:root { color-scheme: dark; --bg: #141716; --panel: #1b1f1d; --text: #f0eee5; --muted: #a3aaa2; --line: #343b35; --accent: #f4a261; --accent-text: #181b17; --grid: #ffffff03; }
:root[data-theme="light"] { color-scheme: light; --bg: #f6f4ec; --panel: #fdfcf7; --text: #242d27; --muted: #626b61; --line: #d9ddd1; --accent: #a94b20; --accent-text: #fff9ef; --grid: #24392705; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) { color-scheme: light; --bg: #f6f4ec; --panel: #fdfcf7; --text: #242d27; --muted: #626b61; --line: #d9ddd1; --accent: #a94b20; --accent-text: #fff9ef; --grid: #24392705; } }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { isolation: isolate; margin: 0; color: var(--text); background: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 40px 40px; font-family: "Avenir Next", "Segoe UI", sans-serif; line-height: 1.6; }
.starfield { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.starfield span { position: absolute; top: -18px; left: var(--x); width: 3px; height: 3px; border-radius: 50%; background: #e4edf5; font-size: 0; color: transparent; opacity: .55; animation: star-drift var(--duration) linear var(--delay) infinite; }
:root[data-theme="light"] .starfield span { width: auto; height: auto; border-radius: 0; background: none; color: #3f8752; font: 14px/1 monospace; opacity: .45; }
@keyframes star-drift { to { transform: translateY(calc(100vh + 36px)); } }
@media (prefers-reduced-motion: reduce) { .starfield span { animation: none; top: var(--y); } }
a { color: var(--accent); text-underline-offset: .25em; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.shell { isolation: isolate; max-width: 1160px; padding: 0 40px; margin: auto; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; padding-bottom: 80px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 750; letter-spacing: -.8px; text-decoration: none; color: var(--text); }
.brand img { border-radius: 50%; }
nav { display: flex; gap: 30px; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
nav a:hover, nav a[aria-current] { color: var(--accent); }
#theme-toggle { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--text); font-size: 23px; cursor: pointer; }
.eyebrow { font: 11px/1.6 "SFMono-Regular", Consolas, monospace; letter-spacing: 1.7px; color: var(--muted); text-decoration: none; }
.hero { position: relative; padding: 48px 0; overflow: hidden; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(46px, 6.5vw, 82px); line-height: 1.08; letter-spacing: -4px; font-weight: 650; margin: 26px 0; }
.hero-description { max-width: 640px; margin: 18px 0 0; font-size: 16px; line-height: 1.7; color: var(--muted); }
.hero h1 { font-size: clamp(34.5px, 4.875vw, 61.5px); margin: 0; }
h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }
.intro { color: var(--muted); font-size: 18px; line-height: 1.85; max-width: 640px; }
.home-number { position: fixed; top: 50%; right: 3vw; transform: translateY(-50%); z-index: -1; font: clamp(100px, 23vh, 200px)/1 Georgia, serif; letter-spacing: .2em; writing-mode: vertical-rl; color: var(--muted); opacity: .07; pointer-events: none; user-select: none; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.feature-card { padding: 30px; border: 1px solid var(--line); border-radius: 32px; background: var(--panel); color: var(--text); text-decoration: none; }
.feature-card h2 { margin: 0 0 10px; font-size: 30px; letter-spacing: -1px; font-weight: 600; display: flex; justify-content: space-between; }
.feature-card h2 span { color: var(--accent); font-size: 26px; }
.feature-card p { max-width: 370px; font-size: 15px; color: var(--muted); margin-bottom: 28px; }
.card-link { font-size: 13px; color: var(--accent); font-weight: 600; }
.feature-card:hover, .project-card:hover { border-color: var(--accent); }
.page-heading { padding: 48px 0; }
.page-heading > p:last-child { margin-bottom: 0; }
.page-heading h1 { margin: 18px 0; font-size: clamp(42px, 5.8vw, 68px); letter-spacing: -2.8px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 22px; }
.section-heading h2 { font-size: 18px; font-weight: 600; margin: 0; }
.project-grid { padding: 0; margin: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-grid li { min-width: 0; }
.project-card { display: block; height: 100%; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-decoration: none; color: var(--text); }
.project-card h3 { font-size: 17px; margin-bottom: 7px; overflow-wrap: anywhere; }
.project-card p { font-size: 13px; color: var(--muted); margin: 0; }
.project-icon { float: right; margin-left: 10px; color: var(--accent); }
.experiments { margin-top: 48px; }
.post-row { display: grid; grid-template-columns: 130px 1fr 20px; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.post-row time, .post time { font: 12px/1.8 "SFMono-Regular", Consolas, monospace; color: var(--muted); }
.post-row h2 { font-size: 23px; line-height: 1.3; margin-bottom: 9px; font-weight: 600; }
.post-row p { font-size: 15px; color: var(--muted); margin: 0; }
.post-row > span, .post-row:hover h2 { color: var(--accent); }
.empty-state { border: 1px dashed var(--line); padding: 48px 30px; border-radius: 8px; }
.empty-state h2 { margin: 18px 0 8px; font-size: 25px; }
.empty-state p { color: var(--muted); }
.empty-state a { font-size: 14px; }
.post { max-width: 760px; margin: auto; }
.post .page-heading { padding-bottom: 36px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.post h1 { font-size: clamp(38px, 5vw, 60px); }
.prose { background: var(--bg); font-size: 17px; line-height: 1.9; overflow-wrap: anywhere; }
.prose h2, .prose h3 { margin: 36px 0 14px; line-height: 1.3; }
.prose img, .prose video { max-width: 100%; height: auto; border-radius: 6px; }
.prose pre { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; line-height: 1.6; }
.prose code { font-size: .85em; }
.prose :not(pre) > code { background: var(--panel); padding: 3px 5px; }
.prose blockquote { margin: 26px 0; border-left: 3px solid var(--accent); padding-left: 22px; color: var(--muted); }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 16px; border: 1px solid var(--line); text-align: left; }
.back-link { display: inline-block; margin-top: 36px; font-size: 14px; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 10px; background: var(--panel); z-index: 10; }
.skip-link:focus { top: 10px; }
@media (max-width: 640px) {
  .shell { padding: 0 22px; }
  .site-header { padding: 22px 0; gap: 16px; flex-wrap: wrap; }
  .brand { font-size: 18px; }
  .brand img { width: 32px; height: 32px; }
  nav { gap: 18px; }
  .hero { padding: 32px 0; }
  h1 { letter-spacing: -2.5px; }
  .intro { font-size: 16px; }
  .intro br { display: none; }
  .home-grid, .project-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 25px; }
  .page-heading { padding: 32px 0; }
  .post-row { grid-template-columns: 1fr 20px; gap: 10px; }
  .post-row time { grid-column: 1 / -1; }
  main { padding-bottom: 48px; }
}
