/*
 * jackowiak.net: five looks for the same page. The markup is shared; data-theme on <html> chooses the look.
 * System fonts and plain CSS, plus one bundled face (Federo, OFL) for Art Nouveau: no external requests, so the strict
 * Content-Security-Policy in Caddy holds.
 *
 * Common variables set by each theme: --bg, --ink (text), --muted, --line, --accent, --font-display, --font-body.
 */

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
.themes input:focus-visible + span {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

h1,
h2,
p,
ul,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
}
.skip:focus {
  top: 1rem;
}

/* ---------- Top bar and style switcher ---------- */
.top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1rem;
}

.themes {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.themes legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.themes label {
  cursor: pointer;
}
.themes input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.themes span {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.themes span:hover {
  transform: translateY(-1px);
}
.themes input:checked + span {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(1.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 6vw, 5rem);
  min-height: min(70vh, 46rem);
  display: flex;
  align-items: flex-end;
}

.hero-text {
  position: relative;
  z-index: 2;
  width: 100%;
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

h1 {
  font-family: var(--font-display);
  line-height: 0.9;
  overflow-wrap: normal;
}

.lede {
  max-width: 32rem;
  margin-top: 1.75rem;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
}
/* The quote under the name: the author is a quiet signature below it */
.lede figcaption {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-style: normal;
  opacity: 0.8;
}
.lede figcaption::before {
  content: "— ";
}
.lede cite {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
}

.art {
  display: none;
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.art svg {
  display: block;
  width: 100%;
  height: auto;
}

.marquee {
  display: none;
}

/* ---------- Projects ---------- */
.projects {
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 8vw, 6rem);
}

.projects > h2 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.card {
  display: block;
  color: inherit;
}
.card-no {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0.7;
}
.card-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
}
.card-desc {
  display: block;
  margin-top: 0.6rem;
  max-width: 34rem;
  font-size: 1rem;
  opacity: 0.85;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.card-go {
  display: inline-block;
  font-size: 1.6em;
  line-height: 1;
  transition: transform 0.25s ease;
}
.card:hover .card-go,
.card:focus-visible .card-go {
  transform: translateX(6px);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  vertical-align: middle;
  margin-left: 0.4rem;
  padding: 0.18rem 0.6rem;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}
.live i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #e5322b;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    transform: scale(0.55);
    opacity: 0.55;
  }
}

.foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* =====================================================================
   1. MID-CENTURY: cream paper, orange / mustard / teal shapes, geometric type
   ===================================================================== */
[data-theme="midcentury"] {
  --bg: #f3e9d2;
  --ink: #2a2622;
  --muted: #6b6155;
  --line: #d9ccaf;
  --font-display: "Futura", "Avenir Next", "Century Gothic", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
[data-theme="midcentury"] h1 {
  font-size: clamp(3.2rem, 15vw, 15rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}
[data-theme="midcentury"] .art-midcentury {
  display: block;
  right: clamp(-3rem, -2vw, 0rem);
  top: 0;
  width: min(52vw, 620px);
}
.mc-orange { fill: #e0572b; }
.mc-teal { fill: #1f7a7a; }
.mc-olive { fill: #7a8b3a; }
.mc-ink { fill: #2a2622; }
.mc-star line { stroke: #e9a820; stroke-width: 7; stroke-linecap: round; }
.mc-star circle { fill: #e9a820; }
.mc-star-core { fill: #2a2622 !important; }
.mc-line { stroke: #2a2622; stroke-width: 3; }

[data-theme="midcentury"] .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
[data-theme="midcentury"] .card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 21rem;
  height: 100%;
  padding: 1.75rem;
  color: #fbf3e0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
[data-theme="midcentury"] .card:hover {
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 14px 0 -6px rgba(42, 38, 34, 0.18);
}
[data-theme="midcentury"] .card-body {
  margin-top: auto;
  padding-top: 2.5rem;
}
[data-theme="midcentury"] .card-name {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  letter-spacing: -0.02em;
}
[data-theme="midcentury"] .card-meta {
  margin-top: 1.5rem;
  padding-top: 0.9rem;
  border-top: 2px solid currentColor;
}
[data-theme="midcentury"] li:nth-child(1) .card { background: #e0572b; border-radius: 999px 999px 18px 18px; padding-top: 3.25rem; }
[data-theme="midcentury"] li:nth-child(2) .card { background: #1f7a7a; border-radius: 18px 18px 18px 160px; }
[data-theme="midcentury"] li:nth-child(3) .card { background: #e9a820; color: #2a2622; border-radius: 18px 160px 18px 18px; }
[data-theme="midcentury"] .card-no { font-size: 1.1rem; }

/* =====================================================================
   2. JAPANDI: warm paper, stone and sage, a light serif, lots of air
   ===================================================================== */
[data-theme="japandi"] {
  --bg: #efe9df;
  --ink: #38342f;
  --muted: #7b746b;
  --line: #cfc6b8;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text", Georgia, serif;
  --font-body: "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
}
/* A faint paper grain, as an inline SVG so no file is fetched */
[data-theme="japandi"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.26  0 0 0 0 0.2  0 0 0 0.09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-theme="japandi"] .top,
[data-theme="japandi"] main,
[data-theme="japandi"] .foot {
  position: relative;
  z-index: 1;
}
[data-theme="japandi"] .themes span {
  border-width: 1px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
[data-theme="japandi"] .hero {
  min-height: min(74vh, 48rem);
}
[data-theme="japandi"] h1 {
  font-size: clamp(3rem, 13vw, 12.5rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 0.95;
}
[data-theme="japandi"] .eyebrow {
  font-weight: 500;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
}
[data-theme="japandi"] .lede {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-style: italic;
}
[data-theme="japandi"] .art-japandi {
  display: block;
  right: 0;
  bottom: 0;
  width: min(48vw, 560px);
  opacity: 0.95;
}
.jp-sun { fill: #c9906f; opacity: 0.38; }
.jp-horizon { stroke: #38342f; stroke-width: 1.5; opacity: 0.55; }
.jp-stone-1 { fill: #8a9a82; }
.jp-stone-2 { fill: #b6a58f; }
.jp-stone-3 { fill: #38342f; }
.jp-stone-4 { fill: #c9906f; }
.jp-branch { fill: none; stroke: #38342f; stroke-width: 2; stroke-linecap: round; opacity: 0.7; }

[data-theme="japandi"] .projects > h2 {
  font-weight: 500;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
}
[data-theme="japandi"] .cards {
  border-bottom: 1px solid var(--line);
}
[data-theme="japandi"] .card {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: baseline;
  gap: 1rem 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.3s ease, background-color 0.3s ease;
}
[data-theme="japandi"] .card:hover,
[data-theme="japandi"] .card:focus-visible {
  padding-left: 1rem;
  background: rgba(138, 154, 130, 0.12);
}
[data-theme="japandi"] .card-no {
  font-weight: 400;
  color: var(--muted);
}
[data-theme="japandi"] .card-name {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}
[data-theme="japandi"] .card-desc {
  color: var(--muted);
  font-size: 0.98rem;
  opacity: 1;
}
[data-theme="japandi"] .card-meta {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  color: var(--muted);
  font-weight: 500;
}
[data-theme="japandi"] .card-go {
  font-size: 1.4rem;
  color: #b07d62;
}
[data-theme="japandi"] .live {
  border-color: #8a9a82;
  color: #5d6c56;
}

/* =====================================================================
   3. BOLD: acid yellow, black, a name as wide as the screen
   ===================================================================== */
[data-theme="bold"] {
  --bg: #ffe600;
  --ink: #0a0a0a;
  --muted: #0a0a0a;
  --line: #0a0a0a;
  --font-display: "Arial Black", "Helvetica Neue", Impact, "Arial", sans-serif;
  --font-body: "Helvetica Neue", Arial, system-ui, sans-serif;
}
[data-theme="bold"] .brand {
  font-weight: 900;
  text-transform: uppercase;
}
[data-theme="bold"] .themes span {
  border-width: 3px;
  border-radius: 0;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
}
[data-theme="bold"] .themes input:checked + span {
  box-shadow: none;
  transform: translate(3px, 3px);
}
[data-theme="bold"] .hero {
  min-height: 0;
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
  overflow: hidden;
}
[data-theme="bold"] .eyebrow {
  font-weight: 900;
  color: var(--ink);
}
[data-theme="bold"] h1 {
  /* Arial Black caps are ~6.2em wide at this tracking: 14vw keeps the name inside the screen */
  font-size: min(14vw, 26rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.06em;
  line-height: 0.8;
  white-space: nowrap;
  margin-left: -0.04em;
}
[data-theme="bold"] .lede {
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(1.1rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  text-transform: uppercase;
  max-width: 44rem;
}
[data-theme="bold"] .lede figcaption {
  font-size: 0.8rem;
  font-weight: 900;
  opacity: 1;
}
[data-theme="bold"] .marquee {
  display: block;
  overflow: hidden;
  background: var(--ink);
  color: #ffe600;
  border-block: 4px solid var(--ink);
  white-space: nowrap;
}
[data-theme="bold"] .marquee-track {
  display: inline-flex;
  animation: marquee 22s linear infinite;
}
[data-theme="bold"] .marquee-track span {
  padding: 0.5rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
[data-theme="bold"] .projects {
  padding-top: 2rem;
}
[data-theme="bold"] .projects > h2 {
  font-weight: 900;
  color: var(--ink);
}
[data-theme="bold"] .card {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem 0.75rem;
  border-top: 6px solid var(--ink);
  transition: background-color 0.15s, color 0.15s, padding-left 0.2s;
}
[data-theme="bold"] .cards li:last-child .card {
  border-bottom: 6px solid var(--ink);
}
[data-theme="bold"] .card:hover,
[data-theme="bold"] .card:focus-visible {
  background: var(--ink);
  color: #ffe600;
  padding-left: 1.5rem;
}
[data-theme="bold"] .card-no {
  font-weight: 900;
  font-size: 1.3rem;
  opacity: 1;
}
[data-theme="bold"] .card-name {
  font-size: clamp(2.2rem, 8.5vw, 7.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
[data-theme="bold"] .card-desc {
  font-weight: 700;
  font-size: 1.05rem;
  max-width: 40rem;
  opacity: 1;
}
[data-theme="bold"] .card-meta {
  flex-direction: column;
  align-items: flex-end;
  font-weight: 900;
  text-transform: uppercase;
}
[data-theme="bold"] .card-go {
  font-size: clamp(2.2rem, 6vw, 5rem);
}
[data-theme="bold"] .live {
  border-width: 3px;
  border-radius: 0;
  font-weight: 900;
  vertical-align: middle;
  font-size: 0.8rem;
}
[data-theme="bold"] .foot {
  border-top: 0;
  font-weight: 800;
  color: var(--ink);
}

/* =====================================================================
   4. SWISS: International Typographic Style (Swiss posters, 1950s-1970s).
      A visible grid, flush-left grotesque type, red and black on off-white, pure geometry, nothing decorative.
   ===================================================================== */
[data-theme="swiss"] {
  --bg: #f1efe9;
  --ink: #111111;
  --muted: #111111;
  --line: #111111;
  --swiss-red: #e3000f;
  --font-display: "Helvetica Neue", Helvetica, "Nimbus Sans", Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, "Nimbus Sans", Arial, sans-serif;
}
[data-theme="swiss"] .brand {
  font-weight: 700;
  letter-spacing: -0.01em;
}
[data-theme="swiss"] .themes span {
  border-radius: 0;
  border-width: 2px;
  font-weight: 700;
  letter-spacing: 0;
}
[data-theme="swiss"] .themes input:checked + span {
  background: var(--swiss-red);
  border-color: var(--swiss-red);
  color: #fff;
}
[data-theme="swiss"] .top {
  border-bottom: 2px solid var(--ink);
}
[data-theme="swiss"] .hero {
  min-height: min(78vh, 52rem);
  overflow: hidden;
}
[data-theme="swiss"] .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 1rem;
}
[data-theme="swiss"] .eyebrow::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  background: var(--swiss-red);
}
[data-theme="swiss"] h1 {
  font-size: clamp(3.6rem, 17vw, 19rem);
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: -0.065em;
  line-height: 0.8;
  margin-left: -0.05em;
}
[data-theme="swiss"] .lede {
  max-width: 22rem;
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 6px solid var(--swiss-red);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}
[data-theme="swiss"] .lede figcaption {
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 700;
  opacity: 1;
}
[data-theme="swiss"] .lede figcaption::before {
  content: "";
}
[data-theme="swiss"] .lede cite {
  font-style: normal;
  font-weight: 400;
}
[data-theme="swiss"] .art-swiss {
  display: block;
  right: 0;
  top: 0;
  width: min(56vw, 680px);
}
.sw-grid line { stroke: #111; stroke-width: 1; opacity: 0.18; }
.sw-red { fill: #e3000f; mix-blend-mode: multiply; }
.sw-black { fill: #111; mix-blend-mode: multiply; }
.sw-white { fill: #f1efe9; }

[data-theme="swiss"] .projects > h2 {
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  font-size: 1rem;
  color: var(--ink);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ink);
}
[data-theme="swiss"] .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
}
[data-theme="swiss"] .card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 19rem;
  padding: 1.25rem 1.5rem 1.5rem 0;
  transition: background-color 0.15s, color 0.15s, padding-left 0.15s;
}
[data-theme="swiss"] .cards li + li .card {
  padding-left: 1.5rem;
  border-left: 2px solid var(--ink);
}
[data-theme="swiss"] .card:hover,
[data-theme="swiss"] .card:focus-visible {
  background: var(--swiss-red);
  color: #fff;
  padding-left: 1.5rem;
}
[data-theme="swiss"] .card-no {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: var(--swiss-red);
  opacity: 1;
}
[data-theme="swiss"] .card:hover .card-no,
[data-theme="swiss"] .card:focus-visible .card-no {
  color: #fff;
}
[data-theme="swiss"] .card-body {
  margin-top: auto;
  padding-top: 2rem;
}
[data-theme="swiss"] .card-name {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  letter-spacing: -0.035em;
}
[data-theme="swiss"] .card-desc {
  font-size: 0.95rem;
  line-height: 1.35;
  opacity: 1;
}
[data-theme="swiss"] .card-meta {
  margin-top: 1.25rem;
  padding-top: 0.6rem;
  border-top: 2px solid currentColor;
  font-weight: 700;
}
[data-theme="swiss"] .live {
  border-radius: 0;
  border-width: 2px;
  letter-spacing: 0.02em;
}
[data-theme="swiss"] .foot {
  border-top: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
}

/* =====================================================================
   5. ART NOUVEAU: deep green and gold, a Mucha-style halo with lilies and whiplash stems,
      ornamental frames, arched cards and the Federo face (inspired by period lettering)
   ===================================================================== */
@font-face {
  font-family: "Federo";
  src: url("fonts/federo.woff2") format("woff2");
  font-display: swap;
  /* The face covers Western Latin; other letters (e.g. Polish ż) fall back to the serif below */
  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;
}
[data-theme="nouveau"] {
  --bg: #14241c;
  --ink: #efe3c6;
  --muted: #c9b88f;
  --line: rgba(200, 162, 76, 0.45);
  --gold: #c8a24c;
  --gold-light: #ecd18a;
  --panel: #1c3327;
  --plum: #6e2f45;
  --font-display: "Federo", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
/* Wallpaper: a faint repeating motif of a stylised flower between curling stems */
[data-theme="nouveau"] body {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><g fill='none' stroke='%23c8a24c' stroke-opacity='0.13' stroke-width='1.4'><path d='M70 10c18 18 18 42 0 60-18-18-18-42 0-60z'/><path d='M70 70c-30 0-40 30-60 30M70 70c30 0 40 30 60 30'/><path d='M0 10c20 10 20 40 0 50M140 10c-20 10-20 40 0 50'/><circle cx='70' cy='105' r='6'/><path d='M70 111v29'/></g></svg>");
}
[data-theme="nouveau"] .brand {
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
}
[data-theme="nouveau"] .themes span {
  border-color: var(--gold);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.06em;
}
[data-theme="nouveau"] .themes input:checked + span {
  background: var(--gold);
  color: #14241c;
}
[data-theme="nouveau"] .hero {
  margin: 0 clamp(0.5rem, 3vw, 2.5rem);
  min-height: min(80vh, 54rem);
  padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4.5rem);
  overflow: hidden;
}
[data-theme="nouveau"] .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--gold-light);
}
[data-theme="nouveau"] .eyebrow::before,
[data-theme="nouveau"] .eyebrow::after {
  content: "❦";
  font-size: 1.2rem;
  letter-spacing: 0;
  color: var(--gold);
}
[data-theme="nouveau"] .eyebrow::before {
  transform: scaleX(-1);
}
[data-theme="nouveau"] h1 {
  font-size: clamp(3.2rem, 13.5vw, 14rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.95;
  padding-bottom: 0.06em;
  background: linear-gradient(175deg, #fff2c4 0%, #ecd18a 30%, #c8a24c 58%, #8f6d26 80%, #e2c47a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}
[data-theme="nouveau"] .lede {
  max-width: 30rem;
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: var(--ink);
}
[data-theme="nouveau"] .lede figcaption {
  font-family: var(--font-display);
  font-style: normal;
  letter-spacing: 0.2em;
  color: var(--gold);
}
[data-theme="nouveau"] .lede figcaption::before {
  content: "❧ ";
  letter-spacing: 0;
}
[data-theme="nouveau"] .art-nouveau {
  display: block;
  inset: 0;
}
[data-theme="nouveau"] .nv-halo {
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  width: min(54vw, 640px);
  height: auto;
}
.nv-whip { fill: none; stroke: #c8a24c; stroke-width: 2.5; opacity: 0.45; }
.nv-whip-thin { stroke-width: 1.2; opacity: 0.35; }
.nv-scallop { fill: none; stroke: #c8a24c; stroke-width: 16; stroke-dasharray: 0.1 21.6; stroke-linecap: round; }
.nv-ring { fill: none; stroke: #c8a24c; stroke-width: 3; }
.nv-ring-thin { stroke-width: 1.3; }
.nv-beads { fill: none; stroke: #ecd18a; stroke-width: 6; stroke-dasharray: 0.1 11.4; stroke-linecap: round; }
.nv-disc { fill: #1c3327; }
.nv-mosaic { fill: none; stroke: #6e2f45; stroke-width: 36; stroke-dasharray: 18 4; opacity: 0.85; }
.nv-inner { fill: #234033; }
.nv-rays path { stroke: #c8a24c; stroke-width: 1.4; opacity: 0.55; }
.nv-stem { fill: none; stroke: #8fa77a; stroke-width: 5; stroke-linecap: round; }
.nv-stem-thin { stroke-width: 3; }
.nv-petal { fill: #efe3c6; stroke: #c8a24c; stroke-width: 2; }
.nv-petal-mid { fill: #fbf4e0; }
.nv-stamen { fill: none; stroke: #c8a24c; stroke-width: 1.6; stroke-linecap: round; }
.nv-gold { fill: #ecd18a; }
.nv-leafshape { fill: #4d6e4c; stroke: #8fa77a; stroke-width: 1.6; }
.nv-vein { fill: none; stroke: #b8cba2; stroke-width: 1.1; }
.nv-flowerpetal { fill: #c8a24c; stroke: #ecd18a; stroke-width: 1; }
.nv-jewel { fill: #6e2f45; stroke: #ecd18a; stroke-width: 2.5; }

/* The frame: double gold rules on all sides, with a flourish in every corner */
[data-theme="nouveau"] .nv-frame {
  position: absolute;
  inset: 0.75rem;
  border: 2px solid var(--gold);
  outline: 1px solid var(--line);
  outline-offset: 7px;
  border-radius: 4px;
}
[data-theme="nouveau"] .nv-corner {
  position: absolute;
  width: clamp(56px, 8vw, 110px);
  height: auto;
  fill: none;
  stroke: var(--gold-light);
  stroke-width: 2.2;
  stroke-linecap: round;
}
[data-theme="nouveau"] .nv-corner circle {
  fill: var(--gold-light);
  stroke: none;
}
.nv-tl { left: 0; top: 0; }
.nv-tr { right: 0; top: 0; transform: scaleX(-1); }
.nv-bl { left: 0; bottom: 0; transform: scaleY(-1); }
.nv-br { right: 0; bottom: 0; transform: scale(-1, -1); }

[data-theme="nouveau"] .projects > h2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--gold-light);
}
[data-theme="nouveau"] .projects > h2::before,
[data-theme="nouveau"] .projects > h2::after {
  content: "";
  flex: 1;
  height: 7px;
  border-block: 1px solid var(--gold);
}
[data-theme="nouveau"] .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
}
/* Cards are arched windows: a rounded top, a double gold border and a small lily above the name */
[data-theme="nouveau"] .card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  min-height: 23rem;
  padding: 4.5rem 1.75rem 1.75rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(236, 209, 138, 0.16), transparent 60%),
    var(--panel);
  border: 2px solid var(--gold);
  border-radius: 999px 999px 10px 10px / 220px 220px 10px 10px;
  outline: 1px solid var(--line);
  outline-offset: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
[data-theme="nouveau"] .card::before {
  content: "";
  position: absolute;
  top: 1.4rem;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translateX(-50%);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46'><g fill='none' stroke='%23ecd18a' stroke-width='1.6' stroke-linecap='round'><path d='M23 44V20'/><path d='M23 20c-8-4-10-12-4-18 1 8 3 12 4 18z' fill='%23efe3c6'/><path d='M23 20c8-4 10-12 4-18-1 8-3 12-4 18z' fill='%23efe3c6'/><path d='M23 34c-6-6-14-4-18 0 6 2 12 2 18 0zM23 34c6-6 14-4 18 0-6 2-12 2-18 0z' fill='%234d6e4c'/></g></svg>") center / contain no-repeat;
}
[data-theme="nouveau"] .card:hover,
[data-theme="nouveau"] .card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px var(--gold), 0 18px 40px -12px rgba(0, 0, 0, 0.6), 0 0 40px -6px rgba(236, 209, 138, 0.35);
}
[data-theme="nouveau"] .card-no {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--gold);
  opacity: 1;
}
[data-theme="nouveau"] .card-body {
  margin: auto 0;
  padding: 1.25rem 0;
}
[data-theme="nouveau"] .card-name {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--gold-light);
}
[data-theme="nouveau"] .card-desc {
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
  color: var(--ink);
  opacity: 0.88;
}
[data-theme="nouveau"] .card-meta {
  width: 100%;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--gold);
}
[data-theme="nouveau"] .live {
  display: flex;
  width: fit-content;
  margin: 0.6rem auto 0;
  border-color: var(--gold);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 400;
}
[data-theme="nouveau"] .foot {
  justify-content: center;
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  color: var(--gold);
  border-top: 1px solid var(--line);
}

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .hero {
    min-height: 0;
    padding-top: 3rem;
  }
  [data-theme="midcentury"] .art-midcentury {
    width: 82vw;
    right: -18vw;
    top: -1rem;
    opacity: 0.9;
  }
  [data-theme="japandi"] .art-japandi {
    width: 78vw;
    right: -12vw;
    top: 0;
    bottom: auto;
    opacity: 0.55;
  }
  [data-theme="japandi"] .card,
  [data-theme="bold"] .card {
    grid-template-columns: 2.4rem 1fr;
  }
  [data-theme="japandi"] .card-meta,
  [data-theme="bold"] .card-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  [data-theme="bold"] h1 {
    font-size: 14vw;
  }
  [data-theme="bold"] .card-go {
    font-size: 2rem;
  }
  [data-theme="swiss"] .art-swiss {
    width: 92vw;
    right: -30vw;
    opacity: 0.9;
  }
  [data-theme="swiss"] .cards li + li .card {
    padding-left: 0;
    border-left: 0;
    border-top: 2px solid var(--ink);
  }
  [data-theme="nouveau"] .nv-halo {
    width: 110vw;
    right: -40vw;
    top: 32%;
    opacity: 0.55;
  }
  [data-theme="nouveau"] .eyebrow {
    letter-spacing: 0.25em;
  }
}

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
