/* Glyph Alt. Palette sampled from the artwork PNGs (art/generate.py):
   ink #1c1a18 · paper #eee8d6 · G1 #5b9c3a · G2 #3c7028 · G3 #96c460 · accent gold #e2b028 */
@font-face { font-family: "Silkscreen"; src: url(../fonts/Silkscreen-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(../fonts/AtkinsonHyperlegible-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(../fonts/AtkinsonHyperlegible-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(../fonts/AtkinsonHyperlegible-400i.woff2) format("woff2"); font-style: italic; font-display: swap; }

:root {
  --ink: #1c1a18; --ink-2: #141311; --ink-3: #26241f;
  --paper: #eee8d6; --paper-dim: #c9c4b3;
  --g1: #5b9c3a; --g2: #3c7028; --g3: #96c460;
  --gold: #e2b028;
  --px: 4px;
  --display: "Silkscreen", ui-monospace, monospace;
  --body: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--ink) url(../img/tooth.png); image-rendering: pixelated; scroll-behavior: smooth; }
body { margin: 0; color: var(--paper); font: 400 1.0625rem/1.65 var(--body); max-width: 1120px; margin-inline: auto; padding: 0 clamp(14px, 3vw, 32px); }
img { max-width: 100%; height: auto; image-rendering: pixelated; display: block; }
a { color: var(--g3); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--g2); }
a:hover, a:focus-visible { color: var(--gold); text-decoration-color: var(--gold); }
:focus-visible { outline: 3px dashed var(--gold); outline-offset: 3px; }
::selection { background: var(--g1); color: var(--ink); }
em { color: var(--g3); font-style: italic; }
strong { color: var(--g3); }
code { font-family: var(--mono); font-size: .88em; color: var(--g3); word-break: break-all; }
svg.g { display: inline-block; vertical-align: middle; color: var(--g1); overflow: visible; }
svg.g.gold { color: var(--gold); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: var(--gold); color: var(--ink); padding: 6px 10px; z-index: 9; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--g3); line-height: 1.15; letter-spacing: .02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); text-shadow: var(--px) var(--px) 0 var(--g2); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); margin-top: 1.4em; text-shadow: 3px 3px 0 var(--ink-2); }
h3 { font-size: 1.15rem; }
h2 small { font-family: var(--body); font-size: .55em; color: var(--paper-dim); letter-spacing: 0; margin-left: .5em; text-shadow: none; }
.h-g { display: inline-block; margin-right: .5em; vertical-align: .08em; }
.h-g svg { color: var(--gold); }

/* pixel frame, like Canvas.frame() in the art: a gap, then a 2px line */
.framed, .banner-frame, .work-img, .post-card a, .frog img, .contact img, .pfp, .thumb img, .glyph-grid li, .link-list a {
  border: 6px solid var(--g1);
  border-image: url(../img/frame.png) 2 / 6px round;
}

/* ------------------------------------------------ header / nav / footer */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 14px;
  border-bottom: 4px solid transparent; border-image: url(../img/dither.png) 0 0 4 0 / 0 0 4px 0 repeat; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: 44px; background: var(--gold); }
.brand-name { font-family: var(--display); font-size: 1.45rem; color: var(--g3); letter-spacing: .04em; text-shadow: 3px 3px 0 var(--g2); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { font-family: var(--display); font-size: .95rem; text-decoration: none; color: var(--paper); padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.nav a svg { color: var(--g1); }
.nav a:hover svg, .nav a[aria-current] svg { color: var(--gold); }
.nav a[aria-current] { color: var(--g3); background: var(--ink-3); box-shadow: inset 0 -4px 0 var(--g1); }
.site-foot { margin: 64px 0 32px; color: var(--paper-dim); font-size: .95rem; }
.foot-row { display: grid; gap: 6px; justify-items: center; text-align: center; }
.foot-row p { margin: 0; }
.foot-note { font-size: .85rem; opacity: .75; }
.sig { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); color: var(--g3); }
.sig svg { color: var(--gold); }

.divider { margin: 40px 0; text-align: center; overflow: hidden; white-space: nowrap; opacity: .9; }
.divider svg { color: var(--g2); max-width: 100%; height: auto; }

/* ------------------------------------------------------------- buttons */
.btn { display: inline-block; font-family: var(--display); font-size: 1rem; text-decoration: none; color: var(--ink); background: var(--g1);
  padding: 10px 18px; margin: 4px 8px 4px 0; box-shadow: var(--px) var(--px) 0 var(--g2);
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 0px), 0 100%); }
.btn:hover, .btn:focus-visible { background: var(--gold); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--g3); box-shadow: inset 0 0 0 3px var(--g1); }
.btn.ghost:hover { background: var(--ink-3); color: var(--gold); }
button.copy { font: .8rem var(--display); background: var(--ink); color: var(--g3); border: 2px solid var(--g2); padding: 3px 8px; cursor: pointer; }
button.copy:hover { border-color: var(--gold); color: var(--gold); }

/* ---------------------------------------------------------------- home */
.hero { margin-top: 28px; }
.banner-frame { background: var(--paper); }
.banner { width: 100%; }
.intro { max-width: 760px; margin: 34px auto 0; }
.intro h1 .h-g svg { width: auto; height: .8em; }
.lede { font-size: 1.2rem; color: var(--paper); }
.cta { margin-top: 1.2em; }
.post-list { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.post-card { display: flex; min-width: 0; }
.post-card a { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; width: 100%; height: 100%; min-height: 180px; padding: 16px 18px 18px; background: rgba(20,19,17,.7); text-decoration: none; color: var(--paper); transition: transform .12s steps(2); }
.post-card a:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--g2); color: var(--paper); }
.post-card time { display: block; font-family: var(--display); font-size: .8rem; color: var(--paper-dim); margin: 10px 0 4px; }
.post-card h3 { margin-bottom: .35em; }
.post-card p { margin: 0; font-size: .97rem; color: var(--paper-dim); flex: 1; }
.pc-g svg { color: var(--gold); }
.thumbs { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); align-items: end; }
.thumb { text-decoration: none; color: var(--paper); }
.thumb img { background: var(--paper); transition: transform .12s steps(2); }
.thumb:hover img { transform: translate(-3px, -3px); }
.thumb span { display: block; font-family: var(--display); font-size: .9rem; margin-top: 8px; color: var(--g3); }
.thumb small { display: block; font-family: var(--body); color: var(--paper-dim); font-size: .8rem; }

/* ------------------------------------------------------------- gallery */
.page-head { margin: 36px 0 8px; max-width: 820px; }
.page-head.center { text-align: center; margin-inline: auto; padding: 40px 0; }
.page-head.center h1 svg { color: var(--gold); margin-bottom: 18px; }
.page-glyphs { margin: 36px 0 -12px; }
.page-glyphs svg { color: var(--gold); }
.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.jump a { font-family: var(--display); font-size: .9rem; text-decoration: none; padding: 8px 12px; background: var(--ink-3); color: var(--g3); box-shadow: inset 0 0 0 2px var(--g2); }
.jump a:hover { box-shadow: inset 0 0 0 2px var(--gold); }
.jump svg { color: var(--gold); margin-right: 6px; }
.chain { scroll-margin-top: 20px; }
.chain-note { max-width: 760px; color: var(--paper-dim); }
.works { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 22px; }
#counterparty .works { grid-template-columns: repeat(3, 1fr); }
#tezos .works { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.work { display: flex; flex-direction: column; background: rgba(20,19,17,.72); scroll-margin-top: 20px; }
.work:target .work-img { border-image: none; border-color: var(--gold); }
.work-img { display: block; background: var(--paper); }
.work-img.sq { background: var(--gold); }
.work-img img { width: 100%; }
.work-img:hover { filter: brightness(1.04); }
.work-txt { padding: 14px 4px 4px; }
.work-txt h3 { margin-bottom: .2em; }
.meta { margin: 0 0 .5em; font-size: .9rem; color: var(--paper-dim); }
.note { margin: .4em 0 .8em; font-size: .97rem; }
.price { margin: .4em 0; font-family: var(--display); font-size: .9rem; color: var(--gold); }
.links { margin: .4em 0 0; font-family: var(--display); font-size: .9rem; }
.field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: var(--ink-2); padding: 8px 10px; box-shadow: inset 0 0 0 2px var(--ink-3); }
.field .k { font-family: var(--display); font-size: .75rem; color: var(--paper-dim); text-transform: lowercase; }
.field .v { flex: 1 1 200px; font-size: .82rem; }
.frogs { display: grid; gap: 16px; grid-template-columns: repeat(6, 1fr); margin: 22px 0; }
.frog { margin: 0; }
.frog img { background: var(--paper); }
.frog figcaption { margin-top: 8px; font-size: .85rem; color: var(--paper-dim); display: grid; gap: 4px; }
.frog figcaption svg { color: var(--g3); }
.contact { margin: 26px 0 0; }
.contact img { width: 100%; }
.contact figcaption { margin-top: 10px; color: var(--paper-dim); font-size: .95rem; }

/* ------------------------------------------------------------- journal */
.post-list.wide { grid-template-columns: 1fr; max-width: 820px; }
.post { max-width: 720px; margin: 0 auto; }
.post-head { margin: 28px 0 18px; }
.post-g { margin-bottom: 14px; }
.post-g svg { color: var(--gold); }
.post-head time { font-family: var(--display); font-size: .85rem; color: var(--paper-dim); }
.prose { font-size: 1.1rem; }
.prose p { margin: 0 0 1.05em; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose h2::before { content: ""; display: inline-block; width: 12px; height: 12px; background: var(--gold); margin-right: 12px; vertical-align: .1em; box-shadow: 4px 4px 0 var(--g2); }
.prose img { margin: 1.6em auto; background: var(--paper); border: 6px solid var(--g1); border-image: url(../img/frame.png) 2 / 6px round; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { padding-left: 26px; position: relative; margin-bottom: .7em; }
.prose li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 8px; height: 8px; background: var(--g1); box-shadow: 2px 2px 0 var(--g2); }
.prose blockquote { margin: 1.4em 0; padding: 4px 18px; border-left: 6px solid var(--g2); color: var(--paper-dim); }
.post-foot { margin: 34px 0 0; }
.pager { max-width: 720px; margin: 36px auto 0; display: flex; justify-content: space-between; gap: 18px; font-family: var(--display); font-size: .9rem; }
.pager a { text-decoration: none; }

/* --------------------------------------------------------------- about */
.about-head { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; max-width: none; }
.pfp { width: 220px; background: var(--gold); }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); align-items: stretch; }
.link-list li { display: flex; min-width: 0; }
.link-list a { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; width: 100%; height: 100%; min-height: 120px; padding: 18px 14px; text-decoration: none; background: rgba(20,19,17,.7); color: var(--paper); }
.link-list a:hover { color: var(--gold); }
.link-list a:hover svg { color: var(--gold); }
.link-list b { display: block; font-family: var(--display); font-weight: 400; color: var(--g3); font-size: .85rem; margin-bottom: 2px; }
.link-list span { overflow-wrap: anywhere; font-family: var(--body); font-size: .98rem; }
.addresses { text-align: center; max-width: 720px; margin-inline: auto; }
.addresses .addr-intro { color: var(--paper-dim); font-size: 1.05rem; }
.addr { display: grid; gap: 10px; margin-top: 18px; text-align: left; }
.foot-addr { font-size: .82rem; color: var(--paper-dim); overflow-wrap: anywhere; }
.foot-addr span { font-family: var(--display); font-size: .75rem; color: var(--g3); margin-right: 4px; }
.foot-addr code { color: var(--paper-dim); font-size: .78rem; }
.glyph-grid { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(8, 1fr); }
.glyph-grid li { background: var(--paper); color: var(--ink); text-align: center; padding: 14px 4px 8px; }
.glyph-grid svg { color: var(--ink); }
.glyph-grid li:nth-child(5) svg { color: var(--gold); }
.glyph-grid span { display: block; margin-top: 8px; font-family: var(--display); font-size: .8rem; }
.glyph-grid li.withheld { background: var(--paper) url(../img/dither.png); background-size: 8px 8px; }
.glyph-grid li.withheld .hole { display: block; width: 30px; height: 30px; margin: 0 auto; background: var(--ink); opacity: .85; }
.glyph-grid li.withheld span:last-child { background: var(--paper); margin: 8px 6px 0; }
.glyph-grid b { color: var(--g2); font-weight: 400; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .thumbs { grid-template-columns: repeat(2, 1fr); }
  .frogs { grid-template-columns: repeat(3, 1fr); }
  #counterparty .works, #tezos .works { grid-template-columns: repeat(2, 1fr); }
  .glyph-grid { grid-template-columns: repeat(4, 1fr); }
  .link-list { grid-template-columns: repeat(2, 1fr); }
  .post-list:not(.wide) { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .site-head { justify-content: center; }
  .nav { justify-content: center; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .nav a { flex-direction: column; gap: 4px; padding: 6px 2px; font-size: .78rem; }
  .about-head { grid-template-columns: 1fr; }
  .pfp { width: 160px; }
  .frogs { grid-template-columns: repeat(2, 1fr); }
  .works, #counterparty .works, #tezos .works { grid-template-columns: 1fr; }
  .lede { font-size: 1.08rem; }
  .link-list { grid-template-columns: 1fr 1fr; }
  .link-list a { min-height: 110px; padding: 14px 10px; }
  .post-list:not(.wide) { grid-template-columns: 1fr; }
  .post-card a { min-height: 160px; }
  .foot-addr { display: grid; gap: 4px; justify-items: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
