/* ============================================================
   kaiogden.net — homepage
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }

:root {
  --paper:     #ffffff;
  --ink:       #141a24;
  --ink-2:     #3d4655;
  --ink-3:     #7a8494;
  --rule:      #e6e9ee;
  --blue:      #2457d6;
  --blue-soft: rgba(36, 87, 214, .14);

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 42rem;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--blue-soft); color: var(--ink); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, var(--blue) 45%, transparent);
  transition: color .15s, text-decoration-color .15s;
}
a:hover { color: var(--blue); text-decoration-color: var(--blue); }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper);
  font-size: .875rem; padding: .5rem .75rem; z-index: 10;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap {
  max-width: calc(var(--measure) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Top navigation ───────────────────────────────────── */
.topnav {
  display: flex;
  justify-content: flex-end;
  gap: 1.75rem;
  padding-top: 1.75rem;
  font-size: .9375rem;
  font-weight: 500;
}
.topnav a { color: var(--ink-2); text-decoration: none; }
.topnav a:hover { color: var(--blue); }

/* ── Header ───────────────────────────────────────────── */
.hero { padding-top: 6.5rem; }

h1 {
  font-size: clamp(2.75rem, 8vw, 4.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em;
  color: var(--ink);
}

.role {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.contact {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.5rem;
  font-size: .9375rem;
  font-weight: 500;
}
.contact span { color: var(--ink-3); font-weight: 400; }
.contact a { color: var(--ink); text-decoration-color: var(--rule); }
.contact a:hover { color: var(--blue); text-decoration-color: var(--blue); }

/* ── About ────────────────────────────────────────────── */
.about { margin-top: 4rem; }
.about p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #262e3b;
  text-wrap: pretty;
}
.about p + p { margin-top: 1.15rem; }

/* ── Timeline ─────────────────────────────────────────────
   On wide screens the years and the rail hang in the left
   margin, so every entry lines up with the text above.      */
.timeline-section { margin: 4.5rem 0 7rem; }

.timeline {
  --rail: -1.75rem;
  list-style: none;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: var(--rail);
  top: .7rem;
  bottom: .4rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--blue), color-mix(in srgb, var(--blue) 25%, var(--rule)) 40%, var(--rule));
}

.tl-year {
  position: relative;
  padding-bottom: 2.75rem;
}
.tl-year:last-child { padding-bottom: 0; }

/* node on the rail */
.tl-year::before {
  content: '';
  position: absolute;
  left: calc(var(--rail) + .5px);
  top: .7rem;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid #b8c2d4;
}
.tl-year.is-current::before {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.tl-year h3 {
  position: absolute;
  right: calc(100% + 3.25rem);
  top: .1rem;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tl-year.is-current h3 { color: var(--blue); font-weight: 600; }

.tl-year ul { list-style: none; }
.tl-year li { position: relative; font-size: 1rem; line-height: 1.6; color: var(--ink); }
.tl-year li + li { margin-top: .6rem; }

/* each entry gets a short tick, like a branch off the rail */
.tl-year li::before {
  content: '';
  position: absolute;
  left: -.95rem;
  top: .8em;
  width: .5rem;
  height: 1px;
  background: #aeb8c8;
}
.tl-year.is-current li::before { background: color-mix(in srgb, var(--blue) 55%, #aeb8c8); }

/* ── Narrower screens: years sit above their entries ──── */
@media (max-width: 1000px) {
  .timeline { --rail: 4px; }
  .tl-year { padding-left: 1.75rem; }
  .tl-year h3 { position: static; margin-bottom: .5rem; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 1.25rem; }
  .hero { padding-top: 3.5rem; }
  .about { margin-top: 2.75rem; }
  .about p { font-size: 1.0625rem; }
  .timeline-section { margin-top: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}
