/* ============================================================
   Dark theme styles — shared by landing and about pages
   ============================================================ */
:root {
  --bg: #1a1c1e;
  --bg-2: #232528;
  --surface: #2a2c2f;
  --surface-2: #32353a;
  --text: #ebe9df;
  --muted: #8f9196;
  --dim: #5d6065;
  --border: #34373b;
  --accent: #4ecdc4;
  --accent-2: #ff6b6b;
  --keyword: #ff6b6b;
  --string: #4ecdc4;
  --comment: #5d6065;
  --good: #98c379;
  --mono: "Fira Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  background: linear-gradient(180deg, rgba(26,28,30,0.95), rgba(26,28,30,0.7) 70%, transparent);
  backdrop-filter: blur(10px);
}
nav .brand { color: var(--text); font-weight: 500; letter-spacing: -0.01em; text-decoration: none; }
nav .brand::before { content: "▌ "; color: var(--accent); }
nav .brand:hover { color: var(--accent); }
nav ul { display: flex; gap: 1.8rem; list-style: none; }
nav a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
nav a:hover { color: var(--text); }

section { position: relative; z-index: 1; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 2.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.hero-text { min-width: 0; }
.hero .eyebrow::before { content: "$ "; color: var(--muted); }
.hero .eyebrow::after { content: "whoami"; }
.hero .eyebrow { margin-bottom: 1.5rem; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin-bottom: 2rem;
}
.hero h1 .accent { color: var(--accent); }
.hero .tagline {
  font-family: var(--mono);
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  color: var(--muted);
  max-width: 36ch;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}
.hero .tagline .cursor {
  display: inline-block;
  width: 0.55ch; height: 1em;
  background: var(--accent);
  margin-left: 0.2ch;
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero .meta {
  margin-top: clamp(2rem, 5vw, 4rem);
  font-family: var(--mono);
  font-size: clamp(0.65rem, 1.3vw, 0.8rem);
  color: var(--dim);
  display: flex;
  gap: clamp(0.8rem, 2vw, 2rem);
  flex-wrap: wrap;
}
.hero .meta span { display: flex; align-items: center; gap: 0.5rem; }
.hero .meta span::before { content: ""; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.meta-link, .stat-link { color: var(--accent); text-decoration: none; border-bottom: 1px dashed var(--accent); }
.meta-link:hover, .stat-link:hover { color: var(--text); border-bottom-color: var(--text); }
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.2em;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ========== HERO TERMINAL ========== */
.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.82rem;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.terminal-bar {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal-bar .dot:nth-child(1) { background: #ff5f56; }
.terminal-bar .dot:nth-child(2) { background: #ffbd2e; }
.terminal-bar .dot:nth-child(3) { background: #27c93f; }
.terminal-title { margin-left: 1rem; color: var(--dim); font-size: 0.78rem; }
.terminal-content {
  padding: 1.5rem;
  color: var(--text);
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}
.terminal-content .kw { color: var(--keyword); }
.terminal-content .str { color: var(--string); }
.terminal-content .com { color: var(--comment); font-style: italic; }
.terminal-content .ac { color: var(--accent); }
.terminal-content .ok { color: var(--good); }

/* ========== IMPACT ========== */
.impact {
  padding: 8rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.impact h2 {
  font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 4rem;
}
.impact h2 .accent { color: var(--accent); }
.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.stat {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.3s, border-color 0.3s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--accent); }
.stat-number {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.stat-detail {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}

/* ========== INTERESTS ========== */
.interests {
  padding: 8rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.interests h2 {
  font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 4rem;
}
.interests h2 .accent { color: var(--accent); }
.interests-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.interest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), border-color 0.3s;
  opacity: 0;
  transform: translateY(20px);
}
.interest-card.in { opacity: 1; transform: translateY(0); }
.interest-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.interest-icon { font-size: 2rem; margin-bottom: 1rem; }
.interest-card h3 {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.interest-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ========== ABOUT TEASER ========== */
.about {
  padding: 8rem 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.about p {
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.about p.muted { color: var(--muted); font-size: 1.1rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}
.section-head h2 {
  font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  letter-spacing: -0.03em;
}
.section-head h2 .accent { color: var(--accent); }
.see-all {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}
.see-all::after { content: " ↗"; color: var(--dim); }
.see-all-group { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: end; }

/* ========== TIMELINE ========== */
.timeline-section {
  padding: 10rem 2.5rem 6rem;
  max-width: 1100px;
  margin: 0 auto;
}
.timeline-section h2 {
  font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 4rem;
}
.timeline-section h2 .accent { color: var(--accent); }
.timeline {
  position: relative;
  padding-left: 2.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.tl-entry {
  position: relative;
  padding-bottom: 2.5rem;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.tl-entry.in { opacity: 1; transform: translateX(0); }
.tl-entry::before {
  content: "";
  position: absolute;
  left: -2.5rem;
  top: 0.55rem;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-entry .year {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.tl-entry .title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}
.tl-entry .title a { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.tl-entry .title a:hover { color: var(--accent); }
.tl-entry .desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 58ch;
}
.tl-entry .desc a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--dim); }
.tl-entry .desc a:hover { border-color: var(--accent); }
.tl-entry .desc code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface);
  padding: 0.05em 0.35em;
  border-radius: 3px;
  color: var(--accent);
}

/* ========== TIMELINE TYPEWRITER (about.html) ========== */
.about-page .tl-entry .char { visibility: hidden; }
.about-page .tl-entry .char.shown { visibility: visible; }
.about-page .tl-entry .typing-caret {
  display: inline-block;
  width: 0.55ch; height: 1em;
  background: var(--accent);
  margin-left: 0.2ch;
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .about-page .tl-entry .char { visibility: visible; }
  .about-page .tl-entry .typing-caret { display: none; }
}

/* ========== ABOUT PAGE (about.html) ========== */
.about-hero {
  padding: 6rem 2.5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.about-hero .eyebrow { margin-bottom: 1rem; }
.about-hero h1 {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}
.about-hero h1 .accent { color: var(--accent); }
.about-hook {
  margin-top: 1.2rem;
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.01em;
}
.bio {
  padding: 2rem 2.5rem 6rem;
  max-width: 1000px;
  margin: 0 auto;
}
.bio-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.bio-photo {
  width: 180px;
  height: auto;
  display: block;
  margin: 0.4rem 0 0;
}
.bio-prose { min-width: 0; }
.bio-prose p {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.75;
  margin: 0 0 1.5rem;
  color: var(--text);
}
.bio-prose p:last-child { margin-bottom: 0; }
.bio-prose em { color: var(--accent); font-style: italic; }

/* ========== FOOTER ========== */
footer {
  padding: 5rem 2.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: end;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 1rem;
}
footer a { color: var(--muted); text-decoration: none; margin-left: 1.25rem; }
footer a:hover { color: var(--accent); }

/* Hamburger button */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.3rem;
  line-height: 1;
}
.nav-toggle:hover { color: var(--accent); }

/* ========== MOBILE ========== */
@media (max-width: 880px) {
  nav {
    padding: 0.75rem 1.25rem;
    flex-wrap: wrap;
    row-gap: 0;
  }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  nav:has(.nav-toggle) ul {
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 0 0.5rem;
    display: none;
  }
  nav:has(.nav-toggle).open ul { display: flex; }
  .hero, .impact, .interests, .about, .timeline-section, .about-hero, .bio, footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-terminal { display: none; }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .interests-grid { grid-template-columns: repeat(2, 1fr); }
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    justify-items: center;
  }
  .bio-photo { width: 140px; margin: 0 auto; }
  .bio-prose { width: 100%; }
}
