/* thog.me — Snow-Leopard-style starfield landing page. */

@font-face {
  font-family: "Nunito Variable";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #010208;
  --fg: #f6f9ff;
  --muted: #8b96a9;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#starfield {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Vignette + a faint blue bloom so the name stays legible over the stars. */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(58% 46% at 50% 52%, rgba(76, 124, 255, 0.1), transparent 70%),
    radial-gradient(135% 100% at 50% 46%, transparent 38%, rgba(0, 0, 0, 0.62) 100%);
}

.hero {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.4rem, 4vh, 2.4rem);
  padding: min(8vmin, 4rem);
  text-align: center;
}

/* SF Pro Rounded-flavoured: rounded terminals, heavy weight, closed tracking. */
.name {
  margin: 0;
  font-family: "Nunito Variable", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: clamp(2rem, 7.4vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: clamp(0.03em, 0.5vw, 0.08em);
  /* Compensate the trailing letter-spacing so the name stays optically centered. */
  text-indent: clamp(0.03em, 0.5vw, 0.08em);
  text-wrap: balance;
  color: var(--fg);
  text-shadow:
    0 0 24px rgba(170, 200, 255, 0.3),
    0 0 80px rgba(110, 160, 255, 0.22);
}

.links {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2.5vw, 1.1rem);
}

.icon-link {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}

.icon-link:hover,
.icon-link:focus-visible {
  color: var(--fg);
  filter: drop-shadow(0 0 10px rgba(150, 190, 255, 0.55));
  transform: translateY(-1px);
}

.icon {
  display: block;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 1px solid rgba(150, 190, 255, 0.65);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Reveal sequence, gated on JS so the page degrades to plain text without it. */
.js .name,
.js .links {
  visibility: hidden;
  will-change: opacity, filter, transform;
}

@keyframes materialize {
  from {
    visibility: hidden;
    opacity: 0;
    filter: blur(14px);
    transform: translateY(10px) scale(1.015);
  }
  to {
    visibility: visible;
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

.js .name {
  animation: materialize 2.2s cubic-bezier(0.19, 0.8, 0.22, 1) 1.5s forwards;
}

.js .links {
  animation: materialize 1.7s cubic-bezier(0.19, 0.8, 0.22, 1) 2.7s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .js .name,
  .js .links {
    visibility: visible;
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
}
