:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1a1f24;
  --muted: #5b6570;
  --line: #e3e4e0;
  --accent: #1f5f8b;
  --accent-ink: #ffffff;
  --accent-soft: #e6eef5;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #171d24;
    --text: #e8ecef;
    --muted: #9aa5b0;
    --line: #26303a;
    --accent: #6fb1e0;
    --accent-ink: #0f1419;
    --accent-soft: #18293a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 22px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-top: 56px;
  padding-bottom: 40px;
  align-items: center;
}
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 9vw, 64px); line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.role { margin: 8px 0 0; font-size: 20px; color: var(--accent); font-weight: 600; }
.lede { font-size: 19px; color: var(--muted); max-width: 34em; margin: 18px 0 0; }
.portrait {
  width: 180px; height: 180px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #2f8f83);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  order: -1;
}
.portrait span { color: #fff; font-family: var(--serif); font-size: 64px; font-weight: 600; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 760px) {
  .hero { grid-template-columns: 1fr auto; padding-top: 96px; padding-bottom: 64px; }
  .portrait { width: 240px; height: 240px; order: 0; }
  .portrait span { font-size: 84px; }
}

/* Buttons */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }

/* Sections */
section { padding-top: 44px; padding-bottom: 44px; border-top: 1px solid var(--line); }
h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; margin: 0 0 22px; }
h3 { font-size: 18px; margin: 0 0 6px; line-height: 1.35; }
p { margin: 0 0 14px; }

.about-grid { display: grid; gap: 28px; }
.about-side { display: grid; gap: 16px; align-self: start; }
.about-photo { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.facts { list-style: none; margin: 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); align-self: start; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.facts li:last-child { border-bottom: 0; }
.facts span { display: block; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
@media (min-width: 760px) {
  /* Desktop: facts card sits under the text so the left column isn't short beside the photo. */
  .about-grid { grid-template-columns: 1.6fr 1fr; grid-template-areas: "text photo" "facts photo"; grid-template-rows: auto 1fr; }
  .about-side { display: contents; }
  .about-text { grid-area: text; }
  .about-photo { grid-area: photo; height: 100%; object-fit: cover; object-position: 50% 30%; }
  .facts { grid-area: facts; display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .facts li:nth-last-child(2) { border-bottom: 0; }
}

.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }

.projects { display: grid; gap: 16px; }
@media (min-width: 760px) { .projects { grid-template-columns: 1fr 1fr; } }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.project p { color: var(--muted); font-size: 15.5px; }
.tag { display: inline-block; margin: 0 0 10px !important; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent) !important; font-size: 12.5px !important; font-weight: 700; letter-spacing: .03em; }
.stack { font-size: 13.5px !important; margin: 0 !important; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline > li:last-child { border-bottom: 0; }
@media (min-width: 760px) { .timeline > li { grid-template-columns: 170px 1fr; } }
.when { color: var(--muted); font-weight: 600; font-size: 15px; }
.org { color: var(--muted); margin: 0 0 8px; }
.timeline ul { margin: 0; padding-left: 20px; color: var(--muted); }
.timeline ul li { margin-bottom: 4px; }
.more { margin-top: 18px; }

.contact p { max-width: 36em; color: var(--muted); }
footer { padding-top: 28px; padding-bottom: 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* Draft placeholders. Delete this rule once every <mark class="todo"> is filled in. */
mark.todo { background: #ffe58a; color: #3d3300; padding: 0 4px; border-radius: 4px; }

@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .cta, .portrait, footer { display: none; }
  section { border: 0; padding: 12pt 0; }
  .card, .project, .facts { border: 1px solid #ccc; break-inside: avoid; }
}
