:root {
  --bg: #f4efe4; --paper: #fffaf0; --text: #29231f; --muted: #71675e;
  --accent: #913b67; --green: #237866; --red: #c6533f;
  --yellow: #d3a52f; --border: #d8cebc; --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background-color: var(--bg); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 .09'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E"); color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.68; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-underline-offset: .18em; }
canvas#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.home > :not(canvas) { position: relative; z-index: 1; }
.site-header { display: flex; align-items: center; justify-content: space-between; width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding: 28px 0; border-bottom: 1px solid var(--border); text-shadow: 0 0 12px var(--bg); }
.site-header a { color: var(--text); text-decoration: none; }
.site-header .wordmark { font-weight: 780; letter-spacing: -.025em; }
.site-header nav { display: flex; gap: 24px; font-size: .92rem; }
.site-header nav a:hover { color: var(--accent); }
.page { width: min(760px, calc(100% - 48px)); margin: 0 auto; }
.eyebrow { color: var(--green); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .76rem; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }

.hero { position: relative; width: min(var(--max), calc(100% - 48px)); min-height: 610px; margin: 0 auto; padding: 112px 0 96px; overflow: hidden; }
.hero h1 { position: relative; z-index: 1; max-width: 820px; margin: 20px 0 28px; font-size: clamp(3.2rem, 8vw, 7.4rem); line-height: .9; letter-spacing: -.07em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy { position: relative; z-index: 1; max-width: 640px; margin: 0; color: var(--muted); font-size: 1.2rem; }
.hero-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 28px; margin-top: 38px; }
.archive-action { display: flex; align-items: flex-start; flex-direction: column; gap: 9px; }
.archive-action small { max-width: 250px; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.button { display: inline-block; padding: 12px 20px; border: 1px solid #76294f; border-radius: 8px 8px 8px 2px; background: var(--accent); color: #fffaf4; box-shadow: 4px 4px 0 rgba(35,120,102,.22); font-weight: 750; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.button:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 rgba(35,120,102,.28); }
.text-link { color: var(--green); font-weight: 700; }
.latest { width: min(var(--max), calc(100% - 48px)); padding: 92px 0 110px; border-top: 1px solid var(--border); }
.section-heading { margin-bottom: 44px; }
.section-heading h1, .section-heading h2 { margin: 8px 0 0; font-size: clamp(2.4rem, 5vw, 4.7rem); line-height: 1; letter-spacing: -.05em; }
.section-heading p { max-width: 560px; color: var(--muted); font-size: 1.05rem; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading-row > a { padding-bottom: 9px; font-weight: 650; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.latest-actions { display: flex; justify-content: center; margin-top: 52px; }
.post-card { --tilt: 0deg; --shift: 0px; --stain-turn: -13deg; --stain-scale: 1; position: relative; display: flex; flex-direction: column; min-height: 320px; padding: 31px; overflow: hidden; border: 0; border-top: 4px solid var(--accent); background: #fffaf0; filter: drop-shadow(1px 1px 0 rgba(41,35,31,.92)) drop-shadow(-1px -1px 0 rgba(41,35,31,.78)) drop-shadow(4px 6px 1px rgba(71,56,43,.16)); transform: translateY(var(--shift)) rotate(var(--tilt)); transform-origin: center; }
.post-card:nth-child(3n+2) { border-top-color: var(--green); }
.post-card:nth-child(3n) { border-top-color: var(--red); }
.post-card::after { content: none; }
.post-card.cup-stain::after { content: ""; position: absolute; right: -25px; bottom: -22px; width: 132px; height: 116px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg viewBox='0 0 140 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.045' numOctaves='3' seed='8'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='8'/%3E%3C/filter%3E%3Cellipse cx='70' cy='60' rx='55' ry='44' fill='none' stroke='%23694329' stroke-opacity='.28' stroke-width='4.5' stroke-linecap='round' stroke-dasharray='72 7 31 4 54 10 48 5' filter='url(%23w)'/%3E%3Cellipse cx='69' cy='61' rx='51' ry='41' fill='none' stroke='%23694329' stroke-opacity='.1' stroke-width='2' stroke-dasharray='38 12 67 8 42 15' filter='url(%23w)'/%3E%3C/svg%3E"); transform: rotate(var(--stain-turn)) scale(var(--stain-scale)); pointer-events: none; }
.card-date, .article-date, .archive-date { display: flex; align-items: baseline; gap: 10px; }
.card-date b, .article-date b, .archive-date b { color: var(--accent); font-size: .92rem; letter-spacing: .05em; }
.card-date time, .article-date time, .archive-date time { color: var(--muted); font-size: .72rem; }
.post-card h3 { margin: 14px 0 12px; font-size: 1.42rem; line-height: 1.12; letter-spacing: -.025em; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card p { margin: 0 0 24px; color: var(--muted); font-size: .91rem; line-height: 1.55; }
.card-tag { position: relative; z-index: 1; align-self: flex-start; margin-top: auto; color: var(--green); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.site-footer { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding: 36px 0 48px; color: var(--muted); font-size: .85rem; }

.article-page { padding: 72px 0 110px; }
.article { max-width: 720px; margin: 0 auto; }
.article-header { margin-bottom: 52px; }
.article-header h1 { margin: 22px 0 20px; font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.055em; }
.article-date { margin-top: 4px; }
.article-date b { font-size: 1.06rem; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 0; padding: 0; list-style: none; }
.tags li { padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .75rem; }
.tags a { color: inherit; text-decoration: none; }
.tags li:hover { border-color: var(--accent); color: var(--accent); }
.article-media { margin: 0 0 52px; }
.article-media p { margin: 0; }
.article-media img { display: block; width: 100%; max-height: 680px; object-fit: contain; border-radius: 14px; box-shadow: 0 12px 35px rgba(20,25,20,.09); }
.prose { font-size: 1.1rem; }
.prose p, .prose ul, .prose ol, .prose pre { margin: 0 0 1.35em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose img { display: block; max-width: min(100%, 960px); height: auto; margin: 2.5rem auto; border-radius: 12px; box-shadow: 0 12px 35px rgba(20,25,20,.09); }
.prose pre { overflow-x: auto; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--paper); }
.prose code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.prose blockquote { margin: 2em 0; padding-left: 20px; border-left: 3px solid var(--green); color: var(--muted); }
.spoiler { display: inline; padding: 0 3px; border: 0; border-radius: 4px; background: rgba(145,59,103,.11); color: transparent; text-shadow: 0 0 7px rgba(41,35,31,.68); font: inherit; cursor: pointer; transition: color .15s, text-shadow .15s, background .15s; }
.spoiler[aria-expanded="true"] { background: #e3e6de; color: var(--text); }
.spoiler[aria-expanded="true"] { text-shadow: none; }
.spoiler:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.original { margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--border); }
.archive-page { width: min(900px, calc(100% - 48px)); padding: 86px 0 120px; }
.archive-years { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; font-weight: 750; }
.archive-years a { min-width: 2.5rem; padding: 5px 9px; border: 1px solid var(--border); color: var(--muted); text-align: center; text-decoration: none; }
.archive-years a:hover { border-color: var(--accent); color: var(--accent); }
.archive-years a[aria-current="page"] { border-color: var(--text); background: var(--text); color: var(--paper); }
.archive-years-note { margin: 0 0 42px; color: var(--muted); font-size: .76rem; }
.post-list { margin: 0; padding: 0; list-style: none; }
.post-list li { display: grid; grid-template-columns: 10rem 1fr; gap: 28px; padding: 24px 0; border-top: 1px solid var(--border); }
.archive-date { align-items: flex-start; flex-direction: column; gap: 1px; }
.post-list a { color: var(--text); font-size: 1.24rem; font-weight: 720; line-height: 1.25; text-decoration: none; }
.post-list a:hover { color: var(--accent); }
.post-list p { margin: 7px 0 0; color: var(--muted); font-size: .78rem; }
.inline-tags a { color: inherit; font-size: inherit; font-weight: 500; }

@media (max-width: 820px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-header { width: min(100% - 32px, var(--max)); padding: 20px 0; }
  .site-header nav { gap: 15px; font-size: .82rem; }
  .hero { width: calc(100% - 32px); min-height: auto; padding: 76px 0 82px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.7rem); }
  .hero-copy { font-size: 1.04rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .latest, .page, .site-footer { width: calc(100% - 32px); }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card { min-height: 280px; }
  .article-page, .archive-page { padding-top: 52px; }
  .post-list li { grid-template-columns: 1fr; gap: 5px; }
}
