@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(/fonts/newsreader-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6860;
  --line: #e7e3da;
  --accent: #1f5f5b;
  --accent-ink: #ffffff;
  --accent-soft: #e5efed;
  --ok: #2f7d4f;
  --err: #b4372f;
  --radius: 10px;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #131412;
    --surface: #1b1c1a;
    --text: #ecebe6;
    --muted: #9c998f;
    --line: #2d2e2a;
    --accent: #7cc3b8;
    --accent-ink: #0d1f1d;
    --accent-soft: #1d2b29;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #131412;
  --surface: #1b1c1a;
  --text: #ecebe6;
  --muted: #9c998f;
  --line: #2d2e2a;
  --accent: #7cc3b8;
  --accent-ink: #0d1f1d;
  --accent-soft: #1d2b29;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: 1.75rem; margin-top: 1.5em; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.section { padding-top: 56px; padding-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .95rem; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a[aria-current='page'] { color: var(--text); font-weight: 500; }
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; flex: none; }
.theme-toggle:hover { color: var(--text); }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 8px; gap: 8px; }
  .brand { flex: 1; }
  .nav { order: 3; width: 100%; margin: 0 -10px; }
}

/* Hero */
.hero { padding-top: 88px; padding-bottom: 40px; }
.hero-h1 { font-family: var(--sans); font-size: .78rem; line-height: 1.6; margin: 0 0 14px; }
.hero-h1 span { font-weight: 500; opacity: .85; }
.hero-title { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.2; margin: 0 0 .5em; max-width: 20ch; }
.hero { display: grid; grid-template-columns: 1fr 240px; gap: 56px; align-items: center; }
.hero-text { grid-row: 1; }
.hero-photo { grid-column: 2; grid-row: 1; width: 240px; height: 240px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); box-shadow: 0 0 0 8px var(--accent-soft); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; }
  .hero-photo { grid-column: 1; width: 112px; height: 112px; box-shadow: 0 0 0 5px var(--accent-soft); }
  .hero-text { grid-row: 2; }
}
.about-head { display: flex; align-items: center; gap: 24px; margin-bottom: 8px; }
.about-head h1 { margin-bottom: 0; }
.about-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); flex: none; }
@media (max-width: 560px) { .about-head { flex-direction: column; align-items: flex-start; gap: 16px; } .about-photo { width: 88px; height: 88px; } }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 22px; }
.availability { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font: 500 .95rem var(--sans); cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding: 0; }
.stats div { background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; }
.stats strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.stats span { color: var(--muted); font-size: .88rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); margin: 0 20px; } }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.section-head h2 { margin-top: 0; }
.section-head a { font-size: .92rem; white-space: nowrap; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 12px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card p { color: var(--muted); font-size: .95rem; }
.card .tags { margin-top: auto; }
.card-more { color: var(--accent); font-size: .9rem; margin-top: 14px; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; }
.tags li { font-size: .78rem; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--text); }

/* Experience */
.xp { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.xp-period { color: var(--muted); font-size: .9rem; padding-top: 2px; }
.xp .xp-title { font-family: var(--sans); font-size: 1.1rem; font-weight: 600; letter-spacing: 0; margin: 0 0 2px; }
.xp-at { font-weight: 400; color: var(--muted); }
.xp p { margin-top: 10px; }
.bullets { margin: 8px 0 0; padding-left: 1.1em; }
.bullets li { margin: 4px 0; }
.xp-list { margin-top: 24px; }
@media (max-width: 640px) { .xp { grid-template-columns: 1fr; gap: 4px; } }

.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 28px; margin-top: 16px; }
.skill-group h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.skill-group p { font-size: .95rem; }

.cta { background: var(--accent-soft); border-radius: calc(var(--radius) * 1.5); padding: 40px; text-align: center; }
.cta h2 { margin-top: 0; }
.cta p { color: var(--muted); max-width: 52ch; margin: 0 auto 20px; }

/* Prose */
.prose { font-size: 1.05rem; }
.prose h2 { font-size: 1.45rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.prose pre { background: var(--surface); border: 1px solid var(--line); padding: 16px; border-radius: var(--radius); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 0; padding-left: 16px; color: var(--muted); }
.back { display: inline-block; margin-bottom: 20px; font-size: .92rem; text-decoration: none; }

.edu { list-style: none; padding: 0; }
.edu li { display: grid; grid-template-columns: 1fr auto; padding: 14px 0; border-top: 1px solid var(--line); }
.edu li span:not(.muted) { grid-column: 1; color: var(--muted); font-size: .95rem; }
.edu .muted { grid-row: 1; grid-column: 2; font-size: .9rem; }

.posts { list-style: none; padding: 0; }
.posts a { display: block; padding: 20px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.posts h3 { font-size: 1.2rem; margin-bottom: 4px; }
.posts time { color: var(--muted); font-size: .88rem; }
.posts p { color: var(--muted); margin: 6px 0 0; }

/* Contact form */
.form { display: grid; gap: 16px; margin-top: 28px; }
.form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form input, .form textarea { font: 1rem var(--sans); padding: 11px 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 100%; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.form .btn { justify-self: start; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 16px; border-radius: 8px; margin-top: 24px; }
.notice.success { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.notice.error { background: color-mix(in srgb, var(--err) 12%, var(--surface)); margin-top: 0; }
.contact-alt { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; padding-bottom: 32px; color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* Recommendations */
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 12px; }
.rec { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.rec blockquote { margin: 0; font-size: .98rem; line-height: 1.65; position: relative; }
.rec blockquote::before { content: '\201C'; font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--accent); display: block; height: 22px; }
.rec blockquote p { margin: 0 0 .8em; }
.rec blockquote p:last-child { margin-bottom: 0; }
.rec.clamp blockquote { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.rec figcaption { display: grid; gap: 2px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92rem; }
.rec figcaption a { color: var(--text); }
.rec-list { display: grid; gap: 16px; margin-top: 24px; }
.rec-source { display: flex; align-items: center; gap: 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.stars { color: #d9a43a; letter-spacing: 1px; font-size: .85rem; text-transform: none; }
.stars span { color: var(--muted); margin-left: 4px; letter-spacing: 0; font-weight: 500; }
.narrow .recs { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .narrow .recs { grid-template-columns: 1fr; } }
