/* hanatsumi · faded mall edition
   nostalgia for an unrealised future. dusty pinks, teals, the glow of a CRT
   left on too long. EB Garamond for body, VT323 for display. dark by default.
*/

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=VT323&display=swap');

:root {
  color-scheme: dark;
  --bg: #1a1530;
  --bg-deep: #0f0a22;
  --text: #e8d8e8;
  --muted: #8a7aa8;
  --accent: #ff8fc7;
  --accent-soft: #c89aff;
  --teal: #6dd9d2;
  --rule: #3a2c5c;
  --glow-pink: 0 0 12px rgba(255, 143, 199, 0.45);
  --glow-teal: 0 0 10px rgba(109, 217, 210, 0.35);
}

/* light mode if user really insists — softer, gallery-poster feel */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #1a1530;
    --bg-deep: #0f0a22;
    --text: #e8d8e8;
    --muted: #8a7aa8;
    --accent: #ff8fc7;
    --accent-soft: #c89aff;
    --teal: #6dd9d2;
    --rule: #3a2c5c;
    --glow-pink: 0 0 12px rgba(255, 143, 199, 0.45);
    --glow-teal: 0 0 10px rgba(109, 217, 210, 0.35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ---- Background: dusty gradient sky + faint scanlines ---- */
body {
  font-family: 'EB Garamond', ui-serif, Georgia, "Times New Roman", serif;
  color: var(--text);
  line-height: 1.65;
  font-size: 19px;
  font-feature-settings: "kern", "liga", "onum";
  max-width: 38rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 4rem;
  min-height: 100vh;
  background:
    linear-gradient(180deg,
      var(--bg-deep) 0%,
      var(--bg) 40%,
      #2a1a3e 70%,
      #3d2050 100%);
  background-attachment: fixed;
  position: relative;
}

/* horizon grid — the canonical vaporwave receding plane, fixed at bottom */
body::before {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38vh;
  background-image:
    linear-gradient(transparent 0%, rgba(255, 143, 199, 0.08) 100%),
    linear-gradient(0deg, transparent 0%, var(--bg-deep) 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(5% - 1px),
      rgba(255, 143, 199, 0.12) calc(5% - 1px),
      rgba(255, 143, 199, 0.12) 5%
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent calc(20% - 1px),
      rgba(109, 217, 210, 0.1) calc(20% - 1px),
      rgba(109, 217, 210, 0.1) 20%
    );
  transform: perspective(50vh) rotateX(60deg);
  transform-origin: center bottom;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* very faint scanlines over everything for CRT feel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 3px
  );
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

/* keep content above the decorative layers */
body > * { position: relative; z-index: 2; }

/* ---- Links ---- */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 143, 199, 0.35);
  text-underline-offset: 4px;
  transition: color 0.2s, text-decoration-color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: var(--teal);
  text-decoration-color: var(--teal);
  text-shadow: var(--glow-teal);
}

/* ---- Back link ---- */
.back {
  display: inline-block;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.15rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}

.back:hover {
  color: var(--accent);
  text-shadow: var(--glow-pink);
}

/* ---- Site header ---- */
header.site {
  margin-bottom: 2.5rem;
  position: relative;
}

header.site h1 {
  font-family: 'VT323', ui-monospace, monospace;
  font-weight: 400;
  font-size: 4.2rem;
  margin: 0 0 0.3rem;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--accent);
  text-shadow:
    0 0 1px var(--accent),
    0 0 14px rgba(255, 143, 199, 0.55),
    0 0 28px rgba(255, 143, 199, 0.25);
  /* the canonical vaporwave chromatic-offset, very subtle */
  filter: drop-shadow(1px 0 0 rgba(109, 217, 210, 0.4));
}

header.site .tagline {
  font-style: italic;
  color: var(--accent-soft);
  font-size: 1.1rem;
  margin: 0;
  letter-spacing: 0.02em;
}

/* the floating 花 ornament — quiet, top-right, doesn't interrupt */
header.site::after {
  content: '花';
  position: absolute;
  top: -1.2rem;
  right: -0.5rem;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 5rem;
  color: var(--teal);
  opacity: 0.18;
  text-shadow: var(--glow-teal);
  pointer-events: none;
  z-index: -1;
}

.intro {
  font-style: italic;
  color: var(--muted);
  margin: 0 0 2.5rem;
  font-size: 1.05rem;
}

/* ---- Collection nav (homepage) ---- */
nav.collections { margin: 2.5rem 0 1rem; }

nav.collections ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

nav.collections li {
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background 0.25s;
}

nav.collections li:hover {
  background: linear-gradient(90deg,
    rgba(255, 143, 199, 0.06) 0%,
    rgba(109, 217, 210, 0.04) 100%);
}

nav.collections a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0.5rem;
  text-decoration: none;
  color: var(--text);
  gap: 1rem;
}

nav.collections a:hover {
  color: var(--accent);
  text-shadow: var(--glow-pink);
}

nav.collections .name {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
}

nav.collections .desc {
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
  text-align: right;
}

nav.collections a:hover .desc { color: var(--accent-soft); }

/* ---- Collection list (entries inside a section) ---- */
ul.collection-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

ul.collection-list li {
  border-bottom: 1px solid var(--rule);
  transition: background 0.25s;
}

ul.collection-list li:hover {
  background: linear-gradient(90deg,
    rgba(255, 143, 199, 0.05) 0%,
    transparent 100%);
}

ul.collection-list a {
  display: block;
  padding: 1.2rem 0.5rem;
  text-decoration: none;
  color: var(--text);
}

ul.collection-list a:hover {
  color: var(--accent);
  text-shadow: var(--glow-pink);
}

ul.collection-list .title {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

ul.collection-list .meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  font-family: 'VT323', ui-monospace, monospace;
  letter-spacing: 0.04em;
  font-size: 1rem;
}

ul.collection-list a:hover .meta { color: var(--teal); }

/* ---- Article ---- */
article header {
  margin-bottom: 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}

article header h1 {
  font-family: 'VT323', ui-monospace, monospace;
  font-weight: 400;
  font-size: 2.8rem;
  margin: 0 0 0.4rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: var(--accent);
  text-shadow:
    0 0 10px rgba(255, 143, 199, 0.4),
    0 0 20px rgba(255, 143, 199, 0.15);
}

article header .meta {
  color: var(--muted);
  font-style: italic;
  font-size: 1rem;
  margin: 0;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

article .body p { margin: 0 0 1.2rem; }

article .body blockquote {
  border-left: 2px solid var(--teal);
  padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 1.8rem 0;
  font-style: italic;
  color: var(--text);
  font-size: 1.05rem;
  position: relative;
  box-shadow: -2px 0 8px -2px rgba(109, 217, 210, 0.25);
}

article .body blockquote p { margin: 0 0 0.5rem; }
article .body blockquote p:last-child { margin: 0; }

article .body blockquote cite {
  display: block;
  text-align: right;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.6rem;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

article .body em { font-style: italic; color: var(--accent-soft); }
article .body strong { font-weight: 600; color: var(--accent); }

/* ---- Demo notice ---- */
.demo-notice {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 1.8rem;
  padding: 0.7rem 1rem;
  border-left: 2px solid var(--accent-soft);
  background: rgba(200, 154, 255, 0.06);
  border-radius: 0 4px 4px 0;
}

.demo-notice code {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1em;
  padding: 0 0.3rem;
  background: rgba(255, 143, 199, 0.12);
  color: var(--accent);
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ---- Footer ---- */
footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

footer.site p { margin: 0; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover {
  color: var(--accent);
  text-shadow: var(--glow-pink);
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  body {
    font-size: 18px;
    padding: 2.5rem 1.2rem 3rem;
  }
  header.site h1 { font-size: 3.2rem; }
  header.site::after { font-size: 3.8rem; top: -0.8rem; right: -0.2rem; }
  article header h1 { font-size: 2.2rem; }
  nav.collections a { flex-direction: column; gap: 0.2rem; padding: 1rem 0.4rem; }
  nav.collections .desc { text-align: left; }
  nav.collections .name { font-size: 1.4rem; }
  /* tone the grid down on small screens — too busy otherwise */
  body::before { height: 25vh; opacity: 0.4; }
}

/* respect reduced motion — kill the chromatic offset which can shimmer */
@media (prefers-reduced-motion: reduce) {
  header.site h1 { filter: none; }
  * { transition: none !important; }
}
