/* ============================================================
   Personal academic site — styling
   Plain CSS, no build step. The driving sim is a fixed, full-page
   canvas backdrop; content floats over it on translucent panels.
   Tweak the custom properties below to re-theme everything.
   ============================================================ */

:root {
  --bg: #ffffff;
  --text: #1a1d24;
  --text-soft: #5a6473;
  --accent: #1f6feb;
  --border: #e2e6ee;
  --card: #ffffff;
  --panel: rgba(255, 255, 255, 0.86); /* translucent so road shows through */
  --shadow: 0 8px 30px rgba(20, 30, 60, 0.14);
  --maxw: 900px;
  --radius: 16px;
  --gap: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --text: #e6edf3;
    --text-soft: #9aa7b4;
    --accent: #4f9bff;
    --border: #2a323d;
    --card: #1b222c;
    --panel: rgba(16, 21, 28, 0.82);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
html, body { overflow-x: hidden; } /* guard against any stray horizontal overflow shifting layout */

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text);
  background: transparent; /* let the canvas show through */
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===================== SIM BACKDROP ===================== */
.sim-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* behind everything */
  display: block;
}

/* ===================== FLOATING CONTROLS ===================== */
.controls {
  position: fixed;
  bottom: 1rem; /* bottom-right so it never overlaps the nav links */
  right: 1rem;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.controls__hint {
  font-size: 0.78rem;
  color: var(--text-soft);
  background: var(--panel);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.btn {
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: var(--accent); }
.btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===================== NAV ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__brand { font-weight: 700; color: var(--text); }
.nav__links a { margin-left: 1.25rem; color: var(--text-soft); font-size: 0.95rem; }
.nav__links a:hover { color: var(--accent); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  text-align: center;
}
.hero__card {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 2rem;
  max-width: 90%;
}
.avatar {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
}
.hero__name { margin: 0.25rem 0 0.35rem; font-size: 2rem; }
.hero__tagline { margin: 0; color: var(--text-soft); font-size: 1.05rem; }
.hero__bio { margin: 0.75rem auto 0; max-width: 34rem; color: var(--text-soft); font-size: 0.95rem; }
.hero__links {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}
.hero__links a { font-size: 0.95rem; font-weight: 600; }
/* "scroll to drive" cue — a centred badge that sits beneath the content */
.scroll-cue {
  display: block;
  width: fit-content;
  margin: 0 auto 1rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  background: var(--panel);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* ===================== SECTIONS (panels) ===================== */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem 3rem; }
.section {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
  margin: 0 0 2rem;
}
.section__title {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* Interests cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }

/* Education timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--border);
}
.timeline__item { position: relative; padding: 0 0 1.75rem 2.25rem; }
.timeline__dot {
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--card);
}
.timeline__body h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.timeline__meta { margin: 0 0 0.35rem; color: var(--accent); font-size: 0.9rem; font-weight: 600; }
.timeline__body p:last-child { margin: 0; color: var(--text-soft); }

/* Contact links */
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.links a { font-size: 1.05rem; }

/* Transparent scroll spacer — lets the road keep going below the
   content. Height is set by main.js from the generated world. */
.road-spacer { width: 100%; }

/* Footer + end scorecard */
.footer {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2.5rem 1.25rem 2rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}
.footer__copy { margin: 1.5rem 0 0; }

.scorecard {
  max-width: 920px;
  margin: 0 auto;
}
.scorecard__title { margin: 0 0 1.25rem; font-size: 1.4rem; color: var(--text); }
.scorecard__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* centre the panels as a group */
  gap: 0.5rem;
}
.stat {
  width: 140px; /* fixed width; the flex row centres them */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
  padding: 0.75rem 0.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.stat__val { font-size: 1.1rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 0.72rem; color: var(--text-soft); font-variant-numeric: tabular-nums; min-height: 1em; }
.stat__label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-soft); }
/* The collisions/lights block is a small label→value list, not a big stat */
.stat--list { width: auto; min-width: 150px; justify-content: center; }
.metric-list { margin: 0; width: 100%; display: flex; flex-direction: column; gap: 0.45rem; }
.metric-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.metric-list dt { font-size: 0.8rem; color: var(--text-soft); }
.metric-list dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.scorecard__hint { margin: 1.25rem 0 0; font-size: 0.82rem; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 700px) {
  .nav__links a { margin-left: 0.9rem; }
  .hero__name { font-size: 1.6rem; }
  .hero__tagline { font-size: 0.95rem; }
  .hero__card { padding: 1.25rem 1.4rem; }
  .avatar { width: 100px; height: 100px; }
  .controls__hint { display: none; }
  .section { padding: 1.5rem 1.25rem; }
}
