/* victorgutwein.com — shared look for every page.
   Change the colours and fonts in the :root block and the whole site follows. */

:root {
  /* Layout idea: a left-aligned logbook. Short header, then ledger rows grouped by kind. */
  --paper: #edf1f2;      /* page background: cool lake-fog grey */
  --surface: #f8fafa;    /* rows and panels */
  --ink: #12222b;        /* text: deep lake navy */
  --muted: #52666f;      /* secondary text */
  --line: #c5d1d6;       /* rules and borders */
  --accent: #d9480f;     /* swim-buoy orange: marks, focus, one button */
  --ok: #1f7a4d;         /* status: ready */
  --warn: #9a6400;       /* status: in progress */

  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.75rem, 11vw, 4.75rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0d181e;
    --surface: #13222a;
    --ink: #e3ecef;
    --muted: #8fa3ad;
    --line: #263a44;
    --accent: #ff7a33;
    --ok: #5fd39a;
    --warn: #f0b64a;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d181e;
  --surface: #13222a;
  --ink: #e3ecef;
  --muted: #8fa3ad;
  --line: #263a44;
  --accent: #ff7a33;
  --ok: #5fd39a;
  --warn: #f0b64a;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.5;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ---------- Header ---------- */

.masthead { display: flex; flex-direction: column; gap: 0.75rem; }

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
}

.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.intro { margin: 0; max-width: 34rem; font-size: var(--step-1); line-height: 1.4; color: var(--muted); }

.links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0; padding: 0; list-style: none; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: flex-start;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  border-bottom: 3px solid var(--accent);
}
.button:hover { text-decoration: underline; }

main { display: flex; flex-direction: column; gap: 1.75rem; }

/* ---------- Summary line ---------- */

.tally {
  margin: 0;
  padding: 0.75rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tally strong { color: var(--ink); font-weight: 500; }

/* ---------- Ledger ---------- */

.ledger { display: flex; flex-direction: column; gap: 2.25rem; }

.group { display: flex; flex-direction: column; gap: 0.6rem; }

.group h2 {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.group h2 .count {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }

.row { border-bottom: 1px solid var(--line); }

.row-body {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  grid-template-areas: "kind main meta";
  align-items: start;
  gap: 0.25rem 1rem;
  padding: 0.9rem 0.25rem;
  color: inherit;
  text-decoration: none;
}

a.row-body:hover { background: var(--surface); }
a.row-body:hover .row-title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.row-kind {
  grid-area: kind;
  padding-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.row-main { grid-area: main; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.row-title { font-weight: 600; font-size: 1.0625rem; overflow-wrap: anywhere; }
.row-blurb { color: var(--muted); font-size: 0.9375rem; }

.row-meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  padding-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.row:not(.is-live) .row-title { color: var(--muted); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: nowrap;
}
.chip::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; }
.chip-live { color: var(--accent); }
.chip-ready { color: var(--ok); }
.chip-building { color: var(--warn); }
.chip-planned { color: var(--muted); }
.chip-planned::before { background: transparent; border: 1px solid currentColor; }

.open-mark { color: var(--accent); font-size: 1rem; }

.empty {
  margin: 0;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.notice {
  margin: 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
}

/* ---------- Films and songs ---------- */

.player { display: flex; flex-direction: column; gap: 0.9rem; }
.player video { display: block; width: 100%; max-height: 80vh; background: #000; border-radius: 3px; }
.player audio { display: block; width: 100%; }
.player h2 { margin: 0; font-family: var(--font-display); font-size: var(--step-2); line-height: 1; text-transform: uppercase; }
.player p { margin: 0; color: var(--muted); }

.tracks { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.track { display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem 0.25rem; border-bottom: 1px solid var(--line); }
.track.is-current { border-left: 3px solid var(--accent); padding-left: 0.9rem; background: var(--surface); }
.track-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.track-title { font-weight: 600; }
.track-blurb { color: var(--muted); font-size: 0.9375rem; }

/* ---------- Visitor log ---------- */

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
th, td { padding: 0.55rem 0.75rem 0.55rem 0.25rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-size: var(--step--1); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
td.num, th.num { text-align: right; }
td.when { white-space: nowrap; color: var(--muted); }
td.path { font-family: var(--font-mono); font-size: var(--step--1); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
}

/* ---------- Preview switcher (only used by the preview page) ---------- */

.switcher { display: flex; flex-direction: column; gap: 0.6rem; }
.switcher p { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.tabs { display: inline-flex; flex-wrap: wrap; align-self: flex-start; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; }
.tabs button {
  appearance: none;
  padding: 0.5rem 0.9rem;
  border: 0;
  border-right: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 500 var(--step--1) / 1.3 var(--font-mono);
  cursor: pointer;
}
.tabs button:last-child { border-right: 0; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Phone ---------- */

@media (max-width: 34rem) {
  .wrap { padding: 1.5rem 1rem 3rem; gap: 2rem; }
  .intro { font-size: 1.125rem; }
  .row-body {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "kind meta" "main main";
  }
  .row-meta { flex-direction: row; align-items: center; gap: 0.6rem; padding-top: 0; }
  .row-kind { padding-top: 0.1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  a.row-body { transition: background-color 120ms ease; }
}
