:root, .theme-reveal[data-theme="light"] {
  --paper: #f8f7f3;
  --ink: #242b27;
  --muted: #69736d;
  --rule: #dcded8;
  --accent: #3b6557;
  --hover: #edf1eb;
  --dot: #9eaea0;
  --dot-lit: #bfd8b8;
  --selection: #d9e7db;
  --mono: "DM Mono", Consolas, monospace;
  --sans: "DM Sans", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
}
html[data-theme="dark"], .theme-reveal[data-theme="dark"] {
  --paper: #17291f;
  --ink: #f1eee5;
  --muted: #b8c7b9;
  --rule: #46604d;
  --accent: #bfdbc2;
  --hover: #274232;
  --dot: #66816c;
  --dot-lit: #c4e5b7;
  --selection: #385942;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, .theme-reveal { background-color: var(--paper); background-image: url("../texture.svg"); background-size: 180px 180px; background-blend-mode: soft-light; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { margin: 0; }
body::before, body::after, .theme-reveal::before, .theme-reveal::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background-size: 20px 20px; }
body::before, .theme-reveal::before { background-image: radial-gradient(circle, var(--dot) .8px, transparent 1.3px); opacity: .28; }
body::after, .theme-reveal::after { background-image: radial-gradient(circle, var(--dot-lit) 1.15px, transparent 1.6px); opacity: 0; mask-image: radial-gradient(circle 170px at var(--pointer-x, 50%) var(--pointer-y, 50%), #000 5%, transparent 100%); transition: opacity .25s ease; }
body.pointer-active::after, body.pointer-active .theme-reveal::after { opacity: .95; }
.theme-reveal { position: fixed; inset: 0; z-index: 9999; overflow: hidden; pointer-events: none; }
::selection { background: var(--selection); }
a { color: inherit; text-decoration: none; transition: color .18s ease, transform .18s ease; }
.theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 10; padding: 10px 14px; background: var(--ink); color: #fff; }
.skip-link:focus { left: 12px; }
.page { position: relative; z-index: 1; width: min(100% - 44px, 690px); margin: auto; }
.site-header { position: sticky; top: 0; z-index: 20; min-height: 88px; display: flex; align-items: center; gap: 15px; margin-inline: -24px; padding-inline: 40px; border: 1px solid transparent; border-bottom-color: var(--rule); background: transparent; transition: background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.site-header.is-scrolled { border-color: color-mix(in srgb, var(--rule) 75%, transparent); border-radius: 0 0 10px 10px; background: color-mix(in srgb, var(--paper) 76%, transparent); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: inset 0 1px #ffffff20, 0 8px 25px #0e211320; }
.theme-reveal > .site-header { position: absolute; top: 0; left: 50%; width: calc(min(100% - 44px, 690px) + 48px); margin-inline: 0; transform: translateX(-50%); }
.wordmark { font: 500 2rem/1 var(--serif); letter-spacing: -.08em; margin-right: auto; }
.wordmark span, h1 span { color: var(--accent); }
.site-nav { display: flex; gap: 18px; color: var(--muted); font: 11px var(--mono); }
.site-nav a { display: inline-block; }
.site-nav a:hover, .more-link:hover, .inline-link:hover { color: var(--accent); }
.site-nav a:hover, .more-link:hover { transform: translateY(-2px); }
.theme-toggle, .command-trigger { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); background: transparent; color: var(--muted); border-radius: 5px; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.theme-toggle { width: 32px; height: 32px; font: 20px/1 var(--serif); }
.command-trigger { min-height: 32px; padding: 4px 6px; font: 10px var(--mono); white-space: nowrap; }
.theme-toggle:hover, .command-trigger:hover { background: #24533b; border-color: #24533b; color: #f5f1e9; transform: translateY(-2px); }
.command-trigger:hover kbd { border-color: #71977a; color: #f5f1e9; }
.command-trigger kbd { border: 1px solid var(--rule); border-radius: 3px; padding: 3px 5px; color: var(--ink); font: 10px var(--mono); }
.intro { padding: 68px 0 58px; }
.intro-kicker { margin: 0 0 12px; color: var(--muted); font: 11px var(--mono); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0 0 24px; font: 400 clamp(3.2rem, 8vw, 5.2rem)/1 var(--serif); letter-spacing: -.055em; }
.intro-lede { margin-bottom: 0; font-size: 17px; line-height: 1.6; }
.section { padding: 24px 0 42px; border-top: 1px solid var(--rule); scroll-margin-top: 104px; }
.project { scroll-margin-top: 104px; }
.section-heading { margin: 0 0 18px; font: 500 12px var(--mono); color: var(--accent); }
.entry { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--rule); transition: background .2s ease, transform .2s ease; }
.entry:hover { background: var(--hover); transform: translateX(3px); }
.entry-date { padding-top: 3px; color: var(--muted); font: 10px var(--mono); }
.entry-meta { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.entry-icon { display: block; width: 20px; height: 20px; flex: none; transition: transform .2s ease; }
.theme-reveal[data-theme="dark"] .entry-icon--tint, html[data-theme="dark"] .entry-icon--tint { filter: brightness(1.55); }
.entry:hover .entry-icon { transform: translateY(-2px) rotate(-5deg); }
.entry-icon--internflow { padding: 2px; border-radius: 5px; background: #243c30; }
.entry h3 { margin: 0 0 5px; font-size: 14px; font-weight: 700; line-height: 1.45; }
.entry h3 span { font-weight: 400; color: var(--muted); }
.entry p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.project h3 a:hover { color: var(--accent); }
.inline-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.more-link { display: inline-block; margin-top: 21px; border-bottom: 1px solid var(--rule); padding-bottom: 5px; font: 10px var(--mono); }
.latest-commit { display: block; margin-top: 26px; padding: 15px 17px; border: 1px solid var(--rule); border-radius: 7px; background: color-mix(in srgb, var(--paper) 70%, transparent); transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.latest-commit[hidden] { display: none; }
.latest-commit:hover { background: var(--hover); border-color: var(--accent); transform: translateY(-2px); }
.latest-commit__top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font: 10px var(--mono); }
.latest-commit__dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.latest-commit__message { display: block; overflow: hidden; margin-top: 9px; color: var(--ink); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.latest-commit__repo { display: block; margin-top: 5px; color: var(--muted); font: 10px var(--mono); }
.contact { padding-bottom: 60px; }
.contact-links { display: flex; gap: 10px; padding-top: 3px; }
.contact-links a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: 7px; color: var(--ink); background: var(--paper); transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
.contact-links a:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--hover); color: var(--accent); }
.contact-links svg { width: 19px; height: 19px; }
.site-footer { position: relative; padding: 25px 0 38px; color: var(--muted); font: 10px var(--mono); }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 1px solid var(--rule); }
.page--error { min-height: 100vh; display: flex; flex-direction: column; }
.error-main { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 80px 0 130px; }
.error-main h1 { font-size: clamp(6rem, 20vw, 11rem); margin: 0 0 18px; }
.error-lede { font: 400 clamp(1.6rem, 5vw, 2.2rem)/1.2 var(--serif); margin-bottom: 12px; }
.error-detail { color: var(--muted); font-size: 13px; line-height: 1.6; }
.error-home { display: inline-block; margin-top: 26px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; color: var(--accent); font: 11px var(--mono); }
.error-home:hover { transform: translateX(-3px); }
.cow-link { position: absolute; top: -96px; right: 0; display: block; width: 96px; height: 96px; image-rendering: pixelated; transition: transform .2s ease; }
.cow-link:hover { transform: translateY(-4px); }
.cow-link img { display: block; width: 96px; height: 96px; image-rendering: pixelated; }
.command-menu { width: min(calc(100% - 28px), 540px); max-height: min(78vh, 600px); padding: 0; border: 1px solid #405449; border-radius: 9px; background: #19231e; color: #e8f0e9; box-shadow: 0 24px 70px #17201a55; overflow: hidden; }
.command-menu::backdrop { background: #17201a88; backdrop-filter: blur(3px); }
.command-head { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid #34473b; }
.command-head label { white-space: nowrap; color: #98c5a4; font: 12px var(--mono); }
.command-head label span { margin-right: 6px; color: #80ae8d; }
.command-head input { width: 100%; min-width: 0; border: 0; background: transparent; color: #f4f7f3; font: 12px var(--mono); }
.command-head input::placeholder { color: #778d7e; }
.command-head button { border: 1px solid #445b4b; border-radius: 3px; padding: 4px 6px; background: transparent; color: #9bb09f; cursor: pointer; font: 10px var(--mono); }
.command-results { max-height: min(55vh, 430px); overflow-y: auto; padding: 10px; }
.command-caption { margin: 14px 9px 6px; color: #829887; font: 10px var(--mono); }
.command-results a, .command-results button { display: flex; justify-content: space-between; gap: 10px; width: 100%; border: 0; border-radius: 5px; padding: 10px 12px; background: transparent; color: inherit; text-align: left; cursor: pointer; font: 12px var(--mono); transition: background .18s ease, color .18s ease, transform .18s ease; }
.command-results a:hover, .command-results a.is-active, .command-results button:hover, .command-results button.is-active { background: #2d4536; color: #fff; transform: translateX(2px); }
.command-results small { color: #94aa99; font: 10px var(--mono); }
.command-results [data-command][hidden], .command-caption[hidden], .command-empty[hidden] { display: none; }
.command-empty { margin: 20px 12px; color: #a7b7aa; font: 11px var(--mono); }
.command-foot { display: flex; gap: 19px; padding: 12px 17px; border-top: 1px solid #34473b; color: #839887; font: 10px var(--mono); }
@media (max-width: 650px) {
  .page { width: min(100% - 36px, 690px); }
  .site-header { min-height: 74px; margin-inline: -10px; padding-inline: 24px; }
  .theme-reveal > .site-header { width: calc(min(100% - 36px, 690px) + 20px); margin-inline: 0; }
  .site-nav { display: none; }
  .intro { padding: 62px 0 52px; }
  .entry { grid-template-columns: 43px minmax(0, 1fr); gap: 11px; }
  .entry-meta { flex-direction: column; align-items: flex-start; gap: 7px; }
  .section, .project { scroll-margin-top: 90px; }
}
@media (max-width: 400px) {
  h1 { font-size: 3.25rem; }
  .command-head { gap: 8px; }
  .command-head label { font-size: 11px; }
  .command-foot { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
