:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: #121211;
  --surface-hover: #191917;
  --ink: #f0efeb;
  --muted: #b1aea5;
  --faint: #96938a;
  --gold: #c9a96e;
  --gold-light: #e0c58f;
  --border: #2b2b27;
  --max-width: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0; color: var(--ink); background: var(--bg); isolation: isolate;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure, ol, ul { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; }
a { color: var(--gold); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 5px; }
::selection { color: var(--bg); background: var(--gold-light); }
.container { width: min(var(--max-width), calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; inset: 12px auto auto 16px; z-index: 100; padding: 10px 16px; background: var(--gold-light); color: var(--bg); border-radius: 8px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); color: var(--bg); }
.geo-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 70% 12%, #c9a96e0a, transparent 50%), linear-gradient(#0c0c0b, #090909); }
.geo-bg::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#ffffff03 1px, transparent 1px), linear-gradient(90deg, #ffffff03 1px, transparent 1px); background-size: 80px 80px; mask-image: linear-gradient(#000, transparent 75%); }

/* Shared navigation remains usable before JavaScript loads. */
.site-nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; background: #0a0a0af0; backdrop-filter: blur(18px); transition: border-color .2s ease; }
.site-nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.nav-logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 23px; font-weight: 600; letter-spacing: -.055em; }
.nav-logo span, .gold-dot { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 30px); padding: 0; list-style: none; }
.nav-links a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold-light); }
.nav-links .nav-github { color: var(--ink); }
.nav-links svg { width: 15px; height: 15px; }
.menu-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 7px; cursor: pointer; font-size: 13px; }

/* Introduction. */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(40px, 6vw, 84px); padding-block: clamp(70px, 10vw, 130px) 110px; }
.hero-copy { min-width: 0; }
.eyebrow { color: var(--gold); font-size: 11px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; }
.hero h1 { margin-top: 22px; font-size: clamp(52px, 6.4vw, 84px); font-weight: 500; line-height: 1.03; letter-spacing: -.075em; }
.hero-lead { margin-top: 30px; max-width: 27ch; color: var(--ink); font-size: clamp(20px, 2.1vw, 25px); line-height: 1.5; letter-spacing: -.025em; }
.hero-description { margin-top: 16px; max-width: 48ch; color: var(--muted); font-size: 15px; line-height: 1.85; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 25px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 11px 21px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 600; transition: background .18s ease, border-color .18s ease; }
.button-primary { background: var(--gold); border-color: var(--gold); color: #17130b; }
.button-primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: #17130b; }
.button-secondary { color: var(--gold-light); background: #c9a96e08; border-color: #c9a96e44; }
.button-secondary:hover { background: #c9a96e14; border-color: var(--gold); }
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; font-weight: 500; }
.text-link svg, .button svg { width: 17px; height: 17px; }
.hero-footnote { display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; margin-top: 19px; color: var(--faint); font-size: 11px; letter-spacing: .025em; }
.hero-footnote a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: var(--muted); }
.hero-footnote a:hover { color: var(--gold-light); }
.dot-separator { color: var(--gold); }
.hero-portrait { width: 100%; max-width: 460px; justify-self: end; }
.portrait-frame { position: relative; overflow: hidden; aspect-ratio: 1; border: 1px solid #c9a96e35; border-radius: 14px; background: var(--surface); box-shadow: 0 18px 65px #0006; }
.portrait-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 6px #ffffff03; border-radius: inherit; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; color: var(--faint); font-size: 11px; letter-spacing: .025em; }
.portrait-mark { color: var(--gold); }

/* Work and writing. */
.section { padding-block: 76px; border-top: 1px solid var(--border); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-bottom: 32px; }
.section h2 { font-size: clamp(25px, 3vw, 34px); font-weight: 500; line-height: 1.2; letter-spacing: -.05em; }
.section-heading .eyebrow + h2 { margin-top: 14px; }
.section-intro { max-width: 44ch; color: var(--muted); font-size: 14px; }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-card { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #121211bb; }
.project-visual { display: grid; place-items: center; height: 188px; overflow: hidden; border-bottom: 1px solid var(--border); background: radial-gradient(ellipse at center, #ffffff04, transparent 75%); }
.project-visual svg { width: 100%; height: 180px; }
.project-iceroot .project-visual { color: #8adff2; background: radial-gradient(ellipse at 50% 75%, #8adff209, transparent 65%); }
.project-monolythium .project-visual { color: var(--gold); background: radial-gradient(ellipse at 50% 70%, #c9a96e09, transparent 65%); }
.project-content { padding: 28px 30px 24px; }
.project-kicker { margin-bottom: 13px; color: var(--faint); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.project-content h3 { font-size: 26px; font-weight: 500; letter-spacing: -.045em; }
.iceroot-word { color: #8adff2; }
.project-content > p:not(.project-kicker) { margin-top: 13px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.project-content .text-link { margin-top: 19px; }
.relationship-note { display: flex; align-items: flex-start; gap: 14px; margin-top: 26px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.note-mark { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: 2px; border: 1px solid #c9a96e40; border-radius: 50%; color: var(--gold); font-size: 12px; }
.relationship-note p { max-width: 90ch; }
.relationship-note strong { color: var(--ink); font-weight: 500; }
.essay-feature { display: grid; grid-template-columns: 1fr .85fr; gap: clamp(32px, 7vw, 88px); padding: 38px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(120deg, #c9a96e05, transparent 65%), var(--surface); }
.essay-copy :is(h2, h3) { max-width: 23ch; margin-top: 16px; font-size: clamp(25px, 3vw, 32px); font-weight: 500; line-height: 1.3; letter-spacing: -.04em; }
.essay-copy > p:not(.eyebrow) { margin-top: 17px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.essay-copy :is(.text-link, .button) { margin-top: 22px; }
.lifecycle { align-self: center; padding-left: 32px; border-left: 1px solid var(--border); }
.lifecycle > p, .lifecycle > label { display: block; color: var(--faint); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.lifecycle ol { margin-top: 22px; padding: 0; list-style: none; }
.lifecycle li { position: relative; display: flex; gap: 15px; padding-bottom: 25px; }
.lifecycle li:last-child { padding-bottom: 0; }
.lifecycle li:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 31px; bottom: 0; width: 1px; background: var(--border); }
.step-no { flex: none; display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #c9a96e40; border-radius: 50%; color: var(--gold); font-size: 10px; }
.lifecycle li div { padding-top: 2px; }
.lifecycle strong { display: block; color: var(--ink); font-size: 13px; font-weight: 500; }
.lifecycle li div > span { display: block; margin-top: 3px; color: var(--faint); font-size: 11px; line-height: 1.65; }
.history-list { border-top: 1px solid var(--border); }
.history-item { display: grid; grid-template-columns: 145px 1fr 120px; align-items: start; gap: 26px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.history-date { padding-top: 3px; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.history-item h3 { font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
.history-item > div > p { max-width: 62ch; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.history-item .history-detail { color: var(--faint); font-size: 12px; }
.history-detail strong { color: var(--ink); font-weight: 500; }
.history-category { justify-self: end; padding-top: 3px; color: var(--faint); font-size: 11px; }
.section-tail { margin-top: 24px; color: var(--muted); font-size: 13px; }

/* Personal interests, kept lighter than the main project cards. */
.interests-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.interest-item { padding-top: 22px; border-top: 1px solid var(--border); }
.interest-kicker { color: var(--faint); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.interest-item h3 { margin-top: 12px; font-size: 20px; font-weight: 500; letter-spacing: -.035em; }
.interest-item > p:not(.interest-kicker) { max-width: 38ch; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.interest-item .text-link { margin-top: 12px; }

/* Contact and footer. */
.contact-section { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-bottom: 96px; }
.contact-section h2 { margin-top: 13px; }
.contact-section p:not(.eyebrow) { max-width: 42ch; margin-top: 17px; color: var(--muted); font-size: 14px; }
.contact-section p.contact-location { margin-top: 3px; color: var(--faint); font-size: .78rem; }
.contact-links { display: grid; align-content: start; }
.contact-link { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 2px; min-height: 76px; border-bottom: 1px solid var(--border); color: var(--ink); }
.contact-link:first-child { border-top: 1px solid var(--border); }
.contact-link:hover { color: var(--gold-light); }
.contact-link strong { display: block; font-size: 14px; font-weight: 500; }
.contact-link small { display: block; margin-top: 4px; color: var(--faint); font-size: 12px; }
.contact-link svg { width: 19px; height: 19px; color: var(--gold); }
.contact-email { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 12px; font-size: 14px; }
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 100px; padding-block: 20px; color: var(--faint); font-size: 11px; }
.footer-inner > div { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.footer-inner a:hover { color: var(--gold-light); }

/* Quiet, comfortable long-form pages. */
.article-main { padding-block: 76px 110px; }
.article { max-width: 760px; margin-inline: auto; }
.article-header { padding-bottom: 35px; border-bottom: 1px solid var(--border); }
.article-header h1 { margin-top: 23px; max-width: 22ch; font-size: clamp(35px, 4.8vw, 58px); font-weight: 500; line-height: 1.14; letter-spacing: -.06em; text-wrap: balance; }
.article-lead { margin-top: 26px; color: #c7c4bb; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.8; letter-spacing: -.01em; }
.article-body { padding-top: 9px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.article-body h2 { margin: 45px 0 17px; color: var(--ink); font-size: 25px; font-weight: 500; line-height: 1.35; letter-spacing: -.04em; }
.article-body p + p { margin-top: 20px; }
.article-body strong { color: var(--ink); font-weight: 500; }
.article-body ul, .article-body ol { margin: 20px 0; padding-left: 24px; }
.article-body li { padding-left: 6px; margin-block: 8px; }
.article-body li::marker { color: var(--gold); }
.article-body a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-color: #c9a96e66; text-underline-offset: 5px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.article-body a:hover { text-decoration-color: currentColor; }

@media (max-width: 1000px) {
  .container { width: calc(100% - 64px); }
  .hero { gap: 35px; padding-block: 70px 90px; }
  .hero h1 { font-size: clamp(51px, 7vw, 70px); }
  .nav-links { gap: 18px; }
  .project-content { padding: 25px; }
  .essay-feature { padding: 30px; gap: 32px; }
  .history-item { grid-template-columns: 120px 1fr 95px; gap: 20px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 92px; }
  .container { width: calc(100% - 40px); }
  .nav-inner { min-height: 76px; gap: 0 20px; flex-wrap: wrap; padding-block: 12px; }
  .nav-links { width: 100%; flex-wrap: wrap; gap: 0 22px; padding-top: 6px; }
  .nav-ready .menu-toggle { display: inline-flex; align-items: center; }
  .nav-ready .nav-links { display: none; padding-block: 8px; }
  .nav-ready .nav-links.is-open { display: flex; flex-direction: column; align-items: stretch; }
  .nav-ready .nav-links a { width: 100%; min-height: 48px; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 50px 65px; }
  .hero h1 { font-size: clamp(58px, 12vw, 82px); }
  .hero-lead { max-width: 32ch; margin-top: 25px; font-size: 23px; }
  .hero-description { max-width: 52ch; }
  .hero-portrait { justify-self: start; width: 100%; max-width: 420px; }
  .section { padding-block: 55px; }
  .section-heading { flex-direction: column; gap: 15px; margin-bottom: 25px; }
  .section-intro { max-width: 52ch; }
  .projects-grid { grid-template-columns: 1fr; gap: 20px; }
  .project-visual { height: 170px; }
  .project-content { padding: 25px; }
  .essay-feature { grid-template-columns: 1fr; padding: 27px; gap: 31px; }
  .essay-copy :is(h2, h3) { max-width: 29ch; }
  .lifecycle { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .history-item { grid-template-columns: 1fr auto; gap: 10px 18px; padding-block: 25px; }
  .history-date { grid-column: 1; }
  .history-item > div { grid-column: 1 / -1; grid-row: 2; }
  .history-category { grid-column: 2; grid-row: 1; }
  .interests-grid { grid-template-columns: 1fr; gap: 23px; }
  .interest-item { padding-top: 20px; }
  .interest-item > p:not(.interest-kicker) { max-width: 52ch; }
  .contact-section { grid-template-columns: 1fr; gap: 30px; padding-bottom: 65px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 4px; padding-block: 25px; }
  .footer-inner > div { gap: 20px; }
  .article-main { padding-block: 45px 70px; }
  .article-header h1 { font-size: clamp(35px, 7vw, 48px); }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 24px; margin-top: 36px; }
}
@media (max-width: 380px) {
  .container { width: calc(100% - 32px); }
  .hero h1 { font-size: 55px; }
  .hero-lead { font-size: 21px; }
  .hero-actions { gap: 8px 18px; }
  .project-content, .essay-feature { padding: 22px; }
  .hero-portrait figcaption { align-items: flex-start; font-size: 10px; }
  .article-header h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
