/* ============================================
   PORTFOLIO — Purple/Black/Grey Design System
   ============================================ */

/* ── Design Tokens ── */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.5);
  --shadow-purple: 0 0 30px oklch(0.5 0.25 290 / 0.3);
  --shadow-purple-lg: 0 0 60px oklch(0.5 0.25 290 / 0.4);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

/* ── Dark Theme (Default) ── */
:root, [data-theme="dark"] {
  --color-bg:              #080810;
  --color-bg-2:            #0c0c18;
  --color-surface:         #0f0f1e;
  --color-surface-2:       #141428;
  --color-surface-3:       #1a1a30;
  --color-border:          rgba(124, 58, 237, 0.15);
  --color-border-subtle:   rgba(255, 255, 255, 0.06);
  --color-divider:         rgba(255, 255, 255, 0.06);

  --color-text:            #f0eeff;
  --color-text-muted:      #8b84b0;
  --color-text-faint:      #3d3860;
  --color-text-inverse:    #0a0a14;

  --color-purple:          #7c3aed;
  --color-purple-light:    #a78bfa;
  --color-purple-glow:     #6d28d9;
  --color-indigo:          #4f46e5;
  --color-violet:          #8b5cf6;

  --color-primary:         #7c3aed;
  --color-primary-hover:   #6d28d9;
  --color-primary-light:   #a78bfa;
}

[data-theme="light"] {
  --color-bg:              #faf9ff;
  --color-bg-2:            #f5f3ff;
  --color-surface:         #ffffff;
  --color-surface-2:       #f0eeff;
  --color-surface-3:       #ebe8ff;
  --color-border:          rgba(124, 58, 237, 0.2);
  --color-border-subtle:   rgba(0, 0, 0, 0.06);
  --color-divider:         rgba(0, 0, 0, 0.06);

  --color-text:            #1a1040;
  --color-text-muted:      #6b5ea0;
  --color-text-faint:      #a89ed0;
  --color-text-inverse:    #f0eeff;

  --color-purple:          #6d28d9;
  --color-purple-light:    #7c3aed;
  --color-purple-glow:     #5b21b6;
  --color-indigo:          #4338ca;
  --color-violet:          #7c3aed;

  --color-primary:         #6d28d9;
  --color-primary-hover:   #5b21b6;
  --color-primary-light:   #7c3aed;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:              #faf9ff;
    --color-bg-2:            #f5f3ff;
    --color-surface:         #ffffff;
    --color-surface-2:       #f0eeff;
    --color-surface-3:       #ebe8ff;
    --color-border:          rgba(124, 58, 237, 0.2);
    --color-border-subtle:   rgba(0, 0, 0, 0.06);
    --color-divider:         rgba(0, 0, 0, 0.06);
    --color-text:            #1a1040;
    --color-text-muted:      #6b5ea0;
    --color-text-faint:      #a89ed0;
    --color-text-inverse:    #f0eeff;
    --color-primary:         #6d28d9;
    --color-primary-hover:   #5b21b6;
    --color-primary-light:   #7c3aed;
  }
}

/* ============================================
   CANVAS BACKGROUND
   ============================================ */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, oklch(0.5 0.25 290 / 0.12) 0%, transparent 70%);
  transition: transform 0.05s linear, opacity 0.3s ease;
  will-change: transform;
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  background: var(--color-purple-light);
  box-shadow: 0 0 10px var(--color-purple), 0 0 20px var(--color-purple-light);
  transition: transform 0.1s var(--ease-out), width 0.2s var(--ease-out), height 0.2s var(--ease-out);
  will-change: transform;
}

.cursor-dot.cursor-hover {
  width: 14px;
  height: 14px;
  background: var(--color-primary-light);
}

/* ============================================
   SCROLL PROGRESS
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-purple), var(--color-indigo), var(--color-violet));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - var(--space-8));
  max-width: 900px;
  transition: top 0.3s var(--ease-out);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: color-mix(in oklch, var(--color-surface) 80%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md), 0 0 40px oklch(0.5 0.25 290 / 0.08);
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity var(--transition-interactive), transform var(--transition-interactive);
}
.nav-logo:hover { opacity: 0.85; transform: scale(1.05); }

.nav-links {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  position: relative;
  transition: color var(--transition-interactive), background var(--transition-interactive);
  letter-spacing: 0.01em;
}
.nav-link:hover { color: var(--color-text); background: var(--color-border); }
.nav-link.active {
  color: var(--color-text);
  background: linear-gradient(135deg, color-mix(in oklch, var(--color-purple) 20%, transparent), color-mix(in oklch, var(--color-indigo) 15%, transparent));
  border: 1px solid var(--color-border);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-resume-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  background: linear-gradient(135deg, var(--color-purple), var(--color-indigo));
  border: none;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), opacity var(--transition-interactive);
  white-space: nowrap;
}

.nav-cv-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  text-decoration: none;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  white-space: nowrap;
  transition: color var(--transition-interactive),
              border-color var(--transition-interactive),
              background var(--transition-interactive),
              transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.nav-cv-btn:hover {
  color: var(--color-purple-light);
  border-color: color-mix(in oklch, var(--color-purple) 55%, transparent);
  background: color-mix(in oklch, var(--color-purple) 10%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px oklch(0.5 0.25 290 / 0.2);
}
.nav-cv-btn:active { transform: translateY(0); }
.nav-cv-btn svg { width: 14px; height: 14px; }

/* Hide on very small screens (still accessible via hamburger menu) */
@media (max-width: 520px) {
  .nav-cv-btn { display: none; }
}

/* Mobile menu CV link styling */
.mobile-cv-link {
  color: var(--color-purple-light) !important;
  border-top: 1px solid var(--color-border-subtle);
  margin-top: var(--space-2);
  padding-top: var(--space-4) !important;
}


.nav-resume-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px oklch(0.5 0.25 290 / 0.4);
  opacity: 0.9;
}
.nav-resume-btn:active { transform: translateY(0); }

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-2);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  background: color-mix(in oklch, var(--color-surface) 95%, transparent);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-top: var(--space-2);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
}
.mobile-link {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.mobile-link:hover { color: var(--color-text); background: var(--color-border); }

/* ============================================
   SOCIAL SIDEBAR
   ============================================ */
.social-sidebar {
  position: fixed;
  left: var(--space-6);
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  z-index: 50;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text-faint);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: color var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.social-link:hover {
  color: var(--color-purple-light);
  transform: translateY(-2px);
  box-shadow: 0 0 12px oklch(0.5 0.25 290 / 0.3);
}
.social-link svg { width: 18px; height: 18px; }

.social-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-text-faint), transparent);
}

/* ============================================
   SECTIONS BASE
   ============================================ */
.section {
  position: relative;
  z-index: 2;
}

.section-container {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: clamp(var(--space-16), 10vw, var(--space-32)) var(--space-8);
}

.section-header {
  margin-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-purple-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  opacity: 0.8;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 55ch;
  margin-top: var(--space-4);
  line-height: 1.7;
}

/* ============================================
   GRADIENT TEXT
   ============================================ */
.gradient-text {
  background: linear-gradient(135deg, var(--color-purple-light) 0%, var(--color-indigo) 50%, var(--color-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight-text {
  color: var(--color-purple-light);
  font-weight: 600;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.6s; }
.delay-5 { animation-delay: 0.8s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   ICON SIZES
   ============================================ */
.icon-sm svg, .icon-sm { width: 16px; height: 16px; }
.icon-md svg, .icon-md { width: 20px; height: 20px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--color-purple), var(--color-indigo));
  text-decoration: none;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  border: none;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), opacity var(--transition-interactive);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, white, transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: inherit;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px oklch(0.5 0.25 290 / 0.45);
}
.btn-primary:hover::after { opacity: 0.08; }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  text-decoration: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  transition: color var(--transition-interactive), border-color var(--transition-interactive), transform var(--transition-interactive), background var(--transition-interactive);
}
.btn-ghost:hover {
  color: var(--color-text);
  border-color: color-mix(in oklch, var(--color-purple) 50%, transparent);
  background: color-mix(in oklch, var(--color-purple) 8%, transparent);
  transform: translateY(-1px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-12);
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: clamp(100px, 12vw, 140px) var(--space-8) var(--space-16);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-greeting {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-purple-light);
  background: color-mix(in oklch, var(--color-purple) 12%, transparent);
  border: 1px solid color-mix(in oklch, var(--color-purple) 25%, transparent);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  width: fit-content;
  animation: fadeInUp 0.6s var(--ease-out) forwards;
  opacity: 0;
}

.tag-bracket {
  color: var(--color-text-faint);
  opacity: 0.7;
}

.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  animation: fadeInUp 0.7s var(--ease-out) 0.1s forwards;
  opacity: 0;
}

.name-line { display: block; }
.name-plain { color: var(--color-text); }
.name-gradient {
  background: linear-gradient(135deg, var(--color-purple-light) 0%, #c4b5fd 30%, var(--color-indigo) 70%, var(--color-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text-muted);
  animation: fadeInUp 0.7s var(--ease-out) 0.2s forwards;
  opacity: 0;
}

.role-static { color: var(--color-text-muted); }

.role-rotate-wrapper {
  overflow: hidden;
  height: 1.3em;
  display: inline-flex;
  align-items: center;
}

.role-rotate {
  color: var(--color-purple-light);
  font-weight: 600;
  display: inline-block;
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}

.hero-bio {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 50ch;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-top: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-subtle);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  background: linear-gradient(135deg, var(--color-purple-light), var(--color-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border-subtle);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 500px;
  animation: fadeInUp 0.8s var(--ease-out) 0.3s forwards;
  opacity: 0;
}

/* Avatar ring */
.avatar-ring {
  position: relative;
  width: 280px;
  height: 280px;
}

.avatar-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-surface-2), var(--color-surface-3));
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px oklch(0.5 0.25 290 / 0.2), inset 0 0 40px oklch(0.5 0.25 290 / 0.05);
}

.avatar-ring-inner::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--color-purple), var(--color-indigo), transparent 60%, var(--color-purple));
  z-index: -1;
  animation: spin 4s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.avatar-placeholder {
  width: 160px;
  height: 160px;
}

/* Orbits */
.orbit {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  border: 1px dashed color-mix(in oklch, var(--color-purple) 20%, transparent);
}
.orbit-1 { animation: orbitSpin 8s linear infinite; width: 320px; height: 320px; top: -20px; left: -20px; }
.orbit-2 { animation: orbitSpin 12s linear infinite reverse; width: 370px; height: 370px; top: -45px; left: -45px; }
.orbit-3 { animation: orbitSpin 16s linear infinite; width: 420px; height: 420px; top: -70px; left: -70px; }

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

.orbit-dot {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

/* Floating cards */
.floating-card {
  position: absolute;
  background: color-mix(in oklch, var(--color-surface-2) 90%, transparent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

.code-card {
  left: 50%;
  transform: translateX(-50%);
  bottom: -20px;
  min-width: 220px;
  z-index: 3;
}

.code-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-red { background: #ff5f56; }
.code-yellow { background: #ffbd2e; }
.code-green { background: #27c93f; }

.code-filename {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-left: var(--space-2);
}

.code-content {
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  overflow: hidden;
}

.code-kw { color: #c4b5fd; }
.code-var { color: #fbbf24; }
.code-key { color: #93c5fd; }
.code-str { color: #86efac; }
.code-bool { color: #f9a8d4; }

.status-card {
  right: -10px;
  top: -30px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: statusPulse 2s ease-in-out infinite;
}
.status-dot-inline {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: statusPulse 2s ease-in-out infinite;
  margin-right: var(--space-2);
  vertical-align: middle;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.status-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  animation: fadeInUp 1s var(--ease-out) 1.2s forwards;
  opacity: 0;
}

.scroll-arrow {
  animation: bounceDown 1.5s ease-in-out infinite;
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Typewriter tag */
.typewriter-tag {
  position: relative;
  min-width: 200px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
  background: linear-gradient(180deg, transparent, color-mix(in oklch, var(--color-purple) 3%, transparent) 50%, transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.about-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-purple), transparent);
  opacity: 0.5;
}
.about-card:hover {
  border-color: color-mix(in oklch, var(--color-purple) 30%, transparent);
  box-shadow: 0 0 30px oklch(0.5 0.25 290 / 0.1);
}

.card-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-purple-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
  opacity: 0.8;
}

.about-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.about-langs {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.lang-chip {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
}

/* Bento grid */
.about-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.bento-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: border-color var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.bento-card:hover {
  border-color: color-mix(in oklch, var(--color-purple) 35%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px oklch(0.5 0.25 290 / 0.12);
}

.bento-icon { color: var(--color-purple-light); flex-shrink: 0; width: 18px; height: 18px; }
.bento-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bento-label { font-size: var(--text-xs); color: var(--color-text-faint); font-family: var(--font-mono); letter-spacing: 0.05em; }
.bento-value { font-size: var(--text-sm); color: var(--color-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bento-wide {
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: flex-start;
}

.interests-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.interests-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.interest-tag {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: color-mix(in oklch, var(--color-purple) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--color-purple) 20%, transparent);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  transition: background var(--transition-interactive), color var(--transition-interactive);
}
.interest-tag:hover {
  background: color-mix(in oklch, var(--color-purple) 20%, transparent);
  color: var(--color-purple-light);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-section {
  background: linear-gradient(180deg, transparent, color-mix(in oklch, var(--color-indigo) 3%, transparent) 50%, transparent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.project-card:hover {
  border-color: color-mix(in oklch, var(--color-purple) 40%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px oklch(0 0 0 / 0.3), 0 0 40px oklch(0.5 0.25 290 / 0.12);
}
.project-card:hover .project-glow {
  opacity: 1;
}

.project-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(0.5 0.25 290 / 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project-card-featured {
  grid-column: span 1;
  border-color: color-mix(in oklch, var(--color-purple) 30%, transparent);
  background: linear-gradient(135deg, var(--color-surface) 0%, color-mix(in oklch, var(--color-purple) 5%, var(--color-surface)) 100%);
}

.project-featured-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--color-purple-light);
  background: color-mix(in oklch, var(--color-purple) 15%, transparent);
  border: 1px solid color-mix(in oklch, var(--color-purple) 30%, transparent);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: fit-content;
}

.project-concept-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  background: color-mix(in oklch, var(--color-text-muted) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--color-text-muted) 25%, transparent);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: fit-content;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
}

.project-links {
  display: flex;
  gap: var(--space-2);
}

.project-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-text-faint);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: color var(--transition-interactive), background var(--transition-interactive), border-color var(--transition-interactive), transform var(--transition-interactive);
}
.project-link-btn:hover {
  color: var(--color-purple-light);
  background: color-mix(in oklch, var(--color-purple) 15%, transparent);
  border-color: color-mix(in oklch, var(--color-purple) 30%, transparent);
  transform: scale(1.1);
}
.project-link-btn svg { width: 14px; height: 14px; }

.project-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-text-faint);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.project-status-icon svg { width: 14px; height: 14px; }

.project-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
}

.project-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.75;
  flex: 1;
  max-width: none;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--color-text-faint);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-subtle);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  transition: color var(--transition-interactive), border-color var(--transition-interactive);
}
.project-card:hover .tag {
  color: var(--color-text-muted);
  border-color: color-mix(in oklch, var(--color-purple) 20%, transparent);
}

/* ============================================
   COMPETITIONS
   ============================================ */
.competitions-section {
  background: linear-gradient(180deg, transparent, color-mix(in oklch, var(--color-purple) 3%, transparent) 50%, transparent);
}

.competitions-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.competition-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--space-6);
  position: relative;
}

.comp-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.comp-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}
.comp-badge svg { width: 20px; height: 20px; }

.comp-badge.gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1000;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}
.comp-badge.silver {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: white;
  box-shadow: 0 0 20px rgba(148, 163, 184, 0.3);
}
.comp-badge.bronze {
  background: linear-gradient(135deg, #cd7f32, #a0522d);
  color: white;
  box-shadow: 0 0 20px rgba(205, 127, 50, 0.3);
}
.comp-badge.purple {
  background: linear-gradient(135deg, var(--color-purple), var(--color-indigo));
  color: white;
  box-shadow: 0 0 20px oklch(0.5 0.25 290 / 0.3);
}

.comp-connector {
  width: 2px;
  flex: 1;
  background: linear-gradient(to bottom, var(--color-border), transparent);
  min-height: 40px;
  margin: var(--space-2) 0;
}

.comp-content {
  padding-bottom: var(--space-10);
}

.comp-year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.comp-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.comp-org {
  font-size: var(--text-sm);
  color: var(--color-purple-light);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.comp-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-3);
  max-width: 65ch;
}

.comp-result {
  display: inline-block;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}
.result-gold { background: rgba(251,191,36,0.1); color: #fbbf24; border: 1px solid rgba(251,191,36,0.2); }
.result-silver { background: rgba(148,163,184,0.1); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }
.result-bronze { background: rgba(205,127,50,0.1); color: #cd7f32; border: 1px solid rgba(205,127,50,0.2); }
.result-purple { background: color-mix(in oklch, var(--color-purple) 12%, transparent); color: var(--color-purple-light); border: 1px solid color-mix(in oklch, var(--color-purple) 25%, transparent); }

/* ============================================
   TECH STACK
   ============================================ */
.stack-section {
  background: linear-gradient(180deg, transparent, color-mix(in oklch, var(--color-indigo) 3%, transparent) 50%, transparent);
}

.stack-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.stack-category {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.stack-category:hover {
  border-color: color-mix(in oklch, var(--color-purple) 25%, transparent);
  box-shadow: 0 0 30px oklch(0.5 0.25 290 / 0.08);
}

.stack-cat-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.stack-cat-icon {
  font-family: var(--font-mono);
  color: var(--color-purple-light);
  font-size: var(--text-base);
}

.stack-chips {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stack-chip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.chip-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.chip-bar {
  flex: 1;
  height: 3px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-left: auto;
  min-width: 60px;
  max-width: 80px;
}

.chip-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-purple), var(--color-violet));
  border-radius: var(--radius-full);
  width: 0;
  transition: width 1.2s var(--ease-out);
}

/* Marquee */
.tech-marquee-wrapper {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: var(--space-5) 0;
  position: relative;
}
.tech-marquee-wrapper::before,
.tech-marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.tech-marquee-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, var(--color-surface), transparent);
}
.tech-marquee-wrapper::after {
  right: 0;
  background: linear-gradient(-90deg, var(--color-surface), transparent);
}

.tech-marquee { overflow: hidden; }

.marquee-track {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  will-change: transform;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-item {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.marquee-sep {
  color: var(--color-purple);
  opacity: 0.5;
  font-size: 10px;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-section {
  background: linear-gradient(180deg, transparent, color-mix(in oklch, var(--color-purple) 4%, transparent) 50%, transparent);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-10);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  transition: border-color var(--transition-interactive), transform var(--transition-interactive);
}
.contact-card:hover {
  border-color: color-mix(in oklch, var(--color-purple) 35%, transparent);
  transform: translateX(4px);
}

.contact-icon { color: var(--color-purple-light); width: 20px; height: 20px; flex-shrink: 0; }
.contact-label { font-size: var(--text-xs); color: var(--color-text-faint); font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
.contact-value { font-size: var(--text-sm); color: var(--color-text); font-weight: 500; text-decoration: none; transition: color var(--transition-interactive); }
a.contact-value:hover { color: var(--color-purple-light); }

.social-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.social-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  text-decoration: none;
  transition: border-color var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive);
  position: relative;
  overflow: hidden;
}
.social-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in oklch, var(--color-purple) 8%, transparent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.social-card:hover {
  border-color: color-mix(in oklch, var(--color-purple) 40%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px oklch(0.5 0.25 290 / 0.15);
}
.social-card:hover::after { opacity: 1; }

.social-card-icon { color: var(--color-purple-light); width: 22px; height: 22px; flex-shrink: 0; position: relative; z-index: 1; }
.social-card-label { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); position: relative; z-index: 1; }
.social-card-handle { font-size: var(--text-xs); color: var(--color-text-faint); font-family: var(--font-mono); position: relative; z-index: 1; }
.social-arrow { color: var(--color-text-faint); margin-left: auto; width: 16px; height: 16px; position: relative; z-index: 1; transition: transform var(--transition-interactive), color var(--transition-interactive); }
.social-card:hover .social-arrow { transform: translate(2px, -2px); color: var(--color-purple-light); }

/* Contact form */
.contact-form-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}
.contact-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-purple), transparent);
  opacity: 0.5;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.form-input {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  width: 100%;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  outline: none;
}
.form-input:focus {
  border-color: color-mix(in oklch, var(--color-purple) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-purple) 12%, transparent);
}
.form-input::placeholder { color: var(--color-text-faint); }

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-body);
}

.form-submit {
  width: 100%;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.form-success {
  display: none;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.form-success.show { display: flex; }
.form-success svg { width: 16px; height: 16px; }

.form-error {
  display: none;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
}
.form-error.show { display: flex; }
.form-error svg { width: 16px; height: 16px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: var(--space-8) var(--space-8);
  position: relative;
  z-index: 2;
}

.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  max-width: none;
}

.footer-credit {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color var(--transition-interactive);
  font-family: var(--font-mono);
}
.footer-credit:hover { color: var(--color-purple-light); }

.footer-right {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.footer-social {
  display: flex;
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color var(--transition-interactive), transform var(--transition-interactive);
}
.footer-social:hover { color: var(--color-purple-light); transform: translateY(-1px); }
.footer-social svg { width: 16px; height: 16px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-12);
    padding-top: 120px;
  }
  .hero-content { align-items: center; }
  .hero-visual { height: 350px; }
  .hero-bio { text-align: center; }

  .about-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-categories { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }
  .social-sidebar { display: none; }

  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-stats { flex-wrap: wrap; gap: var(--space-4); }

  .projects-grid { grid-template-columns: 1fr; }
  .stack-categories { grid-template-columns: 1fr; }
  .about-bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: 1; }

  .competition-item { grid-template-columns: 44px 1fr; gap: var(--space-4); }
  .comp-connector { display: none; }
  .comp-content { padding-bottom: var(--space-8); }

  .section-container { padding-inline: var(--space-5); }

  .cursor-glow, .cursor-dot { display: none; }
  body { cursor: auto; }
  button, a { cursor: auto; }

  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { text-align: center; justify-content: center; }
  .code-card { left: -20px; }
}

/* ============================================
   EXPERIENCE TIMELINE (in About section)
   ============================================ */
.experience-timeline {
  margin-top: clamp(var(--space-12), 6vw, var(--space-20));
  padding-top: clamp(var(--space-10), 5vw, var(--space-16));
  border-top: 1px solid var(--color-border-subtle);
}

.timeline-heading {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-purple-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-8);
  opacity: 0.8;
}

.timeline-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  position: relative;
}

.timeline-items::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-purple), var(--color-indigo), transparent);
  opacity: 0.3;
}

.tl-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
  transition: border-color var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.tl-item:hover {
  border-color: color-mix(in oklch, var(--color-purple) 35%, transparent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px oklch(0.5 0.25 290 / 0.12);
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-purple);
  box-shadow: 0 0 10px var(--color-purple);
  margin-bottom: var(--space-4);
}

.tl-body { display: flex; flex-direction: column; gap: var(--space-1); }

.tl-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.tl-date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.05em;
}

.active-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  color: #22c55e;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

.tl-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  max-width: none;
}

.tl-org {
  font-size: var(--text-sm);
  color: var(--color-purple-light);
  font-weight: 500;
}

.tl-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: var(--space-2);
  max-width: none;
}

@media (max-width: 900px) {
  .timeline-items {
    grid-template-columns: 1fr;
  }
  .timeline-items::before { display: none; }
}

/* ============================================
   AI CHAT WIDGET
   ============================================ */
.chat-widget {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 500;
}

.chat-toggle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--color-purple), var(--color-indigo));
  box-shadow: 0 4px 20px oklch(0.5 0.25 290 / 0.45);
  cursor: pointer;
  animation: chatPulse 2.4s ease-in-out infinite;
  transition: transform var(--transition-interactive);
}
.chat-toggle-btn:hover { transform: scale(1.08); }
.chat-toggle-btn svg { width: 24px; height: 24px; }

@keyframes chatPulse {
  0%, 100% { box-shadow: 0 4px 20px oklch(0.5 0.25 290 / 0.45); }
  50% { box-shadow: 0 4px 28px oklch(0.5 0.25 290 / 0.7); }
}

.chat-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  bottom: calc(100% + var(--space-4));
  width: min(360px, calc(100vw - var(--space-8)));
  height: min(480px, 70vh);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.chat-panel.open { display: flex; }

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-subtle);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
}

.chat-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.chat-close-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.chat-close-btn svg { width: 16px; height: 16px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat-msg {
  max-width: 85%;
  font-size: var(--text-sm);
  line-height: 1.6;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
}
.chat-msg-user {
  align-self: flex-end;
  color: white;
  background: linear-gradient(135deg, var(--color-purple), var(--color-indigo));
}
.chat-msg-bot {
  align-self: flex-start;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-subtle);
}
.chat-msg-error {
  align-self: flex-start;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.chat-typing-indicator {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
}
.chat-typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-faint);
  animation: chatTypingBounce 1.2s ease-in-out infinite;
}
.chat-typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-indicator span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input-row {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.chat-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  outline: none;
  transition: border-color var(--transition-interactive);
}
.chat-input:focus { border-color: var(--color-purple); }

.chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--color-purple), var(--color-indigo));
  cursor: pointer;
  transition: transform var(--transition-interactive), opacity var(--transition-interactive);
}
.chat-send-btn:hover { transform: scale(1.08); }
.chat-send-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.chat-send-btn svg { width: 16px; height: 16px; }

@media (max-width: 480px) {
  .chat-widget {
    right: var(--space-4);
    bottom: var(--space-4);
  }
  .chat-panel {
    width: calc(100vw - var(--space-8));
    height: min(420px, 65vh);
  }
}
