/* ============================================================
   DESIGN SYSTEM TOKENS — Muhammad Haris Portfolio
   ============================================================ */
:root {
  /* Colors */
  --primary: #00d4ff;
  --secondary: #0f1729;
  --accent: #ff9f43;
  --accent-hover: #e8872e;
  --background: #0a0a1a;
  --surface: #141428;
  --text: #e4e4ef;
  --text-muted: #7a7a99;
  --border: #1e1e3a;
  --accent-dark: #007a94;
  --accent-light: #66e5ff;
  --glow: rgba(0, 212, 255, 0.2);

  /* RGB for alpha usage */
  --cyan-rgb: 0, 212, 255;
  --amber-rgb: 255, 159, 67;
  --surface-rgb: 20, 20, 40;
  --bg-rgb: 10, 10, 26;

  /* Timing */
  --duration-micro: 150ms;
  --duration-small: 250ms;
  --duration-medium: 500ms;
  --duration-large: 700ms;
  --duration-counter: 2200ms;

  /* Easing */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-overshoot: cubic-bezier(0.34, 1.3, 0.64, 1);
}

/* ===== GLOBAL RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--background);
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.7;
  color: var(--text);
  background-color: var(--background);
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar for Webkit */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--background);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

/* Selection */
::selection {
  background: rgba(0, 212, 255, 0.3);
  color: #fff;
}

/* Skip to content */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--background);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-weight: 500;
  z-index: 10001;
  transition: top 0.3s;
  text-decoration: none;
}
.skip-to-content:focus {
  top: 0;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Focus states */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
}
button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
  border-radius: 8px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 700 !important;
}
h1 {
  font-size: clamp(3rem, 8vw, 7rem) !important;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
h2 {
  font-size: clamp(2rem, 4vw, 3.5rem) !important;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--primary);
}
h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem) !important;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(90deg, #00d4ff, #66e5ff, #ff9f43);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.3));
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  z-index: 1000;
  background: rgba(15, 23, 41, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 212, 255, 0.06);
  opacity: 0;
  transition: background var(--duration-small) var(--ease-standard),
              border-color var(--duration-small) var(--ease-standard),
              box-shadow var(--duration-small) var(--ease-standard);
}
.navbar.navbar-scrolled {
  background: rgba(15, 23, 41, 0.85);
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  transition: text-shadow 0.3s;
  cursor: pointer;
}
.nav-logo:hover {
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}
.nav-logo .logo-m { color: var(--text); }
.nav-logo .logo-h { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-link {
  position: relative;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--duration-small) var(--ease-standard);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
  transition: width var(--duration-small) var(--ease-out);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-cta {
  padding: 8px 20px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: var(--primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: all var(--duration-small) var(--ease-standard);
}
.nav-cta:hover {
  border-color: var(--primary);
  background: rgba(0, 212, 255, 0.08);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1002;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Mobile menu panel */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: rgba(15, 23, 41, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid rgba(0, 212, 255, 0.1);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out);
  padding: 5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu a {
  display: block;
  padding: 1rem 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 212, 255, 0.06);
  transition: color 0.2s;
}
.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--primary);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--background);
  overflow: hidden;
}

/* Gradient mesh background */
.hero-gradient-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  animation: mesh-fade-in 800ms var(--ease-out) 200ms both;
}
.hero-gradient-mesh::before,
.hero-gradient-mesh::after,
.hero-gradient-mesh .mesh-orb {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.hero-gradient-mesh::before {
  width: 60%;
  height: 60%;
  top: 20%;
  left: -10%;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
  animation: mesh-orb-1 25s ease-in-out infinite alternate;
}
.hero-gradient-mesh::after {
  width: 50%;
  height: 50%;
  top: -10%;
  right: -10%;
  background: radial-gradient(ellipse, rgba(255, 159, 67, 0.08) 0%, transparent 70%);
  animation: mesh-orb-2 30s ease-in-out infinite alternate;
}
.hero-gradient-mesh .mesh-orb {
  width: 55%;
  height: 55%;
  bottom: -15%;
  left: 25%;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  animation: mesh-orb-3 22s ease-in-out infinite alternate;
}

@keyframes mesh-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes mesh-orb-1 {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(5%, -8%) scale(1.1); }
  50% { transform: translate(10%, 5%) scale(0.95); }
  75% { transform: translate(-3%, 10%) scale(1.05); }
  100% { transform: translate(7%, -3%) scale(1); }
}
@keyframes mesh-orb-2 {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-8%, 6%) scale(1.05); }
  50% { transform: translate(-4%, -5%) scale(1.1); }
  75% { transform: translate(5%, 8%) scale(0.95); }
  100% { transform: translate(-6%, 3%) scale(1.02); }
}
@keyframes mesh-orb-3 {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(8%, -5%) scale(0.95); }
  50% { transform: translate(-6%, -8%) scale(1.08); }
  75% { transform: translate(3%, 6%) scale(1); }
  100% { transform: translate(-4%, -3%) scale(1.05); }
}

/* Dot grid overlay */
.dot-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: radial-gradient(circle, #e4e4ef 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Particles */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: particles-fade-in 1200ms var(--ease-out) 400ms both;
}
@keyframes particles-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particle-rise linear infinite;
}
.particle--cyan {
  background: rgba(0, 212, 255, 0.6);
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.4);
}
.particle--white {
  background: rgba(228, 228, 239, 0.4);
  box-shadow: 0 0 4px rgba(228, 228, 239, 0.2);
}
.particle--amber {
  background: rgba(255, 159, 67, 0.4);
  box-shadow: 0 0 6px rgba(255, 159, 67, 0.3);
}

@keyframes particle-rise {
  0% { opacity: 0; transform: translateY(100vh) scale(0.5); }
  5% { opacity: 0.7; }
  50% { opacity: 0.4; }
  95% { opacity: 0.1; }
  100% { opacity: 0; transform: translateY(-20px) scale(1); }
}

.particle:nth-child(1)  { left: 3%;  width: 3px; height: 3px; animation-duration: 18s; animation-delay: 0s; }
.particle:nth-child(2)  { left: 10%; width: 4px; height: 4px; animation-duration: 22s; animation-delay: 1.2s; }
.particle:nth-child(3)  { left: 17%; width: 2px; height: 2px; animation-duration: 16s; animation-delay: 3.5s; }
.particle:nth-child(4)  { left: 24%; width: 5px; height: 5px; animation-duration: 20s; animation-delay: 0.8s; }
.particle:nth-child(5)  { left: 31%; width: 3px; height: 3px; animation-duration: 24s; animation-delay: 2.1s; }
.particle:nth-child(6)  { left: 38%; width: 4px; height: 4px; animation-duration: 17s; animation-delay: 4.0s; }
.particle:nth-child(7)  { left: 44%; width: 2px; height: 2px; animation-duration: 21s; animation-delay: 1.5s; }
.particle:nth-child(8)  { left: 51%; width: 6px; height: 6px; animation-duration: 19s; animation-delay: 0.3s; }
.particle:nth-child(9)  { left: 57%; width: 3px; height: 3px; animation-duration: 23s; animation-delay: 2.8s; }
.particle:nth-child(10) { left: 63%; width: 4px; height: 4px; animation-duration: 15s; animation-delay: 1.0s; }
.particle:nth-child(11) { left: 69%; width: 2px; height: 2px; animation-duration: 25s; animation-delay: 3.2s; }
.particle:nth-child(12) { left: 75%; width: 5px; height: 5px; animation-duration: 18s; animation-delay: 0.5s; }
.particle:nth-child(13) { left: 81%; width: 3px; height: 3px; animation-duration: 20s; animation-delay: 2.4s; }
.particle:nth-child(14) { left: 87%; width: 4px; height: 4px; animation-duration: 22s; animation-delay: 4.5s; }
.particle:nth-child(15) { left: 93%; width: 2px; height: 2px; animation-duration: 16s; animation-delay: 1.8s; }
.particle:nth-child(16) { left: 20%; width: 3px; height: 3px; animation-duration: 21s; animation-delay: 5.0s; }
.particle:nth-child(17) { left: 50%; width: 4px; height: 4px; animation-duration: 19s; animation-delay: 3.8s; }
.particle:nth-child(18) { left: 80%; width: 3px; height: 3px; animation-duration: 23s; animation-delay: 2.0s; }
.particle:nth-child(19) { left: 7%;  width: 2px; height: 2px; animation-duration: 20s; animation-delay: 5.5s; }
.particle:nth-child(20) { left: 14%; width: 4px; height: 4px; animation-duration: 17s; animation-delay: 0.7s; }
.particle:nth-child(21) { left: 28%; width: 3px; height: 3px; animation-duration: 24s; animation-delay: 3.0s; }
.particle:nth-child(22) { left: 35%; width: 5px; height: 5px; animation-duration: 19s; animation-delay: 1.3s; }
.particle:nth-child(23) { left: 42%; width: 2px; height: 2px; animation-duration: 22s; animation-delay: 4.2s; }
.particle:nth-child(24) { left: 55%; width: 4px; height: 4px; animation-duration: 16s; animation-delay: 2.5s; }
.particle:nth-child(25) { left: 60%; width: 3px; height: 3px; animation-duration: 21s; animation-delay: 0.2s; }
.particle:nth-child(26) { left: 67%; width: 5px; height: 5px; animation-duration: 18s; animation-delay: 3.7s; }
.particle:nth-child(27) { left: 72%; width: 2px; height: 2px; animation-duration: 25s; animation-delay: 1.6s; }
.particle:nth-child(28) { left: 84%; width: 4px; height: 4px; animation-duration: 20s; animation-delay: 4.8s; }
.particle:nth-child(29) { left: 90%; width: 3px; height: 3px; animation-duration: 17s; animation-delay: 0.9s; }
.particle:nth-child(30) { left: 96%; width: 2px; height: 2px; animation-duration: 23s; animation-delay: 2.3s; }

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 2rem;
}
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fade-up 500ms var(--ease-out) 900ms both;
}
.hero-name {
  font-size: clamp(2.5rem, 6vw, 5rem) !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  opacity: 0;
  animation: hero-name-reveal 100ms linear 600ms both;
}
@keyframes hero-name-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hero-name .letter {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 400ms var(--ease-out);
  color: var(--primary);
}
.hero-name .letter.visible {
  clip-path: inset(0 0 0 0);
}
.gradient-text-letter {
  color: var(--primary) !important;
  -webkit-text-fill-color: var(--primary) !important;
  text-shadow: 0 0 40px rgba(var(--cyan-rgb), 0.3), 0 0 80px rgba(var(--cyan-rgb), 0.15);
}
.hero-name .letter-space {
  display: inline-block;
  width: 0.3em;
}

.hero-tagline {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--text-muted);
  margin-top: 1.5rem;
  opacity: 0;
  animation: fade-up 500ms var(--ease-out) 1000ms both;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fade-up 400ms var(--ease-out) 1100ms both;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  z-index: 2;
  opacity: 0;
  animation: fade-up 400ms var(--ease-out) 1300ms both, scroll-pulse 2s var(--ease-standard) 2s infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 12px;
  padding: 14px 32px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  min-height: 48px;
  background: linear-gradient(135deg, #ff9f43, #e8872e);
  color: #0a0a1a;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform var(--duration-small) var(--ease-out),
              box-shadow var(--duration-small) var(--ease-out);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(255, 159, 67, 0.3);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(255, 159, 67, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 12px;
  padding: 14px 32px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  min-height: 48px;
  background: rgba(20, 20, 40, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--duration-small) var(--ease-standard),
              box-shadow var(--duration-small) var(--ease-standard),
              transform var(--duration-small) var(--ease-out),
              color var(--duration-small) var(--ease-standard);
}
.btn-secondary:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
  transform: translateY(-1px);
  color: var(--accent-light);
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 0;
  position: relative;
}
.section-bg-secondary {
  background-color: var(--secondary);
}
.section-bg-primary {
  background-color: var(--background);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

/* ===== ABOUT / STATS ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-text {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.7;
  color: var(--text);
}
.about-text .highlight {
  color: var(--primary);
  font-weight: 500;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.stat-card {
  background: rgba(20, 20, 40, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-top: 2px solid var(--primary);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  transition: transform var(--duration-small) var(--ease-out),
              box-shadow var(--duration-small) var(--ease-standard);
  cursor: default;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 -2px 20px rgba(0, 212, 255, 0.15), 0 8px 30px rgba(0, 0, 0, 0.3);
}
.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.2);
  line-height: 1;
  font-weight: 400;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ===== EXPERIENCE TIMELINE ===== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow-x: hidden;
}
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), rgba(0, 212, 255, 0.1));
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
  transform: translateX(-50%);
  transform-origin: top;
  transform: translateX(-50%) scaleY(0);
  transition: transform 800ms var(--ease-out);
}
.timeline-line.visible {
  transform: translateX(-50%) scaleY(1);
}

.timeline-entry {
  position: relative;
  display: flex;
  margin-bottom: 3rem;
}
.timeline-entry:last-child {
  margin-bottom: 0;
}

.timeline-entry-left {
  justify-content: flex-start;
  padding-right: calc(50% + 2rem);
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--duration-medium) var(--ease-out),
              transform var(--duration-medium) var(--ease-out);
}
.timeline-entry-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-entry-right {
  justify-content: flex-end;
  padding-left: calc(50% + 2rem);
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--duration-medium) var(--ease-out),
              transform var(--duration-medium) var(--ease-out);
}
.timeline-entry-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-node {
  position: absolute;
  left: 50%;
  top: 2rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
  border: 3px solid var(--secondary);
  transform: translateX(-50%);
  z-index: 2;
}
.timeline-node::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.3);
  animation: node-pulse 2s var(--ease-standard) infinite;
}
@keyframes node-pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.5); opacity: 0; }
}

.timeline-card {
  background: rgba(20, 20, 40, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-radius: 16px;
  padding: 32px;
  transition: transform 400ms var(--ease-out),
              border-color 400ms var(--ease-standard),
              box-shadow 400ms var(--ease-standard);
  width: 100%;
  cursor: default;
}
.timeline-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}
.timeline-card h3 {
  color: var(--text);
  margin-bottom: 0.25rem;
}
.timeline-card .role-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 1rem;
}
.timeline-card ul {
  list-style: none;
  padding: 0;
}
.timeline-card li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}
.timeline-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.timeline-card li .metric {
  color: var(--accent);
  font-weight: 500;
}

/* ===== SKILLS / TECH STACK ===== */
.marquee-section {
  overflow: hidden;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  margin-bottom: 1rem;
}
.marquee-content {
  display: inline-flex;
  gap: 1.5rem;
  animation: marquee-scroll 30s linear infinite;
  white-space: nowrap;
}
.marquee-section:hover .marquee-content {
  animation-play-state: paused;
}
.marquee-reverse .marquee-content {
  animation-direction: reverse;
  animation-duration: 35s;
}
.marquee-content span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 16px;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 9999px;
  white-space: nowrap;
  transition: color var(--duration-small) var(--ease-standard),
              background var(--duration-small) var(--ease-standard);
  cursor: default;
}
.marquee-content span:hover {
  color: var(--primary);
  background: rgba(0, 212, 255, 0.12);
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.skills-categories {
  margin-top: 4rem;
}
.skill-category {
  margin-bottom: 2rem;
}
.skill-category-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.skill-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--primary);
  padding: 8px 16px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 9999px;
  cursor: default;
  opacity: 0;
  transform: translateY(15px) scale(0.9);
  transition: opacity 400ms var(--ease-out),
              transform 400ms var(--ease-out),
              background var(--duration-small) var(--ease-standard),
              box-shadow var(--duration-small) var(--ease-standard);
}
.skill-badge.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.skill-badge:hover {
  background: rgba(0, 212, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
  transform: scale(1.1);
}

/* Stagger delays for skill badges */
.skill-badge:nth-child(1) { transition-delay: 0ms; }
.skill-badge:nth-child(2) { transition-delay: 80ms; }
.skill-badge:nth-child(3) { transition-delay: 160ms; }
.skill-badge:nth-child(4) { transition-delay: 240ms; }
.skill-badge:nth-child(5) { transition-delay: 320ms; }
.skill-badge:nth-child(6) { transition-delay: 400ms; }
.skill-badge:nth-child(7) { transition-delay: 480ms; }
.skill-badge:nth-child(8) { transition-delay: 560ms; }

/* ===== PORTFOLIO / BENTO GRID ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.portfolio-card {
  background: rgba(20, 20, 40, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.95) rotate(-1deg) translateY(20px);
  transition: opacity 600ms var(--ease-out),
              transform 600ms var(--ease-out),
              border-color 400ms var(--ease-standard),
              box-shadow 400ms var(--ease-standard);
}
.portfolio-card.visible {
  opacity: 1;
  transform: scale(1) rotate(0deg) translateY(0);
}
.portfolio-card:nth-child(1) { transition-delay: 0ms; }
.portfolio-card:nth-child(2) { transition-delay: 120ms; }
.portfolio-card:nth-child(3) { transition-delay: 240ms; }
.portfolio-card:nth-child(4) { transition-delay: 360ms; }
.portfolio-card:nth-child(5) { transition-delay: 480ms; }
.portfolio-card:nth-child(6) { transition-delay: 600ms; }
.portfolio-card:nth-child(7) { transition-delay: 720ms; }

.portfolio-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
  transform: scale(1.02);
}

.card-featured {
  grid-column: span 2;
}

.portfolio-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}
.portfolio-card:hover .portfolio-thumb img {
  transform: scale(1.05);
}
.portfolio-thumb-gradient {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(255, 159, 67, 0.1));
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-body {
  padding: 24px 32px 32px;
}
.portfolio-body h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
.portfolio-body .portfolio-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}
.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.portfolio-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 4px 10px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 6px;
  color: var(--primary);
}
.visit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s var(--ease-standard);
}
.portfolio-card:hover .visit-link {
  opacity: 1;
  transform: translateX(0);
}

/* Ghost card */
.ghost-card {
  border: 1px dashed rgba(0, 212, 255, 0.15);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 600ms var(--ease-out),
              transform 600ms var(--ease-out);
  min-height: 200px;
}
.ghost-card.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ===== EDUCATION ===== */
.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.education-card {
  background: rgba(20, 20, 40, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-radius: 16px;
  padding: 32px;
  transition: transform 400ms var(--ease-out),
              border-color 400ms var(--ease-standard),
              box-shadow 400ms var(--ease-standard);
  cursor: default;
}
.education-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}
.education-card h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
}
.education-card .degree {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.education-card .status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.education-card .grad-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.education-card .note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.course-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.course-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 4px 10px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 6px;
  color: var(--primary);
}

.pulse-active {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: active-pulse 2s ease-in-out infinite;
}
@keyframes active-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* ===== CONTACT ===== */
.contact-section {
  position: relative;
  overflow: hidden;
}
.contact-gradient-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.contact-gradient-mesh::before {
  content: '';
  position: absolute;
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-radius: 50%;
  filter: blur(100px);
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
  animation: mesh-orb-1 35s ease-in-out infinite alternate;
}

.contact-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.contact-subheadline {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 1rem auto 2rem;
}
.contact-form-container {
  max-width: 560px;
  margin: 2rem auto 0;
  background: rgba(20, 20, 40, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: left;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.form-input {
  width: 100%;
  border-radius: 12px;
  padding: 14px 18px;
  background: rgba(20, 20, 40, 0.8);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  transition: border-color var(--duration-small) var(--ease-standard),
              box-shadow var(--duration-small) var(--ease-standard);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
  outline: none;
}
.form-input::placeholder {
  color: var(--text-muted);
}
textarea.form-input {
  min-height: 140px;
  resize: vertical;
}
.form-submit {
  width: 100%;
  margin-top: 0.5rem;
}

.contact-info {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 50%;
  transition: color var(--duration-small) var(--ease-standard),
              transform var(--duration-small) var(--ease-out);
}
.social-icon:hover {
  color: var(--primary);
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4));
}
.social-icon svg {
  width: 24px;
  height: 24px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--background);
  border-top: 1px solid rgba(0, 212, 255, 0.15);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer-left .tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-left .copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-center {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.footer-center a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration-small);
}
.footer-center a:hover {
  color: var(--primary);
}
.footer-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.footer-right a {
  color: var(--text-muted);
  transition: color var(--duration-small), transform var(--duration-small);
  display: inline-flex;
}
.footer-right a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}
.footer-right a svg {
  width: 20px;
  height: 20px;
}

/* ===== DIVIDERS ===== */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), transparent);
  margin: 0 auto;
  max-width: 60%;
}
.gradient-divider {
  height: 4rem;
  background: linear-gradient(-45deg, #0a0a1a, #0f1729, rgba(0, 212, 255, 0.05), #0a0a1a);
  background-size: 400% 400%;
  animation: gradient-divider-shift 12s ease infinite;
}
@keyframes gradient-divider-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-medium) var(--ease-out),
              transform var(--duration-medium) var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger items */
.stagger-item {
  opacity: 0;
  transform: translateY(30px);
}
.stagger-item.visible {
  animation: stagger-in var(--duration-medium) var(--ease-out) forwards;
}
@keyframes stagger-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.stagger-item:nth-child(1) { animation-delay: 0ms; }
.stagger-item:nth-child(2) { animation-delay: 120ms; }
.stagger-item:nth-child(3) { animation-delay: 240ms; }
.stagger-item:nth-child(4) { animation-delay: 360ms; }

/* Core keyframes */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Text reveal */
.text-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}
.text-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CUSTOM CURSOR ===== */
.custom-cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.6);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
  pointer-events: none;
  z-index: 10000;
  transition: width 300ms var(--ease-out),
              height 300ms var(--ease-out),
              background 300ms var(--ease-standard),
              margin-left 300ms var(--ease-out),
              margin-top 300ms var(--ease-out);
  margin-left: -4px;
  margin-top: -4px;
  mix-blend-mode: screen;
  display: none;
}
.custom-cursor.cursor-hover {
  width: 40px;
  height: 40px;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.3);
  margin-left: -20px;
  margin-top: -20px;
}
@media (hover: hover) and (pointer: fine) {
  .custom-cursor {
    display: block;
  }
}
@media (hover: none) and (pointer: coarse) {
  .custom-cursor {
    display: none !important;
  }
}

/* ===== FLOATING MOBILE CTA ===== */
.floating-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 2rem;
  background: rgba(15, 23, 41, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  z-index: 998;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-out);
  display: none;
}
.floating-cta.show {
  transform: translateY(0);
}
.floating-cta .btn-primary {
  width: 100%;
  justify-content: center;
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(10, 10, 26, 0.97);
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 1.5rem;
  display: none;
}
.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.cookie-banner p {
  color: #94a3b8;
  font-size: 0.875rem;
  margin: 0;
  flex: 1;
  min-width: 200px;
}
.cookie-banner a {
  color: var(--primary);
  text-decoration: underline;
}
.cookie-btns {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.cookie-btn-decline {
  padding: 0.5rem 1.25rem;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  transition: border-color 0.2s;
}
.cookie-btn-decline:hover {
  border-color: #94a3b8;
}
.cookie-btn-accept {
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  border: none;
  color: var(--background);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: background 0.2s;
}
.cookie-btn-accept:hover {
  background: var(--accent-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-featured {
    grid-column: span 2;
  }
  .section {
    padding: 5rem 0;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .floating-cta { display: block; }

  .timeline-line {
    left: 20px;
    transform: translateX(0) scaleY(0);
  }
  .timeline-line.visible {
    transform: translateX(0) scaleY(1);
  }
  .timeline-entry {
    max-width: 100%;
    box-sizing: border-box;
  }
  .timeline-entry-left,
  .timeline-entry-right {
    padding-left: 50px;
    padding-right: 0;
    justify-content: flex-start;
    max-width: 100%;
    box-sizing: border-box;
  }
  .timeline-entry-left {
    opacity: 0;
    transform: translateX(40px);
  }
  .timeline-card {
    max-width: 100%;
    box-sizing: border-box;
  }
  .timeline-node {
    left: 20px;
    width: 12px;
    height: 12px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  .footer-left { align-items: center; }
}

@media (max-width: 640px) {
  .hero-content {
    padding-left: 2rem;
    padding-right: 2rem;
    text-align: center;
    max-width: 100%;
  }
  .hero h1 {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }
  .hero-cta-group .btn-primary,
  .hero-cta-group .btn-secondary {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }
  .hero-scroll-indicator {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-card {
    padding: 24px;
  }
  .stat-number {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }
  .card-featured {
    grid-column: span 1;
  }
  .visit-link {
    opacity: 1;
    transform: translateX(0);
  }
  .portfolio-thumb {
    height: 160px;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }
  .education-card {
    padding: 24px;
  }

  .contact-form-container {
    padding: 1.5rem;
  }

  .marquee-content span {
    font-size: 0.7rem;
    padding: 6px 12px;
  }
  .marquee-content {
    animation-duration: 60s;
  }
  .marquee-reverse .marquee-content {
    animation-duration: 70s;
  }

  .section {
    padding: 4rem 0;
  }

  .timeline-card {
    padding: 24px;
  }
}

@media (max-width: 374px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .stagger-item,
  .portfolio-card,
  .skill-badge,
  .timeline-entry-left,
  .timeline-entry-right,
  .text-reveal,
  .hero-gradient-mesh,
  .hero-particles,
  .hero-eyebrow,
  .hero-name,
  .hero-name .letter,
  .hero-tagline,
  .hero-cta-group,
  .hero-scroll-indicator,
  .navbar,
  .timeline-line,
  .ghost-card {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .particle { display: none !important; }
  .marquee-content { animation: none !important; }
  .hero-gradient-mesh::before,
  .hero-gradient-mesh::after,
  .hero-gradient-mesh .mesh-orb {
    animation: none !important;
  }
  .custom-cursor { display: none !important; }
  .gradient-divider { animation: none !important; }
}

/* ===== LEGAL PAGES ===== */
.legal-page {
  padding-top: 100px;
  padding-bottom: 4rem;
  min-height: 100vh;
}
.legal-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.legal-page .last-updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.legal-content h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.legal-content h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.legal-content p {
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.7;
}
.legal-content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.legal-content li {
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.7;
}
.legal-content a {
  color: var(--primary);
  text-decoration: underline;
}
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.legal-content th,
.legal-content td {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: left;
  color: var(--text);
  font-size: 0.9rem;
}
.legal-content th {
  background: rgba(20, 20, 40, 0.6);
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.legal-back:hover {
  color: var(--accent-light);
}
