/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(/fonts/font-0.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(/fonts/font-1.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(/fonts/font-2.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(/fonts/font-3.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(/fonts/font-4.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(/fonts/font-5.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-0.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-1.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-2.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-3.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-4.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-5.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-12.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-13.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-14.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-15.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url(/fonts/font-12.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url(/fonts/font-13.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url(/fonts/font-14.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url(/fonts/font-15.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: optional;
  src: url(/fonts/font-20.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: optional;
  src: url(/fonts/font-21.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: optional;
  src: url(/fonts/font-22.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(/fonts/font-23.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(/fonts/font-24.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url(/fonts/font-25.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-26.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-27.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url(/fonts/font-28.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url(/fonts/font-29.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url(/fonts/font-30.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url(/fonts/font-31.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ═══════════════════════════════════════════════════════════
   RGR PORTFOLIO — style.css
   Rose Gold × Deep Black · BEM methodology · CSS Custom Properties
   ═══════════════════════════════════════════════════════════ */

/* ─── 1. DESIGN TOKENS ─────────────────────────────────── */
:root {
  /* ── Backgrounds ── */
  --void-black:      #000000;   /* page background */
  --charcoal-base:   #121212;   /* sections */
  --panel-surface:   #1C1C1C;   /* cards / nav */

  /* ── Gold ── */
  --classic-gold:    #D4AF37;   /* primary accent, headings, borders */
  --rose-gold:       #B76E79;   /* secondary accent, gradients */
  --rose-gold-light: #E8C39E;   /* hover states, soft glows */

  /* ── Red ── */
  --deep-red:        #8B0000;   /* warnings, critical actions */
  --optimus-red:     #C1272D;   /* CTAs, badges, energetic accents */

  /* ── Blue ── */
  --cybertron-blue:       #1E3A5F;  /* links, contrast, info */
  --cybertron-blue-light: #274B7A;  /* link hover */

  /* ── Text ── */
  --text-primary:    #F5F1EC;   /* off-white body */
  --text-secondary:  #A8A8A8;   /* muted body / captions */
  --text-on-accent:  #ffffff;   /* text on solid gold/rose/red buttons */

  /* ── Gradients ── */
  --grad-black-gold:     linear-gradient(90deg, #000000, #D4AF37);
  --grad-rose-glow:      linear-gradient(90deg, #B76E79, #E8C39E);
  --grad-rose-light:     linear-gradient(90deg, #E8C39E, #B76E79);
  --grad-deep-red:       linear-gradient(90deg, #8B0000, #C1272D);
  --grad-optimus-red:    linear-gradient(90deg, #C1272D, #8B0000);
  --grad-cybertron-blue: linear-gradient(90deg, #1E3A5F, #274B7A);

  /* ── Fonts ── */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Poppins', system-ui, sans-serif;
  --font-display: var(--font-heading);
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* ── Backward-compatible aliases ── */
  --bg-void:       var(--void-black);
  --bg-base:       var(--charcoal-base);
  --bg-elevated:   var(--panel-surface);
  --bg-overlay:    #262626;
  --rg-deep:       var(--deep-red);
  --rg-core:       var(--classic-gold);
  --rg-mid:        var(--rose-gold);
  --rg-light:      var(--rose-gold-light);
  --rg-shimmer:    var(--rose-gold-light);
  --rg-pearl:      var(--text-primary);
  --cyber-blue:    var(--cybertron-blue);

  /* ── Functional aliases ── */
  --color-text-primary:   var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted:     var(--text-secondary);
  --color-accent:         var(--classic-gold);
  --color-accent-glow:    var(--rose-gold);
  --color-border:         rgba(212, 175, 55, 0.2);
  --color-border-hover:   rgba(212, 175, 55, 0.55);
  --color-surface:        var(--panel-surface);
  --color-surface-hover:  var(--bg-overlay);

  /* ── Legacy aliases (internal use) ── */
  --color-primary-gold:    var(--classic-gold);
  --color-bg:              var(--void-black);
  --color-bg-2:            var(--charcoal-base);
  --color-bg-3:            var(--panel-surface);
  --color-text:            var(--text-primary);
  --color-text-dim:        var(--text-secondary);
  --color-glow:            rgba(212, 175, 55, 0.4);
  --color-hologram:        rgba(183, 110, 121, 0.2);
  --color-accent-cyan:     var(--cybertron-blue);

  /* ── Glow / shadow ── */
  --glow-sm:  0 0 8px  rgba(212, 175, 55, 0.35);
  --glow-md:  0 0 20px rgba(212, 175, 55, 0.45);
  --glow-lg:  0 0 50px rgba(212, 175, 55, 0.3);
  --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.70);

  /* ── Motion ── */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 180ms;
  --duration-base: 320ms;

  /* ── Spacing ── */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;
  --space-2xl:  64px;
  --space-3xl:  96px;

  /* ── Radius ── */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-pill: 100px;

  /* ── Transitions ── */
  --transition-fast:   150ms ease;
  --transition-base:   300ms ease;
  --transition-slow:   600ms ease;
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Nav ── */
  --nav-height: 72px;

  /* ── Z-indices ── */
  --z-canvas:     0;
  --z-content:    10;
  --z-nav:        100;
  --z-overlay:    200;
  --z-toast:      300;
}

/* Light theme disabled — dark luxury system only (tokens stay on void/charcoal) */
html[data-theme="light"] {
  --void-black:      #000000;
  --charcoal-base:   #121212;
  --panel-surface:   #1C1C1C;
  --bg-void:         var(--void-black);
  --bg-base:         var(--charcoal-base);
  --bg-elevated:     var(--panel-surface);
  --color-text:      var(--text-primary);
  --color-text-primary: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted:    var(--text-secondary);
  --color-border:    rgba(212, 175, 55, 0.2);
}

/* ─── 2. RESET & BASE ──────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* PERF: Force scrollbar visible to prevent CLS from scrollbar appearance on desktop.
     Without this, content changes (theme swap) can toggle the
     scrollbar, shifting the body by ~17px — the root cause of the 0.737 desktop CLS. */
  overflow-y: scroll;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-void);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  /* No transition here: transitions are added after first paint to prevent CLS */
}

/* Enable smooth transitions only after first paint (set by inline script in <head>) */
.theme-ready body {
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

img, video, canvas, svg { display: block; max-width: 100%; }

a {
  color: var(--cybertron-blue);
  text-decoration: none;
  transition: color var(--duration-fast), text-decoration-color var(--duration-fast);
}
a:hover {
  color: var(--cybertron-blue-light);
  text-decoration: underline;
}

/* UI chrome links keep brand accents; no default link underline */
.nav a:hover,
.btn:hover,
.project-card__btn:hover,
.about__link:hover,
.contact__social-link:hover,
.footer a:hover,
.hero__link:hover {
  text-decoration: none;
}
.hero__link:hover {
  text-decoration: underline;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--rg-deep);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--rg-core); }

/* ── Selection ── */
::selection {
  background: var(--rg-core);
  color: var(--bg-void);
}

/* ─── 3. ACCESSIBILITY ──────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--rg-core);
  color: var(--bg-void);
  font-weight: 600;
  border-radius: var(--radius-md);
  z-index: 9999;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: var(--space-md); }

:focus-visible {
  outline: 2px solid var(--rg-core);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ─── 4. TYPOGRAPHY ─────────────────────────────────────── */
h1 {
  font-family: var(--font-heading);
  line-height: 1.1;
  font-weight: 700;
  color: var(--classic-gold);
}

h2 {
  font-family: var(--font-heading);
  line-height: 1.15;
  font-weight: 500;
  color: var(--rose-gold);
}

h3, h4 {
  font-family: var(--font-body);
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-primary);
}

p, li { color: var(--text-secondary); }
code, pre { font-family: var(--font-mono); color: var(--rose-gold); }

.section__heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  color: var(--rose-gold);
  margin-bottom: var(--space-xl);
  position: relative;
}

.section__heading:not(.section__heading--static) {
  background: var(--grad-rose-glow);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-shimmer 6s linear infinite;
}

.section__heading-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--rose-gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

/* ─── 5. KEYFRAMES ─────────────────────────────────────── */
@keyframes arc-reactor-pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes repulsor-blast {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(3); opacity: 0; }
}

@keyframes scan-line {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes hologram-flicker {
  0%,100%      { opacity: 0.3; }
  10%,20%,40%,60%,80% { opacity: 0.42; }
  30%,50%,70%  { opacity: 0.18; }
}

@keyframes float-y {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-18px); }
}

@keyframes glow-pulse {
  0%,100% { opacity: 0.6; }
  50%     { opacity: 1; }
}

@keyframes text-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes slide-in-up {
  /* Start visible but offset — opacity stays 1 so LCP text is immediately
     measurable by the browser, preventing mobile LCP delay from invisible state */
  from { opacity: 1; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(120%); }
  to   { opacity: 1; transform: translateX(0); }
}



@keyframes nav-logo-pulse {
  0%,100% { opacity: 0.8; }
  50%     { opacity: 1; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes scan-pulse {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* ─── 6. PAGE TRANSITIONS ───────────────────────────────── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.page-transition--active {
  opacity: 1;
  pointer-events: all;
}

/* ─── 6b. APP LOADER (splash) ───────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(183, 110, 121, 0.08), transparent 65%),
    var(--void-black);
  color: var(--text-primary);
  transition: opacity 0.55s var(--ease-out-expo), visibility 0.55s;
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
  padding: var(--space-xl);
}
.loader__hex {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.45));
  animation: loader-spin 4.5s linear infinite;
}
.loader__brand {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--classic-gold);
  margin: 0;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
}
.loader__status {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-gold);
  margin: 0;
}
.loader__bar {
  width: min(240px, 58vw);
  height: 2px;
  background: var(--panel-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.loader__bar-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-rose-glow);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
  border-radius: inherit;
  transition: width 0.2s ease;
}
.loader__pct {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
@keyframes loader-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .loader__hex { animation: none; }
}

/* ─── 7. SCROLL TRACER ──────────────────────────────────── */
.scroll-tracer {
  position: fixed;
  right: 16px;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--rg-core), transparent);
  z-index: var(--z-nav);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 100ms linear;
  border-radius: var(--radius-pill);
  box-shadow: var(--glow-sm);
}

/* ─── 8. NAVIGATION ─────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: var(--z-nav);
  transition: background var(--transition-base), backdrop-filter var(--transition-base),
              box-shadow var(--transition-base);
}

.nav--scrolled {
  background: rgba(28, 28, 28, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--color-border), 0 8px 32px rgba(0,0,0,0.5);
}

.nav__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--rg-core);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  text-decoration: none;
  text-shadow: var(--glow-sm);
  animation: nav-logo-pulse 3s ease-in-out infinite;
  /* Reserve intrinsic space so font-swap cannot shift adjacent nav items */
  min-width: 88px;
  contain: layout style;
}
.nav__logo-arc {
  font-size: 1.4rem;
  animation: spin-slow 8s linear infinite;
  display: inline-block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-left: auto;
}

.nav__link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  transition: color var(--duration-fast) var(--ease-out-expo),
              background var(--duration-fast),
              border-color var(--duration-fast);
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  width: 0;
  height: 1px;
  background: var(--classic-gold);
  transition: width var(--transition-base);
  box-shadow: var(--glow-sm);
}
.nav__link:hover {
  color: var(--classic-gold);
  text-decoration: none;
}
.nav__link--active {
  color: var(--classic-gold);
  background: rgba(193, 39, 45, 0.12);
  border-left-color: var(--optimus-red);
  text-decoration: none;
}
.nav__link:hover::after,
.nav__link--active::after {
  width: calc(100% - 24px);
}

.nav__controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}
.nav__theme-toggle:hover {
  border-color: var(--rg-core);
  color: var(--rg-core);
  box-shadow: var(--glow-sm);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-secondary);
  border-radius: 2px;
  transition: all var(--transition-base);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.nav__mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(5, 4, 6, 0.96);
  backdrop-filter: blur(20px);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-base), opacity var(--transition-base);
  border-bottom: 1px solid var(--color-border);
}
.nav__mobile-menu--open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.nav__mobile-link {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  transition: color var(--transition-base);
}
.nav__mobile-link:hover { color: var(--rg-core); text-shadow: var(--glow-sm); }

/* ─── Shared Three.js background ───────────────────────── */
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-canvas);
  pointer-events: none;
  display: block;
  /* Visible fallback if WebGL never starts */
  background:
    radial-gradient(ellipse 55% 50% at 72% 48%, rgba(79, 210, 255, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 40% 35% at 68% 52%, rgba(26, 111, 154, 0.18) 0%, transparent 70%),
    #000;
}
.bg-canvas--ready {
  background: #000;
}
.bg-canvas--fallback {
  background:
    radial-gradient(ellipse 60% 55% at 70% 45%, rgba(79, 210, 255, 0.28) 0%, transparent 55%),
    radial-gradient(circle at 75% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 45%),
    #000;
}

/* ─── 9. SECTION BASE ──────────────────────────────────── */
.section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  contain: layout;
  background: transparent;
}

.section[hidden] {
  display: none !important;
}

.section__arc-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(79, 210, 255, 0.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ─── 10. HERO SECTION ──────────────────────────────────── */
/* Hero must not clip the content card */
.section.hero {
  overflow: visible;
  contain: layout style;
  min-height: 100vh;
  position: relative;
}

.hero {
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  min-height: 100vh;
  contain: layout style;
  overflow: visible;
  position: relative;
}

.hero__content {
  position: relative;
  z-index: var(--z-content);
  max-width: 640px;
  padding: var(--space-3xl) var(--space-2xl);
  animation: slide-in-up 0.8s ease both;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--rose-gold);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.hero__arc-dot {
  width: 8px;
  height: 8px;
  background: var(--rose-gold);
  box-shadow: 0 0 20px rgba(183, 110, 121, 0.5), 0 0 40px rgba(183, 110, 121, 0.2);
  animation: arc-reactor-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
  display: inline-block;
  will-change: transform, opacity;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  margin-bottom: var(--space-lg);
  will-change: contents;
}
.hero__title-line { display: block; color: var(--text-primary); }
.hero__title-line--accent {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--classic-gold);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.hero__role {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.hero__tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}
.hero__tagline em {
  font-style: normal;
  color: var(--text-primary);
  font-weight: 500;
}

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

.hero__link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--rose-gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--duration-fast);
}
.hero__link:hover {
  color: var(--rose-gold-light);
  text-decoration: underline;
}

.hero__stats {
  display: flex;
  gap: var(--space-xl);
}
.hero__stat {
  display: flex;
  flex-direction: column;
  min-width: 80px;
}
.hero__stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--rg-core);
  line-height: 1;
}
.hero__stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-xs);
}

.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  opacity: 0.5;
  animation: float-y 2s ease-in-out infinite;
  will-change: transform;
}
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--rg-core), transparent);
}
.hero__scroll-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rg-core);
}

/* ─── 11. BUTTONS ─────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background var(--duration-fast), color var(--duration-fast),
              border-color var(--duration-fast), box-shadow var(--duration-fast),
              transform var(--duration-fast);
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--classic-gold);
  color: var(--void-black);
  border-color: var(--classic-gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.28);
}
.btn--primary:hover {
  background: transparent;
  color: var(--classic-gold);
  border-color: var(--classic-gold);
  box-shadow: var(--glow-sm);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn--secondary {
  background: var(--rose-gold);
  color: var(--text-on-accent);
  border-color: var(--rose-gold);
}
.btn--secondary:hover {
  background: transparent;
  color: var(--rose-gold);
  border-color: var(--rose-gold);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn--cta {
  background: var(--optimus-red);
  color: var(--text-on-accent);
  border-color: var(--optimus-red);
}
.btn--cta:hover {
  background: transparent;
  color: var(--optimus-red);
  border-color: var(--optimus-red);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  color: var(--rose-gold);
  border: 1px solid var(--rose-gold);
}
.btn--outline:hover {
  background: transparent;
  border-color: var(--rose-gold);
  color: var(--rose-gold-light);
  box-shadow: var(--glow-sm);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(232, 195, 158, 0.2) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.btn:hover .btn__glow { opacity: 1; }

.btn--submit .btn__loading { display: none; }
.btn--submit.btn--loading .btn__text { display: none; }
.btn--submit.btn--loading .btn__loading { display: inline; }

/* ─── 12. ABOUT SECTION ─────────────────────────────────── */
.about {
  display: flex;
  align-items: center;
  padding: var(--space-3xl) 0;
}

.about__container {
  position: relative;
  z-index: var(--z-content);
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-2xl);
}

.about__bio {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}
.about__bio strong { color: var(--rg-pearl); font-weight: 600; }

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}
.about__stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--duration-base);
  animation: gentle-float 5.5s ease-in-out infinite;
}
.about__stat-card:nth-child(2) { animation-delay: 300ms; }
.about__stat-card:nth-child(3) { animation-delay: 600ms; }
.about__stat-card:hover {
  border-color: var(--rg-core);
  box-shadow: var(--shadow-card), var(--glow-md);
  transform: translateY(-3px);
}
.about__stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--rg-core);
}
.about__stat-desc {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

.about__internship {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
}
.about__internship-badge {
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-on-accent);
  background: var(--optimus-red);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  white-space: nowrap;
}
.about__internship-detail {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.about__internship-detail strong { color: var(--rg-pearl); }

.about__links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.about__link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--rg-core);
  border: 1px solid var(--color-border);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}
.about__link:hover {
  border-color: var(--rg-core);
  background: rgba(183, 110, 121, 0.10);
  box-shadow: var(--glow-sm);
  color: var(--rg-shimmer);
}

/* ─── 13. PROJECTS SECTION ──────────────────────────────── */
.projects {
  padding: var(--space-3xl) 0;
}

.projects__container {
  position: relative;
  z-index: var(--z-content);
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-2xl);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.project-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color var(--duration-base), box-shadow var(--duration-base), transform 220ms var(--ease-out-expo);
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card:hover {
  border-color: var(--rg-core);
  box-shadow: var(--shadow-card), var(--glow-md);
  transform: translateY(-6px);
}

.project-card__pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--rg-light);
  pointer-events: none;
  transform: translate(-50%,-50%) scale(0);
  opacity: 0;
  z-index: 2;
}
.project-card:hover .project-card__pulse {
  animation: scan-pulse 0.5s ease-out forwards;
}

.project-card__inner {
  position: relative;
  z-index: 1;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  height: 100%;
}

.project-card__header {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.project-card__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--rg-light);
  background: rgba(183, 110, 121, 0.12);
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  letter-spacing: 0.05em;
}
.project-card__tag:hover {
  background: rgba(183, 110, 121, 0.22);
  border-color: var(--rg-core);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--rg-pearl);
  line-height: 1.2;
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  flex: 1;
}

.project-card__footer {
  display: flex;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.project-card__btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}
.project-card__btn--primary {
  background: var(--classic-gold);
  color: var(--void-black);
  font-weight: 600;
  border: 1px solid var(--classic-gold);
}
.project-card__btn--primary:hover {
  background: transparent;
  color: var(--classic-gold);
  border-color: var(--classic-gold);
  box-shadow: var(--glow-sm);
  transform: translateY(-1px);
  text-decoration: none;
}
.project-card__btn--ghost {
  color: var(--text-secondary);
  border: 1px solid var(--color-border);
}
.project-card__btn--ghost:hover {
  border-color: var(--rose-gold);
  color: var(--rose-gold);
  background: transparent;
  text-decoration: none;
}

/* ─── 14. SKILLS SECTION ─────────────────────────────────── */
.skills {
  display: flex;
  align-items: center;
  padding: var(--space-3xl) 0;
}

.skills__container {
  position: relative;
  z-index: var(--z-content);
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-2xl);
}

.skills__categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.skills__cat-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--rg-core);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  background: rgba(183, 110, 121, 0.12);
  border: 1px solid rgba(183, 110, 121, 0.25);
  color: var(--rg-light);
  transition: all var(--transition-base);
  cursor: default;
}
.skill-tag:hover {
  background: rgba(183, 110, 121, 0.22);
  border-color: var(--rg-core);
  color: var(--rg-shimmer);
  box-shadow: var(--glow-sm);
}

/* Reset list styles when using native ul/li for skill tags */
ul.skills__tags {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.skills__tags li.skill-tag {
  display: inline-flex;
}
.skill-tag--accent {
  border-color: rgba(183, 110, 121, 0.45);
  color: var(--rg-mid);
  background: rgba(183, 110, 121, 0.10);
}
.skill-tag--accent:hover {
  border-color: var(--rg-core);
  box-shadow: var(--glow-sm);
  color: var(--rg-shimmer);
}

/* WIP / featured project card tag */
.project-card__tag--wip {
  border-color: transparent !important;
  color: var(--text-on-accent) !important;
  background: var(--optimus-red) !important;
  border-radius: var(--radius-pill) !important;
  box-shadow: none;
  animation: none;
}

/* ─── 15. CONTACT SECTION ────────────────────────────────── */
.contact {
  display: flex;
  align-items: center;
  padding: var(--space-3xl) 0;
}

.contact__container {
  position: relative;
  z-index: var(--z-content);
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-2xl);
  width: 100%;
}

.contact__header {
  margin-bottom: var(--space-2xl);
}
.contact__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

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

.contact__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.contact__info-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}
.contact__info-icon { font-size: 1.2rem; margin-top: 2px; }
.contact__info-item strong {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}
.contact__info-link {
  color: var(--rg-core);
  transition: color var(--transition-base);
}
.contact__info-link:hover {
  color: var(--rg-shimmer);
  text-shadow: var(--glow-sm);
}

.contact__social {
  display: flex;
  gap: var(--space-md);
}
.contact__social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}
.contact__social-link svg { width: 18px; height: 18px; }
.contact__social-link:hover {
  border-color: var(--cyber-blue);
  color: var(--cyber-blue);
  box-shadow: var(--glow-sm);
  transform: translateY(-2px);
}

/* Contact Form */
.contact__form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact__repulsor-charge {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rg-mid) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  filter: blur(4px);
}
.contact__form:focus-within .contact__repulsor-charge {
  opacity: 0.6;
  box-shadow: 0 0 20px rgba(183, 110, 121, 0.5), 0 0 40px rgba(183, 110, 121, 0.2);
  animation: arc-reactor-pulse 1.5s ease-in-out infinite;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.form__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.form__input {
  width: 100%;
  padding: 14px var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--rg-pearl);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-base);
  outline: none;
  resize: none;
}
.form__input::placeholder { color: var(--color-text-muted); }
.form__input:focus {
  border-color: var(--rg-core);
  box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.12), var(--glow-sm);
  background: var(--bg-overlay);
}
.form__input:invalid:not(:placeholder-shown) {
  border-color: rgba(193, 39, 45, 0.55);
}
.form__textarea { min-height: 140px; }
.form__error {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--optimus-red);
  min-height: 1em;
}

/* ─── 16. TOAST ──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--rg-core);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--glow-sm);
  z-index: var(--z-toast);
  opacity: 0;
  transform: translateX(120%);
  pointer-events: none;
  transition: none;
}
.toast--show {
  animation: toast-in 0.4s var(--transition-spring) forwards;
}
.toast--hide {
  animation: toast-in 0.3s ease reverse forwards;
}
.toast__icon { font-size: 1.2rem; }
.toast__text {
  font-size: 0.9rem;
  color: var(--rg-pearl);
}

/* ─── 17. FOOTER ─────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) 0;
}
.footer__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.footer__text, .footer__copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.footer__text strong { color: var(--color-text-secondary); }

/* ─── 18. SCROLL REVEAL ──────────────────────────────────── */
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-item--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.reveal-item:nth-child(2) { transition-delay: 0.1s; }
.reveal-item:nth-child(3) { transition-delay: 0.2s; }
.reveal-item:nth-child(4) { transition-delay: 0.3s; }
.reveal-item:nth-child(5) { transition-delay: 0.4s; }
.reveal-item:nth-child(6) { transition-delay: 0.5s; }

/* ─── 19. SECTION DIVIDERS / LABELS ─────────────────────── */
.section-label {
  color: var(--rg-core);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--rg-core) 50%,
    transparent 100%
  );
  opacity: 0.4;
}

/* ─── 20. REDUCED MOTION ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .section__heading:not(.section__heading--static),
  .about__stat-card {
    animation: none !important;
  }
}

/* ─── 21. RESPONSIVE ─────────────────────────────────────── */

/* ── 1024px ── */
@media (max-width: 1024px) {
  :root { --nav-height: 64px; }

  .about__container,
  .skills__container,
  .contact__body {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .hero__content { padding: var(--space-3xl) var(--space-xl); }
}

/* ── 768px ── */
@media (max-width: 768px) {
  .scroll-tracer { display: none; }
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .nav__container {
    padding: 0 var(--space-md);
    gap: var(--space-md);
  }
  .nav__mobile-menu {
    top: auto;
    bottom: 0;
    max-height: min(72vh, 520px);
    border-top: 1px solid var(--color-border);
    border-bottom: none;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transform: translateY(100%);
    padding: var(--space-xl) var(--space-lg) calc(var(--space-xl) + env(safe-area-inset-bottom));
  }
  .nav__mobile-menu--open { transform: translateY(0); }
  .nav__mobile-link {
    padding: 12px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.01);
    text-align: center;
    font-size: 1.25rem;
  }

  .hero__title { font-size: clamp(2.5rem, 12vw, 4rem); }
  .hero__content {
    max-width: 100%;
    padding: var(--space-2xl) var(--space-lg);
  }
  .hero__tagline br { display: none; }
  .hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
  }
  .hero__ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero__ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .projects__grid { grid-template-columns: 1fr; }
  .project-card__inner { padding: var(--space-lg); }
  .project-card__footer {
    flex-wrap: wrap;
  }
  .project-card__btn {
    flex: 1 1 46%;
    text-align: center;
  }
  .about__stat-card {
    animation-duration: 7s;
  }

  .about__stats { grid-template-columns: 1fr; }
  .about__internship {
    flex-direction: column;
    align-items: flex-start;
  }
  .skills__tags { gap: var(--space-xs); }
  .contact__social {
    flex-wrap: wrap;
  }
  .form__input,
  .btn--submit {
    min-height: 48px;
  }

  .footer__container { flex-direction: column; text-align: center; }

  .toast { right: var(--space-md); left: var(--space-md); bottom: var(--space-md); }
}

/* ── 480px ── */
@media (max-width: 480px) {
  :root {
    --space-2xl: 40px;
    --space-3xl: 56px;
  }

  .nav__container { padding: 0 var(--space-md); }

  .hero__content { padding: calc(var(--space-2xl) + 8px) var(--space-md) var(--space-2xl); }
  .hero__tagline { font-size: 0.95rem; }
  .hero__eyebrow { font-size: 0.68rem; letter-spacing: 0.06em; }
  .hero__stat-number { font-size: 1.6rem; }
  .hero__stat-label { font-size: 0.62rem; }

  .about__container,
  .skills__container,
  .projects__container,
  .contact__container { padding: var(--space-2xl) var(--space-md); }

  .section__heading { font-size: 2rem; }

  .contact__info-item span { font-size: 0.85rem; }
  .nav__mobile-link { font-size: 1.05rem; }
  .project-card__btn { flex: 1 1 100%; }
  .section__heading:not(.section__heading--static) {
    animation-duration: 8s;
  }
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT / SURFACE LAYER — token-aligned dark luxury system
   ═══════════════════════════════════════════════════════════ */

:root {
  --rd-bg: var(--void-black);
  --rd-surface: var(--panel-surface);
  --rd-surface-2: var(--charcoal-base);
  --rd-stroke: rgba(212, 175, 55, 0.2);
  --rd-stroke-strong: rgba(212, 175, 55, 0.55);
  --rd-text: var(--text-primary);
  --rd-muted: var(--text-secondary);
  --rd-gold: var(--classic-gold);
  --rd-rose: var(--rose-gold);
  --rd-red: var(--optimus-red);
  --rd-blue: var(--cybertron-blue);
  --rd-radius: 16px;
  --rd-blur: blur(14px);
}

body {
  background: var(--void-black);
  color: var(--text-primary);
}

.section {
  padding: clamp(48px, 6vw, 84px) 0;
  background-color: transparent;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(79, 210, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 210, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  opacity: 0.55;
}

.nav {
  height: 78px;
  background: transparent;
}

.nav--scrolled {
  background: rgba(28, 28, 28, 0.92);
  backdrop-filter: var(--rd-blur);
  -webkit-backdrop-filter: var(--rd-blur);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.nav__container {
  max-width: 1320px;
  padding: 0 clamp(14px, 2.5vw, 36px);
}

.nav__logo {
  color: var(--classic-gold);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
  text-decoration: none;
}

.nav__logo:hover {
  color: var(--rose-gold-light);
  text-decoration: none;
}

.nav__links {
  gap: clamp(12px, 2vw, 28px);
}

.nav__theme-toggle {
  width: 40px;
  height: 40px;
  background: var(--panel-surface);
  border: 1px solid var(--color-border);
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding-bottom: clamp(24px, 4vw, 48px);
  overflow: visible;
}

.hero__content {
  margin-left: clamp(12px, 5vw, 96px);
  max-width: min(640px, 48vw);
  background: rgba(28, 28, 28, 0.78);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: var(--rd-blur);
  -webkit-backdrop-filter: var(--rd-blur);
  padding: clamp(20px, 4.6vw, 48px);
  min-width: 0;
}

.hero__title {
  font-size: clamp(3.1rem, 10vw, 7.2rem);
  letter-spacing: 0.02em;
}

.hero__title-line--accent {
  color: var(--classic-gold);
  background: none;
  -webkit-text-fill-color: var(--classic-gold);
  animation: none;
}

.hero__role {
  color: var(--text-secondary);
}

.hero__tagline,
.about__bio,
.project-card__desc,
.contact__subtitle {
  color: var(--text-secondary);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 24px);
}

.hero__stat {
  background: var(--charcoal-base);
  border: 1px solid var(--color-border);
  border-radius: var(--rd-radius);
  padding: 12px 14px;
  min-width: 0;
}

.hero__stat-number {
  color: var(--classic-gold);
  text-shadow: 0 0 22px rgba(212, 175, 55, 0.34);
}

.hero__quick-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: clamp(14px, 3vw, 24px);
}

.hero__meta-item {
  background: var(--charcoal-base);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}

.hero__meta-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose-gold);
  margin-bottom: 4px;
}

.hero__services {
  margin-top: clamp(14px, 3vw, 28px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero__service {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--charcoal-base);
  min-width: 0;
  overflow: hidden;
}

.hero__service h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.hero__service p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.about__container,
.skills__container,
.projects__container,
.contact__container {
  max-width: 1320px;
}

.about__container,
.skills__container {
  max-width: 820px;
  display: block;
}

.contact__form,
.project-card,
.about__stat-card,
.about__internship {
  background: var(--panel-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--rd-radius);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

.about__stat-card:hover,
.project-card:hover,
.about__internship:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(212, 175, 55, 0.18);
}

.about__timeline {
  margin: 18px 0 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--rd-radius);
  background: var(--panel-surface);
  padding: 16px;
}

.about__timeline-title {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--classic-gold);
}

.about__timeline-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
}

.about__timeline-item:first-of-type {
  border-top: none;
}

.about__timeline-year {
  font-family: var(--font-body);
  color: var(--classic-gold);
}

.section__heading-label,
.skills__cat-title,
.form__label,
.hero__eyebrow {
  color: var(--rose-gold);
}

.projects__grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.project-card {
  grid-column: span 6;
}

.project-card:nth-child(1),
.project-card:nth-child(4) {
  grid-column: span 7;
}

.project-card:nth-child(2),
.project-card:nth-child(3),
.project-card:nth-child(5) {
  grid-column: span 5;
}

.project-card__tag {
  background: rgba(183, 110, 121, 0.12);
  border: 1px solid rgba(183, 110, 121, 0.3);
  color: var(--rose-gold-light);
  border-radius: var(--radius-pill);
}

.skills__categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.skills__category {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--rd-radius);
  background: var(--panel-surface);
}

.skill-tag {
  border-radius: var(--radius-pill);
  border-color: rgba(183, 110, 121, 0.35);
}

.contact__body {
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(18px, 4vw, 48px);
}

.contact__info {
  padding: clamp(14px, 3vw, 28px);
  border: 1px solid var(--color-border);
  border-radius: var(--rd-radius);
  background: var(--panel-surface);
}

.contact__social-link {
  background: var(--charcoal-base);
  border: 1px solid var(--color-border);
  text-decoration: none;
}

.contact__social-link:hover {
  border-color: var(--classic-gold);
  color: var(--classic-gold);
  text-decoration: none;
}

.contact__form {
  padding: clamp(14px, 3vw, 26px);
}

.contact__cta-panel {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(14px, 3vw, 28px);
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--rd-radius);
  background: var(--panel-surface);
  padding: clamp(14px, 3vw, 24px);
  margin-bottom: clamp(18px, 4vw, 32px);
}

.contact__cta-copy h3 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin-bottom: 8px;
  color: var(--classic-gold);
}

.contact__cta-copy p {
  color: var(--text-secondary);
}

.contact__cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form__input {
  background: var(--charcoal-base);
  border: 1px solid var(--color-border);
  color: var(--text-primary);
}

.form__input:focus {
  border-color: rgba(212, 175, 55, 0.64);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.14);
}

.footer {
  border-top: 1px solid var(--color-border);
  background: var(--void-black);
}

.footer__text,
.footer__copy {
  color: var(--text-secondary);
}

.divider-gold {
  height: 1px;
  width: 100%;
  background: var(--grad-black-gold);
  border: none;
  opacity: 0.55;
}

@media (max-width: 1100px) {
  .projects__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card,
  .project-card:nth-child(1),
  .project-card:nth-child(2),
  .project-card:nth-child(3),
  .project-card:nth-child(4),
  .project-card:nth-child(5) {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .about__container,
  .skills__container,
  .contact__body {
    grid-template-columns: 1fr;
  }

  .skills__categories {
    grid-template-columns: 1fr;
  }

  .hero__content {
    margin: 0 auto;
    max-width: min(640px, 92vw);
  }

  .hero__quick-meta,
  .hero__services,
  .contact__cta-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    height: 68px;
  }

  .hero__content {
    border-radius: 18px;
  }

  .hero__stats {
    grid-template-columns: 1fr;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .project-card__footer {
    flex-direction: column;
  }

  .project-card__btn {
    width: 100%;
    text-align: center;
  }
}
