:root {
  --bg: #0a0e1c;
  --bg-panel: #131a2e;
  --text: #f5f1e8;
  --text-dim: #8992ad;
  --accent: #b8a4f2;
  --border: #232b45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ---------- header / nav ---------- */

.site-header {
  margin-bottom: 48px;
}

.blurb {
  color: var(--text-dim);
  margin: 0 0 8px;
  font-size: 0.9em;
}

.site-title {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 2em;
  margin: 0 0 18px;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

/* ---------- generic elements ---------- */

h2 {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 1.4em;
  margin: 40px 0 16px;
}

h2:first-of-type {
  margin-top: 0;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--text);
  text-decoration-color: var(--text-dim);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
  transform-origin: left;
  animation: draw-in 0.9s ease-out;
}

@keyframes draw-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- links list ---------- */

.link-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.link-list li {
  border-bottom: 1px solid var(--border);
}

.link-list li:first-child {
  border-top: 1px solid var(--border);
}

.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  text-decoration: none;
  color: var(--text);
}

.link-list a:hover {
  color: var(--accent);
}

.link-list .arrow {
  display: inline-block;
  color: var(--text-dim);
  transition: transform 0.2s ease, color 0.2s ease;
}

.link-list a:hover .arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ---------- blog ---------- */

.post {
  margin-bottom: 44px;
}

.post-date {
  display: block;
  color: var(--text-dim);
  font-size: 0.85em;
  margin-bottom: 4px;
}

.post-title {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  margin: 0 0 10px;
  font-size: 1.4em;
}

.post p:last-child {
  margin-bottom: 0;
}

/* ---------- blog index list ---------- */

.post-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.post-list li {
  border-bottom: 1px solid var(--border);
}

.post-list li:first-child {
  border-top: 1px solid var(--border);
}

.post-list a {
  display: block;
  padding: 14px 2px;
  text-decoration: none;
  color: var(--text);
}

.post-list-date {
  display: block;
  color: var(--text-dim);
  font-size: 0.85em;
  margin-bottom: 4px;
}

.post-list-title {
  display: block;
  font-weight: 500;
}

.post-list a:hover .post-list-date,
.post-list a:hover .post-list-title {
  color: var(--accent);
}

/* ---------- back link (post pages) ---------- */

.back-link {
  display: inline-block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9em;
  margin-bottom: 8px;
}

.back-link:hover {
  color: var(--accent);
}

/* ---------- art gallery ---------- */

.art-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.art-piece img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.art-piece img:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.art-title {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  margin: 12px 0 4px;
  font-size: 1.1em;
}

.art-meta {
  color: var(--text-dim);
  font-size: 0.85em;
  margin: 0 0 6px;
}

.art-blurb {
  margin: 0;
  color: var(--text);
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 64px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85em;
}

.site-footer a {
  color: var(--text-dim);
}

.site-footer a:hover {
  color: var(--accent);
}

/* ---------- accessibility ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- rainbow letters (hover wiggle) ---------- */

.letter {
  display: inline-block;
}

.rainbow:hover .letter {
  animation: wiggle 0.4s ease;
}

@keyframes wiggle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---------- footer pulse dot ---------- */

.footer-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ---------- blurb color-cycling dot ---------- */

.blurb-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-left: 8px;
  vertical-align: middle;
  animation: color-cycle 6s steps(1) infinite;
}

@keyframes color-cycle {
  0% { background: #ffb3d9; }
  25% { background: #c9b6f5; }
  50% { background: #fff2a0; }
  75% { background: #b3f0c4; }
  100% { background: #ffb3d9; }
}

@media (prefers-reduced-motion: reduce) {
  .divider,
  .footer-dot,
  .blurb-dot,
  .rainbow:hover .letter {
    animation: none;
  }
  .art-piece img:hover {
    transform: none;
  }
}
