@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f5f2;
  --fg: #141414;
  --muted: #6b6b6b;
  --line: #d8d6d0;
  --bird: #c9c5bc;
  --accent: #e4572e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --fg: #ededeb;
    --muted: #8e8e8a;
    --line: #2e2e2c;
    --bird: #4d4c48;
    --accent: #ff6a3d;
  }
}

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

html, body { height: 100%; }

body {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}

#sky.on { opacity: 1; }

main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

h1 {
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}

.tagline {
  margin-top: 1rem;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  color: var(--muted);
}

.mail {
  align-self: flex-start;
  margin-top: 2.5rem;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.3s ease;
}

.mail:hover,
.mail:focus-visible { border-color: var(--accent); }

.mail:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

::selection { background: var(--accent); color: #fff; }

/* Gentle fade-in on load. */
main > *,
footer {
  opacity: 0;
  animation: fade-in 1s ease forwards;
}

main > :nth-child(2) { animation-delay: 0.12s; }
main > :nth-child(3) { animation-delay: 0.24s; }
footer { animation-delay: 0.4s; }

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

@media (prefers-reduced-motion: reduce) {
  main > *,
  footer { animation: none; opacity: 1; }
}
