:root {
  --bg: #0a0a0b;
  --text: #f4f4f6;
  --muted: #8a8a93;
  --font-wordmark: "Comfortaa", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --edge: clamp(1.5rem, 4.5vw, 3.75rem);
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Full-bleed animated wave sits behind everything */
#wave {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* Subtle vignette to deepen the edges */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    120% 120% at 50% 50%,
    transparent 55%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.frame {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--edge);
}

.wordmark {
  grid-row: 1;
  font-family: var(--font-wordmark);
  font-weight: 500;
  font-size: clamp(1.1rem, 1.4vw + 0.7rem, 1.6rem);
  letter-spacing: 0.14em;
  color: var(--text);
  user-select: none;
}

.caption {
  grid-row: 3;
  align-self: end;
  max-width: 34ch;
  font-size: clamp(0.82rem, 0.4vw + 0.72rem, 0.98rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.contact {
  grid-row: 3;
  justify-self: end;
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.6rem -0.6rem 0 0;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.35s ease, transform 0.35s ease;
}

.contact:hover,
.contact:focus-visible {
  color: var(--text);
  transform: translateY(-2px);
  outline: none;
}

/* Intro reveal */
.wordmark,
.caption {
  opacity: 0;
  animation: rise 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.wordmark {
  animation-delay: 0.15s;
}
.caption {
  animation-delay: 0.55s;
}
/* Contact fades opacity only, so its hover transform stays free */
.contact {
  opacity: 0;
  animation: fade 1.4s ease 0.75s forwards;
}

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

@keyframes fade {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark,
  .caption,
  .contact {
    opacity: 1;
    animation: none;
  }
}
