@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Outfit:wght@100..900&family=Geist+Mono:wght@100..900&display=swap');

/* ==================================================================
   RYCODE — styles.css
   Palette: "Coal & Forged Gold"  |  Stack: vanilla CSS, mobile-first

   TABLE OF CONTENTS
   -----------------
   1.  DESIGN TOKENS      (colors, type, spacing, radii, shadows)
   2.  RESET & BASE
   3.  LAYOUT HELPERS     (container, section)
   4.  TYPOGRAPHY
   5.  HEADER / NAV
   6.  HERO
   7.  STATS
   8.  ABOUT
   9.  PROJECTS
   10. CONTACT
   11. FOOTER
   12. BUTTONS, TAGS, BADGES
   13. REVEAL & MOTION
   14. RESPONSIVE  (breakpoint: 768px)
   15. REDUCED MOTION  (accessibility override)
   16. NOSCRIPT BANNER
   ================================================================== */


/* ==================================================================
   1. DESIGN TOKENS
   ================================================================== */
:root {
  /* Palette — Frosted Slate & Cobalt Indigo (Light Mode) */
  --bg:         #f8fafc;   /* Ultra-soft slate-white background */
  --surface:    rgba(255, 255, 255, 0.85); /* Premium frosted glass, higher opacity for readability */
  --surface-2:  rgba(255, 255, 255, 0.95); /* Active/hover frosted glass */
  --border:     rgba(255, 255, 255, 0.95); /* Bright white border to frame the glass */
  --border-hot: rgba(37, 99, 235, 0.35);   /* Softer cobalt blue active outline */

  --gold:       #1e40af;   /* Cobalt blue accent (mapped to --gold for compatibility) */
  --gold-hot:   #2563eb;   /* Cobalt hover state */
  --gold-dim:   rgba(37, 99, 235, 0.1);   /* Soft cobalt tint for backgrounds / eyebrows */

  --text:        #0f172a;   /* Slate-900 for high-contrast typography */
  --text-muted:  #334155;   /* Slate-700 for high-readability body copy */
  --text-faint:  #475569;   /* Slate-600 for metadata and captions */

  --live:    #2563eb;      /* Cobalt pulse for "Live" pill */

  /* Type stack — premium variable fonts. Fallback to system fonts. */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Mono",
               Consolas, "Courier New", monospace;

  /* Scale — clamp() makes these fluid without media queries. */
  --fs-hero:    clamp(3rem, 10vw, 7.5rem);   /* 48 → 120 */
  --fs-h2:      clamp(1.75rem, 4vw, 2.75rem);
  --fs-h3:      clamp(1.25rem, 2vw, 1.5rem);
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-tiny:    0.75rem;

  --lh-tight: 1.05;
  --lh-snug:  1.35;
  --lh-body:  1.65;

  /* Spacing (base 8px). */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-card:  0 1px 0 rgba(255,255,255,0.8) inset,
                  0 6px 20px -2px rgba(15, 23, 42, 0.06),
                  0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-glow:  0 0 0 1px rgba(37, 99, 235, 0.2),
                  0 8px 30px -10px rgba(37, 99, 235, 0.12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --max-w: 1160px;
}


/* ==================================================================
   2. RESET & BASE
   ================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  background-image: 
    linear-gradient(rgba(37, 99, 235, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Film-grain overlay — gives the coal background a tactile, physical feel
   so large black areas don't look flat on OLED / high-contrast displays.
   SVG turbulence is inlined as a data URI so there's no extra request.
   pointer-events:none keeps it purely decorative; z-index 9999 stays
   above content but below any future modal that uses 10000+. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 160ms var(--ease);
}
a:hover { color: var(--gold-hot); }

:focus-visible {
  outline: 2px solid var(--gold-hot);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link: hidden until a keyboard user tabs into the page, then
   slides in from off-screen as a gold pill. Lets keyboard users
   bypass the 7-link nav and jump straight to <main>.
   Standard accessibility pattern — mouse users never see it. */
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  padding: 0.5rem 0.875rem;
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
  font-size: var(--fs-small);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 200ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

ul { list-style: none; padding: 0; margin: 0; }


/* ==================================================================
   3. LAYOUT HELPERS
   ================================================================== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

.section {
  padding-block: var(--s-9);
  border-top: 1px solid var(--border);
}


/* ==================================================================
   4. TYPOGRAPHY
   ================================================================== */
h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin: 0 0 var(--s-4);
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--border-hot);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.06);
}

.section-title {
  font-size: var(--fs-h2);
  max-width: 22ch;
  margin-bottom: var(--s-5);
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 62ch;
  margin: 0 0 var(--s-7);
}


/* ==================================================================
   5. HEADER / NAV
   ================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--s-4) var(--s-5);
  gap: var(--s-5);
}

.brand {
  display: inline-flex;
  align-items: center;
}
/* Logo lockup: element mark + "code" wordmark, rendered from /logo.svg.
   Height controls the whole lockup; width scales from the SVG viewBox (320×100). */
.brand-logo {
  display: block;
  height: 2rem;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.nav-links a {
  color: var(--text-muted);
  font-size: var(--fs-small);
  font-weight: 500;
  padding: var(--s-2) 0;
  position: relative;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); }
/* Suppress the global box outline on nav links — the animated underline
   below serves as the focus indicator, consistent with hover. */
.nav-links a:focus-visible { outline: none; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

.nav-cta {
  padding: var(--s-2) var(--s-4) !important;
  border: 1px solid var(--border-hot);
  border-radius: 999px;
  color: var(--gold) !important;
  background: rgba(37, 99, 235, 0.05);
}
.nav-cta:hover { background: rgba(37, 99, 235, 0.12); }
.nav-cta::after { display: none; }

/* Mobile hamburger (hidden on desktop). */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }


/* ==================================================================
   6. HERO
   ================================================================== */
.hero {
  position: relative;
  padding: var(--s-10) 0 var(--s-9);
  overflow: hidden;
  isolation: isolate;
  /* Default spotlight position lives in the center — script.js updates
     --mx / --my on mousemove. This default keeps the glow visible on
     first paint and on touch devices where there's no cursor. */
  --mx: 50%;
  --my: 40%;
}

/* Cursor-following glow. Sits above the forge gradient but below the
   hero content (z-index 0). Skipped under reduced-motion via §15. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mx) var(--my),
    rgba(37, 99, 235, 0.05),
    transparent 65%
  );
  transition: background-position 120ms var(--ease);
}

/* Make sure hero content stacks above the spotlight. */
.hero-inner { position: relative; z-index: 1; }

/* Animated gradient "forge" behind the hero text. Decorative only. */
.hero-bg {
  position: absolute;
  inset: -10% -10% 0 -10%;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 30% 20%, rgba(37, 99, 235, 0.08), transparent 75%),
    radial-gradient(50% 40% at 80% 10%, rgba(56, 189, 248, 0.12), transparent 70%),
    radial-gradient(40% 30% at 50% 90%, rgba(129, 140, 248, 0.10), transparent 70%);
  filter: blur(10px);
  animation: forge 18s var(--ease) infinite alternate;
}
@keyframes forge {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2%, -3%, 0) scale(1.08); }
}

.hero-inner { text-align: left; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-faint);
  margin: 0 0 var(--s-5);
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--gold);
  margin-bottom: var(--s-5);
}

.hero-tagline {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--text-muted);
  max-width: 38ch;
  margin: 0 0 var(--s-7);
  line-height: var(--lh-snug);
}

/* The rotating word — gold, with a subtle blinking caret. */
.type-target {
  color: var(--gold-hot);
  font-weight: 700;
  position: relative;
  white-space: nowrap;
}
.type-target::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: var(--gold-hot);
  transform: translateY(0.12em);
  /* Smooth opacity fade, not stepped — feels modern instead of CRT. */
  animation: caret 1.1s var(--ease) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
}


/* ==================================================================
   7. STATS
   ================================================================== */
.stats {
  padding-block: var(--s-8);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.stats-grid {
  display: grid;
  /* Two tiles: Live system + Surfaces in motion. Was a three-column
     grid when there was also a "Frameworks used" tile; dropped because
     a permanent zero doesn't carry information and the no-frameworks
     claim is already made in the About and Principles sections. */
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6);
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  transition: transform 260ms var(--ease);
}
/* Subtle lift + glow on the number — makes the stat block feel alive
   instead of frozen. Matches the project-card hover language. */
.stat:hover { transform: translateY(-2px); }
.stat:hover .stat-num {
  filter: drop-shadow(0 0 14px rgba(37, 99, 235, 0.12));
  transition: filter 260ms var(--ease);
}

.stat-num {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, var(--gold-hot), var(--gold-dim));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

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


/* ==================================================================
   7b. MANIFESTO — wake-up callout under the hero
   One belief, loud. Sits between the hero and About. No visuals,
   no chrome — the typography and a gold accent line do all the work.
   ================================================================== */
.manifesto {
  /* A thin gold-dim rule at top separates this from the hero without
     needing a full-bleed background — keeps the section quiet
     everywhere except the words themselves. */
  border-top: 1px solid var(--border);
  padding-top: var(--s-9, 5rem);
  padding-bottom: var(--s-9, 5rem);
  position: relative;
}
.manifesto::before {
  /* Short gold bar that drops into the top edge — a punctuation mark
     for the reader: "stop and read this." */
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
}
.manifesto-title {
  /* Gold, weight 600 — sits one step heavier than the hero (500) because
     manifesto copy is declarative, not just brand. Matches the restyled
     logo/hero language (flat gold, no silvery gradient). */
  font-size: clamp(2rem, 5.2vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 18ch;
  margin: 0 0 var(--s-5);
  color: var(--gold);
}
.manifesto-body {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0 0 var(--s-5);
}
.manifesto-kicker {
  /* The slap at the bottom — mono, gold, tight letter-spacing.
     Deliberately smaller than the body so it reads like a stamp
     rather than a second paragraph. */
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--gold);
  letter-spacing: 0.04em;
  margin: 0;
  padding-top: var(--s-4);
  border-top: 1px dashed var(--border-hot, rgba(37, 99, 235, 0.3));
  max-width: 62ch;
}


/* ==================================================================
   8. ABOUT
   ================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s-7);
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin: 0 0 var(--s-4);
  font-size: 1.0625rem;
}
.about-text p:last-child { margin-bottom: 0; }

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-5) var(--s-5) var(--s-6);
}
.about-card h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--s-4);
  color: var(--gold);
}
.about-card ul { display: grid; gap: var(--s-3); }
.about-card li {
  color: var(--text-muted);
  font-size: var(--fs-small);
  padding-left: var(--s-4);
  position: relative;
}
.about-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
}
.about-card strong { color: var(--text); }


/* ==================================================================
   8b. PRINCIPLES — "built with AI" transparency panel
   2x2 grid on desktop, stacked on mobile. Each card is a claim + proof,
   numbered so the set reads as a ranked stance, not a flat list.
   ================================================================== */
.principle-grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
  margin-top: var(--s-5);
}
@media (min-width: 768px) {
  .principle-grid {
    /* auto-fit lets the grid stay 2-wide at most normal widths but
       collapse to 1-wide if the container ever gets too narrow. */
    grid-template-columns: repeat(2, 1fr);
  }
}

.principle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  /* Subtle inner glow anchored to the top-left where the number lives. */
  background:
    radial-gradient(50% 80% at 0% 0%, rgba(37, 99, 235, 0.04), transparent 60%),
    var(--surface);
  transition: border-color 180ms var(--ease), transform 180ms var(--ease);
}
.principle-card:hover {
  border-color: var(--border-hot);
  transform: translateY(-2px);
}

.principle-num {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.2em;
  color: var(--gold);
  margin: 0 0 var(--s-3);
  font-weight: 600;
}

.principle-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: var(--lh-snug);
  margin: 0 0 var(--s-3);
  color: var(--text);
}

.principle-body {
  color: var(--text-muted);
  margin: 0;
}


/* ==================================================================
   9. PROJECTS
   ================================================================== */
/* Bento Grid Layout - Balanced, Multi-column Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  margin-top: var(--s-5);
}
@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-w2 {
    grid-column: span 2;
  }
}
@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bento-w2 {
    grid-column: span 2;
  }
}

/* Empty state — used by category sections that don't have a live
   project yet. Dashed border + muted palette signals "placeholder"
   without pretending to be a real card. */
.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-7) var(--s-6);
  text-align: center;
  background:
    radial-gradient(40% 80% at 50% 0%, rgba(37, 99, 235, 0.04), transparent 70%),
    var(--surface);
}
.empty-title {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin: 0 0 var(--s-3);
}
.empty-desc {
  color: var(--text-muted);
  max-width: 48ch;
  margin: 0 auto;
}

.project-card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  box-shadow: var(--shadow-card);
  /* 3D tilt setup — JS writes --rx / --ry as the mouse moves. */
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  /* Transform duration bumped to 350ms so the card has weight — it
     "settles" back to neutral on mouseleave instead of snapping. */
  transition: box-shadow 300ms var(--ease), border-color 300ms var(--ease), transform 350ms var(--ease), background 300ms var(--ease);
  will-change: transform;
}
.project-card:hover {
  border-color: var(--border-hot);
  background: var(--surface-2);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12), var(--shadow-glow);
}

.project-head,
.project-title,
.project-desc,
.tag-row,
.project-links {
  transition: transform 350ms var(--ease);
  transform: translateZ(0);
}

.project-card:hover .project-head { transform: translateZ(10px); }
.project-card:hover .project-title { transform: translateZ(22px); }
.project-card:hover .project-desc { transform: translateZ(14px); }
.project-card:hover .tag-row { transform: translateZ(8px); }
.project-card:hover .project-links { transform: translateZ(18px); }

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.card-category {
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.03);
}
.card-status.is-live {
  color: var(--live);
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.05);
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--live);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--live);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5); }
  100% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
}

.project-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.project-desc {
  color: var(--text-muted);
  margin: 0;
  font-size: var(--fs-small);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.tag-row li {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-hot);
  padding: 3px 8px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.05);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: auto;
  padding-top: var(--s-3);
}


/* ==================================================================
   10. CONTACT
   ================================================================== */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
}


/* ==================================================================
   11. FOOTER
   ================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--s-6);
  color: var(--text-faint);
  font-size: var(--fs-small);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 160ms var(--ease);
}
.footer-link:hover {
  color: var(--gold);
}


/* ==================================================================
   12. BUTTONS, TAGS, BADGES
   ================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 200ms var(--ease),
              background 200ms var(--ease),
              color 200ms var(--ease),
              border-color 200ms var(--ease),
              box-shadow 200ms var(--ease);
}
.btn span {
  display: inline-block;
  transition: transform 200ms var(--ease);
}
.btn:hover span {
  transform: translateX(4px);
}

.btn-primary {
  background: var(--gold);
  color: #ffffff; /* Clean white text on blue primary */
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  background: var(--gold-hot);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(37, 99, 235, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: rgba(37, 99, 235, 0.2);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-hot);
  background: rgba(37, 99, 235, 0.05);
}

.btn-disabled {
  background: transparent;
  color: var(--text-faint);
  border-color: var(--border);
  cursor: not-allowed;
  pointer-events: none;
}


/* ==================================================================
   13. REVEAL & MOTION
   Elements marked `.reveal` start hidden; JS adds `.is-in` when
   they enter the viewport, which runs the entrance animation.
   ================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.975);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* After the initial reveal animation finishes, restore the element's
   own hover transition timings so interactions feel snappy. Without
   this, `.js .reveal` keeps enforcing a 600ms transform transition
   which makes hover tilts and lifts feel sluggish. */
.js .reveal.is-in.project-card {
  transition: box-shadow 300ms var(--ease), border-color 300ms var(--ease), transform 350ms var(--ease), background 300ms var(--ease);
}
.js .reveal.is-in.stat {
  transition: transform 260ms var(--ease);
}


/* ==================================================================
   14. RESPONSIVE  (breakpoint: 768px)
   ================================================================== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    right: var(--s-5);
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--s-4);
    min-width: 220px;
    gap: var(--s-3);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms var(--ease), transform 180ms var(--ease);
  }
  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .section { padding-block: var(--s-8); }

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

  .stats-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .stat { padding-block: var(--s-3); border-top: 1px solid var(--border); }
  .stat:first-child { border-top: 0; }

  .project-grid > .project-card { max-width: none; }

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


/* ==================================================================
   15. REDUCED MOTION
   Respect the user's OS-level "reduce motion" setting. Animations
   stop, transitions shorten, reveal elements appear immediately.
   ================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .hero-bg { animation: none; }
  .live-dot { animation: none; }
  .type-target::after { animation: none; opacity: 1; }
}


/* ==================================================================
   16. NOSCRIPT BANNER
   ================================================================== */
.noscript-banner {
  background: var(--gold);
  color: var(--bg);
  padding: var(--s-3) var(--s-5);
  text-align: center;
  font-size: var(--fs-small);
}

/* ==================================================================
   17. SCROLL PROGRESS
   ================================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 1000;
  animation: scroll-progress auto linear;
  animation-timeline: scroll();
}
@keyframes scroll-progress {
  to { transform: scaleX(1); }
}
