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

:root {
  --bg: #0c0c0c;
  --bg-elevated: #141414;
  --fg: #f2f2f2;
  --fg-muted: #8a8a8a;
  --fg-subtle: #4a4a4a;
  --border: #2a2a2a;
  --accent: #ffffff;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  background: var(--bg);
  overflow-x: hidden;
}

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

.grid-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  opacity: 0.35;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.5rem, 5vw, 3rem);
  position: relative;
  z-index: 1;
  animation: fade-up 0.8s var(--ease-out) both;
}

.logo {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
  border: 1px solid var(--border);
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg);
  animation: pulse 2s ease-in-out infinite;
}

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

/* Hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem clamp(1.5rem, 5vw, 3rem) 4rem;
  max-width: 52rem;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg-subtle);
  margin-bottom: 1.5rem;
  animation: fade-up 0.8s 0.1s var(--ease-out) both;
}

.title {
  font-family: var(--serif);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.75rem;
  animation: fade-up 0.8s 0.2s var(--ease-out) both;
}

.title em {
  font-style: italic;
  color: var(--fg-muted);
}

.lead {
  font-family: var(--mono);
  font-size: clamp(0.8125rem, 2vw, 0.9375rem);
  line-height: 1.7;
  max-width: 32rem;
  color: var(--fg-muted);
  margin-bottom: 3rem;
  animation: fade-up 0.8s 0.3s var(--ease-out) both;
}

/* Progress */
.progress-block {
  margin-bottom: 3rem;
  animation: fade-up 0.8s 0.4s var(--ease-out) both;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  color: var(--fg-subtle);
}

.progress-value {
  color: var(--fg);
}

.progress-track {
  height: 1px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 38%;
  background: var(--accent);
  transform-origin: left;
  animation: progress-grow 1.4s 0.6s var(--ease-out) both;
}

@keyframes progress-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Links */
.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  animation: fade-up 0.8s 0.5s var(--ease-out) both;
}

.link-primary {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: opacity 0.2s ease;
}

.link-secondary {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.2s ease;
}

.link-primary:hover,
.link-secondary:hover {
  color: var(--accent);
}

.link-divider {
  color: var(--fg-subtle);
  user-select: none;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.5rem clamp(1.5rem, 5vw, 3rem);
  border-top: 1px solid var(--border);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
  animation: fade-up 0.8s 0.6s var(--ease-out) both;
}

.footer-note {
  color: var(--fg-subtle);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .status-dot {
    animation: none;
  }
}

/* Small screens */
@media (max-width: 480px) {
  .site-footer {
    flex-direction: column;
  }
}
