:root {
  --bg: #ffffff;
  --bg-alt: #f1f3f5;
  --text: #1a1f24;
  --muted: #5b6570;
  --accent: #2f5d7c;      /* steel blue */
  --accent-ink: #ffffff;
  --signal: #a8504a;      /* muted brick red */
  --rule: #dde2e7;
  --max: 960px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111417;
    --bg-alt: #171b1f;
    --text: #e6e9ec;
    --muted: #9aa4ae;
    --accent: #7fb0d4;
    --accent-ink: #111417;
    --rule: #2a3138;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font);
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: .01em; }
h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; }
h3 { font-size: 1.15rem; margin-top: 2rem; }
h4 { font-size: 1.05rem; margin-bottom: .25rem; }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--bg); padding: .5rem 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 3.75rem; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
nav a { color: var(--text); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--accent); }

/* Hero: light-to-dark, left to right, with muted red and blue washes.
   The right side stays dark so the monogram reads cleanly. No image. */
.hero {
  position: relative;
  overflow: hidden;
  color: #1a1f24;
  padding: 7rem 0 6rem;
  background:
    radial-gradient(ellipse 34% 85% at 82% 50%, rgba(12, 14, 17, .9), transparent 72%),
    radial-gradient(ellipse 45% 95% at 10% 100%, rgba(176, 82, 76, .58), transparent 70%),
    radial-gradient(ellipse 45% 90% at 42% 0%, rgba(74, 116, 160, .55), transparent 70%),
    linear-gradient(90deg, #e7e9ec 0%, #c9ced4 42%, #7a838e 62%, #2b3037 80%, #131518 100%);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
/* thin muted red-to-blue line along the bottom edge */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--signal), #5c6670 50%, #3d6187);
  opacity: .8;
}
.hero-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; }
/* The logo sits on black; "screen" drops the black so the grid shows through */
.hero-logo {
  width: clamp(220px, 30vw, 340px);
  height: auto;
  mix-blend-mode: screen;
  /* fade the image edges so its near-black square never shows */
  -webkit-mask-image: radial-gradient(circle, #000 58%, transparent 71%);
  mask-image: radial-gradient(circle, #000 58%, transparent 71%);
  margin: -3rem 0;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--signal);
}
.hero .tagline { font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: #2c333b; max-width: 34rem; margin: .75rem 0 0; padding-left: 1.25rem; }

/* Shared section bits */
.eyebrow {
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--signal);
  margin-bottom: .6rem;
}
.eyebrow::before { content: ""; display: inline-block; width: 1.75rem; height: 2px; margin-right: .6rem; vertical-align: .3em; background: linear-gradient(90deg, var(--signal), #3d6187); }

/* About */
.about { padding: 5.5rem 0 4.5rem; }
.about-grid { display: grid; grid-template-columns: 200px 1fr; gap: 3rem; align-items: start; }
.portrait-wrap { margin: 0; text-align: center; }
.portrait {
  width: 200px; height: auto; border-radius: 50%; aspect-ratio: 1; object-fit: cover;
  padding: 5px;
  background: linear-gradient(135deg, #b0524c, #7a838e 55%, #3d6187);
}
.portrait-wrap figcaption { margin-top: .9rem; font-size: .82rem; letter-spacing: .04em; color: var(--muted); }
.about h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 22ch; }
.lede { font-size: 1.2rem; color: var(--text); }
.pull {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--signal);
  background: linear-gradient(90deg, color-mix(in srgb, var(--signal) 9%, transparent), transparent);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.4;
}

/* By the numbers: dark band echoing the hero's right side */
.stats {
  color: #fff;
  padding: 3.5rem 0;
  background:
    radial-gradient(ellipse 40% 120% at 0% 50%, rgba(176, 82, 76, .45), transparent 70%),
    radial-gradient(ellipse 40% 120% at 100% 50%, rgba(74, 116, 160, .5), transparent 70%),
    #181b1f;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.stat { display: flex; flex-direction: column; gap: .35rem; }
.stat .num { font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700; line-height: 1.1; }
.stat .label { font-size: .9rem; color: #b9c1ca; line-height: 1.45; }

/* Values */
.values { padding: 4.5rem 0 2rem; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.value {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
  transition: transform .2s ease, box-shadow .2s ease;
}
.value:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -18px rgba(0,0,0,.45); }
.value::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 12px 12px 0 0; background: linear-gradient(90deg, var(--signal), #3d6187); }
.value-num { font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: var(--muted); }
.value h3 { margin: .4rem 0 .5rem; font-size: 1.25rem; }
.value p { margin: 0; color: var(--muted); }

/* The path: vertical timeline */
.path { padding: 4rem 0 4.5rem; }
.path h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 26ch; }
.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5.5rem; top: .4rem; bottom: .4rem; width: 2px;
  background: linear-gradient(180deg, #7a838e, var(--signal) 45%, #3d6187);
}
.timeline li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 2rem; position: relative; padding-bottom: 1.75rem; }
.timeline li::before {
  content: ""; position: absolute; left: calc(5.5rem - 6px); top: .45rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--signal);
}
.timeline .when { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--muted); padding-top: .1rem; padding-right: 1rem; text-align: right; }
.timeline h3 { margin: 0 0 .15rem; font-size: 1.12rem; }
.timeline .where { color: var(--muted); font-size: .92rem; margin-bottom: .35rem; }
.timeline p { margin-bottom: .2rem; }
.timeline .milestone::before { background: var(--signal); }
.timeline .now::before { background: #3d6187; border-color: #3d6187; box-shadow: 0 0 0 6px color-mix(in srgb, #3d6187 25%, transparent); }
.timeline .now .when { color: #3d6187; }

/* Service & stage */
.service { background: var(--bg-alt); padding: 4.5rem 0; }
.service h2 { font-size: 1.6rem; }
.cards { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .75rem; }
.cards li { background: var(--bg); border: 1px solid var(--rule); border-left: 3px solid #3d6187; border-radius: 8px; padding: .85rem 1rem; }
.cards strong { display: block; }
.cards span { font-size: .9rem; color: var(--muted); }
.talks { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.talks li { display: grid; grid-template-columns: 4.5rem 1fr; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.talks .yr { font-family: var(--font-display); font-weight: 700; color: var(--signal); }

/* Why + contact */
.why { padding: 4.5rem 0; }
.why-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; }
.why-text { font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.55; }
.contact { padding: 1.5rem; border: 1px solid var(--rule); border-radius: 12px; }

/* Fade-in on scroll (only when JS has opted in) */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }

.button {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1.25rem; border-radius: 6px;
  text-decoration: none; font-weight: 600; font-size: .95rem;
}
.button:hover { filter: brightness(1.08); }
.button-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }

/* Resume (collapsed by default) */
.resume { padding: 4rem 0 4.5rem; border-top: 1px solid var(--rule); }
.resume-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.resume-head h2 { margin: 0; }
details { margin-top: 1.5rem; }
summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; color: var(--accent);
}
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border: 1.5px solid currentColor; border-radius: 50%; font-size: .95rem; line-height: 1; }
details[open] summary::before { content: "–"; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { background: var(--bg); border: 1px solid var(--rule); border-radius: 999px; padding: .3rem .85rem; font-size: .9rem; }

.job { padding: 1.25rem 0; border-top: 1px solid var(--rule); }
.job:last-of-type { border-bottom: 1px solid var(--rule); }
.job .meta { color: var(--muted); font-size: .92rem; margin-bottom: .5rem; }
.job ul { margin: 0; padding-left: 1.2rem; }
.job li { margin-bottom: .3rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin-bottom: .85rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 1.5rem 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.site-footer a { color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; }
.footer-brand img { border-radius: 6px; }

/* Simple page (privacy) */
.page { padding: 4rem 0; max-width: 42rem; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  nav ul { gap: .9rem; }
  .brand { font-size: 1.05rem; white-space: nowrap; }
  /* Stacked on phones: dark pool behind the logo up top, lightening toward the text */
  .hero {
    padding: 5rem 0 4rem;
    background:
      radial-gradient(circle 140px at 84px 128px, rgba(12, 14, 17, .97), rgba(12, 14, 17, .6) 60%, transparent 100%),
      radial-gradient(ellipse 80% 60% at 0% 100%, rgba(176, 82, 76, .52), transparent 70%),
      radial-gradient(ellipse 80% 60% at 100% 40%, rgba(74, 116, 160, .5), transparent 70%),
      linear-gradient(180deg, #4a5059 0%, #b4bac2 38%, #e3e6e9 100%);
  }
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-logo { order: -1; width: 160px; margin: -2rem 0 1rem -1rem; }
  .about { padding: 3.5rem 0 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .portrait-wrap { text-align: left; }
  .portrait { width: 140px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; }
  .values-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 3.75rem; }
  .timeline li { grid-template-columns: 3.75rem 1fr; gap: 0 1.25rem; }
  .timeline li::before { left: calc(3.75rem - 6px); }
  .timeline .when { font-size: .9rem; padding-right: .75rem; }
  .two-col { grid-template-columns: 1fr; gap: 3rem; }
  .why-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Narrow phones: logo alone in the header, name still announced to screen readers */
@media (max-width: 420px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.updated { color: var(--muted); font-size: .9rem; margin-top: 2rem; }
