/* ============================================
   Theme: pastel-os
   Light desktop of white window cards on a
   periwinkle dotted-grid wallpaper. Blue /
   amber / navy traffic dots, Geist Mono chrome,
   Sentient italic giant word.
   ============================================ */

/* ---------- custom properties (light) ---------- */
html[data-theme="pastel-os"] {
  --bg: #EEF1F8;                 /* wallpaper */
  --grid-dot: #DCE2F0;           /* wallpaper dots */
  --window: #FFFFFF;             /* window body */
  --titlebar: #F6F8FD;           /* title bar strip */
  --hairline: #D8DEEC;           /* window border */
  --ink: #16233B;                /* primary text */
  --ink-soft: #4A5878;           /* secondary text */
  --ink-faint: #7C89A6;          /* tertiary text */
  --blue: #007CFF;               /* accent */
  --sky: #00A1FF;
  --ice: #7DC4FF;
  --navy: #002E58;
  --amber: #FFB020;
  --paper: #FAF9F5;              /* manifesto warm paper */
  --rule-line: rgba(0, 124, 255, 0.05);
  --row-line: #EFF2F9;
  --radius: 14px;
  --window-shadow: 0 1px 0 rgba(22, 35, 59, 0.04), 0 12px 32px -18px rgba(0, 46, 88, 0.18);
  --dot-ring: rgba(0, 46, 88, 0.15);

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

  background-color: var(--bg);
}

/* ---------- page ---------- */
html[data-theme="pastel-os"] body {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

/* fixed wallpaper: periwinkle dot grid stays put while windows scroll */
html[data-theme="pastel-os"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
}

html[data-theme="pastel-os"] ::selection {
  background: var(--ice);
  color: var(--navy);
}

html[data-theme="pastel-os"] main,
html[data-theme="pastel-os"] .site-footer {
  max-width: 900px;
  margin: 0 auto;
  padding-left: clamp(14px, 3vw, 32px);
  padding-right: clamp(14px, 3vw, 32px);
}

html[data-theme="pastel-os"] .site-nav {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px) clamp(14px, 3vw, 32px) 0;
}

/* ---------- menu bar ---------- */
html[data-theme="pastel-os"] .site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 5vw, 56px);
}
html[data-theme="pastel-os"] .wordmark {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--navy);
}
html[data-theme="pastel-os"] .wordmark sup {
  color: var(--blue);
  font-size: 0.6em;
}
html[data-theme="pastel-os"] .site-nav nav {
  display: flex;
  gap: clamp(10px, 2.5vw, 24px);
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
}
html[data-theme="pastel-os"] .site-nav nav a {
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
html[data-theme="pastel-os"] .site-nav nav a::before {
  content: '▸ ';
  color: var(--blue);
}
html[data-theme="pastel-os"] .site-nav nav a:hover {
  color: var(--navy);
  background: var(--window);
  border-color: var(--hairline);
}

/* ---------- window component ---------- */
html[data-theme="pastel-os"] .hero,
html[data-theme="pastel-os"] .manifesto,
html[data-theme="pastel-os"] .index-section {
  background: var(--window);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--window-shadow);
  overflow: hidden;
  margin-bottom: clamp(22px, 4vw, 40px);
}

/* title bar: dots painted as background, title text from data-window */
html[data-theme="pastel-os"] .hero::before,
html[data-theme="pastel-os"] .manifesto::before,
html[data-theme="pastel-os"] .index-section::before {
  content: attr(data-window);
  display: block;
  height: 34px;
  padding: 0 14px 0 68px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 34px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  background: var(--titlebar);
  border-bottom: 1px solid var(--hairline);
  background-image:
    radial-gradient(circle at 19px 17px, var(--blue) 0 4.5px, var(--dot-ring) 4.5px 5.5px, transparent 5.5px),
    radial-gradient(circle at 35px 17px, var(--amber) 0 4.5px, var(--dot-ring) 4.5px 5.5px, transparent 5.5px),
    radial-gradient(circle at 51px 17px, var(--navy) 0 4.5px, var(--dot-ring) 4.5px 5.5px, transparent 5.5px);
  background-repeat: no-repeat;
}
html[data-theme="pastel-os"] .hero::after,
html[data-theme="pastel-os"] .manifesto::after,
html[data-theme="pastel-os"] .index-section::after {
  content: none;
}

/* ---------- hero window ---------- */
html[data-theme="pastel-os"] .hero-meta {
  font-family: var(--mono);
  font-size: clamp(11.5px, 1.4vw, 13px);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: clamp(28px, 5vw, 64px) clamp(22px, 4.5vw, 56px) 0;
  margin-bottom: clamp(20px, 3vw, 34px);
}
html[data-theme="pastel-os"] .status-dot {
  background: var(--blue);
}
/* blinking blue cursor block after the status line */
html[data-theme="pastel-os"] .hero-meta::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--blue);
  animation: blink 1.1s steps(1) infinite;
}

html[data-theme="pastel-os"] .the-word {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.4rem, 9vw, 8rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--navy);
  padding: 0 clamp(22px, 4.5vw, 56px);
  margin-bottom: clamp(24px, 4vw, 44px);
  overflow-wrap: break-word;
}

/* dictionary card */
html[data-theme="pastel-os"] .dict-entry {
  margin: 0 clamp(22px, 4.5vw, 56px) clamp(28px, 5vw, 64px);
  border-top: 1px dashed var(--hairline);
  padding-top: clamp(18px, 3vw, 28px);
  max-width: 640px;
}
html[data-theme="pastel-os"] .phonetic {
  font-family: var(--mono);
  font-size: clamp(12px, 1.5vw, 13.5px);
  color: var(--ink-faint);
  margin-bottom: 14px;
}
html[data-theme="pastel-os"] .phonetic em {
  color: var(--blue);
  font-style: italic;
}
html[data-theme="pastel-os"] .definitions {
  list-style: none;
  counter-reset: def;
}
html[data-theme="pastel-os"] .definitions li {
  counter-increment: def;
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.9vw, 1.2rem);
  line-height: 1.35;
  color: var(--ink);
}
html[data-theme="pastel-os"] .definitions li::before {
  content: counter(def) '.';
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  flex: 0 0 auto;
}
html[data-theme="pastel-os"] .caret {
  background: var(--blue);
}

/* ---------- manifesto window ---------- */
html[data-theme="pastel-os"] .manifesto {
  text-align: center;
}
html[data-theme="pastel-os"] .manifesto .band-kicker {
  font-family: var(--mono);
  font-size: clamp(11px, 1.4vw, 12.5px);
  color: var(--ink-faint);
  margin-bottom: 18px;
}
html[data-theme="pastel-os"] .manifesto .band-line {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.7vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
  max-width: 22ch;
  margin: 0 auto;
}
/* warm paper body with ruled lines, applied to both paragraphs' box */
html[data-theme="pastel-os"] .manifesto .band-kicker,
html[data-theme="pastel-os"] .manifesto .band-line {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 27px, var(--rule-line) 27px, var(--rule-line) 28px),
    var(--paper);
}
html[data-theme="pastel-os"] .manifesto .band-kicker {
  padding: clamp(36px, 6vw, 72px) clamp(20px, 4vw, 48px) 0;
  margin-bottom: 0;
}
html[data-theme="pastel-os"] .manifesto .band-line {
  max-width: none;
  padding: 18px clamp(20px, 4vw, 48px) clamp(36px, 6vw, 72px);
}
/* ---------- index sections ---------- */
html[data-theme="pastel-os"] .index-section .section-head {
  padding: clamp(22px, 4.5vw, 52px) clamp(22px, 4.5vw, 52px) 0;
}
html[data-theme="pastel-os"] .index-section .entry-list {
  padding: 0 clamp(22px, 4.5vw, 52px) clamp(22px, 4.5vw, 52px);
}

html[data-theme="pastel-os"] .section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: clamp(18px, 3vw, 28px);
}
html[data-theme="pastel-os"] .section-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  border: 1px solid var(--hairline);
  background: var(--titlebar);
  border-radius: 6px;
  padding: 3px 8px;
}
html[data-theme="pastel-os"] .section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.9vw, 1.85rem);
  letter-spacing: -0.02em;
  color: var(--navy);
}
html[data-theme="pastel-os"] .section-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  margin-left: auto;
}

/* entry rows — folder listings */
html[data-theme="pastel-os"] .entry-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 13px 12px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
html[data-theme="pastel-os"] .entry-list li + li a {
  border-top: 1px solid var(--row-line);
}
html[data-theme="pastel-os"] .entry-list a:hover {
  background: var(--titlebar);
}
html[data-theme="pastel-os"] .entry-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--sky);
  flex: 0 0 3.2em;
}
html[data-theme="pastel-os"] .entry-title {
  font-size: clamp(14px, 1.8vw, 15.5px);
  color: var(--ink);
  font-weight: 500;
  flex: 1 1 auto;
  transition: color 0.15s ease;
}
html[data-theme="pastel-os"] .entry-list a:hover .entry-title {
  color: var(--blue);
}
html[data-theme="pastel-os"] .entry-date,
html[data-theme="pastel-os"] .entry-tag {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  flex: 0 0 auto;
  text-align: right;
}
html[data-theme="pastel-os"] .entry-date::before,
html[data-theme="pastel-os"] .entry-tag::before {
  content: '— ';
}

/* ---------- footer ---------- */
html[data-theme="pastel-os"] .site-footer {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  padding-bottom: 64px;
}
html[data-theme="pastel-os"] .site-footer p { margin-bottom: 6px; }
html[data-theme="pastel-os"] .site-footer em {
  color: var(--blue);
  font-style: italic;
}
html[data-theme="pastel-os"] .site-footer .colophon {
  color: var(--ink-faint);
}
html[data-theme="pastel-os"] #theme-controls {
  color: var(--ink-soft);
}
html[data-theme="pastel-os"] #theme-controls .tc-current {
  color: var(--blue);
}

/* ---------- small screens ---------- */
@media (max-width: 480px) {
  html[data-theme="pastel-os"] .section-note {
    margin-left: 0;
    width: 100%;
  }
  html[data-theme="pastel-os"] .entry-list a {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  html[data-theme="pastel-os"] .entry-date,
  html[data-theme="pastel-os"] .entry-tag {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="pastel-os"] .hero-meta::after { animation: none; }
}

/* ============================================
   Dark mode — soft navy night desktop
   ============================================ */
html[data-theme="pastel-os"][data-mode="dark"] {
  --bg: #161A24;
  --grid-dot: #232A3A;
  --window: #1F2531;
  --titlebar: #242B3A;
  --hairline: #333B4D;
  --ink: #E4E8F2;
  --ink-soft: #9AA3B5;
  --ink-faint: #6E7890;
  --blue: #6FB2FF;
  --sky: #6FB2FF;
  --ice: #33507A;
  --navy: #E4E8F2;
  --amber: #FFB020;
  --paper: #232936;
  --rule-line: rgba(111, 178, 255, 0.06);
  --row-line: #2A3243;
  --window-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 12px 32px -18px rgba(0, 0, 0, 0.55);
  --dot-ring: rgba(0, 0, 0, 0.35);
}

/* keep the navy traffic dot visible against the dark title bar */
html[data-theme="pastel-os"][data-mode="dark"] .hero::before,
html[data-theme="pastel-os"][data-mode="dark"] .manifesto::before,
html[data-theme="pastel-os"][data-mode="dark"] .index-section::before {
  background-image:
    radial-gradient(circle at 19px 17px, #007CFF 0 4.5px, var(--dot-ring) 4.5px 5.5px, transparent 5.5px),
    radial-gradient(circle at 35px 17px, #FFB020 0 4.5px, var(--dot-ring) 4.5px 5.5px, transparent 5.5px),
    radial-gradient(circle at 51px 17px, #3D6CA8 0 4.5px, var(--dot-ring) 4.5px 5.5px, transparent 5.5px);
}
