/* ─────────────────────────────────────────
       ART DIRECTION:
       Concept: Fintech / developer — sharp, data-forward, night-terminal energy
       Palette: Deep navy-black surfaces, electric green primary accent (terminal/Bloomberg vibes)
       Typography: Cabinet Grotesk (display) + Satoshi (body) — technical authority with personality
       Density: spacious but precise, card-heavy
    ───────────────────────────────────────── */

    /* === TOKENS === */
    :root, [data-theme="light"] {
      --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-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

      --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;

      --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
      --radius-xl: 1rem; --radius-full: 9999px;
      --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

      --content-narrow: 640px; --content-default: 960px; --content-wide: 1200px;
      --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
      --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
      --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

      /* Light palette — inverted fintech (clean, Bloomberg terminal on white) */
      --color-bg:             #f4f4f6;
      --color-surface:        #ffffff;
      --color-surface-2:      #f9f9fb;
      --color-surface-offset: #eeeef2;
      --color-surface-offset-2: #e4e4ea;
      --color-divider:        #d8d8e0;
      --color-border:         #ccccd6;
      --color-text:           #111118;
      --color-text-muted:     #6b6b7a;
      --color-text-faint:     #aaaab6;
      --color-text-inverse:   #f4f4f6;

      --color-primary:        #00b386;
      --color-primary-hover:  #00906b;
      --color-primary-active: #006d50;
      --color-primary-highlight: #cdf0e4;

      --color-accent2:        #5b5bd6;
      --color-accent2-hover:  #4646b8;

      --shadow-sm: 0 1px 2px oklch(0.15 0.02 260 / 0.06);
      --shadow-md: 0 4px 12px oklch(0.15 0.02 260 / 0.1);
      --shadow-lg: 0 12px 32px oklch(0.15 0.02 260 / 0.14);
    }

    [data-theme="dark"] {
      --color-bg:             #0b0c10;
      --color-surface:        #111318;
      --color-surface-2:      #16181f;
      --color-surface-offset: #1c1f28;
      --color-surface-offset-2: #21242e;
      --color-divider:        #252830;
      --color-border:         #2e3240;
      --color-text:           #e8e9f0;
      --color-text-muted:     #8a8d99;
      --color-text-faint:     #4a4d5a;
      --color-text-inverse:   #0b0c10;
      --color-primary:        #00e5a8;
      --color-primary-hover:  #00c490;
      --color-primary-active: #00a378;
      --color-primary-highlight: #0d2e24;
      --color-accent2:        #8b8bff;
      --color-accent2-hover:  #7272ee;
      --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
      --shadow-md: 0 4px 12px oklch(0 0 0 / 0.45);
      --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.6);
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme]) {
        --color-bg: #0b0c10; --color-surface: #111318; --color-surface-2: #16181f;
        --color-surface-offset: #1c1f28; --color-surface-offset-2: #21242e;
        --color-divider: #252830; --color-border: #2e3240;
        --color-text: #e8e9f0; --color-text-muted: #8a8d99; --color-text-faint: #4a4d5a;
        --color-text-inverse: #0b0c10;
        --color-primary: #00e5a8; --color-primary-hover: #00c490; --color-primary-active: #00a378;
        --color-primary-highlight: #0d2e24;
        --color-accent2: #8b8bff; --color-accent2-hover: #7272ee;
        --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
        --shadow-md: 0 4px 12px oklch(0 0 0 / 0.45);
        --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.6);
      }
    }

    /* === BASE === */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html {
      -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility; scroll-behavior: smooth;
      scroll-padding-top: var(--space-16);
    }
    body {
      min-height: 100dvh;
      cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%3E%0A%20%20%3C%21--%20Green%20staircase%20up%20--%3E%0A%20%20%3Crect%20x%3D%220%22%20%20y%3D%2212%22%20width%3D%223%22%20height%3D%224%22%20rx%3D%220.3%22%20fill%3D%22%2300e5a8%22/%3E%0A%20%20%3Crect%20x%3D%224%22%20%20y%3D%228%22%20%20width%3D%223%22%20height%3D%224%22%20rx%3D%220.3%22%20fill%3D%22%2300e5a8%22/%3E%0A%20%20%3Crect%20x%3D%228%22%20%20y%3D%224%22%20%20width%3D%223%22%20height%3D%224%22%20rx%3D%220.3%22%20fill%3D%22%2300e5a8%22/%3E%0A%20%20%3C%21--%20Red%20staircase%20down%20%28mirror%29%20--%3E%0A%20%20%3Crect%20x%3D%2213%22%20y%3D%224%22%20%20width%3D%223%22%20height%3D%224%22%20rx%3D%220.3%22%20fill%3D%22%23e05252%22/%3E%0A%20%20%3Crect%20x%3D%2217%22%20y%3D%228%22%20%20width%3D%223%22%20height%3D%224%22%20rx%3D%220.3%22%20fill%3D%22%23e05252%22/%3E%0A%20%20%3Crect%20x%3D%2221%22%20y%3D%2212%22%20width%3D%223%22%20height%3D%224%22%20rx%3D%220.3%22%20fill%3D%22%23e05252%22/%3E%0A%3C/svg%3E") 12 4, crosshair; line-height: 1.6;
      font-family: var(--font-body, sans-serif);
      font-size: var(--text-base);
      color: var(--color-text);
      background-color: var(--color-bg);
    }
    img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
    /* Exempt sprite sheets from the height:auto reset */
    .climber-sprite { height: 192px !important; }
    ul[role="list"], ol[role="list"] { list-style: none; }
    input, button, textarea, select { font: inherit; color: inherit; }
    h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; }
    p, li { text-wrap: pretty; max-width: 68ch; }
    button { cursor: pointer; background: none; border: none; }
    a, button, [role="button"], input, textarea, select {
      transition: color var(--transition-interactive), background var(--transition-interactive),
                  border-color var(--transition-interactive), box-shadow var(--transition-interactive),
                  opacity var(--transition-interactive);
    }
    ::selection { background: oklch(from var(--color-primary) l c h / 0.22); color: var(--color-text); }
    :focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: var(--radius-sm); }
    @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;
      }
    }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

    /* === LAYOUT === */
    .container {
      max-width: min(1180px, calc(100% - 2 * var(--space-6)));
      margin-inline: auto;
      padding-inline: 0;
      position: relative;
    }
    .container--wide {
      max-width: min(1320px, calc(100% - 2 * var(--space-6)));
      margin-inline: auto;
      padding-inline: 0;
      position: relative;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 12% 18%, color-mix(in oklab, var(--color-primary) 10%, transparent), transparent 22%),
        radial-gradient(circle at 82% 12%, color-mix(in oklab, var(--color-accent2) 7%, transparent), transparent 18%),
        linear-gradient(to right, transparent 0, transparent calc(100% - 1px), oklch(from var(--color-divider) l c h / 0.2) calc(100% - 1px));
      background-size: 100% 100%, 100% 100%, 24px 24px;
      opacity: 0.7;
      mix-blend-mode: screen;
      z-index: -2;
    }

    body::after {
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      background-image:
        linear-gradient(oklch(from var(--color-text) l c h / 0.015) 1px, transparent 1px),
        linear-gradient(90deg, oklch(from var(--color-text) l c h / 0.015) 1px, transparent 1px);
      background-size: 120px 120px;
      mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
      z-index: -1;
    }

    /* === SCROLLBAR (dark mode terminal feel) === */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--color-bg); }
    ::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-full); }
    ::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

    /* === CURSOR BLINK === */
    @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
    .cursor { display: inline-block; width: 3px; height: 1em; background: var(--color-primary); margin-left: 2px; vertical-align: text-bottom; animation: blink 1s step-end infinite; }

    /* === NAV === */
    .nav {
      position: sticky; top: 0; z-index: 50;
      background: oklch(from var(--color-bg) l c h / 0.85);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--color-divider);
      transition: box-shadow var(--transition-interactive);
    }
    .nav--scrolled { box-shadow: var(--shadow-sm); }
    .nav-inner {
      display: flex; align-items: center; justify-content: space-between;
      padding-block: var(--space-4);
    }
    .nav-logo {
      display: flex; align-items: center; gap: var(--space-3);
      text-decoration: none; color: var(--color-text);
      font-family: var(--font-display); font-weight: 800;
      font-size: var(--text-sm); letter-spacing: -0.01em;
    }
    .nav-logo svg { flex-shrink: 0; }
    .nav-links {
      display: flex; align-items: center; gap: var(--space-4);
      list-style: none;
    }
    .nav-links li { display: flex; }
    .nav-links a {
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
      min-height: 40px;
      padding: 0.45rem 0.7rem;
      border-radius: var(--radius-full);
      border: 1px solid transparent;
      background: transparent;
      text-decoration: none; color: var(--color-text-muted);
      font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.01em;
      transition:
        color var(--transition-interactive),
        border-color var(--transition-interactive),
        background var(--transition-interactive),
        transform var(--transition-interactive);
    }
    .nav-links a:hover {
      color: var(--color-text);
      border-color: color-mix(in oklab, var(--color-primary) 24%, var(--color-border));
      background: color-mix(in oklab, var(--color-primary) 6%, transparent);
      transform: translateY(-1px);
    }
    .nav-candle {
      position: relative;
      width: 0.34rem;
      border-radius: 999px;
      background: linear-gradient(to top, var(--color-primary-active), var(--color-primary));
      box-shadow: 0 0 10px color-mix(in oklab, var(--color-primary) 22%, transparent);
      flex-shrink: 0;
    }
    .nav-candle::before,
    .nav-candle::after {
      content: '';
      position: absolute;
      left: 50%;
      width: 1px;
      transform: translateX(-50%);
      background: color-mix(in oklab, var(--color-primary) 85%, white 15%);
      opacity: 0.95;
    }
    .nav-candle::before { bottom: 100%; }
    .nav-candle::after { top: 100%; }
    .nav-links li:nth-child(1) .nav-candle { height: 0.5rem; }
    .nav-links li:nth-child(1) .nav-candle::before { height: 0.22rem; }
    .nav-links li:nth-child(1) .nav-candle::after { height: 0.12rem; }
    .nav-links li:nth-child(2) .nav-candle { height: 0.78rem; }
    .nav-links li:nth-child(2) .nav-candle::before { height: 0.18rem; }
    .nav-links li:nth-child(2) .nav-candle::after { height: 0.16rem; }
    .nav-links li:nth-child(3) .nav-candle { height: 1.02rem; }
    .nav-links li:nth-child(3) .nav-candle::before { height: 0.24rem; }
    .nav-links li:nth-child(3) .nav-candle::after { height: 0.14rem; }
    .btn-nav {
      padding: var(--space-2) var(--space-4);
      background: var(--color-primary); color: var(--color-text-inverse);
      border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600;
      text-decoration: none; letter-spacing: 0.01em;
    }
    .btn-nav:hover { background: var(--color-primary-hover); }
    .hamburger { display: none; flex-direction: column; gap: 5px; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
    .hamburger span { display: block; width: 18px; height: 2px; background: var(--color-text-muted); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }

    /* === HERO === */
    .hero {
      padding-block: clamp(var(--space-16), 12vw, var(--space-24));
      min-height: 85vh; display: flex; flex-direction: column; justify-content: center;
      position: relative; overflow: hidden;
    }
    .hero-grid-bg {
      position: absolute; inset: 0; pointer-events: none; opacity: 0.04;
      background-image:
        linear-gradient(var(--color-primary) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-primary) 1px, transparent 1px);
      background-size: 48px 48px;
    }
    .hero-glow {
      position: absolute; top: -20%; right: -10%; width: 60vw; height: 60vw; max-width: 800px;
      border-radius: 50%; pointer-events: none;
      background: radial-gradient(circle, oklch(from var(--color-primary) l c h / 0.07) 0%, transparent 70%);
    }
    .hero-tag {
      display: inline-flex; align-items: center; gap: var(--space-2);
      font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
      color: var(--color-primary); font-family: var(--font-mono, monospace);
      margin-bottom: var(--space-6);
    }
    .hero-tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); display: inline-block; animation: blink 2s ease-in-out infinite; }
    .hero-title {
      font-family: var(--font-display); font-weight: 800;
      font-size: var(--text-hero); line-height: 1;
      letter-spacing: -0.03em; color: var(--color-text);
      margin-bottom: var(--space-6);
    }
    .hero-title .accent { color: var(--color-primary); }
    .hero-sub {
      font-size: var(--text-lg); color: var(--color-text-muted);
      max-width: 54ch; margin-bottom: var(--space-10); line-height: 1.5;
      font-weight: 400;
    }
    .hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-12); }
    .btn-primary {
      display: inline-flex; align-items: center; gap: var(--space-2);
      padding: var(--space-3) var(--space-6);
      background: var(--color-primary); color: var(--color-text-inverse);
      border-radius: var(--radius-lg); font-weight: 700; font-size: var(--text-sm);
      text-decoration: none; letter-spacing: 0.01em;
    }
    .btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
    .btn-secondary {
      display: inline-flex; align-items: center; gap: var(--space-2);
      padding: var(--space-3) var(--space-6);
      background: transparent; color: var(--color-text);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg); font-weight: 600; font-size: var(--text-sm);
      text-decoration: none;
    }
    .btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }

    .hero-stats {
      display: flex; flex-wrap: wrap; gap: var(--space-8);
      padding-top: var(--space-8); border-top: 1px solid var(--color-divider);
    }
    .hero-stat {}
    .hero-stat-num {
      font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl);
      color: var(--color-primary); letter-spacing: -0.02em; line-height: 1;
      display: block;
    }
    .hero-stat-label {
      font-size: var(--text-xs); color: var(--color-text-faint);
      text-transform: uppercase; letter-spacing: 0.06em; margin-top: var(--space-1);
      display: block;
    }

    /* === SECTION HEADER === */
    .section { padding-block: clamp(var(--space-16), 8vw, var(--space-24)); }
    .section-label {
      display: inline-flex; align-items: center; gap: var(--space-2);
      font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--color-primary); font-family: var(--font-mono, monospace);
      margin-bottom: var(--space-4);
    }
    .section-label::before { content: '//'; opacity: 0.5; }
    .section-title {
      font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800;
      letter-spacing: -0.025em; color: var(--color-text); margin-bottom: var(--space-3);
      line-height: 1.1;
    }
    .section-desc { font-size: var(--text-base); color: var(--color-text-muted); max-width: 52ch; margin-bottom: var(--space-12); }

    /* === ABOUT === */
    .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: start; }
    .about-text p { color: var(--color-text-muted); margin-bottom: var(--space-4); line-height: 1.7; }
    .about-text p:last-child { margin-bottom: 0; }
    .about-highlight {
      color: var(--color-primary); font-weight: 600;
    }
    .about-card {
      background: var(--color-surface); border: 1px solid var(--color-border);
      border-radius: var(--radius-xl); padding: var(--space-8);
      box-shadow: var(--shadow-sm);
    }
    .about-card-title {
      font-family: var(--font-display); font-weight: 700; font-size: var(--text-base);
      margin-bottom: var(--space-4); color: var(--color-text);
    }
    .skills-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
    .skill-chip {
      display: inline-flex; align-items: center; gap: var(--space-2);
      padding: var(--space-1) var(--space-3);
      background: var(--color-surface-offset); color: var(--color-text-muted);
      border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 500;
      border: 1px solid var(--color-border); letter-spacing: 0.02em;
    }
    .skill-chip.green { background: var(--color-primary-highlight); color: var(--color-primary); border-color: oklch(from var(--color-primary) l c h / 0.3); }
    .about-divider { margin-block: var(--space-6); border: none; border-top: 1px solid var(--color-divider); }
    .fun-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
    .fun-list li { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
    .fun-list li span.icon { font-size: 1.1em; }

    /* === PROJECTS === */
    .projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 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);
      box-shadow: var(--shadow-sm);
      display: flex; flex-direction: column;
      transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive);
      position: relative; overflow: hidden;
    }
    .project-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
      background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
      opacity: 0; transition: opacity var(--transition-interactive);
    }
    .project-card:hover { border-color: oklch(from var(--color-primary) l c h / 0.4); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
    .project-card:hover::before { opacity: 1; }
    .project-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--space-4); }
    .project-icon { font-size: 1.75rem; line-height: 1; }
    .project-badge {
      font-size: var(--text-xs); font-weight: 600; padding: var(--space-1) var(--space-3);
      border-radius: var(--radius-full); letter-spacing: 0.05em; text-transform: uppercase;
    }
    .badge-hackathon { background: oklch(from var(--color-accent2) l c h / 0.15); color: var(--color-accent2); border: 1px solid oklch(from var(--color-accent2) l c h / 0.3); }
    .project-name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); letter-spacing: -0.02em; margin-bottom: var(--space-2); color: var(--color-text); }
    .project-desc { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.65; flex: 1; margin-bottom: var(--space-6); max-width: none; }
    .project-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
    .project-tag {
      font-size: var(--text-xs); padding: var(--space-1) var(--space-3);
      background: var(--color-surface-offset); color: var(--color-text-faint);
      border-radius: var(--radius-full); font-family: var(--font-mono, monospace); letter-spacing: 0.02em;
    }
    .project-footer { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; position: relative; z-index: 20; }
    .project-link {
      display: inline-flex; align-items: center; gap: var(--space-2);
      font-size: var(--text-xs); font-weight: 600; text-decoration: none;
      color: var(--color-primary); letter-spacing: 0.03em;
    }
    .project-link:hover { color: var(--color-primary-hover); }

    /* === CONTACT === */
    .contact-section { background: var(--color-surface); border-top: 1px solid var(--color-divider); }
    .contact-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-16); align-items: start; }
    .contact-form { background: var(--color-surface-offset); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-8); }
    .form-group { margin-bottom: var(--space-5); }
    .form-label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--color-text); margin-bottom: var(--space-2); }
    .form-input, .form-textarea {
      width: 100%; padding: var(--space-3) var(--space-4);
      background: var(--color-surface); border: 1px solid var(--color-border);
      border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--color-text);
      transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
    }
    .form-input:focus, .form-textarea:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.12); }
    .form-input::placeholder, .form-textarea::placeholder { color: var(--color-text-faint); }
    .form-textarea { resize: vertical; min-height: 120px; }
    .btn-submit {
      width: 100%; padding: var(--space-3) var(--space-6);
      background: var(--color-primary); color: var(--color-text-inverse);
      border-radius: var(--radius-md); font-weight: 700; font-size: var(--text-sm);
      border: none; cursor: pointer; letter-spacing: 0.02em;
      display: flex; align-items: center; justify-content: center; gap: var(--space-2);
    }
    .btn-submit:hover { background: var(--color-primary-hover); }
    .btn-submit:active { background: var(--color-primary-active); }
    .form-status { margin-top: var(--space-4); font-size: var(--text-sm); text-align: center; min-height: 1.5em; }
    .form-status.success { color: var(--color-primary); }
    .form-status.error { color: #ff6b6b; }

    .contact-info-card { display: flex; flex-direction: column; gap: var(--space-6); }
    .contact-link {
      display: flex; align-items: center; gap: var(--space-4);
      padding: var(--space-4) var(--space-6);
      background: var(--color-surface-offset); border: 1px solid var(--color-border);
      border-radius: var(--radius-lg); text-decoration: none; color: var(--color-text);
    }
    .contact-link:hover { border-color: var(--color-primary); color: var(--color-primary); }
    .contact-link-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--color-surface); border-radius: var(--radius-md); flex-shrink: 0; }
    .contact-link-label { font-size: var(--text-xs); color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 2px; }
    .contact-link-value { font-weight: 600; font-size: var(--text-sm); }

    /* === FOOTER === */
    .footer {
      border-top: 1px solid var(--color-divider);
      padding-block: var(--space-8);
      background: var(--color-bg);
    }
    .footer-inner { 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); }
    .footer-copy span { color: var(--color-primary); }
    .footer-mono { font-size: var(--text-xs); color: var(--color-text-faint); font-family: var(--font-mono, monospace); }

    /* === SCROLL REVEAL === */
    .fade-in { opacity: 1; }
    @supports (animation-timeline: scroll()) {
      .fade-in { opacity: 0; animation: reveal-fade linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
    }
    @keyframes reveal-fade { to { opacity: 1; } }

    /* === MOBILE === */
    @media (max-width: 768px) {
      .nav {
        position: relative;
        backdrop-filter: none;
      }
      .nav-actions { gap: var(--space-4); }
      .nav-links { display: none; }
      .hamburger { display: flex; }
      .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-divider); padding: var(--space-4); gap: var(--space-4); z-index: 100; }
      .nav-links.open a { font-size: var(--text-base); }
      .hero-title { font-size: clamp(2.5rem, 10vw, 5rem); }
      .about-grid { grid-template-columns: 1fr; }
      .contact-inner { grid-template-columns: 1fr; }
      .projects-grid { grid-template-columns: 1fr; }
      .hero-stats { gap: var(--space-6); }
    }

  
        /* === BRAINHACK CARD GALLERY === */
        .project-card.has-gallery {
            position: relative;
        }
        .project-card-body {
            position: relative;
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        /* Gallery is hidden by default; appears only on card hover */
        .card-gallery {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border-radius: var(--radius-xl) var(--radius-xl) 0 0;
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 10;
            background: var(--color-bg);
            display: flex;
            flex-direction: column;
        }

        /* Reveal gallery on card hover */
        .project-card.has-gallery:hover .card-gallery {
            opacity: 1;
            pointer-events: all;
        }

        .gallery-slides {
            flex: 1;
            position: relative;
            overflow: hidden;
        }
        .gallery-slide {
            position: absolute;
            inset: 0;
            opacity: 0;
            transition: opacity 0.35s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #000;
        }
        .gallery-slide.active {
            opacity: 1;
        }
        .gallery-slide img,
        .gallery-slide embed,
        .gallery-slide iframe {
            width: 100%;
            height: 100%;
            object-fit: contain;
            border: none;
        }
        .gallery-controls {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: var(--space-2) var(--space-3);
            background: var(--color-surface);
            border-top: 1px solid var(--color-border);
            flex-shrink: 0;
        }
        .gallery-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: var(--radius-md);
            border: 1px solid var(--color-border);
            background: var(--color-surface-offset);
            color: var(--color-text);
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 700;
            transition: border-color var(--transition-interactive), background var(--transition-interactive), color var(--transition-interactive);
            user-select: none;
            font-family: var(--font-mono, monospace);
            line-height: 1;
        }
        .gallery-btn:hover {
            border-color: var(--color-primary);
            color: var(--color-primary);
            background: var(--color-primary-highlight);
        }
        .gallery-dots {
            display: flex;
            gap: var(--space-2);
            align-items: center;
        }
        .gallery-dot {
            width: 6px;
            height: 6px;
            border-radius: var(--radius-full);
            background: var(--color-border);
            transition: background var(--transition-interactive), width var(--transition-interactive);
            cursor: pointer;
        }
        .gallery-dot.active {
            background: var(--color-primary);
            width: 16px;
        }
        .gallery-caption {
            font-size: var(--text-xs);
            color: var(--color-text-muted);
            font-family: var(--font-mono, monospace);
            letter-spacing: 0.03em;
        }

        
    /* === TOAST NOTIFICATION === */
    .toast-container {
      position: fixed;
      top: var(--space-6);
      right: var(--space-6);
      z-index: 10000;
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
      pointer-events: none;
    }
    .toast {
      pointer-events: all;
      display: flex;
      align-items: flex-start;
      gap: var(--space-3);
      padding: var(--space-4) var(--space-5);
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-xl);
      box-shadow: var(--shadow-lg);
      max-width: 380px;
      min-width: 280px;
      font-size: var(--text-sm);
      color: var(--color-text);
      opacity: 0;
      transform: translateX(100%);
      animation: toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
      position: relative;
    }
    .toast.toast-out {
      animation: toast-out 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    .toast--success {
      border-color: oklch(from var(--color-primary) l c h / 0.4);
    }
    .toast--success .toast-icon {
      color: var(--color-primary);
    }
    .toast--error {
      border-color: oklch(0.55 0.22 15 / 0.4);
    }
    .toast--error .toast-icon {
      color: #ff6b6b;
    }
    .toast--sending {
      border-color: oklch(from var(--color-text) l c h / 0.2);
    }
    .toast-icon {
      flex-shrink: 0;
      font-size: 1.25rem;
      line-height: 1;
    }
    .toast-content {
      flex: 1;
    }
    .toast-title {
      font-weight: 700;
      font-size: var(--text-sm);
      margin-bottom: 2px;
      color: var(--color-text);
    }
    .toast-message {
      color: var(--color-text-muted);
      font-size: var(--text-xs);
      line-height: 1.5;
    }
    .toast-close {
      flex-shrink: 0;
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius-sm);
      background: transparent;
      border: none;
      cursor: pointer;
      color: var(--color-text-faint);
      font-size: 1.1rem;
      transition: color var(--transition-interactive), background var(--transition-interactive);
    }
    .toast-close:hover {
      color: var(--color-text);
      background: var(--color-surface-offset);
    }
    .toast-progress {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 3px;
      background: var(--color-primary);
      border-radius: 0 0 var(--radius-xl) var(--radius-xl);
      animation: toast-progress linear;
    }
    .toast--error .toast-progress {
      background: #ff6b6b;
    }
    @keyframes toast-in {
      from { opacity: 0; transform: translateX(100%); }
      to { opacity: 1; transform: translateX(0); }
    }
    @keyframes toast-out {
      from { opacity: 1; transform: translateX(0); }
      to { opacity: 0; transform: translateX(100%); }
    }
    @keyframes toast-progress {
      from { width: 100%; }
      to { width: 0%; }
    }
    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    /* ===== WALL CLIMBER ===== */
    .climber-wrap {
      display: inline-block;
      position: relative;
      width: 18px;
      height: 24px;
      vertical-align: bottom;
      margin-left: -2px;
      overflow: hidden;
      pointer-events: none;
    }
    .climber-sprite {
      display: inline; /* override global img { display: block } */
      width: 18px;
      height: 192px !important; /* override global img { height: auto } */
      animation: sprite-climb 3.2s steps(1) infinite;
    }
    @keyframes sprite-climb {
      0%    { transform: translateY(0px);    }   /* frame 1 */
      12.5% { transform: translateY(-24px);  }   /* frame 2 */
      25%   { transform: translateY(-48px);  }   /* frame 3 */
      37.5% { transform: translateY(-72px);  }   /* frame 4 */
      50%   { transform: translateY(-96px);  }   /* frame 5 */
      62.5% { transform: translateY(-120px); }   /* frame 6 - at top */
      75%   { transform: translateY(-144px); }   /* frame 7 - arms out */
      87.5% { transform: translateY(-168px); }   /* frame 8 - falling */
      100%  { transform: translateY(0px);    }   /* reset */
    }

/* ─── INLINE STYLE MIGRATIONS ─────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md);
  z-index: 9999;
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
}

.hero-stat-num--climber {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: 1px;
}

.projects-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.project-card--placeholder {
  border-style: dashed;
  background: transparent;
}

.project-name--muted {
  color: var(--color-text-muted);
}

.project-desc--faint {
  color: var(--color-text-faint);
}

.contact-info-box {
  padding: var(--space-4) var(--space-6);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.3);
}

.contact-info-box__title {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.contact-info-box__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: none;
}

.honeypot {
  display: none;
}

.form-status,
.form-error {
  display: none;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  text-align: center;
}

.form-status {
  color: var(--color-primary);
  padding: var(--space-4);
  background: var(--color-primary-highlight);
  border-radius: var(--radius-md);
}

.form-error {
  color: #ff6b6b;
}

.embed-full {
  width: 100%;
  height: 100%;
}
