:root {
  --parchment: #F9F5F0;
  --walnut: #252126;
  --stone: #665F65;
  --accent: #955087;
  --glow: rgba(149, 80, 135, 0.10);
  --web-opacity: 0.05;
  --icon-shadow: rgba(37, 33, 38, 0.14);
  --rule: rgba(102, 95, 101, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root {
    --parchment: #14110F;
    --walnut: #F4EBDF;
    --stone: #A89E94;
    --accent: #C476B4;
    --glow: rgba(196, 118, 180, 0.10);
    --web-opacity: 0.07;
    --icon-shadow: rgba(0, 0, 0, 0.55);
    --rule: rgba(168, 158, 148, 0.22);
  }
}

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

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

body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--parchment);
  color: var(--walnut);
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 0.15em; }

/* Header */
.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  max-width: 48rem;
  width: 100%;
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 22.5%;
  box-shadow: 0 2px 8px var(--icon-shadow);
}
.site-nav { display: flex; gap: 1.25rem; font-size: 0.9375rem; }
.site-nav a { color: var(--stone); }
.site-nav a[aria-current="page"] { color: var(--walnut); font-weight: 600; }

/* Home hero */
.glow, .web {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.glow { background: radial-gradient(circle at 50% 44%, var(--glow) 0%, transparent 58%); }
.web { width: 100%; height: 100%; color: var(--stone); opacity: var(--web-opacity); }

.hero {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
}
.icon {
  width: 160px;
  height: 160px;
  border-radius: 22.5%;
  border: 1px solid var(--rule);
  box-shadow: 0 12px 32px var(--icon-shadow);
  display: block;
}
.hero h1 {
  margin-top: 2rem;
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1;
}
.tagline {
  margin-top: 0.875rem;
  font-size: 1.125rem;
  color: var(--stone);
  max-width: 24rem;
}
.subline { margin-top: 0.5rem; font-size: 1rem; color: var(--stone); }
.maker { margin-top: 2.5rem; font-size: 1rem; color: var(--stone); }

/* Inner pages */
.page {
  width: 100%;
  min-width: 0;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  flex: 1;
}
.page h1 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}
.page h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}
.page a:not(.big-link) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
.page p, .page ul { margin-bottom: 1rem; }
.page ul { padding-left: 1.25rem; }
.page li { margin-bottom: 0.375rem; }
.lede { font-size: 1.125rem; color: var(--stone); margin-bottom: 1.5rem; }
.meta { font-size: 0.875rem; color: var(--stone); margin-bottom: 1.5rem; }
.note {
  font-size: 0.9375rem;
  color: var(--stone);
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 0.875rem;
  margin-bottom: 1.5rem;
}
.quote { margin: 1.5rem 0; }
.quote blockquote {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--walnut);
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
}
.quote figcaption {
  margin-top: 0.5rem;
  padding-left: calc(1rem + 3px);
  font-size: 0.9375rem;
  color: var(--stone);
}
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  min-width: 0;
  gap: 1.25rem;
  margin: 1.5rem 0 1rem;
}
.photo { margin: 0; min-width: 0; max-width: 100%; }
.photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--rule);
  box-shadow: 0 8px 24px var(--icon-shadow);
}
.photo figcaption {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
  color: var(--stone);
}
.not-found { text-align: center; padding-top: 3rem; }
.not-found .icon { margin: 0 auto 1.5rem; width: 112px; height: 112px; }
.big-link {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.5rem 0 1.5rem;
  word-break: break-all;
}

/* Footer */
.site-footer {
  position: relative;
  text-align: center;
  padding: 1.5rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--stone);
  border-top: 1px solid var(--rule);
}
.site-footer a { color: var(--stone); }
.site-footer .sep { margin: 0 0.5rem; opacity: 0.6; }
.site-footer p + p { margin-top: 0.375rem; }

@media (max-width: 420px) {
  .icon { width: 128px; height: 128px; }
  .hero h1 { font-size: 2.25rem; }
  .tagline { font-size: 1rem; }
  .page h1 { font-size: 1.75rem; }
  .big-link { font-size: 1.25rem; }
  .site-nav { gap: 0.875rem; font-size: 0.875rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .rise {
    opacity: 0;
    transform: translateY(10px);
    animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .rise:nth-child(2) { animation-delay: 0.15s; }
  .rise:nth-child(3) { animation-delay: 0.3s; }
  .rise:nth-child(4) { animation-delay: 0.45s; }
  .rise:nth-child(5) { animation-delay: 0.6s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  .web { opacity: 0; animation: spin-web 1.6s ease-out 0.2s forwards; }
  @keyframes spin-web { to { opacity: var(--web-opacity); } }
}
