@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f7f5f1;
  --ink: #1d1b18;
  --muted: #78715f;
  --faint: #a8a08c;
  --accent: #e5532d;
  --line: #e4dfd5;
  --card: #ffffff;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #14120f;
    --ink: #ece7df;
    --muted: #9c948a;
    --faint: #6b6559;
    --accent: #ff7a4d;
    --line: #2a2620;
    --card: #1b1814;
    color-scheme: dark;
  }
}
html[data-theme="dark"] {
  --bg: #14120f;
  --ink: #ece7df;
  --muted: #9c948a;
  --faint: #6b6559;
  --accent: #ff7a4d;
  --line: #2a2620;
  --card: #1b1814;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }

header.site {
  padding-top: 48px;
  padding-bottom: 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.logo {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}
.logo-code {
  color: var(--bg);
  background: var(--accent);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: -.08em;
  padding: .48em .55em .43em .48em;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 82% 100%, 0 100%);
  transform: translateY(-1px);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}
.logo-word {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.04em;
  transform: translate(3px, 4px);
  transition: transform .32s cubic-bezier(.34, 1.56, .64, 1);
}
.logo:hover .logo-code { transform: translate(-1px, -2px) rotate(-2deg); }
.logo:hover .logo-word { transform: translate(3px, 0); }
@media (prefers-reduced-motion: reduce) {
  .logo-code, .logo-word { transition: none; }
  .logo:hover .logo-code { transform: translateY(-1px); }
  .logo:hover .logo-word { transform: translate(3px, 4px); }
}
nav { display: flex; gap: 20px; align-items: center; }
nav a { color: var(--muted); font-size: .9rem; transition: color .15s; }
nav a:hover { color: var(--ink); }
#theme {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: .85rem; padding: 3px 12px;
  cursor: pointer; font-family: var(--mono); transition: all .15s;
}
#theme:hover { border-color: var(--accent); color: var(--accent); }

.hero { padding: 96px 0 72px; }
.hero .eyebrow {
  font-family: var(--mono); font-size: .8rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: .18em; margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.08; letter-spacing: -0.01em;
  max-width: 17em;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p {
  color: var(--muted); max-width: 34em;
  margin-top: 24px; font-size: 1.05rem;
}
.workbench {
  font-family: var(--mono); font-size: .85rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 6px;
  padding: 14px 18px; margin-top: 40px;
}
.workbench .prompt { color: var(--accent); }
.workbench a { color: inherit; }
.workbench a:hover { color: var(--accent); }
.cursor {
  display: inline-block; width: .55em; height: 1em;
  background: var(--accent); margin-left: 4px; vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

section { padding-bottom: 80px; }
.section-head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 400; font-size: 1.6rem;
}
.section-head .count { font-family: var(--mono); font-size: .8rem; color: var(--faint); }

.posts { list-style: none; }
.posts li { border-bottom: 1px solid var(--line); }
.posts li:first-child { border-top: 1px solid var(--line); }
.post {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  padding: 22px 8px;
  transition: background .15s ease;
}
.post:hover { background: var(--card); }
.post .date {
  font-family: var(--mono); font-size: .78rem; color: var(--faint);
  padding-top: 7px;
}
.post h3 {
  font-family: var(--serif); font-weight: 400; font-size: 1.35rem;
  line-height: 1.25;
}
.post h3:hover { color: var(--accent); }
.post .tags { margin-top: 6px; }
.tag {
  font-family: var(--mono); font-size: .7rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 10px; margin-right: 6px;
}

.article { padding-bottom: 96px; }
.article x-post { display: block; }
.article .err {
  font-family: var(--mono); font-size: .85rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 6px; padding: 16px 20px;
}
.article .back {
  font-family: var(--mono); font-size: .8rem; color: var(--faint);
  display: inline-block; margin-bottom: 48px;
}
.article .back:hover { color: var(--accent); }
.article .toc {
  display: flex; flex-direction: column; gap: 6px;
  width: fit-content;
  font-family: var(--mono); font-size: .78rem;
  border: 1px dashed var(--line); border-radius: 6px;
  padding: 12px 18px; margin-bottom: 32px;
}
.article .toc .toc-head {
  margin-bottom: 4px;
  font-size: .68rem; color: var(--faint);
  text-transform: uppercase; letter-spacing: .14em;
}
.article .toc a { color: var(--muted); border: none; }
.article .toc a:hover { color: var(--accent); }
.article h2[id] { scroll-margin-top: 24px; }
.article .meta {
  font-family: var(--mono); font-size: .78rem; color: var(--faint);
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px;
}
.article h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.1;
  margin-bottom: 40px;
}
.article h2 {
  font-family: var(--serif); font-weight: 400; font-size: 1.6rem;
  margin: 48px 0 16px;
}
.article p { margin-bottom: 20px; }
.article a { color: var(--accent); border-bottom: 1px solid transparent; }
.article a:hover { border-bottom-color: var(--accent); }
.article code {
  font-family: var(--mono); font-size: .85em;
  background: var(--card); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 4px;
}
.article pre {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 16px 20px; overflow-x: auto;
  font-family: var(--mono); font-size: .85rem; line-height: 1.6;
  border-radius: 6px; margin: 24px 0;
}
.article pre code { background: none; border: none; padding: 0; }
.article pre[data-path] { padding: 0; }
.article pre[data-path]::before {
  content: attr(data-path);
  display: block;
  font-size: .72rem;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 8px 20px;
}
.article pre[data-path] code { display: block; padding: 16px 20px; }
.article blockquote {
  font-family: var(--serif); font-style: italic; font-size: 1.25rem;
  border-left: 3px solid var(--accent); padding-left: 24px;
  margin: 32px 0; color: var(--muted);
}
.article ul, .article ol { margin: 0 0 20px 24px; }
.article li { margin-bottom: 8px; }
.article hr { border: none; border-top: 1px solid var(--line); margin: 48px 0; }
.article img { max-width: 100%; border-radius: 8px; margin: 24px 0; }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about p { color: var(--muted); }
.about h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin-bottom: 16px; }
.about ul { list-style: none; font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.about li { margin-bottom: 10px; }
.about li::before { content: "↳ "; color: var(--accent); }

footer.site {
  border-top: 1px solid var(--line);
  padding-top: 36px;
  padding-bottom: 60px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: .78rem; color: var(--faint);
}
footer.site a:hover { color: var(--accent); }

browser-advice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  width: min(390px, calc(100vw - 32px));
}
.browser-advice {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(20, 16, 12, .18);
  padding: 22px;
  animation: advice-in .32s cubic-bezier(.22, 1, .36, 1);
}
.advice-kicker {
  display: block;
  color: var(--accent);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.browser-advice h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 32px 10px 0;
}
.browser-advice p {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
  margin-bottom: 18px;
}
.advice-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  font: 1.25rem/1 var(--sans);
}
.advice-close:hover { color: var(--ink); }
.advice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.advice-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .72rem;
  padding: 0 12px;
  transition: border-color .15s, transform .15s;
}
.advice-action:hover { border-color: var(--accent); transform: translateY(-1px); }
.advice-action.primary { color: #17120e; background: var(--accent); border-color: var(--accent); }
.browser-advice small { display: block; color: var(--faint); font-family: var(--mono); font-size: .64rem; }
@keyframes advice-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
  .cursor, .browser-advice { animation: none; }
  .advice-action { transition: none; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 64px 0 48px; }
  .post { grid-template-columns: 1fr; gap: 4px; }
  .about { grid-template-columns: 1fr; }
  header.site { flex-direction: column; gap: 16px; }
  browser-advice { right: 16px; bottom: 16px; }
}
