:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #1c1f23;
  --muted: #5b6470;
  --line: #e4e6e9;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e6f4f2;
  --radius: 14px;
  --maxw: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216;
    --surface: #171b21;
    --text: #e8eaed;
    --muted: #9aa3ad;
    --line: #262c34;
    --accent: #2dd4bf;
    --accent-ink: #0b1a18;
    --accent-soft: #15302d;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216;
  --surface: #171b21;
  --text: #e8eaed;
  --muted: #9aa3ad;
  --line: #262c34;
  --accent: #2dd4bf;
  --accent-ink: #0b1a18;
  --accent-soft: #15302d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1.25rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding-left: 1.25rem; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: var(--accent-ink); padding: .5rem .75rem; border-radius: 8px;
}
.skip:focus { left: 8px; z-index: 100; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--maxw); margin: 0 auto; padding: .75rem 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { font-weight: 700; color: var(--text); white-space: nowrap; }
.nav ul { list-style: none; padding: 0; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .95rem; }
.nav a:hover { color: var(--accent); }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.section { padding: 3rem 0; border-top: 1px solid var(--line); }

.hero {
  display: grid; grid-template-columns: 160px 1fr; gap: 2rem; align-items: center;
  padding: 3.5rem 0 3rem;
}
.avatar { width: 160px; height: 160px; border-radius: 50%; border: 4px solid var(--surface); box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.eyebrow { color: var(--muted); font-size: .9rem; letter-spacing: .02em; text-transform: uppercase; margin-bottom: .25rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: .25rem; }
.title { font-size: 1.25rem; color: var(--accent); font-weight: 600; margin-bottom: 1rem; }
.lede { font-size: 1.1rem; max-width: 62ch; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .55rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600;
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }

.prose { max-width: 72ch; }

.timeline { list-style: none; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 170px 1fr; gap: 1.5rem; padding: 1.25rem 0; border-top: 1px dashed var(--line); }
.timeline > li:first-child { border-top: 0; padding-top: 0; }
.when { color: var(--muted); font-weight: 600; font-size: .95rem; padding-top: .2rem; }
.what h3 { font-size: 1.15rem; }
.what h3 span { color: var(--accent); font-weight: 600; }
.where { color: var(--muted); font-size: .95rem; margin-bottom: .5rem; }
.what ul li { margin-bottom: .35rem; }

.subhead { font-size: 1.05rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 1.5rem 0 1rem; }
.subhead:first-of-type { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem;
}
.card header { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.card h4 { font-size: 1.1rem; margin: 0; }
.card h4 a { color: var(--text); }
.card h4 a:hover { color: var(--accent); }
.card p { margin: 0; }
.card .meta { color: var(--muted); font-size: .9rem; }
.card .links { font-size: .95rem; margin-top: auto; padding-top: .25rem; }
.tag { font-size: .8rem; color: var(--accent); background: var(--accent-soft); padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; }

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.skill-group h3 { font-size: 1rem; color: var(--muted); margin-bottom: .5rem; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem; font-size: .9rem; }

.contact-list { list-style: none; padding: 0; display: grid; gap: .6rem; max-width: 520px; }
.contact-list li { display: grid; grid-template-columns: 100px 1fr; }
.contact-list span { color: var(--muted); font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.5rem 16px; text-align: center; color: var(--muted); font-size: .9rem; }

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .grid { grid-template-columns: 1fr; }
  .avatar { width: 120px; height: 120px; }
  .timeline > li { grid-template-columns: 1fr; gap: .25rem; }
  .nav ul { gap: .8rem; }
  .contact-list li { grid-template-columns: 1fr; }
}
