/* noahjock.com blog: "Notebook". Theme levers come from Studio as attributes on <html>:
   --accent, --w (column width), data-theme (auto|light|dark), data-font (serif|sans|system).
   Anything else: Studio > Blog > Custom CSS. */
@font-face{font-family:"Newsreader";src:url(/assets/fonts/newsreader.woff2) format("woff2");font-weight:200 800;font-style:normal;font-display:swap}
@font-face{font-family:"Newsreader";src:url(/assets/fonts/newsreader-italic.woff2) format("woff2");font-weight:200 800;font-style:italic;font-display:swap}
@font-face{font-family:"Inter";src:url(/assets/fonts/inter.woff2) format("woff2");font-weight:100 900;font-style:normal;font-display:swap}

:root{
  --bg:#fbfaf7;--fg:#1f1d1a;--body:#3d3933;--muted:#6b655c;--line:#ebe7df;--chip:#ddd8cf;--card:#f1eee8;
  --display:"Newsreader",Charter,"Iowan Old Style",Georgia,serif;
  --read:"Newsreader",Charter,"Iowan Old Style",Georgia,serif;
  --ui:"Inter",ui-sans-serif,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}
@media (prefers-color-scheme:dark){html[data-theme=auto]{--bg:#161513;--fg:#ece8e1;--body:#cfc9bf;--muted:#9a938a;--line:#2b2925;--chip:#3a3732;--card:#201f1c}}
html[data-theme=dark]{--bg:#161513;--fg:#ece8e1;--body:#cfc9bf;--muted:#9a938a;--line:#2b2925;--chip:#3a3732;--card:#201f1c}
html[data-font=sans]{--display:var(--ui);--read:var(--ui)}
html[data-font=system]{--display:ui-serif,Charter,Georgia,serif;--read:ui-serif,Charter,Georgia,serif;--ui:ui-sans-serif,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}

*{box-sizing:border-box;margin:0}
html{-webkit-text-size-adjust:100%;background:var(--bg)}
body{background:var(--bg);color:var(--fg);font:16px/1.6 var(--ui);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
a:hover{color:var(--accent)}
img{display:block;max-width:100%;height:auto}
::selection{background:var(--accent);color:#fff}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:2px}

.wrap{max-width:var(--w,680px);margin:0 auto;padding:56px 24px 72px;display:flex;flex-direction:column;gap:56px;min-height:100vh}
main{flex:1;display:flex;flex-direction:column;gap:40px}

/* header */
.top{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:12px 24px}
.mark{font:600 22px/1.2 var(--display)}
.top nav{display:flex;gap:6px 22px;flex-wrap:wrap;font-size:15px}
.top nav a{color:var(--muted);padding:6px 0}
.top nav a:hover,.top nav a[aria-current]{color:var(--accent)}

/* intro */
.intro{display:flex;flex-direction:column;gap:12px}
.intro .lead p,.intro h1{font:400 30px/1.3 var(--display);color:var(--fg)}
.intro h1{font-weight:600}
.intro .sub p{font-size:15px;line-height:1.6;color:var(--muted)}
.intro .lead a,.intro .sub a{color:var(--accent)}

/* topic chips */
.chips{display:flex;gap:8px;flex-wrap:wrap;font-size:14px}
.chips a{padding:9px 14px;border-radius:999px;border:1px solid var(--chip);color:var(--fg);line-height:1.2}
.chips a:hover{border-color:var(--accent);color:var(--accent)}
.chips a[aria-current]{background:var(--fg);border-color:var(--fg);color:var(--bg)}

/* feed */
.feed{display:flex;flex-direction:column}
.entry{display:flex;flex-direction:column;gap:8px;padding:0 0 36px;margin-bottom:36px;border-bottom:1px solid var(--line)}
.entry:last-child{border-bottom:0;margin-bottom:0}
.entry h2{font:600 28px/1.25 var(--display)}
.entry .ex{font:19px/1.6 var(--read);color:var(--body)}
.entry .cov{display:block;margin-bottom:8px;border-radius:6px;overflow:hidden;aspect-ratio:16/9;background:var(--card)}
.entry .cov img{width:100%;height:100%;object-fit:cover}
.pin{display:inline-block;vertical-align:middle;margin-left:10px;font:500 11px/1 var(--ui);letter-spacing:.08em;text-transform:uppercase;color:var(--accent);border:1px solid currentColor;border-radius:999px;padding:4px 8px}
.kicker{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.kicker .tags{display:inline-flex;gap:10px;flex-wrap:wrap}
.kicker .tags a:hover{color:var(--accent)}
.empty{font:19px/1.6 var(--read);color:var(--muted)}
.pager{display:flex;justify-content:space-between;gap:16px;font-size:14px;color:var(--muted)}
.pager a{color:var(--accent)}

/* post */
.post header{display:flex;flex-direction:column;gap:12px;margin-bottom:32px}
.post h1{font:600 clamp(32px,5vw,42px)/1.15 var(--display);letter-spacing:-.01em}
.prose{font:19px/1.7 var(--read);color:var(--body)}
.prose>*+*{margin-top:1.1em}
.prose h2{font:600 26px/1.25 var(--display);color:var(--fg);margin-top:1.8em}
.prose h3{font:600 21px/1.3 var(--display);color:var(--fg);margin-top:1.6em}
.prose a{color:var(--accent);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.prose strong{color:var(--fg)}
.prose blockquote{border-left:2px solid var(--accent);padding-left:18px;font-style:italic}
.prose ul,.prose ol{padding-left:1.3em}
.prose li+li{margin-top:.35em}
.prose hr{border:0;border-top:1px solid var(--line);margin:2.2em 0}
.prose code{font:.85em var(--mono);background:var(--card);padding:.12em .35em;border-radius:4px}
.prose pre{background:var(--card);padding:16px 18px;border-radius:8px;overflow-x:auto;font:14px/1.55 var(--mono)}
.prose pre code{background:none;padding:0;font-size:inherit}
.prose table{width:100%;border-collapse:collapse;font:15px/1.5 var(--ui);display:block;overflow-x:auto}
.prose th,.prose td{border-bottom:1px solid var(--line);padding:8px 10px;text-align:left}
.prose .ph{margin:2em 0 .6em;aspect-ratio:var(--ar);background:var(--card);border-radius:4px;overflow:hidden}
.prose .ph img{width:100%;height:100%;object-fit:cover}
.prose .ph a{display:block;height:100%;cursor:zoom-in}
.prose .cap{font:13px/1.4 var(--ui);color:var(--muted);text-align:center;margin-top:.4em}
.prose .footnote{font-size:15px}

.pn{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding-top:28px;border-top:1px solid var(--line)}
.pn a{display:flex;flex-direction:column;gap:4px;font:600 18px/1.3 var(--display)}
.pn a span{font:500 12px/1 var(--ui);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.pn a.r{text-align:right}
@media (max-width:560px){.pn{grid-template-columns:1fr}.pn a.r{text-align:left}}

/* archive */
.archive{display:flex;flex-direction:column;gap:36px}
.year h2{font:600 22px/1.2 var(--display);margin-bottom:12px}
.year ol{list-style:none;padding:0;display:flex;flex-direction:column}
.year li{display:grid;grid-template-columns:110px 1fr;gap:16px;padding:10px 0;border-bottom:1px solid var(--line);align-items:baseline}
.year time{font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.year a{font:19px/1.4 var(--read)}
@media (max-width:480px){.year li{grid-template-columns:1fr;gap:2px}}

/* footer */
.foot{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;font-size:14px;color:var(--muted);padding-top:24px;border-top:1px solid var(--line)}
.foot .links{display:flex;gap:20px;flex-wrap:wrap}

/* lightbox (shared script) */
.lb{position:fixed;inset:0;z-index:50;background:#0c0b0a;display:flex;flex-direction:column;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .25s}
.lb.on{opacity:1;pointer-events:auto}
.lb img{max-width:94vw;max-height:84vh;object-fit:contain}
.lb .lbcap{color:#a9a39b;font-size:12px;letter-spacing:.08em;margin-top:18px;min-height:1em;text-align:center;padding:0 20px}
.lb button{position:absolute;background:none;border:0;color:#d8d3cb;font:300 34px/1 var(--ui);cursor:pointer;padding:18px;opacity:.7}
.lb button:hover{opacity:1}
.lb .x{top:8px;right:12px;font-size:28px}
.lb .pv{left:6px;top:50%;transform:translateY(-50%)}
.lb .nx{right:6px;top:50%;transform:translateY(-50%)}
.lb .count{position:absolute;top:24px;left:28px;color:#8a847c;font-size:12px;letter-spacing:.14em}

@media (max-width:560px){.wrap{padding:32px 20px 56px;gap:40px}.intro .lead p,.intro h1{font-size:25px}.entry h2{font-size:24px}.entry .ex,.prose{font-size:18px}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------- views, likes, comments ---------- */
.stats{font-size:13px;color:var(--muted)}
.engage{display:flex;flex-direction:column;gap:32px;padding-top:8px}
.ebar{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.like{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border:1px solid var(--chip);border-radius:999px;background:none;color:var(--fg);font:500 15px/1 var(--ui);cursor:pointer;transition:border-color .15s,color .15s}
.like svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;transition:transform .2s}
.like:hover{border-color:var(--accent);color:var(--accent)}
.like[aria-pressed=true]{border-color:var(--accent);color:var(--accent)}
.like[aria-pressed=true] svg{fill:currentColor;transform:scale(1.08)}
.like:disabled{opacity:.6}
.views{font-size:14px;color:var(--muted)}
.comments{display:flex;flex-direction:column;gap:20px}
.comments h2{font:600 22px/1.2 var(--display)}
.comments h2 .ccount{color:var(--muted);font-weight:400}
.clist{list-style:none;padding:0;display:flex;flex-direction:column}
.clist li{padding:16px 0;border-top:1px solid var(--line)}
.clist li:first-child{border-top:0;padding-top:0}
.clist .who{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;font-size:14px}
.clist .who b{font-weight:600;color:var(--fg)}
.clist .who time{color:var(--muted);font-size:13px}
.clist .tag{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--accent);border:1px solid currentColor;border-radius:999px;padding:2px 7px}
.clist .body{margin-top:6px;font:17px/1.6 var(--read);color:var(--body);white-space:pre-line;overflow-wrap:anywhere}
.cform{display:flex;flex-direction:column;gap:12px}
.cform label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}
.cform input,.cform textarea{font:16px/1.5 var(--ui);color:var(--fg);background:var(--bg);border:1px solid var(--chip);border-radius:8px;padding:10px 12px;width:100%}
.cform textarea{min-height:110px;resize:vertical;font-family:var(--read);font-size:17px}
.cform input:focus,.cform textarea:focus{outline:none;border-color:var(--accent)}
.cform .row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.cform button{min-height:44px;padding:0 20px;border:0;border-radius:999px;background:var(--fg);color:var(--bg);font:600 15px/1 var(--ui);cursor:pointer}
.cform button:hover{background:var(--accent);color:#fff}
.cform button:disabled{opacity:.6}
.cform .note,.cform .mod{font-size:13px;color:var(--muted)}
.cform .hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---------- listening (Spotify) ---------- */
.np{display:flex;flex-direction:column;gap:12px}
.np-idle{font:19px/1.6 var(--read);color:var(--muted)}
.np-card{display:flex;gap:24px;align-items:center;flex-wrap:wrap}
.np-art{flex:none;width:160px;height:160px;border-radius:6px;overflow:hidden;background:var(--card);box-shadow:0 12px 30px rgba(0,0,0,.12)}
.np-art img{width:100%;height:100%;object-fit:cover}
.np-meta{flex:1 1 260px;min-width:0;display:flex;flex-direction:column;gap:4px}
.np-meta .kicker{align-items:center;color:var(--accent)}
.np-t{font:600 28px/1.2 var(--display)}
.np-a{font:19px/1.4 var(--read);color:var(--body)}
.np-al{font-size:14px;color:var(--muted)}
.np-bar{margin-top:12px;height:3px;background:var(--line);border-radius:3px;overflow:hidden}
.np-bar i{display:block;height:100%;width:0;background:var(--accent);transition:width 1s linear}
.eq{display:inline-flex;align-items:flex-end;gap:2px;height:12px;margin-right:6px}
.eq i{display:block;width:3px;background:var(--accent);animation:eq 1s ease-in-out infinite}
.eq i:nth-child(2){animation-delay:-.35s}.eq i:nth-child(3){animation-delay:-.7s}
@keyframes eq{0%,100%{height:3px}50%{height:12px}}
.paused .eq i{animation:none;height:3px}
.ls{display:flex;flex-direction:column;gap:12px}
.ls h2{font:600 22px/1.2 var(--display)}
.tracks{list-style:none;padding:0;display:flex;flex-direction:column}
.tracks li{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:14px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.tracks img{width:56px;height:56px;border-radius:4px;object-fit:cover;background:var(--card)}
.tracks .m{display:flex;flex-direction:column;min-width:0}
.tracks .tn{font:600 17px/1.3 var(--display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.tracks .ta{font-size:14px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tracks .ts{font-size:13px;color:var(--muted);white-space:nowrap}
.artists{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:18px}
.artists li{display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center}
.artists img{width:96px;height:96px;border-radius:50%;object-fit:cover;background:var(--card)}
.artists .an{font-size:14px;line-height:1.3}
.np-credit{font-size:13px;color:var(--muted)}
.nowline{display:flex;align-items:center;font-size:14px;color:var(--muted)}
.nowline a:hover{color:var(--accent)}
@media (max-width:560px){.np-art{width:120px;height:120px}.np-t{font-size:23px}}
@media (prefers-reduced-motion:reduce){.eq i{animation:none;height:8px}}

/* photo libraries on the blog (/photos/) */
.wide{width:min(1100px,calc(100vw - 48px));margin-left:50%;transform:translateX(-50%)}
.lede{font:19px/1.6 var(--read);color:var(--body);margin-top:10px}
.pcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:32px 24px}
.pcard .cimg{aspect-ratio:4/3;overflow:hidden;border-radius:6px;background:var(--card)}
.pcard img{width:100%;height:100%;object-fit:cover;transition:transform .8s cubic-bezier(.2,.7,.2,1)}
.pcard:hover img{transform:scale(1.03)}
.pcard h3{font:600 21px/1.25 var(--display);margin-top:12px}
.pcard p{font-size:13px;color:var(--muted);margin-top:2px}
.justify{display:flex;flex-wrap:wrap;gap:8px;--row:300px}
.justify::after{content:"";flex-grow:999}
.justify .ph{flex-grow:calc(var(--ar)*100);flex-basis:calc(var(--ar)*var(--row));aspect-ratio:var(--ar);background:var(--card);overflow:hidden;border-radius:3px}
.justify .ph img{width:100%;height:100%;object-fit:cover}
.justify .ph a{display:block;height:100%;cursor:zoom-in}
.gallery .back{font-size:14px;color:var(--muted)}
@media (max-width:640px){.justify .ph{flex-basis:100%}.wide{width:100%;margin-left:0;transform:none}}
