/* ═══════════════════════════════════════════════════════════════
   GregScottKirk.com — Shared Stylesheet
   Covers: all pages, shared components, page-specific sections
════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   1. DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  --cobalt:       #1669F0;
  --cobalt-light: #4D8EFF;
  --cobalt-glow:  rgba(22, 105, 240, 0.25);
  --cobalt-dim:   rgba(22, 105, 240, 0.08);
  --cobalt-line:  rgba(22, 105, 240, 0.12);

  --p9-red:       #a70000;
  --p9-red-light: #c41a1a;
  --p9-red-glow:  rgba(167, 0, 0, 0.28);
  --p9-red-dim:   rgba(167, 0, 0, 0.08);

  --bg-base:      #000000;
  --bg-surface:   #0D0D0D;
  --bg-elevated:  #1A1A1A;
  --bg-card:      #111111;

  --text-primary:   #EAEAF4;
  --text-secondary: #8A8AAC;
  --text-muted:     #44445A;

  --green:  #00E87A;
  --amber:  #FFB800;
  --red:    #FF3B3B;

  --border: rgba(255,255,255,0.06);
  --border-cobalt: rgba(22,105,240,0.2);

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  --radius: 6px;
  --radius-lg: 12px;
  --timeline-line-width: 2px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--cobalt); color: #fff; }

/* ─────────────────────────────────────────────
   3. SCROLLBAR
───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--cobalt), var(--p9-red));
  border-radius: 2px;
}

/* ─────────────────────────────────────────────
   4. MATRIX CANVAS
───────────────────────────────────────────── */
#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   5. NAVIGATION
───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s, border-color 0.3s;
}

.nav.scrolled {
  background: rgba(0,0,0,0.97);
  border-bottom: 1px solid var(--border);
}

/* GSK Mark */
.gsk-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}
.gsk-mark svg {
  width: 38px; height: 38px;
  flex-shrink: 0;
  transition: filter 0.3s;
}
.gsk-mark:hover svg {
  filter: drop-shadow(0 0 8px var(--cobalt));
}
.gsk-mark-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
  line-height: 1.3;
}
.gsk-mark-label strong {
  display: block;
  color: var(--text-primary);
  font-size: 16px;
  letter-spacing: 0.06em;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--cobalt-light); }

.nav-cta {
  color: var(--p9-red-light) !important;
  border: 1px solid var(--p9-red) !important;
  padding: 7px 18px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s !important;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--p9-red) !important;
  color: #fff !important;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─────────────────────────────────────────────
   6. BUTTONS
───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--p9-red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(22,105,240,0.35);
}
.btn-primary:hover {
  background: var(--p9-red-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(22,105,240,0.5);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--cobalt); color: var(--cobalt-light); }

/* ─────────────────────────────────────────────
   7. SHARED SECTION UTILITIES
───────────────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--cobalt);
}
.section-title {
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}
.section-header { 
  margin-bottom: 72px; 
}

/* ─────────────────────────────────────────────
   8. HOME — HERO
───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 64px;
  padding: 140px 48px 100px;
  overflow: hidden;
  z-index: 1;
}

/* Dark vignette for readability over matrix */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.50) 60%, rgba(0,0,0,0.72) 100%);
  pointer-events: none;
  z-index: -1;
}

/* Cobalt glow — single source */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 22% 42%, rgba(22,105,240,0.15) 0%, transparent 52%);
  pointer-events: none;
  z-index: -1;
}

.hero-content { position: relative; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--cobalt);
}

.hero-headline {
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero-headline .name {
  display: block;
  background: linear-gradient(135deg, #FFFFFF 40%, var(--cobalt-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subline {
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}
.hero-subline .accent       { color: var(--cobalt-light); font-weight: 500; }
.hero-subline .accent-red   { color: var(--p9-red-light); font-weight: 500; }

.hero-divider {
  width: 120px; height: 2px;
  background: linear-gradient(to right, var(--cobalt), var(--p9-red), transparent);
  margin-bottom: 36px;
}

.hero-intro {
  max-width: 580px;
  font-size: clamp(15px, 1.3vw, 17px);
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-secondary);
  padding-left: 20px;
  border-left: 2px solid var(--cobalt);
  margin-bottom: 48px;
}
.hero-intro strong { color: var(--text-primary); font-weight: 500; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 48px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: pulseDown 2s ease-in-out infinite;
  z-index: 2;
}
.scroll-indicator::before {
  content: '';
  display: block;
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--cobalt));
}

/* ─────────────────────────────────────────────
   9. HOME — PORTRAIT PLACEHOLDER
───────────────────────────────────────────── */
.portrait-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
  background: var(--bg-elevated);
  border: 1px solid var(--border-cobalt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Corner accent brackets */
.portrait-frame::before,
.portrait-frame::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--p9-red);
  border-style: solid;
}
.portrait-frame::before {
  top: 12px; left: 12px;
  border-width: 2px 0 0 2px;
}
.portrait-frame::after {
  bottom: 12px; right: 12px;
  border-width: 0 2px 2px 0;
}

.portrait-corner-tr,
.portrait-corner-bl {
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--cobalt);
  border-style: solid;
}
.portrait-corner-tr { top: 12px; right: 12px; border-width: 2px 2px 0 0; }
.portrait-corner-bl { bottom: 12px; left: 12px; border-width: 0 0 2px 2px; }

/* Scan-line overlay inside portrait */
.portrait-frame::before {
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(22,105,240,0.03) 3px,
    rgba(22,105,240,0.03) 4px
  );
  width: 100%; height: 100%;
  border: none;
  top: 0; left: 0;
  z-index: 1;
  pointer-events: none;
}

/* Reset and redefine corners using named elements instead */
.portrait-c { position: absolute; width: 22px; height: 22px; border-color: var(--p9-red-light); border-style: solid; }
.portrait-c.tl { top: 14px; left: 14px; border-width: 2px 0 0 2px; }
.portrait-c.tr { top: 14px; right: 14px; border-width: 2px 2px 0 0; }
.portrait-c.bl { bottom: 14px; left: 14px; border-width: 0 0 2px 2px; }
.portrait-c.br { bottom: 14px; right: 14px; border-width: 0 2px 2px 0; }

.portrait-icon {
  width: 64px; height: 64px;
  border-radius: 50%;.section-subtitle
  border: 1px dashed rgba(22,105,240,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}
.portrait-icon svg { width: 28px; height: 28px; opacity: 0.4; }

.portrait-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.8;
  position: relative;
  z-index: 2;
}
.portrait-label strong {
  display: block;
  color: var(--cobalt-light);
  font-size: 10px;
  margin-bottom: 4px;
}

.portrait-subtitle {
  position: absolute;
  bottom: 40px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  z-index: 2;
}

/* ─────────────────────────────────────────────
   10. HOME — PHILOSOPHY STRIP
───────────────────────────────────────────── */
.philosophy-strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 32px 48px;
  overflow: hidden;
}
.philosophy-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cobalt), var(--cobalt-light), transparent);
}
.philosophy-inner {
  display: flex;
  align-items: center;
  gap: 56px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.philosophy-stat { text-align: center; flex: 1; min-width: 140px; }
.philosophy-stat .num {
  font-size: 34px;
  font-weight: 900;
  color: var(--cobalt-light);
  letter-spacing: -0.04em;
  line-height: 1;
}
.philosophy-stat .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 8px;
}
.philosophy-sep { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }


/* ─────────────────────────────────────────────
   11. HOME — ENTRY CARDS
───────────────────────────────────────────── */
.entry-section {
  position: relative;
  z-index: 1;
  background: var(--bg-base);
  padding: 100px 48px;
}
.entry-section .section-header { text-align: center; }
.entry-section .section-label { justify-content: center; }
.entry-section .section-label::before { display: none; }
.entry-section .section-subtitle { margin: 0 auto; text-align: center; }

/* ─────────────────────────────────────────────
   12. HOME — BUILD LOG
───────────────────────────────────────────── */
.portfolio-section,
.module-section {
  position: relative;
  z-index: 1;
  background: var(--bg-base);
  padding: 100px 48px;
}
.portfolio-section .section-header, .module-section .section-header { text-align: center; }
.portfolio-section .section-header .section-label, .module-section .section-header .section-label { justify-content: center; }
.portfolio-section .section-header .section-label::before, .module-section .section-header .section-label::before { display: none; }
.portfolio-section .section-header .section-subtitle, .module-section .section-header .section-subtitle { margin: 0 auto; text-align: center; }

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 5 cards: first row 3, second row 2 centered */
.entry-card:nth-child(4) { grid-column: 1 / 2; margin-left: auto; }
.entry-card:nth-child(5) { grid-column: 2 / 3; }

.entry-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.entry-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--cobalt), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.entry-card:hover {
  border-color: var(--border-cobalt);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(22,105,240,0.12);
}
.entry-card:hover::before { opacity: 1; }

.entry-card-num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--cobalt-light);
  text-transform: uppercase;
}
.entry-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--cobalt-dim);
  border: 1px solid var(--border-cobalt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt-light);
}
.entry-card-icon svg { width: 20px; height: 20px; }
.entry-card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.entry-card-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}
.entry-card-link {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.entry-card:hover .entry-card-link { gap: 10px; }

/* ─────────────────────────────────────────────
   13. CTA SECTION
───────────────────────────────────────────── */
.cta-section {
  position: relative;
  z-index: 1;
  padding: 120px 48px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(22,105,240,0.10) 0%, transparent 60%);
  pointer-events: none;
}
.cta-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.cta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  margin-bottom: 20px;
}
.cta-title {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 24px;
}
.cta-body {
  font-size: 17px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 44px;
}
.cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ─────────────────────────────────────────────
   14. FOOTER
───────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-base);
  padding: 36px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-left { display: flex; align-items: center; gap: 20px; }
.footer-gsk { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-gsk svg { width: 26px; height: 26px; }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  line-height: 1.7;
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-right a {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-right a:hover { color: var(--cobalt-light); }
.footer-domains {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-domains span {
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 20px;
  color: var(--cobalt-light);
}
.footer-domains span.p9 {
  color: var(--p9-red-light);
  border-color: var(--p9-red);
}
.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* ─────────────────────────────────────────────
   15. INNER PAGE HERO
───────────────────────────────────────────── */
.inner-hero {
  position: relative;
  padding: 160px 48px 80px;
  z-index: 1;
  overflow: hidden;
}
.inner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
  z-index: -1;
}
.inner-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 18% 50%, rgba(22,105,240,0.12) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}
.inner-hero-content { max-width: 900px; }

/* ─────────────────────────────────────────────
   16. TIMELINE PAGE STYLES
───────────────────────────────────────────── */
.timeline-wrapper {
  position: relative;
  z-index: 1;
  background: var(--bg-base);
}
.timeline-section {
  position: relative;
  padding: 80px 48px 140px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Track + progress */
.timeline { position: relative; }
.timeline-track {
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: var(--timeline-line-width);
  background: rgba(255,255,255,0.06);
}
.timeline-progress {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--cobalt), var(--cobalt-light) 40%, var(--p9-red-light) 75%, var(--p9-red));
  transition: height 0.1s linear;
  box-shadow: 0 0 12px var(--cobalt-glow);
}

/* Phase items */
.phase-item {
  position: relative;
  padding: 0 0 96px 72px;
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.phase-item:last-child { padding-bottom: 0; }
.phase-item.active { opacity: 1; transform: translateX(0); }

.phase-node {
  position: absolute;
  left: -8px; top: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: var(--timeline-line-width) solid var(--text-muted);
  background: var(--bg-base);
  transition: border-color 0.4s, box-shadow 0.4s;
  z-index: 2;
}
.phase-item.active .phase-node {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 4px var(--cobalt-glow), 0 0 16px var(--cobalt-glow);
}
.phase-item[data-phase="4"].active .phase-node {
  border-color: var(--p9-red-light);
  box-shadow: 0 0 0 4px var(--p9-red-glow), 0 0 16px var(--p9-red-glow);
}
.phase-node::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--cobalt);
  opacity: 0;
  transition: opacity 0.4s;
}
.phase-item.active .phase-node::after { opacity: 1; }
.phase-item[data-phase="4"].active .phase-node::after { background: var(--p9-red); }

.phase-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}
.phase-number {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--cobalt-light);
  text-transform: uppercase;
}
.phase-dates {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.phase-title {
  font-size: clamp(20px, 2.8vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 24px;
}
.phase-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  align-items: start;
}
.phase-content { display: flex; flex-direction: column; gap: 16px; }
.phase-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color 0.3s;
}
.phase-item.active .phase-block { border-color: rgba(22,105,240,0.2); }
.phase-block-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  margin-bottom: 10px;
}
.phase-block p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-secondary);
}
.phase-block p strong { color: var(--text-primary); font-weight: 500; }

.phase-takeaway {
  background: var(--cobalt-dim);
  border: 1px solid rgba(22,105,240,0.2);
  border-left: 3px solid var(--cobalt);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.phase-takeaway p { font-size: 13px; font-style: italic; color: var(--cobalt-light); line-height: 1.65; }

/* Status boxes */
.status-box {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  font-family: var(--font-mono);
  transition: border-color 0.4s;
  position: relative;
  overflow: hidden;
}
.phase-item.active .status-box { border-color: rgba(22,105,240,0.35); }
.status-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--cobalt), transparent);
  opacity: 0;
  transition: opacity 0.4s 0.3s;
}
.phase-item.active .status-box::before { opacity: 1; }

.status-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.green  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.amber  { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.status-dot.red    { background: var(--p9-red-light); box-shadow: 0 0 6px var(--p9-red-glow); }
.status-dot.cobalt { background: var(--cobalt-light); box-shadow: 0 0 6px var(--cobalt); }
.phase-item.active .status-dot.amber,
.phase-item.active .status-dot.red { animation: dotPulse 1.5s ease-in-out infinite; }

.status-header-title { font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); }
.status-row { display: flex; flex-direction: column; gap: 10px; }
.status-line { display: flex; flex-direction: column; gap: 3px; }
.status-key { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); }
.status-value {
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.phase-item.active .status-value { opacity: 1; transform: translateY(0); }
.status-value.s-green  { color: var(--green); }
.status-value.s-amber  { color: var(--amber); }
.status-value.s-red    { color: var(--p9-red-light); }
.status-value.s-cobalt { color: var(--cobalt-light); }
.status-value.s-white  { color: var(--text-primary); }
.status-timestamp {
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Phase bg imagery */
.phase-bg {
  position: absolute;
  right: -48px; top: 0;
  width: 260px; height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
}
.phase-item.active .phase-bg { opacity: 0.12; }
.phase-bg-books {
  background:
    repeating-linear-gradient(0deg, rgba(22,105,240,0.4) 0px, rgba(22,105,240,0.4) 2px, transparent 2px, transparent 20px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 14px, rgba(255,255,255,0.05) 14px, rgba(255,255,255,0.05) 16px);
  background-color: var(--bg-elevated);
}
.phase-bg-engine {
  background:
    radial-gradient(circle at 50% 50%, rgba(22,105,240,0.3) 0%, transparent 60%),
    repeating-conic-gradient(rgba(255,255,255,0.03) 0deg, rgba(255,255,255,0.03) 10deg, transparent 10deg, transparent 20deg);
  background-color: var(--bg-elevated);
}
.phase-bg-build {
  background:
    repeating-linear-gradient(45deg, rgba(22,105,240,0.08) 0px, rgba(22,105,240,0.08) 1px, transparent 1px, transparent 12px),
    repeating-linear-gradient(-45deg, rgba(22,105,240,0.08) 0px, rgba(22,105,240,0.08) 1px, transparent 1px, transparent 12px);
  background-color: var(--bg-elevated);
}
.phase-bg-surgery {
  background:
    radial-gradient(ellipse at 30% 70%, rgba(167,0,0,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(255,184,0,0.08) 0%, transparent 50%);
  background-color: var(--bg-elevated);
}
.phase-bg-ai {
  background:
    radial-gradient(circle at 50% 50%, rgba(22,105,240,0.25) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent 0px, transparent 3px, rgba(22,105,240,0.05) 3px, rgba(22,105,240,0.05) 4px);
  background-color: var(--bg-elevated);
}

/* ─────────────────────────────────────────────
   17. ABOUT PAGE
───────────────────────────────────────────── */
.about-section {
  position: relative;
  z-index: 1;
  background: var(--bg-base);
  padding: 80px 48px 120px;
}
.about-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 80px;
  align-items: start;
}
.about-portrait {
  position: sticky;
  top: 100px;
}
.about-portrait .portrait-frame {
  max-width: 100%;
  aspect-ratio: 3/4;
}

.bio-block { margin-bottom: 48px; }
.bio-block:last-child { margin-bottom: 0; }
.bio-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  font-family: var(--font-mono);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bio-heading::before {
  content: '';
  display: inline-block;
  width: 20px; height: 1px;
  background: var(--cobalt);
}
.bio-text {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.85;
}
.bio-text p { margin-bottom: 20px; }
.bio-text p:last-child { margin-bottom: 0; }
.bio-text strong { color: var(--text-primary); font-weight: 500; }

.bio-quote {
  border-left: 3px solid var(--cobalt);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--cobalt-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.bio-quote p {
  font-style: italic;
  color: var(--cobalt-light);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}

/* ─────────────────────────────────────────────
   18. BOOKSHELF PAGE
───────────────────────────────────────────── */
.bookshelf-section {
  position: relative;
  z-index: 1;
  background: var(--bg-base);
  padding: 80px 48px 120px;
}
.bookshelf-inner { max-width: 1100px; margin: 0 auto; }

.book-era {
  margin-bottom: 72px;
}
.book-era:last-child { margin-bottom: 0; }
.era-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.era-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  background: var(--cobalt-dim);
  border: 1px solid var(--border-cobalt);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.era-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.25s, transform 0.25s;
}
.book-card:hover {
  border-color: var(--border-cobalt);
  transform: translateY(-2px);
}
.book-num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}
.book-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.book-author {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cobalt-light);
}
.book-why {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.65;
  font-style: italic;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────
   19. GARAGE PAGE
───────────────────────────────────────────── */
.garage-section {
  position: relative;
  z-index: 1;
  background: var(--bg-base);
  padding: 80px 48px 120px;
}
.garage-inner { max-width: 1100px; margin: 0 auto; }

.garage-category { margin-bottom: 80px; }
.garage-category:last-child { margin-bottom: 0; }

.garage-category-header {
  margin-bottom: 40px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.garage-category-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--p9-red-light);
}
.garage-category-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.garage-category-desc {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
  margin-top: 12px;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.vehicle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.vehicle-card:hover {
  border-color: var(--border-cobalt);
  transform: translateY(-3px);
}
.vehicle-thumb {
  height: 160px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.vehicle-thumb-moto {
  background:
    radial-gradient(ellipse at 50% 80%, rgba(167,0,0,0.15) 0%, transparent 50%),
    repeating-conic-gradient(rgba(255,255,255,0.02) 0deg, rgba(255,255,255,0.02) 5deg, transparent 5deg, transparent 20deg);
}
.vehicle-thumb-jeep {
  background:
    radial-gradient(ellipse at 50% 80%, rgba(22,105,240,0.12) 0%, transparent 50%),
    repeating-linear-gradient(45deg, rgba(22,105,240,0.04) 0px, rgba(22,105,240,0.04) 1px, transparent 1px, transparent 20px);
}
.vehicle-thumb-icon {
  font-size: 48px;
  opacity: 0.3;
  position: relative;
  z-index: 1;
}
.vehicle-status-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge-current  { background: rgba(0,232,122,0.15); color: var(--green); border: 1px solid rgba(0,232,122,0.3); }
.badge-past     { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }
.badge-recovery { background: rgba(255,184,0,0.12); color: var(--amber); border: 1px solid rgba(255,184,0,0.3); }

.vehicle-body { padding: 20px; }
.vehicle-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.vehicle-type {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cobalt-light);
  margin-bottom: 12px;
}
.vehicle-desc { font-size: 13px; font-weight: 300; color: var(--text-secondary); line-height: 1.65; }

.incident-block {
  background: rgba(167,0,0,0.06);
  border: 1px solid rgba(167,0,0,0.2);
  border-left: 3px solid var(--p9-red);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 32px;
}
.incident-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--p9-red-light);
  margin-bottom: 12px;
}
.incident-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.incident-text { font-size: 14px; font-weight: 300; color: var(--text-secondary); line-height: 1.75; }

/* ─────────────────────────────────────────────
   20. PORTFOLIO & MODULE PAGE
───────────────────────────────────────────── */
.portfolio-section,
.module-section {
  position: relative;
  z-index: 1;
  background: var(--bg-base);
  padding: 80px 48px 120px;
}

.portfolio-inner, .module-inner { max-width: 1100px; margin: 0 auto; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 80px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.project-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity 0.25s;
}
.project-card.cobalt-accent::after { background: linear-gradient(to right, var(--cobalt), transparent); }
.project-card.red-accent::after    { background: linear-gradient(to right, var(--p9-red), transparent); }
.project-card:hover { border-color: var(--border-cobalt); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(22,105,240,0.1); }
.project-card:hover::after { opacity: 1; }

.project-domain {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--cobalt-light);
  text-transform: uppercase;
}
.project-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.project-desc { font-size: 14px; font-weight: 300; color: var(--text-secondary); line-height: 1.7; flex: 1; }
.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
}
.project-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.project-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.project-status-dot.building { background: var(--amber); box-shadow: 0 0 6px var(--amber); }

/* Stack / capabilities */
.stack-section { margin-top: 80px; }
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 40px;
}
.stack-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}
.stack-item:hover { border-color: var(--border-cobalt); color: var(--cobalt-light); }
.stack-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cobalt);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   21. ANIMATIONS
───────────────────────────────────────────── */
@keyframes glitchIn {
  0%   { opacity: 0; clip-path: inset(0 100% 0 0); }
  40%  { opacity: 1; clip-path: inset(0 0% 0 0); }
  42%  { clip-path: inset(30% 0 50% 0); transform: translateX(4px); }
  44%  { clip-path: inset(0 0 0 0); transform: translateX(0); }
  100% { opacity: 1; }
}
@keyframes pulseDown {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-headline { animation: glitchIn 0.8s ease-out forwards; }
.hero-subline  { animation: glitchIn 0.8s 0.2s ease-out both; }
.hero-intro    { animation: glitchIn 0.8s 0.4s ease-out both; }
.hero-actions  { animation: glitchIn 0.6s 0.6s ease-out both; }
.portrait-wrap { animation: fadeUp 0.9s 0.3s ease-out both; }

.inner-hero .section-label,
.inner-hero .section-title,
.inner-hero .section-subtitle { animation: fadeUp 0.7s ease-out both; }
.inner-hero .section-title { animation-delay: 0.1s; }
.inner-hero .section-subtitle { animation-delay: 0.2s; }

/* ─────────────────────────────────────────────
   22. RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .portrait-wrap { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { display: none; }
  .phase-grid { grid-template-columns: 1fr; }
  .phase-bg { display: none; }
  .entry-grid { grid-template-columns: repeat(2, 1fr); }
  .entry-card:nth-child(4),
  .entry-card:nth-child(5) { grid-column: auto; margin-left: 0; }
}

@media (max-width: 768px) {
  .nav { padding: 16px 24px; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(0,0,0,0.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 0;
    display: none;
    backdrop-filter: blur(12px);
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 14px 24px; }
  .nav-toggle { display: flex; }

  .hero { padding: 120px 24px 80px; }
  .scroll-indicator { left: 24px; }
  .philosophy-strip { padding: 28px 24px; }
  .philosophy-sep { display: none; }
  .entry-section { padding: 72px 24px; }
  .entry-grid { grid-template-columns: 1fr; }
  .entry-card:nth-child(4),
  .entry-card:nth-child(5) { grid-column: auto; margin-left: 0; }
  .cta-section { padding: 80px 24px; }
  .footer { padding: 28px 24px; flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; }
  .timeline-section { padding: 60px 24px 100px; }
  .phase-item { padding-left: 44px; }
  .inner-hero { padding: 130px 24px 60px; }
  .about-section,
  .bookshelf-section,
  .garage-section,
  .portfolio-section { padding: 60px 24px 80px; }
}

@media (max-width: 480px) {
  .philosophy-stat .num { font-size: 26px; }
  .book-grid,
  .vehicle-grid,
  .project-grid,
  .stack-grid { grid-template-columns: 1fr; }
}

/* Portrait image inside frame */
.portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}
.portrait-c { z-index: 3; }
.portrait-icon,
.portrait-label,
.portrait-subtitle { z-index: 2; }
