/* ==========================================================================
   tobyhillmann.com

   Austere on purpose: a true-black middle, flare art down both sides, a photo, a name, the
   writing, and the amp. Every colour a skin would want to change comes from the amp's --w-*
   variables through the --th-* tokens below; nothing else names one.
   ========================================================================== */

/* ---- faces: the same files LLTM serves, from Fontsource */
@font-face { font-family: "Anybody"; font-style: normal; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap;
  src: url("/assets/fonts/anybody-latin-wdth-normal.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: "Anybody"; font-style: normal; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap;
  src: url("/assets/fonts/anybody-latin-ext-wdth-normal.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: "Vollkorn"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/vollkorn-latin-wght-normal.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: "Vollkorn"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/vollkorn-latin-ext-wght-normal.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: "Vollkorn"; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/vollkorn-latin-wght-italic.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: "Vollkorn"; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/vollkorn-latin-ext-wght-italic.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: "Vollkorn"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/vollkorn-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Vollkorn"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/assets/fonts/vollkorn-greek-wght-normal.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Paint Pen"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/covered-by-your-grace-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "Paint Pen"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/covered-by-your-grace-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }

/* ---- tokens */
:root {
  color-scheme: dark;
  /* faces: LLTM's three */
  --wide: "Anybody", "Arial Black", system-ui, sans-serif;     /* the name, titles, small labels */
  --serif: "Vollkorn", Georgia, "Times New Roman", serif;       /* anything written to be read */
  --hand: "Paint Pen", "Segoe Print", "Bradley Hand", cursive;  /* one word at a time */

  /* from the skin */
  --th-void: #000;
  --th-edge: var(--w-edge, #3a72ff);
  --th-line: color-mix(in srgb, var(--th-edge) 38%, transparent);
  --th-title: var(--w-lcd, #bfe5ff);
  --th-text: var(--w-text, #dbe6fa);
  --th-bright: var(--w-bright, #fff);
  --th-dim: var(--w-dim, #8a9fc6);
  --th-link: var(--w-lamp-on, #8ccfff);
  --th-hot: var(--w-hot, #fff);
  --th-pick: var(--w-pick, #1d4ad0);
  --th-glow: var(--w-lcd-glow, rgba(110, 185, 255, .75));
  --th-radius: var(--w-pane-radius, 3px);

  /* measures */
  --page: 960px;
  --gap: 28px;           /* black between the art and the page, and between the columns */
  --measure: 36rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--th-void); }
body {
  margin: 0;
  min-height: 100vh;
  background: none; /* the black is on html, so the art (z-index -1) sits between the two */
  color: var(--th-text);
  font: 400 17px/1.55 var(--serif);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--th-link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--th-bright); }
:focus-visible { outline: 2px solid var(--th-hot); outline-offset: 3px; }
img, svg, canvas { display: block; max-width: 100%; }
/* hidden means hidden, even on things a rule below lays out as flex or grid */
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.skip { position: absolute; left: -999px; top: 0; padding: 8px 12px; background: var(--th-pick); color: var(--th-bright); z-index: 10; font: 600 14px var(--wide); }
.skip:focus { left: 8px; top: 8px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- the art down both sides, cut clean where the page's black begins. A canvas inside each
   panel takes over while the amp plays (flare.js); the image underneath is the still state. */
.art {
  position: fixed;
  top: 0;
  bottom: 0;
  width: max(0px, calc((100vw - var(--page)) / 2 - var(--gap)));
  z-index: -1;
  overflow: hidden;
  background-color: var(--th-void);
  background-repeat: no-repeat;
  background-size: cover;
  filter: var(--page-art-filter, none);
  transition: filter .6s ease;
}
.art--left { left: 0; background-position: right center; background-image: url("/assets/art/flare-left.webp"); background-image: image-set(url("/assets/art/flare-left.avif") type("image/avif"), url("/assets/art/flare-left.webp") type("image/webp")); }
.art--right { right: 0; background-position: left center; background-image: url("/assets/art/flare-right.webp"); background-image: image-set(url("/assets/art/flare-right.avif") type("image/avif"), url("/assets/art/flare-right.webp") type("image/webp")); }
.art canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.5s ease; }
.art.is-live canvas { opacity: 1; }

.page { width: min(var(--page), 100% - 32px); margin: 0 auto; padding: 48px 0 64px; }

/* ---- the homepage: photo and name, then the writing and the amp */
.hero { display: grid; grid-template-columns: clamp(112px, 17vw, 176px) 1fr; gap: var(--gap); align-items: end; margin-bottom: 44px; }
.hero__photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--th-line); background: #000; }
.mark__name {
  display: block;
  color: var(--th-bright);
  font: 900 clamp(40px, 7.2vw, 76px)/.9 var(--wide);
  font-stretch: 150%;
  letter-spacing: -.01em;
  text-shadow: 0 0 28px var(--th-glow);
}
/* "Last online" and its disc in the skin's accent, the colour of the amp's disc and a card's
   chevron on hover; the time after it stays quiet. A ring when Toby was here earlier, a lit disc
   while he is online. */
.mark__seen { display: flex; align-items: center; gap: 9px; margin-top: 16px; font: 500 15px/1.3 var(--wide); color: var(--th-dim); }.mark__label { color: var(--th-hot); }
.mark__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--th-hot); }
.mark__seen.is-online .mark__dot { background: var(--th-hot); box-shadow: 0 0 8px var(--th-glow); }

.split { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap); align-items: start; }
.split > * { min-width: 0; }

/* ---- the amp (LLTM-amp, src/_includes/amp/). Beside the writing it is the player alone, its
   three panes stacked to fit the column (amp.css lays them out by the width of the screen, for a
   window as wide as LLTM's pages). Opened out, by its grow button or its View menu, it spans the
   page above the writing. Toronado's scene behind the window is LLTM's: here the art is. */
.split:has(.wa[data-layout="library"]) { grid-template-columns: 1fr; }
.split:has(.wa[data-layout="library"]) > .listening { order: -1; }
.listening .wa-stage { margin-bottom: 0; }
.listening .wa { margin-top: 0; }
.listening .wa[data-skin] ~ .wa-scene { display: none; }
/* the playlist's songs are things to press here, from the first visit: 24px tall at least */
.listening .wa-pl__list button, .listening .wa-pl__list a { min-height: 24px; align-items: center; }
@media (min-width: 861px) {
  .listening .wa[data-layout="compact"] .wa__top { grid-template-columns: minmax(0, 1fr); }
  .listening .wa[data-layout="compact"] .wa-main { grid-column: auto; }
  .listening .wa[data-layout="compact"] .wa-cover { width: 4.6rem; }
  .listening .wa[data-layout="compact"] .wa-pl { height: 11.5rem; }
}

/* ---- entry cards: the whole card is the link; the chevron says so */
.cards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 18px;
  padding: 16px 18px 16px 20px;
  border: 1px solid var(--th-line);
  border-radius: var(--th-radius);
  background: #000;
  color: var(--th-text);
  text-decoration: none;
  transition: border-color .15s ease;
}
.card:hover, .card:focus-visible { border-color: var(--th-edge); color: var(--th-text); }
.card__meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px 14px; font: 500 12px/1.4 var(--wide); color: var(--th-dim); }
.card__tongue { color: var(--th-title); font-weight: 650; }
.card__title { grid-column: 1; color: var(--th-bright); font: 750 clamp(18px, 2vw, 21px)/1.2 var(--wide); font-stretch: 108%; text-wrap: balance; }
.card__sum { grid-column: 1; color: var(--th-text); font-size: 16px; line-height: 1.5; max-width: 60ch; }
.card__go { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: 12px; height: 20px; color: var(--th-dim); transition: color .15s ease, transform .15s ease; }
.card:hover .card__go, .card:focus-visible .card__go { color: var(--th-hot); transform: translateX(3px); }
.writing__all { margin: 0 0 12px; font: 600 14px/1.3 var(--wide); }
.writing__all a { color: var(--th-link); text-decoration: none; }
.writing__all a:hover, .writing__all a:focus-visible { color: var(--th-bright); text-decoration: underline; }
.empty { color: var(--th-dim); }

/* ---- the masthead on every other page */
.masthead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 44px; font: 600 14px/1.3 var(--wide); }
.masthead a { color: var(--th-text); text-decoration: none; }
.masthead a:hover { color: var(--th-bright); }
.masthead__name { font-weight: 900; font-stretch: 140%; font-size: 17px; color: var(--th-bright) !important; }
.masthead a[aria-current="page"] { color: var(--th-hot); }

/* ---- the blog view */
.blog__head { display: grid; gap: 8px; margin-bottom: 24px; }
.blog__title { color: var(--th-bright); font: 850 clamp(34px, 5vw, 48px)/1 var(--wide); font-stretch: 125%; }
.blog__count { font: 500 13px/1.4 var(--wide); color: var(--th-dim); }
.filters { display: grid; gap: 12px; margin: 0 0 28px; padding: 0; border: 0; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter__label { width: 5.5em; font: 600 12px/1 var(--wide); color: var(--th-dim); }
.chip {
  appearance: none;
  padding: 6px 11px 7px;
  border: 1px solid var(--th-line);
  border-radius: 999px;
  background: #000;
  color: var(--th-text);
  font: 550 13px/1 var(--wide);
  cursor: pointer;
}
.chip:hover { border-color: var(--th-edge); }
.chip[aria-pressed="true"] { background: var(--th-pick); border-color: var(--th-edge); color: var(--th-bright); }
.chip span { color: var(--th-dim); margin-left: .35em; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] span { color: inherit; opacity: .8; }
.cards--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.card[hidden] { display: none; }

/* ---- a post */
.post__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; font: 500 13px/1.4 var(--wide); color: var(--th-dim); }
.post__meta a { color: var(--th-title); text-decoration: none; font-weight: 650; }
.post__meta a:hover { text-decoration: underline; }
.post__title { color: var(--th-bright); font: 800 clamp(32px, 5.4vw, 52px)/1.03 var(--wide); font-stretch: 112%; letter-spacing: -.005em; text-wrap: balance; max-width: 18ch; }
.post__sum { margin-top: 16px; max-width: var(--measure); color: var(--th-text); font: italic 400 21px/1.5 var(--serif); }
.post__body { margin-top: 30px; max-width: var(--measure); font: 400 19px/1.65 var(--serif); color: var(--th-text); hyphens: auto; }
.post__body h2 { margin: 1.6em 0 .5em; color: var(--th-title); font: 700 22px/1.25 var(--wide); font-stretch: 110%; }
.post__body p { margin: 0 0 1em; }
.post__body img { margin: 1.4em 0; border: 1px solid var(--th-line); }
.post__body blockquote { margin: 1.2em 0; padding-left: 1em; border-left: 2px solid var(--th-edge); color: var(--th-dim); }
.post__foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--th-line); max-width: var(--measure); display: grid; gap: 8px; font: 500 13px/1.5 var(--wide); color: var(--th-dim); }
/* a YouTube video: its thumbnail and a link until it is played */
.video { margin: 1.6em 0; max-width: var(--measure); }
.video__link, .video__frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--th-line); border-radius: var(--th-radius); background: #000; overflow: hidden; }
.video__frame { border: 0; }
.video__thumb { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .2s ease; }
.video__link:hover .video__thumb, .video__link:focus-visible .video__thumb { opacity: 1; }
.video__play { position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--th-pick) 85%, #000); box-shadow: 0 0 24px var(--th-glow); }
.video__play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent var(--th-bright); }
.video__title { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); color: var(--th-bright); font: 600 14px/1.3 var(--wide); text-align: left; }
.video figcaption { margin-top: 8px; font: 500 13px/1.4 var(--wide); color: var(--th-dim); }
.post--bare .post__body { margin-top: 0; max-width: none; }

/* Post pages: the black middle narrows to just fit the text, and the side art comes in to fill
   the rest. Widgets and videos sit in the text column. (The homepage and the blog view keep the
   wider page for their two columns and card grid.) */
body.post-page { --page: 640px; }
.post-page .post__body, .post-page .post__sum, .post-page .post__foot, .post-page .draft-note, .post-page .video { max-width: none; }

.draft-note { margin: 0 0 22px; padding: 9px 12px; border: 1px dashed var(--th-hot); color: var(--th-hot); font: 500 13px/1.4 var(--wide); max-width: var(--measure); }

/* a widget inside a post: static content first, enhanced by the post's script */
.widget { hyphens: manual; margin: 1.6em 0; padding: 14px 16px; border: 1px solid var(--th-line); border-radius: var(--th-radius); background: color-mix(in srgb, var(--th-pick) 14%, #000); font: 500 14px/1.5 var(--wide);  }
.widget figcaption { margin-top: 10px; color: var(--th-dim); font-size: 11px; }
.widget table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.widget th, .widget td { text-align: left; padding: 4px 8px; border-bottom: 1px solid color-mix(in srgb, var(--th-edge) 40%, transparent); }
.widget th { color: var(--th-title); font-weight: bold; }
.widget input, .widget button, .widget select { font: inherit; color: var(--th-bright); background: #000; border: 1px solid var(--th-line); border-radius: var(--th-radius); padding: 5px 8px; }
.widget button { background: var(--th-bar); cursor: pointer; font-weight: bold; }
.widget label { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 6px 0; white-space: nowrap; }
.widget input[type="number"] { width: 5.5em; }

.widget label { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 6px 0; white-space: nowrap; }
.widget input[type="number"] { width: 5.5em; }
.widget input, .widget button, .widget select { font: inherit; color: var(--th-bright); background: #000; border: 1px solid var(--th-line); border-radius: var(--th-radius); padding: 5px 8px; }

/* ---- narrower screens */
@media (max-width: 1100px) { :root { --page: 900px; --gap: 22px; } }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .art--right { display: none; }
  .art--left {
    position: absolute;
    left: 0; right: 0; top: 0; bottom: auto;
    width: 100%;
    height: 300px;
    background-position: center 35%;
    -webkit-mask-image: linear-gradient(#000 35%, transparent);
    mask-image: linear-gradient(#000 35%, transparent);
    opacity: .6;
  }
  .page { padding-top: 32px; }
  .mark__seen { text-shadow: 0 0 4px #000, 0 0 10px #000; }
  .mark__name { text-shadow: 0 0 4px #000, 0 0 24px var(--th-glow); }
}
@media (max-width: 520px) {
  .hero { grid-template-columns: 84px 1fr; gap: 16px; }
  .mark { min-width: 0; }
  .mark__name { font-size: clamp(28px, 9.2vw, 40px); font-stretch: 128%; }
  .card { padding: 14px 14px 14px 16px; }
  .post__body { font-size: 18px; }
  .filter__label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .art, .art canvas, .card, .card__go { transition: none; }
}
