/* ============================================================
   Isaacacious — skin: sunroom
   Warm cream + navy ink + brand blue + sunny amber.
   Light rules first (custom properties on the scope root),
   then a compact dark section overriding them.
   ============================================================ */

/* ---------- light: custom properties ---------- */
html[data-theme="sunroom"] {
  color-scheme: light;

  --serif: "Sentient", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
  --mono: "Geist Mono", Menlo, monospace;

  --bg: #FFF8EC;            /* cream */
  --surface: #FFFDF7;       /* card */
  --text: #002E58;          /* navy ink */
  --ink: rgba(0, 46, 88, .66);
  --line: rgba(0, 46, 88, .13);
  --line-soft: rgba(0, 46, 88, .08);

  --blue: #007CFF;
  --amber: #FFB020;
  --amber-soft: #FFE9BE;
  --amber-pale: #FFF1D3;
  --amber-line: #F0D49B;
  --amber-ink: #8A5A00;
  --amber-halo: #FFF1D3;

  --band-bg: #FFEFCB;
  --band-line: #F3DCA9;
  --row-hover: #FFF3DD;
  --tag-bg: #F2F8FF;
  --tag-line: rgba(0, 124, 255, .38);
  --highlight: #FFD98A;
  --caret: #FFB020;

  --sel-bg: #FFD98A;
  --sel-fg: #002E58;
}

/* ---------- base canvas ---------- */
html[data-theme="sunroom"] body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  overflow-x: clip;
}

html[data-theme="sunroom"] ::selection {
  background: var(--sel-bg);
  color: var(--sel-fg);
}

/* ---------- nav ---------- */
html[data-theme="sunroom"] .site-nav {
  max-width: 840px;
  margin: 0 auto;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

html[data-theme="sunroom"] .wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
}
html[data-theme="sunroom"] .wordmark sup {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10px;
  color: var(--blue);
  margin-left: 2px;
  letter-spacing: 0;
}

html[data-theme="sunroom"] .site-nav nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
html[data-theme="sunroom"] .site-nav nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 7px 14px;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
html[data-theme="sunroom"] .site-nav nav a:hover {
  background: var(--amber-pale);
  color: var(--text);
}

/* ---------- layout: single column, full-width stacked cards ---------- */
html[data-theme="sunroom"] main {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 28px;
}
html[data-theme="sunroom"] .hero,
html[data-theme="sunroom"] .manifesto,
html[data-theme="sunroom"] .index-section {
  margin-bottom: 56px;
}

/* ---------- hero ---------- */
html[data-theme="sunroom"] .hero {
  position: relative;
  padding: 72px 0 0;
}

/* pale halo behind the sun */
html[data-theme="sunroom"] .hero::before {
  content: "";
  position: absolute;
  top: -16px;
  right: -44px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--amber-halo);
  pointer-events: none;
}

/* slowly-rotating line-art sun */
html[data-theme="sunroom"] .hero::after {
  content: "";
  position: absolute;
  top: 30px;
  right: 2px;
  width: 128px;
  height: 128px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none'%3E%3Cg stroke='%23FFB020' stroke-width='5' stroke-linecap='round'%3E%3Cline x1='50' y1='8' x2='50' y2='20'/%3E%3Cline x1='50' y1='80' x2='50' y2='92'/%3E%3Cline x1='8' y1='50' x2='20' y2='50'/%3E%3Cline x1='80' y1='50' x2='92' y2='50'/%3E%3Cline x1='20.3' y1='20.3' x2='28.8' y2='28.8'/%3E%3Cline x1='71.2' y1='71.2' x2='79.7' y2='79.7'/%3E%3Cline x1='20.3' y1='79.7' x2='28.8' y2='71.2'/%3E%3Cline x1='71.2' y1='28.8' x2='79.7' y2='20.3'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='17' fill='%23FFB020'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: sunroom-spin 56s linear infinite;
}
@keyframes sunroom-spin { to { transform: rotate(360deg); } }

html[data-theme="sunroom"] .hero-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 150px);
}
html[data-theme="sunroom"] .status-dot { background: var(--amber); }

/* tilted amber construction pill */
html[data-theme="sunroom"] .hero-meta::after {
  content: "always sunny";
  display: inline-block;
  background: var(--amber);
  color: var(--text);
  font-weight: 500;
  font-size: 12px;
  padding: 3px 11px;
  border-radius: 999px;
  transform: rotate(-1.6deg);
}

/* the giant word, ending with a period on an amber sun-disc */
html[data-theme="sunroom"] .the-word {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 8rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-top: 30px;
  white-space: nowrap;
}
html[data-theme="sunroom"] .the-word::after {
  content: ".";
  position: relative;
  z-index: 0;
  padding: 0 .15em;
  background: radial-gradient(circle at 50% 68%, var(--amber) 0 .27em, transparent .29em);
}

/* ---------- dictionary card ---------- */
html[data-theme="sunroom"] .dict-entry {
  margin-top: 46px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 34px;
  max-width: 680px;
}

html[data-theme="sunroom"] .phonetic {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
}
html[data-theme="sunroom"] .phonetic em {
  color: var(--blue);
  font-style: italic;
}

/* etymology pill under the phonetic line */
html[data-theme="sunroom"] .phonetic::after {
  content: "isaac + audacious + vivacious + tenacious";
  display: block;
  width: fit-content;
  margin-top: 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--amber-ink);
  background: var(--amber-pale);
  border: 1px solid var(--amber-line);
  padding: 7px 16px;
  border-radius: 999px;
  transform: rotate(-1deg);
}

html[data-theme="sunroom"] .definitions {
  margin-top: 18px;
  padding-top: 18px;
  padding-left: 1.5em;
  border-top: 1px solid var(--line);
}
html[data-theme="sunroom"] .definitions li {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.45;
}
html[data-theme="sunroom"] .definitions li + li { margin-top: 10px; }
html[data-theme="sunroom"] .definitions li::marker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--amber-ink);
}
html[data-theme="sunroom"] #rotating-def {
  border-bottom: 2px dotted var(--amber);
}
html[data-theme="sunroom"] .caret { background: var(--caret); }

/* ---------- manifesto band ---------- */
html[data-theme="sunroom"] .manifesto {
  background: var(--band-bg);
  border: 1px solid var(--band-line);
  border-radius: 26px;
  padding: clamp(36px, 6vw, 60px) clamp(28px, 5vw, 56px);
}
html[data-theme="sunroom"] .band-kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-ink);
}
html[data-theme="sunroom"] .band-line {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin-top: 16px;
  max-width: 24ch;
}
/* marker-style highlight swash across the "…A world —" line */
html[data-theme="sunroom"] .band-line::first-line {
  background: linear-gradient(180deg, transparent 60%, var(--highlight) 60%, var(--highlight) 94%, transparent 94%);
}

/* ---------- index sections ---------- */
html[data-theme="sunroom"] .section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
html[data-theme="sunroom"] .section-no {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
  background: var(--amber);
  border-radius: 10px;
  padding: 5px 9px;
}
html[data-theme="sunroom"] .section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
}
html[data-theme="sunroom"] .section-note {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  text-align: right;
}

html[data-theme="sunroom"] .entry-list li + li {
  border-top: 1px solid var(--line-soft);
}
html[data-theme="sunroom"] .entry-list a {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 17px 34px 17px 12px;
  border-radius: 14px;
  position: relative;
  transition: background .18s ease;
}
html[data-theme="sunroom"] .entry-list a:hover { background: var(--row-hover); }
html[data-theme="sunroom"] .entry-list a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
html[data-theme="sunroom"] .entry-list a::after {
  content: "→";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translate(4px, -50%);
  color: var(--blue);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  font-size: 14px;
}
html[data-theme="sunroom"] .entry-list a:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

html[data-theme="sunroom"] .entry-id {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--blue);
  min-width: 46px;
}
/* user feedback fix: ~10% larger entry titles, airy rows */
html[data-theme="sunroom"] .entry-title {
  flex: 1 1 55%;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}
html[data-theme="sunroom"] .entry-date,
html[data-theme="sunroom"] .entry-tag {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
html[data-theme="sunroom"] .entry-date {
  background: var(--amber-pale);
  border: 1px solid var(--amber-line);
  color: var(--amber-ink);
}
html[data-theme="sunroom"] .entry-tag {
  background: var(--tag-bg);
  border: 1px solid var(--tag-line);
  color: var(--blue);
}

/* ---------- footer ---------- */
html[data-theme="sunroom"] .site-footer {
  max-width: 840px;
  margin: 104px auto 0;
  border-top: 1px solid var(--line);
  padding: 28px 28px 44px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
}
html[data-theme="sunroom"] .site-footer em { color: var(--amber-ink); }
html[data-theme="sunroom"] .colophon {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
  text-align: right;
}
html[data-theme="sunroom"] #theme-controls {
  color: var(--ink);
  width: 100%;
}
html[data-theme="sunroom"] #theme-controls #theme-name { color: var(--ink); }
html[data-theme="sunroom"] #theme-controls button:hover {
  border-color: var(--amber);
  color: var(--amber-ink);
}

/* ---------- responsive ---------- */
@media (max-width: 560px) {
  html[data-theme="sunroom"] .site-nav { padding: 20px; }
  html[data-theme="sunroom"] main { padding: 0 20px; }
  html[data-theme="sunroom"] .hero { padding-top: 52px; }
  html[data-theme="sunroom"] .hero::before {
    top: -6px; right: -26px; width: 150px; height: 150px;
  }
  html[data-theme="sunroom"] .hero::after {
    width: 84px; height: 84px; top: 16px; right: 0;
  }
  html[data-theme="sunroom"] .hero-meta { max-width: calc(100% - 100px); }
  html[data-theme="sunroom"] .dict-entry { padding: 24px 22px; }
  html[data-theme="sunroom"] .definitions li { font-size: 18px; }
  html[data-theme="sunroom"] .section-note { display: none; }
  html[data-theme="sunroom"] .site-footer { padding: 24px 20px 40px; }
  html[data-theme="sunroom"] .colophon { text-align: left; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="sunroom"] .hero::after { animation: none; }
  html[data-theme="sunroom"] .entry-list a,
  html[data-theme="sunroom"] .entry-list a::after,
  html[data-theme="sunroom"] .site-nav nav a { transition: none; }
}

/* ============================================================
   dark mode — warm cocoa, never pure black
   ============================================================ */
html[data-theme="sunroom"][data-mode="dark"] {
  color-scheme: dark;

  /* cool night slate — the same room after sunset */
  --bg: #12161F;
  --surface: #1A212C;
  --text: #E9EDF4;
  --ink: #8B96A8;
  --line: #2A3342;
  --line-soft: #222A38;

  --blue: #6FB2FF;
  /* amber stays warm: the lamp that bridges day and night */
  --amber: #FFB020;
  --amber-soft: #302A1C;
  --amber-pale: #302A1C;
  --amber-line: #4E4426;
  --amber-ink: #FFC25E;
  --amber-halo: #232A38;

  --band-bg: #1B2431;
  --band-line: #2E3A4E;
  --row-hover: #1E2632;
  --tag-bg: rgba(111, 178, 255, .10);
  --tag-line: rgba(111, 178, 255, .35);
  --highlight: rgba(255, 176, 32, .38);

  --sel-bg: rgba(255, 176, 32, .35);
  --sel-fg: #FFF4DE;
}

/* amber pills keep dark night-slate text so the glow stays readable */
html[data-theme="sunroom"][data-mode="dark"] .hero-meta::after,
html[data-theme="sunroom"][data-mode="dark"] .section-no {
  color: #12161F;
}


/* ============================================================
   dark mode — night sky: the sun sets, a moon rises
   ============================================================ */

/* a few quiet stars, only at night */
html[data-theme="sunroom"][data-mode="dark"] .hero {
  background:
    radial-gradient(circle 2px at 12% 22%, rgba(255, 244, 222, .8) 50%, transparent 51%),
    radial-gradient(circle 1.5px at 30% 8%, rgba(255, 244, 222, .55) 50%, transparent 51%),
    radial-gradient(circle 1.5px at 58% 12%, rgba(255, 244, 222, .4) 50%, transparent 51%);
}

/* soft moon glow replaces the sun halo */
html[data-theme="sunroom"][data-mode="dark"] .hero::before {
  top: -36px;
  right: -64px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 207, 107, .14) 0%, transparent 70%);
}

/* the sun-room pill keeps night hours */
html[data-theme="sunroom"][data-mode="dark"] .hero-meta::after {
  content: "open late";
}

/* crescent moon: a cream disc with a mask-cut bite; it does not spin */
html[data-theme="sunroom"][data-mode="dark"] .hero::after {
  top: 36px;
  width: 112px;
  height: 112px;
  background: radial-gradient(circle, #FFCF6B 0 45%, transparent 46%);
  -webkit-mask-image: radial-gradient(circle at 66% 36%, transparent 0 40%, #000 41%);
  mask-image: radial-gradient(circle at 66% 36%, transparent 0 40%, #000 41%);
  animation: none;
}
