/* ================================================================
   thomashymas.com — the CLASSIC look: an aged sepia broadsheet.

   Switched on by <html data-theme="classic"> (theme.js). Every rule here
   is scoped to that attribute, so the Colour look in style.css is never
   touched. It is Competitive Sudokus' "Classic view": warm tan paper with
   grain and a vignette, a serif masthead over a double rule, ink-ruled
   panels in place of colour tiles, and one faded red press ink for links.

   Most of the page re-themes through the token overrides below; the rest
   is newspaper detailing. Only these font faces exist (fonts.css), so use
   no other weight or style:
     Playfair Display  700, 800 upright · 800, 900 italic
     PT Serif          400, 700, each upright and italic
   ================================================================ */

:root[data-theme="classic"] {
  /* Sepia palette. */
  --ground:      #e3d0a3;   /* page paper          */
  --fg:          #2b2113;   /* ink on the page     */
  --fg-soft:     #5b482c;
  --paper:       #f1e6cb;   /* lighter panel paper */
  --ink:         #2b2113;
  --ink-soft:    #5b482c;
  --line:        #cbb588;   /* hairline rules      */
  --line-strong: #a98f5f;
  --accent:      #883225;   /* faded red press ink */
  --shot-bg:     #e7dbb9;

  --on-tile:     #2b2113;   /* there are no colour tiles: lettering is ink */
  --pill-bg:     transparent;
  --pill-ink:    #883225;

  --radius:      2px;

  --font-body:    "PT Serif", Georgia, "Times New Roman", serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* PT Serif sets smaller than Poppins at the same size. */
:root[data-theme="classic"] body { font-size: 17px; line-height: 1.62; }

/* Aged paper: corner stains, a vignette and fibre grain on a fixed layer
   behind everything. */
:root[data-theme="classic"] body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: var(--ground);
  background-image:
    radial-gradient(circle at 88% 12%, rgba(120, 86, 38, 0.16), rgba(120, 86, 38, 0) 26%),
    radial-gradient(circle at 12% 96%, rgba(120, 86, 38, 0.12), rgba(120, 86, 38, 0) 30%),
    radial-gradient(120% 120% at 50% 42%, rgba(227, 208, 163, 0) 56%, rgba(120, 92, 48, 0.28) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: auto, auto, auto, 220px 220px;
  background-blend-mode: multiply, multiply, multiply, soft-light;
}

:root[data-theme="classic"] ::selection { background: #d7b75c; color: var(--ink); }

:root[data-theme="classic"] :focus-visible { outline-color: var(--ink); border-radius: 2px; }

/* ── The switch: unchanged, but its outer ring has to show on paper. The
   dark backing keeps the dimmed "Colour" half dark; without it the tan page
   shows through the half's opacity and turns it muddy. ── */
:root[data-theme="classic"] .theme-toggle { background: #14161c; box-shadow: 0 0 0 1px var(--ink); }

/* ── Masthead ──────────────────────────────────────────────────── */
:root[data-theme="classic"] .intro {
  padding-top: clamp(68px, 10vh, 96px);
  padding-bottom: clamp(0px, 1vw, 12px);
}

/* The name as a nameplate: full width, in ink, over a thick-and-thin rule
   (two background strips, so the gap between them shows the paper). */
:root[data-theme="classic"] .wordmark {
  align-self: stretch;
  margin-bottom: clamp(24px, 3.5vw, 36px);
  padding-bottom: 0.3em;
  gap: 0 0.26em;
  font-size: clamp(50px, 9.6vw, 104px); font-style: italic; font-weight: 800;
  line-height: 1.08; letter-spacing: -0.01em;
  text-transform: none;
  background:
    linear-gradient(var(--ink), var(--ink)) left bottom 4px / 100% 3px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 100% 1px no-repeat;
}
:root[data-theme="classic"] .wm-letter { color: var(--ink); text-shadow: none; }

:root[data-theme="classic"] .lede { font-size: clamp(19px, 2.3vw, 23px); line-height: 1.48; }
:root[data-theme="classic"] .facts { font-style: italic; }

/* ── Buttons: inked rectangles ─────────────────────────────────── */
:root[data-theme="classic"] .btn {
  padding: 13px 26px 12px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--font-body); font-size: 15px; font-weight: 700;
  letter-spacing: 0.12em; text-shadow: none;
  transition: background .12s, border-color .12s;
}
:root[data-theme="classic"] .btn:hover {
  background: var(--accent); border-color: var(--accent);
  filter: none; transform: none;
}
:root[data-theme="classic"] .btn:active { background: var(--ink); border-color: var(--ink); filter: none; }

/* ── Section headings: a headline between rules ────────────────── */
:root[data-theme="classic"] .section-title {
  padding: 9px 0 10px;
  border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink);
  font-size: clamp(27px, 4vw, 36px); font-weight: 800; line-height: 1.12;
  text-transform: none; text-shadow: none;
}

/* ── Projects: ink-ruled paper panels ──────────────────────────── */
:root[data-theme="classic"] .card,
:root[data-theme="classic"] .panel,
:root[data-theme="classic"] .tile {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-strong);
}

/* The title is a headline on the paper, not a colour band. */
:root[data-theme="classic"] .card-title {
  padding: 18px 20px 14px;
  background: none;
  font-size: clamp(23px, 2.7vw, 28px); font-weight: 800; line-height: 1.12;
  text-transform: none; text-shadow: none;
}
:root[data-theme="classic"] .card-title a:hover {
  text-decoration-color: var(--accent); text-decoration-thickness: 2px;
}

/* Pictures: framed in an ink rule and toned like a printed photograph. */
:root[data-theme="classic"] .card-shot {
  margin: 0 20px;
  border: 1px solid var(--ink);
}
/* Games with a Classic look of their own show it here, untouched: it is
   already newsprint. Any other picture gets a light newspaper-photo wash. */
:root[data-theme="classic"] .card-shot .shot-colour { display: none; }
:root[data-theme="classic"] .card-shot .shot-classic { display: block; }
:root[data-theme="classic"] .card-shot img:not(.shot-classic) { filter: sepia(0.5) saturate(0.72) contrast(0.96); }

/* The drawn Prospects stand-in, in sepia inks. */
:root[data-theme="classic"] .cf-ground { fill: #e7dbb9; }
:root[data-theme="classic"] .cf-sheet { fill: #f8f0db; }
:root[data-theme="classic"] .cf-map { fill: #d9c99f; }
:root[data-theme="classic"] .cf-rows circle { fill: var(--accent); }
:root[data-theme="classic"] .cf-rows rect { fill: #bfa97a; }
:root[data-theme="classic"] .cf-road { stroke: #f8f0db; }
:root[data-theme="classic"] .cf-pins circle { fill: var(--accent); stroke: #f8f0db; }

:root[data-theme="classic"] .card-body { padding-top: 16px; font-size: 16px; line-height: 1.6; }

/* Status: a small ruled label in press ink. */
:root[data-theme="classic"] .status > * {
  padding: 3px 9px 2px;
  border: 1px solid var(--accent); border-radius: 2px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
:root[data-theme="classic"] .status a { text-decoration: none; }
:root[data-theme="classic"] .status a:hover { background: var(--accent); color: var(--paper); filter: none; }

:root[data-theme="classic"] .credit { font-size: 15px; }

:root[data-theme="classic"] .card-link a,
:root[data-theme="classic"] .tile-mail a {
  text-decoration-color: var(--accent); text-decoration-thickness: 2px;
}
:root[data-theme="classic"] .card-link a:hover,
:root[data-theme="classic"] .tile-mail a:hover {
  color: var(--accent); text-decoration-color: currentColor; text-decoration-thickness: 2px;
}

:root[data-theme="classic"] .aside { font-style: italic; }

/* ── Work with me ──────────────────────────────────────────────── */
:root[data-theme="classic"] .panel-lede {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.7vw, 27px); font-weight: 700; line-height: 1.3;
}

/* ── Music and Contact ─────────────────────────────────────────── */
:root[data-theme="classic"] .tile-title {
  padding-bottom: 0.4em; border-bottom: 1px solid var(--line-strong);
  font-size: clamp(24px, 3.2vw, 30px); font-weight: 800; line-height: 1.12;
  text-transform: none; text-shadow: none;
}
:root[data-theme="classic"] .tile-mail-big { font-weight: 700; }

/* ── Footer: closed off with a rule ────────────────────────────── */
:root[data-theme="classic"] .footer {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  font-size: 14.5px; font-style: italic;
}
