/* ============================================================
   About page
   (shared .page-hero styling now lives in base.css)
   ============================================================ */

/* ---------- Stats strip ---------- */

.stats-strip {
  margin-top: var(--space-5);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid rgb(var(--fg) / 0.1);
}

@media (max-width: 720px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

.stat-tile { display: flex; flex-direction: column; }

.stat-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

.stat-number {
  font-family: var(--font-display);
  font-style: normal;
  font-size: clamp(2.2rem, 3vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-style: normal;
  font-size: clamp(2.2rem, 3vw, 3rem);
  line-height: 1;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  margin-top: 0.5rem;
  font-size: var(--fs-small);
  color: var(--color-dark-text-muted);
  max-width: 18ch;
}

.bio-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-5);
  align-items: start;
}

@media (max-width: 860px) {
  .bio-grid { grid-template-columns: 1fr; }
}

.bio-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-dark-surface);
}
.bio-photo img { width: 100%; height: 100%; object-fit: cover; }

.bio-text p {
  font-size: var(--fs-body-lg);
  color: var(--color-dark-text-muted);
  margin: 0 0 1.2em;
  max-width: 62ch;
}
.bio-text p:last-child { margin-bottom: 0; }
.bio-text strong { color: var(--color-dark-text); font-weight: 600; }

/* ---------- Timeline ---------- */

.timeline {
  position: relative;
  margin-top: var(--space-3);
  padding-left: var(--space-4);
}

/* faint base track */
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgb(var(--fg) / 0.12);
}

/* indigo line that draws over the track as you scroll (injected by animations.js) */
.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--accent);
  transform-origin: top center;
  transform: scaleY(0);
  pointer-events: none;
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-4);
  cursor: pointer;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:focus-visible { outline: none; }

.timeline-card {
  padding: 0.9rem 1.1rem;
  margin: -0.9rem -1.1rem;
  border-radius: var(--radius-md);
  transition: background var(--dur-base) var(--ease-soft);
}

.timeline-item:hover .timeline-card,
.timeline-item:focus-visible .timeline-card {
  background: rgb(var(--fg) / 0.03);
}

.timeline-explore {
  display: inline-flex;
  margin-top: 0.75rem;
  font-size: var(--fs-small);
  color: var(--color-indigo-light);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}

.timeline-item:hover .timeline-explore,
.timeline-item:focus-visible .timeline-explore {
  opacity: 1;
  transform: translateX(0);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-4) - 5px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-indigo-light);
  box-shadow: 0 0 0 4px var(--color-dark-bg);
}

/* once the scroll effect is running, nodes start dim and light up when the
   line reaches them (without JS they keep the always-lit look above) */
.timeline.fx-ready .timeline-item::before {
  background: var(--color-dark-bg);
  box-shadow: 0 0 0 4px var(--color-dark-bg), inset 0 0 0 1px rgb(var(--fg) / 0.28);
  transform: scale(0.8);
  transition: background 0.45s var(--ease-smooth), box-shadow 0.45s var(--ease-smooth),
    transform 0.45s var(--ease-smooth);
}

.timeline.fx-ready .timeline-item.is-lit::before {
  background: var(--color-indigo-light);
  box-shadow: 0 0 0 4px var(--color-dark-bg);
  transform: scale(1);
}

.timeline-dates {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-indigo-light);
}

.timeline-item h3 {
  font-size: var(--fs-h3);
  margin-top: 0.35rem;
}

.timeline-item .timeline-place {
  font-size: var(--fs-small);
  color: var(--color-dark-text-muted);
  margin-top: 0.2rem;
}

.timeline-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.grade-badge {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--accent-rgb) / 0.4);
  color: var(--color-indigo-light);
}

/* ---------- Languages (full-width, dynamic) ---------- */

.lang-list {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lang-row-full {
  position: relative;
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius-md);
  cursor: default;
  isolation: isolate; /* keep ::before's z-index: -1 contained to this row */
}

/* Decorative "grow + highlight" layer, separate from the row's own hit-box,
   so a hover-triggered scale never bleeds into a neighboring row and causes
   an enter/leave flicker between adjacent rows. */
.lang-row-full::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgb(var(--fg) / 0.03);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity var(--dur-base) var(--ease-smooth), transform var(--dur-base) var(--ease-smooth);
  pointer-events: none;
  z-index: -1;
}

.lang-row-full:hover::before,
.lang-row-full:focus-within::before {
  opacity: 1;
  transform: scale(1.015);
}

.lang-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.lang-name {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-base) var(--ease-smooth);
}

.lang-name.is-native {
  font-style: normal;
  color: var(--color-indigo-light);
}

.lang-level {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--color-dark-text-muted);
  letter-spacing: 0;
  text-transform: none;
}

.lang-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--color-stone-800);
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-indigo-deep), var(--color-indigo-light));
  transition: filter var(--dur-base) var(--ease-soft);
}

.lang-row-full:hover .lang-fill,
.lang-row-full:focus-within .lang-fill {
  filter: brightness(1.25);
}

/* ---------- Detail drawer: see css/drawer.css (shared with Projects) ---------- */

/* ---------- Clickable stat tiles (open the matching drawer tab) ---------- */

.stat-tile[data-detail],
.stat-tile[data-scroll-to] {
  position: relative;
  cursor: pointer;
  /* horizontal bleed stays under half the grid gap (1.5rem), so two
     neighbouring highlights can never overlap */
  padding: 0.9rem 0.65rem;
  margin: -0.9rem -0.65rem;
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-soft);
}
.stat-tile[data-detail]:hover,
.stat-tile[data-detail]:focus-visible,
.stat-tile[data-scroll-to]:hover,
.stat-tile[data-scroll-to]:focus-visible {
  background: rgb(var(--fg) / 0.035);
  outline: none;
}
.stat-more {
  display: inline-flex;
  margin-top: auto; /* all hints line up at the bottom of the row */
  padding-top: 0.75rem;
  font-size: var(--fs-micro);
  font-family: var(--font-mono);
  letter-spacing: 0;
  color: var(--color-indigo-light);
  opacity: 0.55;
  transition: opacity var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}
.stat-tile:hover .stat-more,
.stat-tile:focus-visible .stat-more { opacity: 1; transform: translateX(3px); }


/* ---------- Off-duty teaser ---------- */

.offduty-teaser {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-dark-surface);
  border: 1px solid rgb(var(--fg) / 0.07);
  font-size: var(--fs-small);
  color: var(--color-dark-text-muted);
}
.offduty-teaser a { color: var(--color-indigo-light); font-weight: 600; }
.offduty-teaser a:hover { text-decoration: underline; }
