@font-face { font-family: "Geist"; src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #0f1116; --bg2: #14171e; --line: #232834; --line2: #333a49; --text: #f1f3f8; --muted: #9aa2b4; --faint: #8d96a9;
  --ink: #0f1116; --paper: #f1f3f8;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bar: 52px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f6f3; --bg2: #ecece7; --line: #dcdcd5; --line2: #bfc0b8; --text: #14161c; --muted: #565b68; --faint: #5b606c;
  --ink: #f6f6f3; --paper: #14161c; color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; min-height: 100svh; display: flex; flex-direction: column; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }

/* top bar: a single ruled strip, like a tool's menu */
.bar { position: sticky; top: 0; z-index: 10; height: var(--bar); display: flex; align-items: stretch; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.bar a, .bar button { display: flex; align-items: center; padding: 0 18px; border-right: 1px solid var(--line); color: var(--muted); transition: color .2s, background .2s; }
.bar .brand { color: var(--text); font-weight: 650; letter-spacing: -.02em; font-size: 18px; padding: 0 20px; gap: 10px; }
.logo { flex: none; }
.bar nav { display: flex; }
.bar nav a { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: 11.5px; }
.bar a:hover, .bar button:hover { color: var(--text); background: var(--bg2); }
.bar a[aria-current="page"] { color: var(--ink); background: var(--paper); }
.bar .sp { flex: 1; border-right: 0; }
.bar button { border-right: 0; border-left: 1px solid var(--line); cursor: pointer; background: none; border-top: 0; border-bottom: 0; width: var(--bar); justify-content: center; padding: 0; }
.bar .gh { gap: 9px; border-left: 1px solid var(--line); border-right: 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.bar .support { gap: 8px; border-left: 1px solid var(--line); border-right: 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.gh-n { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--line2); letter-spacing: 0; color: var(--text); }
.gh-n[hidden] { display: none; }
.i-sun { display: none; } :root[data-theme="light"] .i-sun { display: block; } :root[data-theme="light"] .i-moon { display: none; }

main { flex: 1; }

.hero { min-height: calc(100svh - var(--bar) - 150px); display: grid; place-content: center; text-align: center; padding: 8vh 20px 6vh; }
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(1100px, 130vw); height: min(560px, 90vw); transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.085), rgba(255,255,255,.04) 45%, transparent 100%); filter: blur(40px); pointer-events: none; }
:root[data-theme="light"] .hero::before { background: radial-gradient(closest-side, rgba(0,0,0,.05), rgba(0,0,0,.02) 45%, transparent 100%); }
.kicker { color: var(--faint); margin-bottom: clamp(18px, 3vh, 30px); }
h1 { margin: 0; font-weight: 650; letter-spacing: -.045em; line-height: 1; font-size: min(8.4vw, 118px); white-space: nowrap; }
.lead { color: var(--muted); font-size: clamp(16px, 1.7vw, 20px); max-width: 44ch; margin: clamp(20px, 3.2vh, 32px) auto 0; }
.chips { margin-top: clamp(26px, 4vh, 40px); display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.chip { border: 1px solid var(--line2); padding: 9px 14px; color: var(--muted); }
.chip.on { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.projects { border-top: 1px solid var(--line); padding: 28px 22px 70px; }
.projects .head { display: flex; justify-content: space-between; color: var(--faint); margin-bottom: 18px; }
.empty { border: 1px dashed var(--line2); padding: clamp(28px, 5vw, 56px); text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-size: 20px; letter-spacing: -.02em; margin-bottom: 4px; font-weight: 600; }

footer { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 18px 22px 22px; color: var(--faint); }
footer nav { display: flex; gap: 20px; }
footer a:hover { color: var(--text); }

.prose { max-width: 70ch; margin: 0 auto; padding: clamp(36px, 7vw, 84px) 22px 70px; }
.prose h1 { white-space: normal; font-size: clamp(32px, 5vw, 52px); letter-spacing: -.03em; margin-bottom: 8px; }
.prose h2 { font-size: 20px; margin: 2em 0 .3em; letter-spacing: -.02em; }
.prose p { color: var(--muted); }
.prose strong { color: var(--text); }
.prose code { font-family: var(--mono); font-size: .88em; border: 1px solid var(--line2); padding: .05em .35em; }
.prose .updated { color: var(--faint); font-size: 14px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 720px) {
  :root { --bar: 48px; }
  .bar a { padding: 0 12px; }
  .bar .brand { padding: 0 14px; }
  h1 { font-size: 7.3vw; letter-spacing: -.05em; }
  .hero { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 380px) { .bar nav a { padding: 0 9px; } }
@media (prefers-reduced-motion: reduce) { *, ::before { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* byline */
.byline { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px; }
.who { display: flex; align-items: center; gap: 14px; }
.who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line2); filter: grayscale(1) contrast(1.05); transition: filter .3s; }
.who:hover img { filter: none; }
.name { font-weight: 600; letter-spacing: -.02em; font-size: 18px; line-height: 1.2; }
.role { color: var(--faint); margin-top: 4px; font-size: 11px; }
.follow { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--paper); background: var(--paper); color: var(--ink); transition: background .2s, color .2s; }
.follow:hover { background: transparent; color: var(--text); }
@media (max-width: 480px) { .byline { flex-direction: column; align-items: flex-start; } .follow { width: 100%; justify-content: center; } }

/* accessibility */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--paper); color: var(--ink); padding: 10px 14px; font: 600 14px var(--font); transition: top .15s; }
.skip:focus { top: 8px; }
.bar a:focus-visible, .bar button:focus-visible { outline-offset: -4px; }
main:focus { outline: none; }
.projects .head h2 { margin: 0; font-weight: 400; }
a { text-underline-offset: 3px; }
@media (forced-colors: active) { .chip.on, .follow, .bar a[aria-current="page"] { border: 1px solid CanvasText; } }
.lead a { text-decoration: underline; }
footer nav a { display: inline-block; padding: 10px 4px; margin: -10px -4px; }

@media (max-width: 480px) {
  .chip { padding: 8px 12px; font-size: 11px; }
  .hero { min-height: auto; padding-top: 14vh; padding-bottom: 10vh; }
  .byline, .projects { padding-left: 16px; padding-right: 16px; }
  footer { padding-left: 16px; padding-right: 16px; }
}

/* menu button: hidden on wide screens */
.bar .menu-btn { display: none; }
.menu-btn path { transition: transform .25s, opacity .2s; transform-origin: 12px 12px; }
.bar[data-open] .menu-btn .l1 { transform: translateY(4px) rotate(45deg); }
.bar[data-open] .menu-btn .l2 { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 720px) {
  .bar .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* M logo only */
  .bar .brand { padding: 0 16px; }
  .bar .menu-btn { display: flex; width: var(--bar); justify-content: center; padding: 0; border-left: 1px solid var(--line); border-right: 0; background: none; border-top: 0; border-bottom: 0; cursor: pointer; color: var(--muted); }
  .bar .menu-btn:hover, .bar .menu-btn[aria-expanded="true"] { color: var(--text); background: var(--bg2); }
  .bar .support { padding: 0 14px; } .bar .support .gh-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bar .gh { padding: 0 14px; } .bar .gh-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bar .theme-btn { order: 1; }
  .bar .menu-btn { order: 2; }
  .bar nav { display: none; position: absolute; top: var(--bar); left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line2); }
  .bar[data-open] nav { display: flex; animation: drop .22s ease both; }
  .bar nav a { height: 56px; padding: 0 20px; border-right: 0; border-top: 1px solid var(--line); font-size: 13px; }
  .bar nav a:first-child { border-top: 0; }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
}
@media (prefers-reduced-motion: reduce) { .bar[data-open] nav { animation: none; } }
