:root {
  --bg: #060b14;
  --panel: #0d1526;
  --panel-hover: #142035;
  --line: #223049;
  --text: #eef3fb;
  --muted: #8fa3bf;
  --accent: #46e0c1;
  --accent-2: #7c6ff0;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f8fb;
    --panel: #ffffff;
    --panel-hover: #eaf2f8;
    --line: #d7e3ee;
    --text: #10202f;
    --muted: #52708a;
    --accent: #0f9d78;
    --accent-2: #5b4fd6;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header, main, footer { max-width: 880px; margin: 0 auto; }

header {
  position: relative;
  padding: 3rem 0 2.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 220px;
  background:
    radial-gradient(ellipse 60% 100% at 20% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 100% at 80% 20%, color-mix(in srgb, var(--accent-2) 45%, transparent), transparent 70%);
  filter: blur(30px);
  opacity: 0.55;
  pointer-events: none;
  animation: aurora-drift 14s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  from { transform: translateX(-4%) scaleY(1); }
  to   { transform: translateX(4%) scaleY(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  header::before { animation: none; }
}

h1 {
  position: relative;
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text) 40%, var(--accent) 75%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline { position: relative; color: var(--muted); margin: 0.5rem 0 0; }

.grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card a {
  display: block;
  height: 100%;
  padding: 1.1rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.card a:hover, .card a:focus-visible {
  background: var(--panel-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px color-mix(in srgb, var(--accent) 60%, transparent);
}

.card .emoji { font-size: 1.9rem; display: block; }
.card h2 { margin: 0.4rem 0 0.2rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.card .meta {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.card.unpublished a {
  opacity: 0.55;
  pointer-events: none;
}

.loading, .error { color: var(--muted); }

footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0 0 0.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover, .footer-links a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.copyright { margin: 0; }

.prose { max-width: 620px; }
.prose h2 { font-size: 1.05rem; margin: 1.8rem 0 0.4rem; }
.prose p { margin: 0 0 0.9rem; }
.prose a { color: var(--accent); }
.prose .updated { color: var(--muted); font-size: 0.85rem; margin-top: 2rem; }

code {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  font-size: 0.85em;
}
