/* Dark theme (default) */
:root {
  --bg: #0b0b0a;
  --fg: #f2f0ea;
  --mute: #8d8b84;
  --lime: #d4ff3a;
  --accent: #d4ff3a;          /* accent used for text */
  --line: rgba(242, 240, 234, 0.18);
  --surface: rgba(242, 240, 234, 0.04);
  --grid: rgba(242, 240, 234, 0.05);
  --blob-1: #d4ff3a;
  --blob-2: #3a4a10;
  --blob-3: #5b5a52;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  color-scheme: dark;
}

/* Light theme */
:root[data-theme="light"] {
  --bg: #ffffff;
  --fg: #0b0b0a;
  --mute: #6b6962;
  --accent: #4f6b00;
  --line: rgba(11, 11, 10, 0.16);
  --surface: rgba(11, 11, 10, 0.03);
  --grid: rgba(11, 11, 10, 0.06);
  --blob-1: #d4ff3a;
  --blob-2: #e9f7b0;
  --blob-3: #d9d7cf;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Animated background */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg__grid {
  position: absolute;
  inset: -64px;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 70%);
  animation: grid-pan 12s linear infinite;
}
.bg__blob {
  position: absolute;
  width: 45vmax;
  height: 45vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform;
  transition: background-color 0.4s ease;
}
.bg__blob--1 {
  top: -15vmax; left: -10vmax;
  background: var(--blob-1);
  opacity: 0.18;
  animation: drift-1 22s ease-in-out infinite alternate;
}
.bg__blob--2 {
  bottom: -20vmax; right: -12vmax;
  background: var(--blob-2);
  animation: drift-2 26s ease-in-out infinite alternate;
}
.bg__blob--3 {
  top: 30%; left: 40%;
  width: 30vmax; height: 30vmax;
  background: var(--blob-3);
  opacity: 0.2;
  animation: drift-3 30s ease-in-out infinite alternate;
}
:root[data-theme="light"] .bg__blob--1 { opacity: 0.35; }
:root[data-theme="light"] .bg__blob--2 { opacity: 0.6; }
:root[data-theme="light"] .bg__blob--3 { opacity: 0.4; }

@keyframes grid-pan {
  to { transform: translate(64px, 64px); }
}
@keyframes drift-1 {
  to { transform: translate(30vw, 25vh) scale(1.2); }
}
@keyframes drift-2 {
  to { transform: translate(-35vw, -20vh) scale(0.9); }
}
@keyframes drift-3 {
  0%   { transform: translate(-20vw, -10vh) scale(1); }
  100% { transform: translate(15vw, 15vh) scale(1.3); }
}

.header,
.page,
.footer {
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--fg);
  text-decoration: none;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle__icon {
  /* Filled moon in dark mode, outline in light mode */
  fill: currentColor;
  stroke: currentColor;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), fill 0.3s ease;
}
:root[data-theme="light"] .theme-toggle__icon {
  fill: transparent;
}
.theme-toggle:active .theme-toggle__icon { transform: scale(0.85); }

.theme-toggle:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 999px;
}

/* Main */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--gutter);
  text-align: center;
  animation: fade-in 1s ease-out both;
}

.name {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.name span { color: var(--mute); font-weight: 400; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}
.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 1.8s ease-in-out infinite;
}
:root[data-theme="light"] .status__dot { background: #8fbf00; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 255, 58, 0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(212, 255, 58, 0); }
}

.title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.dot { color: var(--lime); }
:root[data-theme="light"] .dot { color: #8fbf00; }

.quote { margin: 0; }
.quote blockquote { margin: 0; }
.quote p {
  margin: 0;
  /* Shrinks on narrow screens so each line fits on one row */
  font-size: min(clamp(0.9rem, 0.85rem + 0.3vw, 1.05rem), calc((100vw - 3rem) / 24.5));
  line-height: 1.6;
  color: var(--mute);
}
.quote p span { display: block; white-space: nowrap; }
.quote figcaption {
  margin-top: 0.75rem;
  color: var(--accent);
  font-size: 0.9rem;
}

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem clamp(1rem, 4vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.social a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.social a::after { content: " ↗"; color: var(--mute); }
.social a:hover { color: var(--accent); border-color: var(--accent); }
.social a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer {
  padding: 1.25rem var(--gutter);
  color: var(--mute);
  font-size: 0.85rem;
  text-align: center;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .page, .bg__grid, .bg__blob, .status__dot { animation: none; }
  .theme-toggle__icon { transition: none; }
}
