/* ==========================================================================
   MATTHEW AGNITCH — PORTFOLIO STYLESHEET (v3)
   Shared by index.html, projects.html, contact.html. Pairs with script.js.
   Theme: bright white · deep navy text · electric blue → cyan → violet
   gradient accents · heavy on motion (tilt, glare, shimmer, aurora).
   COMMON EDITS:  colors → :root block  ·  fonts → @import + --font-* vars
   ========================================================================== */


/* --------------------------------------------------------------------------
   FONTS (Google Fonts)
   HOW TO SWAP: pick a font at fonts.google.com → "Get embed code" →
   "@import" tab → copy the URL into the line below → update the matching
   --font-* variable in :root. Done.
     Space Grotesk  → headings (geometric, technical, futuristic)
     Sora           → body text (clean, modern)
     JetBrains Mono → labels, tags, buttons (precise, technical)
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Sora:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');


/* --------------------------------------------------------------------------
   COLOR + DESIGN VARIABLES — edit here, updates everywhere
   -------------------------------------------------------------------------- */
:root {
  /* --bg: main page background (pure white = maximum brightness) */
  --bg: #FFFFFF;
  /* --bg-soft: alternate section background, a whisper of cool blue */
  --bg-soft: #F5F8FE;
  /* --ink: main text color (deep blue-black, softer than pure black) */
  --ink: #0A1124;
  /* --muted: secondary text — bios, descriptions, captions */
  --muted: #56607A;
  /* --accent: primary electric blue — links, hovers, focus rings */
  --accent: #2E5BFF;
  /* --accent-2: cyan — second stop of the signature gradient */
  --accent-2: #00C2FF;
  /* --accent-3: violet — third gradient stop, adds the futuristic edge */
  --accent-3: #7B5CFF;
  /* --grad: THE signature gradient. Used on buttons, headline words,
     card accent bars, and the scroll progress bar. */
  --grad: linear-gradient(110deg, var(--accent), var(--accent-2) 50%, var(--accent-3));
  /* --accent-tint: faint blue wash (badges, highlighted card) */
  --accent-tint: #F1F6FF;
  /* --line: hairline borders */
  --line: #E6EAF4;
  /* --glow: blue glow shadow for hovered cards/buttons */
  --glow: 0 22px 50px -16px rgba(46, 91, 255, 0.4);
  /* --shadow-soft: gentle resting shadow */
  --shadow-soft: 0 2px 12px rgba(10, 17, 36, 0.05);

  /* Fonts — keep in sync with the @import above */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Sora', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1160px;
  --radius: 20px;
  --radius-pill: 999px;
}


/* --------------------------------------------------------------------------
   RESET + BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Gradient-painted text. Static version: */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Animated version — the gradient slowly sweeps through the letters.
   Used on the hero name and big page titles. */
.grad-shimmer {
  background: linear-gradient(110deg,
    var(--accent), var(--accent-2), var(--accent-3),
    var(--accent-2), var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}


/* --------------------------------------------------------------------------
   SCROLL PROGRESS BAR — thin gradient line pinned to the very top of the
   page; script.js stretches it as you scroll.
   -------------------------------------------------------------------------- */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad);
  z-index: 200;
  border-radius: 0 3px 3px 0;
}


/* --------------------------------------------------------------------------
   NAVIGATION — floating frosted pill, fixed near the top
   EDIT: logo + link labels live in the HTML.
   -------------------------------------------------------------------------- */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 100; pointer-events: none; }
.nav-inner {
  pointer-events: auto;
  max-width: var(--max-width);
  margin: 0 24px;
  padding: 10px 10px 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
}
@media (min-width: 1232px) { .nav-inner { margin-left: auto; margin-right: auto; } }

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.nav-logo .dot { color: var(--accent); }

.nav-links { display: flex; gap: 6px; list-style: none; align-items: center; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.2s ease;
}
/* Sliding gradient underline on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 6px;
  height: 2px; border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }
.nav-links a:hover { color: var(--accent); }
/* Current page = filled dark pill */
.nav-links a.active { background: var(--ink); color: #fff; }
.nav-links a.active::after { display: none; }


/* --------------------------------------------------------------------------
   BUTTONS
   .btn         → gradient pill, glow, animated shine sweep on hover
   .btn-outline → white pill, lights up blue on hover
   Both are "magnetic" (drift toward your cursor — script.js) and press
   down slightly on click.
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  background: var(--grad);
  background-size: 160% 100%;
  color: #fff;
  border: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 26px -10px rgba(46, 91, 255, 0.55);
  transition: transform 0.18s ease, box-shadow 0.3s ease,
              background-position 0.4s ease;
}
.btn:hover { box-shadow: var(--glow); background-position: 100% 0; }
.btn:active { transform: scale(0.95) !important; }  /* press-down */

/* The shine: a tilted white streak that sweeps across on hover */
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent,
              rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}
.btn:hover::before { left: 130%; }

.btn-outline {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 12px 26px -12px rgba(46, 91, 255, 0.35);
}
.btn-outline::before {
  background: linear-gradient(100deg, transparent,
              rgba(46, 91, 255, 0.12), transparent);
}


/* --------------------------------------------------------------------------
   SECTION LABELS ("eyebrows") — pill badge with gradient dot
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid #DCE7FF;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.section { padding: 110px 0; }
.section-soft { background: var(--bg-soft); }
.section-intro { color: var(--muted); max-width: 620px; margin-bottom: 52px; }


/* --------------------------------------------------------------------------
   HERO — full viewport. Layers, back to front:
   1. faint dot grid  2. three drifting aurora blobs
   3. a spotlight that follows your cursor (script.js)  4. the content
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 150px 0 90px;
  overflow: hidden;
}

/* Layer 1: dot grid, fading toward the bottom */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(10, 17, 36, 0.10) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  pointer-events: none;
}

/* Layer 2: aurora blobs. To recolor, edit the rgba() in .one/.two/.three.
   To calm the motion down, increase the animation duration. */
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(95px);
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-glow.one   { top: -160px; right: -100px; background: rgba(0, 194, 255, 0.20); }
.hero-glow.two   { bottom: -220px; left: -160px; background: rgba(46, 91, 255, 0.16); animation-delay: -5s; }
.hero-glow.three { top: 30%; left: 38%; width: 460px; height: 460px;
                   background: rgba(123, 92, 255, 0.13); animation-delay: -9s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-40px, 35px) scale(1.12); }
  100% { transform: translate(45px, -25px) scale(0.96); }
}

/* Layer 3: cursor spotlight. script.js moves --sx/--sy with the mouse. */
.hero-spotlight {
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(620px circle at var(--sx, 50%) var(--sy, 35%),
              rgba(46, 91, 255, 0.10), transparent 65%);
  transition: background 0.12s linear;
}

.hero-content { position: relative; max-width: 880px; }

/* Status badge — pulsing dot + label */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 30px;
}
.hero-badge .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #18C964;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(24, 201, 100, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(24, 201, 100, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 201, 100, 0); }
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* The big name — last name uses .grad-shimmer (animated gradient) */
.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 8.5vw, 6.6rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero-bio { max-width: 600px; color: var(--muted); margin-bottom: 40px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Bouncing scroll hint at the bottom of the hero */
.hero-scroll {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* Hero entrance: staggered fade + rise + de-blur (pure CSS) */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.hero-stagger { opacity: 0; animation: riseIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.hero-stagger:nth-child(1) { animation-delay: 0.05s; }
.hero-stagger:nth-child(2) { animation-delay: 0.16s; }
.hero-stagger:nth-child(3) { animation-delay: 0.28s; }
.hero-stagger:nth-child(4) { animation-delay: 0.40s; }
.hero-stagger:nth-child(5) { animation-delay: 0.52s; }


/* --------------------------------------------------------------------------
   SCROLL-TRIGGERED REVEALS
   class="reveal" → starts invisible, slightly low, and blurred; script.js
   adds .visible when it scrolls into view. Cards inside a grid get an
   automatic stagger (script.js sets a per-card delay).
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  filter: blur(7px);
  transition: opacity 0.8s ease,
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }


/* --------------------------------------------------------------------------
   SKILL TAGS — chips that fill with the gradient and lift on hover
   -------------------------------------------------------------------------- */
.skill-tags { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; max-width: 820px; }
.skill-tags li {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.22s ease, color 0.22s ease,
              border-color 0.22s ease, box-shadow 0.25s ease;
  cursor: default;
  z-index: 0;
}
/* Gradient fill that rises from the bottom on hover */
.skill-tags li::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}
.skill-tags li:hover {
  transform: translateY(-4px);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 26px -12px rgba(46, 91, 255, 0.5);
}
.skill-tags li:hover::before { transform: translateY(0); }


/* --------------------------------------------------------------------------
   CARDS (project cards + AI cards)
   On hover: 3D tilt toward your cursor with a moving light glare
   (script.js drives --mx/--my and the rotation), blue glow shadow,
   and a gradient bar that slides up the left edge.
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease, border-color 0.3s ease;
}
/* Gradient accent bar (left edge) — slides up on hover */
.card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--grad);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}
/* Light glare that follows the cursor across the card surface */
.card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(46, 91, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover { box-shadow: var(--glow); border-color: #D6E1FF; }
.card:hover::before { transform: scaleY(1); }
.card:hover::after { opacity: 1; }

.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  margin-bottom: 16px;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.card p { color: var(--muted); font-size: 0.95rem; }

.card-tools {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink);
}
.card-tools span { color: var(--muted); }

/* Emoji icon tile — wiggles when the card is hovered */
.card-icon {
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  border-radius: 14px;
  background: var(--accent-tint);
  border: 1px solid #DCE7FF;
  margin-bottom: 18px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover .card-icon { transform: scale(1.12) rotate(-6deg); }

/* Highlighted "This Website" card: bar always on + tinted background */
.card-highlight { background: var(--accent-tint); }
.card-highlight::before { transform: scaleY(1); }


/* --------------------------------------------------------------------------
   GRIDS — 2 columns desktop, 1 column phones
   -------------------------------------------------------------------------- */
.grid-projects, .grid-ai { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }


/* --------------------------------------------------------------------------
   SPLIT LAYOUT — heading left, content right (Skills section)
   -------------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.split p { color: var(--muted); }


/* --------------------------------------------------------------------------
   CONTACT PAGE — link cards left, form panel right
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
.contact-info > p { color: var(--muted); margin-bottom: 30px; max-width: 420px; }

.contact-links { list-style: none; display: grid; gap: 12px; }
.contact-links li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.contact-links li:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px -12px rgba(46, 91, 255, 0.4);
}
.contact-links .label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}
.contact-links a { font-weight: 600; font-size: 0.95rem; transition: color 0.2s ease; }
.contact-links li:hover a { color: var(--accent); }

/* Form panel — gradient hairline across its top edge */
.contact-form {
  position: relative;
  display: grid;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.contact-form::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad);
}

.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.97rem;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 91, 255, 0.13);
}
.form-field textarea { resize: vertical; min-height: 160px; }


/* --------------------------------------------------------------------------
   FOOTER — one line; text left, social links right
   -------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--muted);
}
.footer-social { display: flex; gap: 22px; list-style: none; }
.footer-social a { transition: color 0.2s ease; }
.footer-social a:hover { color: var(--accent); }


/* --------------------------------------------------------------------------
   PAGE HEADERS (projects / contact) — title over fading dot grid + glow
   -------------------------------------------------------------------------- */
.page-header { position: relative; padding: 195px 0 70px; overflow: hidden; }
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(10, 17, 36, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  pointer-events: none;
}
.page-header::after {
  content: '';
  position: absolute;
  top: -200px; right: -140px;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: rgba(0, 194, 255, 0.14);
  filter: blur(95px);
  pointer-events: none;
}
.page-header .container { position: relative; z-index: 1; }
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  letter-spacing: -0.03em;
  line-height: 1.0;
}
.page-header p { color: var(--muted); max-width: 560px; margin-top: 20px; }


/* --------------------------------------------------------------------------
   ACCESSIBILITY: REDUCED MOTION — don't remove
   (script.js also disables tilt/magnetic/spotlight when this is set)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-stagger { animation: none; opacity: 1; }
  .hero-glow, .hero-badge .pulse, .hero-scroll, .grad-shimmer { animation: none; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}


/* --------------------------------------------------------------------------
   TABLET (≤ 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 84px 0; }
  .page-header { padding-top: 165px; }
  .hero-scroll { display: none; }
}


/* --------------------------------------------------------------------------
   MOBILE (≤ 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .grid-projects, .grid-ai { grid-template-columns: 1fr; }
  .nav { top: 10px; }
  .nav-inner { margin: 0 12px; padding-left: 16px; }
  .nav-links { gap: 2px; }
  .nav-links a { font-size: 0.66rem; padding: 8px 10px; }
  .nav-links a::after { left: 10px; right: 10px; }
  .nav-logo { font-size: 1.1rem; }
  .hero { padding-top: 115px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .section { padding: 64px 0; }
  .card { padding: 26px; }
  .contact-form { padding: 26px; }
  .footer-inner { flex-direction: column; gap: 14px; }
}


/* ==========================================================================
   INTRO OVERLAY — multi-stage "network forming" landing sequence
   Full-screen panel with a canvas network that assembles and converges,
   then the monogram/name/tagline resolve, then the panel lifts away.
   script.js drives the stages and adds .intro-done to lift off.
   ========================================================================== */
#intro {
  position: fixed;
  inset: 0;
  z-index: 9999;                 /* above everything */
  background: #0A1124;           /* dark canvas reads more "cinematic" */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease, transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}
/* The lift-away: fade + slide up, then script.js removes the node */
#intro.intro-done {
  opacity: 0;
  transform: translateY(-40px);
  pointer-events: none;
}
#intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

#intro-center {
  position: relative;
  text-align: center;
  z-index: 1;
}
.intro-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 10vw, 6rem);
  letter-spacing: -0.02em;
  color: #fff;                   /* white on dark */
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  animation: introFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.6s forwards;
}
.intro-logo .dot { color: var(--accent-2); }   /* cyan dot pops on dark */
.intro-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #fff;
  margin-top: 18px;
  opacity: 0;
  animation: introFade 0.9s ease 2.1s forwards;
}
/* The gradient line that draws out under the name */
.intro-line {
  height: 2px;
  width: 0;
  margin: 20px auto 0;
  background: var(--grad);
  border-radius: 2px;
  animation: introLine 1s cubic-bezier(0.22, 1, 0.36, 1) 2.4s forwards;
}
.intro-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 18px;
  opacity: 0;
  animation: introFade 0.9s ease 2.7s forwards;
}
.intro-skip {
  position: absolute;
  bottom: 28px; right: 28px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  animation: introFade 0.6s ease 0.8s forwards;
}
.intro-skip:hover { color: #fff; }

@keyframes introFade { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes introLine { to { width: 200px; } }

/* While the intro is showing, lock scrolling. script.js removes this. */
body.intro-active { overflow: hidden; }
/* Hero entrance waits until the overlay lifts. */
body.intro-active .hero-stagger { animation-play-state: paused; }


/* ==========================================================================
   WHAT I DO — line-art icon cards (index.html)
   Four cards; each holds a hand-drawn SVG whose strokes "write on" when
   the card scrolls into view, then animate on hover.
   ========================================================================== */
.grid-do {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.do-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease, border-color 0.3s ease;
}
/* gradient top edge that grows in on hover */
.do-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.do-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--glow);
  border-color: #D6E1FF;
}
.do-card:hover::after { transform: scaleX(1); }

/* The icon tile */
.do-icon {
  width: 64px; height: 64px;
  margin-bottom: 20px;
  color: var(--accent);            /* SVG strokes inherit this */
}
.do-icon svg { width: 100%; height: 100%; }

/* The line-art strokes. They start "erased" (dash offset = full length)
   and draw on when the card gets .visible (script.js handles timing via
   the reveal system). On hover, the stroke color deepens. */
.do-icon .dl {
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
/* When the card is revealed, draw the strokes on (cascade per stroke) */
.do-card.visible .do-icon .dl { stroke-dashoffset: 0; }
.do-icon .dl:nth-child(2) { transition-delay: 0.08s; }
.do-icon .dl:nth-child(3) { transition-delay: 0.16s; }
.do-icon .dl:nth-child(4) { transition-delay: 0.24s; }
.do-icon .dl:nth-child(5) { transition-delay: 0.32s; }
.do-icon .dl:nth-child(6) { transition-delay: 0.40s; }
.do-icon .dl:nth-child(n+7) { transition-delay: 0.48s; }

/* Icon reacts on card hover: a gentle pop */
.do-card:hover .do-icon { animation: iconPop 0.5s ease; }
@keyframes iconPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.do-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.do-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* Responsive: 2-up on tablet, 1-up on phone */
@media (max-width: 900px) {
  .grid-do { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-do { grid-template-columns: 1fr; }
}

/* Reduced motion: show icons fully drawn, skip the intro choreography */
@media (prefers-reduced-motion: reduce) {
  .do-icon .dl { stroke-dashoffset: 0; transition: none; }
  .intro-logo, .intro-name, .intro-line { animation: none; opacity: 1; width: 180px; }
}
