/* theabads.com -- the 2026 static redesign (Slice G, #16).
   One stylesheet for every page build.py emits. Referenced as
   /style.css?v=<sha256[0:8]> -- the token is computed by build.py, so editing
   this file and rebuilding is enough; never hand-edit the token.

   Palette: the 2005 site was a dark slate page (#515457) with chartreuse
   accents (#D8F080), a steel-blue menu (#587297) and a leaf-green frame
   (#93B653). Those four hues are kept; the values are re-tuned so every text
   token clears WCAG AA (4.5:1) on its surface in BOTH schemes. Dark is the
   default because that is what the site always was; light follows the OS.
   -------------------------------------------------------------------------- */
:root{
  --surface:   #1b1d20;
  --card:      #24272b;
  --card-2:    #2b2f34;
  --ink:       #f1f1ec;   /* 15.4:1 on surface */
  --ink-soft:  #c6c8c2;   /* 10.1:1 */
  --muted:     #9a9d97;   /*  5.9:1 */
  --accent:    #d8f080;   /* the chartreuse; 12.5:1 on surface, 10.6:1 on card */
  --accent-2:  #93b653;   /* leaf green;      7.1:1 on surface */
  --steel:     #7f9fc4;   /* the menu blue lightened; 6.1:1 on surface */
  --border:    #35393f;
  --ring:      #d8f080;
  --shadow:    0 1px 2px rgba(0,0,0,.45), 0 10px 28px -14px rgba(0,0,0,.7);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
               Palatino, "Times New Roman", serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light){
  :root{
    --surface:   #f4f4ef;
    --card:      #ffffff;
    --card-2:    #ecece5;
    --ink:       #1b1d20;   /* 15.4:1 */
    --ink-soft:  #44484e;   /*  8.9:1 */
    --muted:     #5f6469;   /*  5.6:1 */
    --accent:    #4f6b12;   /* chartreuse darkened to an olive that reads on paper: 6.1:1 on surface */
    --accent-2:  #557a1f;   /* 5.0:1 */
    --steel:     #3a5f8c;   /* 6.6:1 */
    --border:    #dcdcd3;
    --ring:      #4f6b12;
    --shadow:    0 1px 2px rgba(27,29,32,.08), 0 10px 28px -14px rgba(27,29,32,.22);
    color-scheme: light;
  }
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion: reduce){html{scroll-behavior:auto}}
body{
  margin:0;min-height:100vh;min-height:100svh;display:flex;flex-direction:column;
  font-family:var(--font-sans);color:var(--ink);background:var(--surface);
  background-image:radial-gradient(70rem 36rem at 50% -18%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;line-height:1.55;
}
main{flex:1 0 auto}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration-thickness:.06em;text-underline-offset:.15em}
a:hover{color:var(--ink)}
:focus-visible{outline:3px solid var(--ring);outline-offset:3px;border-radius:4px}
h1,h2,h3{font-family:var(--font-serif);font-weight:600;line-height:1.15;letter-spacing:-.005em;margin:0 0 .5rem}
h1{font-size:clamp(1.9rem,1.3rem + 2.2vw,2.9rem)}
h2{font-size:clamp(1.35rem,1.1rem + 1vw,1.8rem)}
h3{font-size:1.15rem}
p{margin:0 0 1rem}
.wrap{width:min(1120px, 100% - 2rem);margin-inline:auto}
.wrap.narrow{width:min(760px, 100% - 2rem)}
.lede{font-size:1.1rem;color:var(--ink-soft);max-width:62ch}
.sub{color:var(--muted);font-size:.92rem}
.fine{color:var(--muted);font-size:.82rem}

/* header / footer ---------------------------------------------------------- */
header.site{border-bottom:1px solid var(--border);background:var(--surface);background:color-mix(in srgb, var(--surface) 88%, transparent);backdrop-filter:blur(8px);position:sticky;top:0;z-index:5}
header.site .wrap{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:3.5rem;flex-wrap:wrap;padding:.4rem 0}
.brand{font-family:var(--font-serif);font-size:1.3rem;font-weight:700;color:var(--ink);text-decoration:none;display:inline-flex;align-items:center;gap:.55rem}
.brand .mark{width:.9rem;height:.9rem;border-radius:50%;background:var(--accent);box-shadow:0 0 0 .3rem color-mix(in srgb, var(--accent) 22%, transparent)}
header.site nav{display:flex;gap:.25rem;flex-wrap:wrap}
header.site nav a{color:var(--ink-soft);text-decoration:none;padding:.45rem .7rem;border-radius:.5rem;font-size:.95rem}
header.site nav a:hover{color:var(--ink);background:var(--card)}
header.site nav a[aria-current=page]{color:var(--accent);background:var(--card)}
footer.site{border-top:1px solid var(--border);margin-top:4rem;padding:1.5rem 0 2.5rem;color:var(--muted);font-size:.9rem}
footer.site p{margin:0 0 .4rem}
footer.site a{color:var(--ink-soft)}

/* breadcrumbs / filters ---------------------------------------------------- */
.crumbs{margin:1.25rem 0 .75rem;font-size:.9rem;color:var(--muted)}
.crumbs ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.35rem}
.crumbs li+li::before{content:"/";margin-right:.35rem;color:var(--border)}
.crumbs a{color:var(--muted)}
.crumbs [aria-current]{color:var(--ink-soft)}
.filters{display:flex;flex-wrap:wrap;gap:.4rem;margin:1rem 0 1.5rem}
.filters a{text-decoration:none;color:var(--ink-soft);background:var(--card);border:1px solid var(--border);padding:.35rem .75rem;border-radius:999px;font-size:.9rem}
.filters a:hover{color:var(--ink);border-color:var(--muted)}
.filters a[aria-current=page]{color:var(--surface);background:var(--accent);border-color:var(--accent);font-weight:600}
@media (prefers-color-scheme: light){.filters a[aria-current=page]{color:#fff}}
h2.year{margin:2rem 0 .75rem;padding-bottom:.35rem;border-bottom:1px solid var(--border);color:var(--ink-soft);font-size:1.3rem;scroll-margin-top:6.5rem}
/* year bar: sticks under the site header; horizontally scrollable on phones */
.years{position:sticky;top:3.6rem;z-index:4;display:flex;gap:.25rem;overflow-x:auto;scrollbar-width:none;padding:.4rem 0;margin:0 0 .5rem;background:var(--surface);background:color-mix(in srgb, var(--surface) 92%, transparent);backdrop-filter:blur(6px);-webkit-overflow-scrolling:touch}
.years::-webkit-scrollbar{display:none}
.years a{flex:0 0 auto;text-decoration:none;color:var(--ink-soft);font-size:.85rem;padding:.3rem .6rem;border-radius:.4rem;font-variant-numeric:tabular-nums}
.years a:hover{color:var(--ink);background:var(--card)}
@media (max-width: 640px){
  /* the header wraps to 2-3 rows here, so it stops being sticky (it would
     hide the year bar and eat 140px of a phone screen); the year bar sticks
     at the top instead and the headings scroll in under it */
  header.site{position:static}
  header.site nav a{padding:.35rem .5rem;font-size:.9rem}
  .years{top:0}
  h2.year{scroll-margin-top:3.2rem}
  /* filter chips become one swipeable row instead of a four-line wrap */
  .filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;padding-bottom:.25rem;margin-inline:-1rem;padding-inline:1rem}
  .filters::-webkit-scrollbar{display:none}
  .filters a{flex:0 0 auto;scroll-snap-align:start;white-space:nowrap}
}

/* hero --------------------------------------------------------------------- */
.hero{padding:2.5rem 0 1rem}
.hero .wrap{display:grid;grid-template-columns:1fr auto;gap:2rem;align-items:center}
.hero .eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:.78rem;color:var(--accent-2);margin-bottom:.5rem;font-weight:600}
.hero h1{font-size:clamp(2.2rem,1.4rem + 3vw,3.6rem)}
.hero .stats a{text-decoration:none;color:var(--ink);border-bottom:2px solid var(--accent)}
.hero .stats strong{color:var(--accent)}
.notice{font-size:.92rem;color:var(--ink-soft);background:var(--card);border-left:3px solid var(--steel);padding:.7rem 1rem;border-radius:.4rem;max-width:62ch}
.hero-img{width:min(300px, 40vw);border-radius:.75rem;box-shadow:var(--shadow);border:1px solid var(--border);justify-self:end}
@media (max-width: 640px){.hero .wrap{grid-template-columns:1fr}.hero-img{justify-self:start;width:min(300px,100%)}}
h2.section{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin:2.25rem 0 1rem;flex-wrap:wrap}
h2.section .more{font-family:var(--font-sans);font-size:.95rem;font-weight:500}
.trio{display:grid;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));gap:1rem;margin-top:2.5rem}
.tile{display:block;text-decoration:none;color:var(--ink);background:var(--card);border:1px solid var(--border);border-radius:.75rem;padding:1.1rem 1.25rem;box-shadow:var(--shadow)}
.tile:hover{border-color:var(--accent-2)}
.tile h3{color:var(--accent);margin-bottom:.25rem}
.tile p{margin:0;color:var(--ink-soft);font-size:.95rem}

/* album cards -------------------------------------------------------------- */
.cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill, minmax(230px, 1fr));gap:1rem}
.card a{display:flex;flex-direction:column;height:100%;text-decoration:none;color:var(--ink);background:var(--card);border:1px solid var(--border);border-radius:.75rem;overflow:hidden;box-shadow:var(--shadow);transition:transform .15s ease,border-color .15s ease}
.card a:hover{transform:translateY(-2px);border-color:var(--accent-2)}
.card .cover,.card .cover.empty{width:100%;aspect-ratio:4/3;object-fit:cover;background:var(--card-2)}
.card .meta{padding:.75rem .9rem 1rem;display:flex;flex-direction:column;gap:.2rem}
.card .name{font-family:var(--font-serif);font-size:1.08rem;font-weight:600;line-height:1.25}
.card .sub{font-size:.85rem}

/* photo grid --------------------------------------------------------------- */
.album-head{margin:0 0 1.5rem}
.album-head .prose{max-width:70ch;color:var(--ink-soft)}
.grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));gap:.6rem}
.grid li a{display:block;position:relative;border-radius:.5rem;overflow:hidden;background:var(--card-2);border:1px solid var(--border)}
.grid li a:hover{border-color:var(--accent)}
.grid img{width:100%;aspect-ratio:4/3;object-fit:cover}
.grid .cap{position:absolute;inset:auto 0 0 0;padding:.35rem .5rem;font-size:.78rem;color:#fff;background:linear-gradient(transparent, rgba(0,0,0,.72));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.moments{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));gap:.6rem}
.moments li a{display:block;border-radius:.5rem;overflow:hidden;background:var(--card-2);border:1px solid var(--border);text-decoration:none;color:var(--ink)}
.moments li a:hover{border-color:var(--accent)}
.moments img{width:100%;aspect-ratio:1/1;object-fit:cover}
.moments .cap{display:block;padding:.45rem .6rem;font-size:.82rem;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.moments .cap small{display:block;color:var(--muted);font-size:.75rem;overflow:hidden;text-overflow:ellipsis}

/* photo page --------------------------------------------------------------- */
.photo-page figure{margin:0;touch-action:manipulation;background:var(--card);border:1px solid var(--border);border-radius:.75rem;overflow:hidden;box-shadow:var(--shadow)}
.photo-page figure>img{margin-inline:auto;max-height:80vh;width:auto;max-width:100%;background:#000}
.photo-page figcaption{padding:1rem 1.25rem 1.25rem}
.photo-page figcaption h1{font-size:1.4rem;margin-bottom:.35rem}
.photo-page h1.untitled{color:var(--muted);font-weight:500;font-style:italic}
.photo-page .prose{color:var(--ink-soft);white-space:normal}
.photo-page .also{font-size:.9rem;color:var(--muted)}
.pager{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;margin:.75rem 0}
.pager a{text-decoration:none;color:var(--ink-soft);padding:.5rem .8rem;border-radius:.5rem;background:var(--card);border:1px solid var(--border)}
.pager a:hover{color:var(--ink);border-color:var(--accent-2)}
.pager .next{justify-self:end}
.pager .pos{color:var(--muted);font-variant-numeric:tabular-nums;font-size:.9rem}
.pager .up{justify-self:center;text-align:center}

/* slide between photos: cross-document view transitions (Chrome 126+, Safari
   18.2+; everyone else gets an ordinary navigation). The leaving page's
   go() stores the direction and the next page's <head> hook sets
   html[data-dir] before first paint, so the new page knows which way to
   slide in. Off entirely under reduced motion. */
@media (prefers-reduced-motion: no-preference){
  @view-transition{navigation:auto}
  ::view-transition-old(root),::view-transition-new(root){animation-duration:.22s;animation-timing-function:ease-out}
  html[data-dir=next]::view-transition-old(root){animation-name:vt-out-left}
  html[data-dir=next]::view-transition-new(root){animation-name:vt-in-right}
  html[data-dir=prev]::view-transition-old(root){animation-name:vt-out-right}
  html[data-dir=prev]::view-transition-new(root){animation-name:vt-in-left}
  @keyframes vt-out-left{to{transform:translateX(-30%);opacity:0}}
  @keyframes vt-in-right{from{transform:translateX(30%);opacity:0}}
  @keyframes vt-out-right{to{transform:translateX(30%);opacity:0}}
  @keyframes vt-in-left{from{transform:translateX(-30%);opacity:0}}
}
a.share{white-space:nowrap}

/* full-screen photo mode (html.fs, toggled by double-tap; see the photo-page
   script in build.py). The figure becomes a fixed black stage; everything
   else on the page is hidden so swiping and the close control are the only
   interactions. The close control is deliberately translucent. */
.fs-close,.fs-pos{display:none}
html.fs,html.fs body{background:#000;overflow:hidden}
html.fs header.site,html.fs footer.site,html.fs .crumbs,html.fs .pager,html.fs figcaption{display:none}
html.fs .photo-page figure{position:fixed;inset:0;margin:0;border:0;border-radius:0;box-shadow:none;background:#000;display:flex;align-items:center;justify-content:center;z-index:50}
html.fs .photo-page figure>img{max-width:100vw;max-height:100vh;max-height:100svh;width:auto;height:auto;object-fit:contain;margin:0}
html.fs .fs-close{display:grid;place-items:center;position:fixed;top:max(.75rem,env(safe-area-inset-top));right:max(.75rem,env(safe-area-inset-right));z-index:60;width:44px;height:44px;border-radius:50%;border:1px solid rgba(255,255,255,.4);background:rgba(0,0,0,.6);color:#fff;font-size:1.25rem;line-height:1;cursor:pointer;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
html.fs .fs-close:hover,html.fs .fs-close:focus-visible{background:rgba(0,0,0,.8);outline-color:#fff}
html.fs .fs-pos{display:block;position:fixed;left:max(.75rem,env(safe-area-inset-left));bottom:max(.75rem,env(safe-area-inset-bottom));z-index:60;padding:.3rem .6rem;border-radius:999px;background:rgba(0,0,0,.6);color:rgba(255,255,255,.9);font-size:.8rem;font-variant-numeric:tabular-nums}

/* prose (article bodies from the database) --------------------------------- */
.post{background:var(--card);border:1px solid var(--border);border-radius:.75rem;padding:1.25rem 1.5rem;margin:1.25rem 0;box-shadow:var(--shadow)}
.post h2{margin-bottom:.25rem}
.prose p,.prose ul,.prose ol{margin:0 0 .9rem}
.prose ul{padding-left:1.25rem}
.prose img{display:inline-block;vertical-align:middle}
.prose hr{border:0;border-top:1px solid var(--border);margin:1rem 0}
.prose .smaller{font-size:.95rem}

/* resume ------------------------------------------------------------------- */
.resume h2{margin-top:2rem;padding-bottom:.3rem;border-bottom:1px solid var(--border)}
.resume .job{margin:1.25rem 0}
.resume .job h3{margin-bottom:.1rem}
.resume .job .when{color:var(--muted);font-size:.9rem;margin-bottom:.5rem}
.resume ul{padding-left:1.25rem}
.resume li{margin-bottom:.4rem}
.resume .pdfs{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:.5rem}
.resume .pdfs a{display:inline-block;text-decoration:none;background:var(--card);border:1px solid var(--border);padding:.4rem .8rem;border-radius:.5rem}
.resume .contact{color:var(--ink-soft)}

/* 404 ---------------------------------------------------------------------- */
.notfound{text-align:center;padding:5rem 0 3rem}
.notfound .code{font-family:var(--font-serif);font-size:5rem;color:var(--accent);line-height:1;margin:0 0 .5rem}
.btn{display:inline-block;text-decoration:none;background:var(--accent);color:var(--surface);font-weight:600;padding:.65rem 1.1rem;border-radius:.6rem;margin:.25rem}
@media (prefers-color-scheme: light){.btn{color:#fff}}
.btn:hover{filter:brightness(1.08);color:var(--surface)}
.btn.ghost{background:var(--card);color:var(--ink);border:1px solid var(--border)}
.btn.ghost:hover{color:var(--ink);border-color:var(--accent-2)}
