/* billdonner.com — stark, text-forward. Inspired by inessential.com, taken plainer.
   One narrow column. No cards, no shadows, hairline rules, a single link color. */

:root {
  --bg: #f4f3ef;
  --ink: #1a1a1a;
  --ink-soft: #4a4a46;
  --ink-faint: #8a8780;
  --rule: rgba(0,0,0,.14);
  --rule-faint: rgba(0,0,0,.08);
  --link: #2a4b8d;
  --link-visited: #5a4a8a;
  --maxw: 640px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Verdana, Geneva, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161a; --ink: rgba(255,255,255,.86); --ink-soft: rgba(255,255,255,.62);
    --ink-faint: rgba(255,255,255,.40); --rule: rgba(255,255,255,.16); --rule-faint: rgba(255,255,255,.09);
    --link: #8aa6e6; --link-visited: #b3a3da;
  }
}
:root[data-theme="dark"] {
  --bg:#15161a; --ink:rgba(255,255,255,.86); --ink-soft:rgba(255,255,255,.62);
  --ink-faint:rgba(255,255,255,.40); --rule:rgba(255,255,255,.16); --rule-faint:rgba(255,255,255,.09);
  --link:#8aa6e6; --link-visited:#b3a3da;
}
:root[data-theme="light"] {
  --bg:#f4f3ef; --ink:#1a1a1a; --ink-soft:#4a4a46; --ink-faint:#8a8780;
  --rule:rgba(0,0,0,.14); --rule-faint:rgba(0,0,0,.08); --link:#2a4b8d; --link-visited:#5a4a8a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 18px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.wrap, .wrap-wide { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

a { color: var(--link); text-underline-offset: 3px; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }

/* ---- header / nav (stark, flat, hairline rule) ---- */
.nav { border-bottom: 1px solid var(--rule); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 18px 12px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.nav a.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.nav a.brand:visited { color: var(--ink); }
.nav .spacer { flex: 1; }
.nav a.link { color: var(--link); text-decoration: none; font-size: .95rem; }
.nav a.link:hover { text-decoration: underline; }
.theme-toggle { background: none; border: none; color: var(--ink-faint); cursor: pointer; font-size: 1rem; padding: 0 2px; line-height: 1; }
.theme-toggle:hover { color: var(--ink); }
@media (max-width: 540px){ .nav .link.hide-sm{ display:none; } }

/* ---- hero ---- */
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
.hero .lead { font-size: 1.05rem; color: var(--ink-soft); margin: 0 0 1em; }
.hero-photo { display: block; width: 100%; max-width: 440px; height: auto; border-radius: 3px; margin: 6px 0 18px; }
/* home: photo ~30% smaller, floated top-right; intro + blog flow around and under it */
.home-photo { float: right; width: 300px; max-width: 44%; height: auto; border-radius: 3px;
  margin: 4px 0 14px 24px; }
@media (max-width: 540px){ .home-photo { float: none; width: 62%; margin: 0 0 14px; } }

/* home masthead — editorial nameplate */
.home-head { padding: 44px 0 26px; border-bottom: 1px solid var(--rule); position: relative; }
.home-head .kick { text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; font-weight: 700; color: var(--ink-faint); margin: 0 0 .9em; }
.home-head .kick a { color: inherit; text-decoration: none; }
.home-head h1 { font-size: 2.3rem; line-height: 1.12; letter-spacing: -.02em; margin: 0; max-width: 18ch; }
.home-head .home-portrait-tr { position: absolute; top: 44px; right: 0; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
@media (max-width: 480px){ .home-head h1 { font-size: 1.9rem; } .home-head .home-portrait-tr { width: 70px; height: 70px; top: 40px; } }

/* blog */
.blog { padding-top: 8px; }
.post { padding: 18px 0; border-top: 1px solid var(--rule-faint); }
.post:first-of-type { border-top: none; }
.post .post-date { font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; }
.post h3 { margin: 2px 0 6px; font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.post p { margin: 0 0 .8em; }
.post p:last-child { margin-bottom: 0; }
.clear { clear: both; }
#more { border-top: 1px solid var(--rule); margin-top: 26px; padding-top: 18px; gap: 8px 20px; }
.hero-portrait { width: 110px; height: auto; border-radius: 3px; margin-bottom: 16px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--ink-faint); margin: 0 0 .6em; }

/* ---- sections ---- */
main { padding-bottom: 10px; }
section { padding: 26px 0; border-top: 1px solid var(--rule-faint); }
section:first-of-type { border-top: none; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.section-head h2, section > h2 { font-size: 1.0rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-faint); margin: 0 0 14px; }
.section-head .count { color: var(--ink-faint); font-size: .82rem; }
p { margin: 0 0 1em; }

/* ---- entries (apps, music) — blog-post rhythm, no cards ---- */
.entry { padding: 16px 0; border-top: 1px solid var(--rule-faint); }
.entry:first-child { border-top: none; padding-top: 4px; }
.entry h3 { margin: 0 0 4px; font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; }
.entry p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin-left: 8px; white-space: nowrap; }
a.tag { text-decoration: none; } a.tag:hover { text-decoration: underline; }
.applinks { margin: 6px 0 0; font-size: .82rem; }
.applinks a { margin-right: 14px; white-space: nowrap; }
.tag.live { color: #2f7d4f; } .tag.beta { color: #9a6b00; }
@media (prefers-color-scheme: dark){ .tag.live{color:#6dcd92;} .tag.beta{color:#e0b34a;} }
:root[data-theme="dark"] .tag.live{color:#6dcd92;} :root[data-theme="dark"] .tag.beta{color:#e0b34a;}

/* ---- link rows / lists ---- */
.linkrow { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 6px 0; margin: 0; }
.linkrow a { font-size: .98rem; }
ul { padding-left: 1.2em; }
ul li { margin: .2em 0; }

/* ---- callout (used on about/teacher) ---- */
.callout { border-left: 2px solid var(--rule); padding: 2px 0 2px 16px; margin: 16px 0; color: var(--ink-soft); }
.callout p:last-child { margin-bottom: 0; }

/* ---- legacy .tile / .app-card flattened to entries (teacher, music hub) ---- */
.tiles, .apps { display: block; }
.tile, .app-card { display: block; background: none; border: none; border-top: 1px solid var(--rule-faint);
  border-radius: 0; box-shadow: none; padding: 16px 0; }
.tile:first-child, .app-card:first-child { border-top: none; }
.tile h3 { margin: 0 0 4px; font-size: 1.2rem; }
.tile h3 a, .tile { text-decoration: none; }
.tile p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.band-logo { display: none; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--rule); margin-top: 36px; padding: 22px 0 60px; color: var(--ink-faint); font-size: .9rem; }
footer a { color: var(--link); }
footer .credits { font-family: var(--mono); font-size: .78rem; white-space: pre-wrap; line-height: 1.5; color: var(--ink-faint); margin-top: 14px; }

/* ====================  MUSIC PLAYER (stark)  ==================== */
.music-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 18px; }
.music-controls input[type=search] {
  flex: 1; min-width: 160px; font: inherit; font-size: .95rem; padding: 7px 10px;
  border: 1px solid var(--rule); border-radius: 3px; background: transparent; color: var(--ink);
}
.chip { font: inherit; font-size: .85rem; padding: 6px 12px; border-radius: 3px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink-soft); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.session { border: none; border-top: 1px solid var(--rule-faint); border-radius: 0; margin: 0; background: none; }
.session:first-of-type { border-top: none; }
.session > summary { list-style: none; cursor: pointer; padding: 11px 2px; display: flex; align-items: baseline; gap: 10px; }
.session > summary::-webkit-details-marker { display: none; }
.session > summary::after { content: "+"; margin-left: auto; color: var(--ink-faint); font-weight: 700; }
.session[open] > summary::after { content: "\2013"; }
.session .s-title { font-weight: 700; }
.session .s-meta { color: var(--ink-faint); font-size: .85rem; }
.session .s-kind { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--ink-faint); }
.session .s-kind.gig { color: var(--link); }
.s-note { margin: 0 2px 6px 14px; font-size: .8rem; color: var(--ink-faint); font-style: italic; }
.tracklist { list-style: none; margin: 0 0 8px; padding: 0; }
.track { display: flex; align-items: baseline; gap: 10px; padding: 5px 2px 5px 14px; cursor: pointer; border-radius: 2px; }
.track:hover { background: var(--rule-faint); }
.track.playing .ttitle { font-weight: 700; color: var(--link); }
.track .tnum { width: 24px; text-align: right; color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: .85rem; flex: none; }
.track .ttitle { flex: 1; }
.track .tplay { color: var(--ink-faint); font-size: .8rem; }

.player-bar {
  position: sticky; bottom: 0; z-index: 40; margin-top: 16px;
  background: var(--bg); border-top: 1px solid var(--rule);
  padding: 10px 2px; display: none; gap: 12px; align-items: center;
}
.player-bar.active { display: flex; }
.player-bar .pb-info { min-width: 0; flex: 1; }
.player-bar .pb-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .pb-sub { font-size: .8rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar audio { height: 34px; }
.pb-btn { background: none; border: none; color: var(--ink); font-size: 1rem; cursor: pointer; padding: 4px 6px; }
.pb-btn:hover { color: var(--link); }

.empty { color: var(--ink-faint); padding: 26px 2px; }

/* share buttons + copied toast */
.session > summary .share { margin-left: 12px; }
.track .share { opacity: 0; }
.track:hover .share, .track .share:focus { opacity: 1; }
button.share { background: none; border: none; cursor: pointer; font-size: .82rem; line-height: 1;
  padding: 2px 4px; color: var(--ink-faint); flex: none; transition: opacity .12s; }
button.share:hover { color: var(--link); }
#copy-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(8px);
  background: var(--ink); color: var(--bg); font-size: .85rem; font-weight: 600; padding: 8px 16px;
  border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
#copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (hover: none) { .track .share { opacity: 1; } }

/* theme-aware Apple Teacher badges (used on teacher page) */
.teacher-badges .badge-dark { display: none; }
@media (prefers-color-scheme: dark){ .teacher-badges .badge-light{display:none;} .teacher-badges .badge-dark{display:inline;} }
:root[data-theme="dark"] .teacher-badges .badge-light{display:none;} :root[data-theme="dark"] .teacher-badges .badge-dark{display:inline;}
:root[data-theme="light"] .teacher-badges .badge-light{display:inline;} :root[data-theme="light"] .teacher-badges .badge-dark{display:none;}
