:root {
  --base: #11001C;
  --accent: #C9A7FF;
  --text: #EEE7F7;
  --muted: #BBAACF;
  --surface: color-mix(in oklab, var(--base), #ffffff 4%);
  --line: color-mix(in oklab, var(--base), #B48CFF 22%);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--base);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --base: #11001C; } }
:root[data-theme="dark"] { --base: #11001C; }
html { scroll-padding-top: calc(77px + env(safe-area-inset-top, 0px)); }
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--base); color: var(--text); font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

header { border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 100; background: var(--base); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; }
.name { font-family: var(--serif); font-weight: 500; font-size: 25px; letter-spacing: -0.01em; }
.nav { display: flex; gap: 2px; font-size: 15px; }
.nav a { padding: 12px 14px; }
.icons { display: flex; gap: 4px; }
.icons a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.menu-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: 10px; color: var(--text); cursor: pointer;
}
.drawer { display: none; }

main { flex: 1; }
.hero { padding-top: 88px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 24px; }
.rule { width: 56px; height: 2px; background: var(--accent); transform-origin: left center; }
.label { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
h1 {
  margin: 0; max-width: 18ch; font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 6vw, 68px); line-height: 1.08; letter-spacing: -0.02em;
}
.lede { margin: 0; max-width: 60ch; font-size: 18px; line-height: 1.65; color: var(--muted); }
.reach { margin: 4px 0 0; font-size: 16px; color: var(--muted); }
.reach span { color: var(--text); }

footer { border-top: 1px solid var(--line); background: var(--surface); }
.foot { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--muted); }
.copy { margin: 0; width: 100%; text-align: center; }
.section { padding-top: 64px; padding-bottom: 64px; border-top: 1px solid var(--line); }
.section h2 { margin: 0 0 28px; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.015em; }
.entry { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: 0; padding-top: 0; }
.when { margin: 4px 0 0; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.role { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.25; }
.org { margin: 6px 0 0; font-size: 16px; color: var(--accent); }
.entry ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-width: 68ch; }
.entry li { position: relative; padding-left: 20px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.entry li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--accent); }
.project .title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 32px); line-height: 1.2; letter-spacing: -0.01em; }
.project p.desc { margin: 14px 0 0; max-width: 68ch; font-size: 17px; line-height: 1.65; color: var(--muted); }
.project .tools { margin: 16px 0 0; font-size: 14px; color: var(--muted); opacity: .85; }
.proj { border-top: 1px solid var(--line); }
.proj:last-of-type { border-bottom: 1px solid var(--line); }
.proj summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 200px minmax(0, 1fr) 44px; gap: 32px; align-items: start; padding: 22px 0; }
.proj summary::-webkit-details-marker { display: none; }
.proj .hook { margin: 8px 0 0; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 60ch; }
.chev { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .25s ease; }
.proj summary:hover .chev { border-color: var(--accent); }
.proj summary:hover .title { color: var(--accent); }
.proj .title { transition: color .25s ease; }
.proj[open] .chev { transform: rotate(180deg); }
.proj-body { padding: 0 0 26px calc(200px + 32px); }
.proj-body p.desc:first-child { margin-top: 0; }
:root { interpolate-size: allow-keywords; }
.proj::details-content { block-size: 0; overflow: hidden; transition: block-size .45s cubic-bezier(.2,.7,.2,1), content-visibility .45s allow-discrete; }
.proj[open]::details-content { block-size: auto; }
.more { margin: 48px 0 0; }
.more h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 26px; }
.more-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 18px 0; border-top: 1px solid var(--line); }
.more-row h4 { margin: 0; font-size: 18px; font-weight: 600; }
.more-row p { margin: 6px 0 0; max-width: 68ch; font-size: 16px; line-height: 1.6; color: var(--muted); }
.more-row a.inline { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .chev, .proj::details-content { transition: none; } }
@media (max-width: 720px) {
  .proj summary { grid-template-columns: minmax(0, 1fr) 44px; gap: 8px 16px; }
  .proj summary .when { grid-column: 1 / -1; }
  .proj-body { padding-left: 0; }
  .more-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.btn { display: inline-flex; align-items: center; min-height: 44px; margin-top: 22px; padding: 0 18px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-weight: 500; transition: border-color .25s ease, color .25s ease; }
.btn:hover { border-color: var(--accent); }
@media (max-width: 720px) {
  .section { padding-top: 48px; padding-bottom: 48px; }
  .section h2 { margin-bottom: 20px; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px 0; }
  .entry li { font-size: 16px; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
header { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.rule { animation: draw 1.1s cubic-bezier(.2,.7,.2,1) .15s both; }
.label { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
h1 { animation: rise .8s cubic-bezier(.2,.7,.2,1) .1s both; }
.lede { animation: rise .8s cubic-bezier(.2,.7,.2,1) .22s both; }
.reach { animation: rise .8s cubic-bezier(.2,.7,.2,1) .34s both; }
@media (prefers-reduced-motion: reduce) { header, .label, .rule, h1, .lede, .reach { animation: none; } }
@media (max-width: 960px) {
  .wrap { padding-left: 28px; padding-right: 28px; }
  .nav a { padding: 12px 10px; }
  .hero { padding-top: 72px; padding-bottom: 64px; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: calc(65px + env(safe-area-inset-top, 0px)); }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .bar { min-height: 64px; }
  .name { font-size: 23px; }
  .bar .nav, .bar .icons { display: none; }
  .menu-btn { display: flex; }
  .drawer { border-top: 1px solid var(--line); padding: 4px 8px 16px; }
  .drawer.open { display: flex; flex-direction: column; font-size: 17px; }
  .drawer a { padding: 12px; }
  .drawer .icons { padding-top: 8px; }
  .hero { padding-top: 48px; padding-bottom: 48px; }

}

.page-head { padding-top: 72px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { max-width: none; }
.search { margin-top: 12px; width: 100%; max-width: 420px; min-height: 48px; padding: 0 16px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; transition: border-color .25s ease; }
.search::placeholder { color: var(--muted); }
.search:focus { outline: none; border-color: var(--accent); }
.posts { padding-bottom: 72px; }
.post { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.post:last-child { border-bottom: 1px solid var(--line); }
.post h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25; letter-spacing: -0.01em; }
.post h2 a:hover { color: var(--accent); }
.post p.ex { margin: 10px 0 0; max-width: 68ch; font-size: 17px; line-height: 1.65; color: var(--muted); }
.post a.inline { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-size: 15px; font-weight: 500; color: var(--accent); }
@media (max-width: 720px) {
  .page-head { padding-top: 48px; padding-bottom: 28px; }
  .post { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.sr { position: absolute; left: -9999px; }
.nav a[aria-current], .drawer a[aria-current] { color: var(--accent); }
#writing .lede { animation: none; }
.no-results { margin: 0; padding: 24px 0; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.65; color: var(--muted); }

.article-head { padding-top: 72px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 12px; }
.article-head h1 { max-width: 24ch; }
.article-head .when { margin: 0; }
.article { padding-bottom: 72px; }
.article-body { max-width: 68ch; font-size: 17px; line-height: 1.65; color: var(--muted); text-align: left; }
.article-body > :first-child { margin-top: 0; }
.article-body p, .article-body ul, .article-body ol, .article-body blockquote, .article-body pre { margin: 0 0 1.25em; }
.article-body h2 { margin: 2em 0 .6em; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 32px); line-height: 1.2; letter-spacing: -0.01em; color: var(--text); }
.article-body h3 { margin: 1.6em 0 .5em; font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.3; color: var(--text); }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body a { color: var(--accent); }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li { margin: 0 0 .4em; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 1.5em 0; border-radius: 10px; }
.article-body pre { overflow-x: auto; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.article-body blockquote { padding-left: 20px; border-left: 2px solid var(--accent); }
.article-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; max-width: 68ch; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); }
.article-nav .next { margin-left: auto; text-align: right; }
.inline { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--accent); }
.back { margin: 8px 0 0; }
@media (max-width: 720px) {
  .article-head { padding-top: 48px; padding-bottom: 28px; }
  .article-nav { flex-direction: column; }
  .article-nav .next { margin-left: 0; text-align: left; }
}
