:root {
  --bg: #000000;
  --bg-elevated: #0a0a0c;
  --fg: #f2f0f7;
  --muted: #9b95a8;
  --purple: #8b8fd9;
  --purple-deep: #2b2e5e;
  --purple-soft: rgba(139, 143, 217, 0.14);
  --purple-line: rgba(139, 143, 217, 0.45);
  --border: rgba(139, 143, 217, 0.28);
  --font-display: "Press Start 2P", ui-monospace, monospace;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --max: 52rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--fg);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(43, 46, 94, 0.55), transparent 60%),
    radial-gradient(800px 400px at 90% 20%, rgba(139, 143, 217, 0.1), transparent 50%),
    var(--bg);
  position: relative;
  overflow-x: hidden;
}

a {
  color: var(--purple);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover {
  color: #b4b7ea;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  pointer-events: none;
  position: fixed;
  inset: auto auto -20% -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(139, 143, 217, 0.14), transparent 65%);
  filter: blur(20px);
  z-index: 0;
  animation: drift 14s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(12vw, -8vh);
  }
}

.hero,
main,
.footer {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.hero {
  padding: clamp(3rem, 12vh, 6.5rem) 0 2.25rem;
  text-align: center;
  animation: rise 700ms ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  display: block;
  width: min(100%, 40rem);
  height: auto;
  margin: 0 auto 1.75rem;
  /* Source mark is deep indigo; lift it so it reads on pure black. */
  filter: brightness(2.65) drop-shadow(0 0 24px rgba(139, 143, 217, 0.35));
  animation: pulse-glow 4.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    filter: brightness(2.65) drop-shadow(0 0 18px rgba(139, 143, 217, 0.28));
  }
  50% {
    filter: brightness(2.85) drop-shadow(0 0 32px rgba(139, 143, 217, 0.48));
  }
}

.tagline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 2.2vw, 0.95rem);
  line-height: 1.7;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.lede {
  margin: 1rem auto 0;
  max-width: 34rem;
  color: var(--muted);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.section-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  font-weight: 400;
  color: var(--purple);
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-list {
  list-style: none;
  margin: 0 0 4rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.project-loading,
.project-error {
  color: var(--muted);
  padding: 1rem 0;
}

.project {
  display: grid;
  gap: 0.65rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(139, 143, 217, 0.06), transparent 70%);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
  animation: rise 560ms ease-out both;
}

.project:hover {
  border-color: var(--purple-line);
  background: var(--purple-soft);
  transform: translateY(-2px);
}

.project-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.project-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.6;
}

.project-name a {
  color: var(--fg);
  text-decoration: none;
}

.project-name a:hover {
  color: #b4b7ea;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
}

.project-desc {
  margin: 0;
  color: var(--muted);
  max-width: 46rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.95rem;
}

.project-actions a {
  font-weight: 500;
}

.project-actions .pages-link {
  color: var(--fg);
  border-bottom: 1px solid var(--purple);
  text-decoration: none;
}

.project-actions .pages-link:hover {
  color: #b48cff;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  padding: 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
