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

/* Self-hosted from public/ (stable, unhashed path so it can be preloaded).
   latin subset only — the h1 slogan is the sole consumer and is ASCII. */
@font-face {
  font-family: "Space Grotesk Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("/fonts/space-grotesk.woff2") format("woff2");
}

:root {
  --bg: #fafaf9;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #2563eb;
  --rule: #e6e4e0;
  --label: #4d4d4d; /* darker than --muted for AA/AAA on small eyebrow text */
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  align-items: safe center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Floating gradient orbs — soft color pooled behind the card. */
.orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orbs span {
  position: absolute;
  width: 45vmax;
  height: 45vmax;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.2;
  will-change: transform;
}

.orbs span:nth-child(1) {
  top: -12vmax;
  left: -8vmax;
  background: var(--accent);
  animation: float1 26s ease-in-out infinite;
}

.orbs span:nth-child(2) {
  bottom: -14vmax;
  right: -10vmax;
  background: #ff9d7a;
  animation: float2 32s ease-in-out infinite;
}

.orbs span:nth-child(3) {
  top: 30%;
  right: 12%;
  width: 32vmax;
  height: 32vmax;
  background: #b592ff;
  animation: float3 24s ease-in-out infinite;
}

@keyframes float1 {
  50% {
    transform: translate(8vmax, 6vmax) scale(1.1);
  }
}
@keyframes float2 {
  50% {
    transform: translate(-7vmax, -5vmax) scale(1.05);
  }
}
@keyframes float3 {
  50% {
    transform: translate(-6vmax, 8vmax) scale(0.95);
  }
}

/* Faint film grain — inline feTurbulence SVG, no network request.
   Sits above the orbs, below the card content, for a filmic wash. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

.card {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  width: 100%;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 2rem;
  background: var(--rule);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 1.5rem;
}

h1 {
  font-family: "Space Grotesk Variable", system-ui, sans-serif;
  font-size: clamp(2rem, 5.8vw, 3.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
  /* Bottom padding so descenders (g, y) aren't clipped by background-clip: text */
  padding-bottom: 0.12em;
  background: linear-gradient(
    100deg,
    var(--ink) 0%,
    var(--ink) 30%,
    var(--accent) 50%,
    var(--ink) 70%,
    var(--ink) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes sweep {
  to {
    background-position: -220% center;
  }
}

.lede {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 32rem;
}

.about {
  margin-top: 1.75rem;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about p {
  font-size: 1rem;
  color: var(--muted);
}

.about strong {
  color: var(--ink);
  font-weight: 600;
}

.availability {
  margin-top: 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.links {
  margin-top: 2.5rem;
  margin-bottom: 4.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 2rem;
}

.links a {
  position: relative;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 3px;
  transition: color 0.2s ease;
}

/* Animated underline wipe — grows from the left on hover/focus */
.links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.links a:hover::after,
.links a:focus-visible::after {
  transform: scaleX(1);
}

h1 {
  animation: sweep 7s linear infinite;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --ink: #f2f2f2;
    --muted: #9a9a9a;
    --accent: #6ea8ff;
    --rule: #262626;
    --label: #b3b3b3; /* lighter eyebrow label for contrast on dark bg */
  }

  body::after {
    opacity: 0.18;
  }
}

/* Respect reduced-motion: kill gradient sweep + orb drift, keep static styles */
@media (prefers-reduced-motion: reduce) {
  h1 {
    animation: none;
    background-position: 0 center;
  }
  .links a::after {
    transition: none;
  }
  .orbs span {
    animation: none;
  }
}
