:root {
  --bg: #1a1917;
  --fg: #fff7f0;
}
:root[data-theme="light"] {
  --bg: #f5f4f1;
  --fg: #262523;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  transition: background-color 0.3s;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.layer {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.layer a, .layer button { pointer-events: auto; }

a { color: inherit; }

.nav {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.nav a {
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.nav a:hover, .nav a.active { opacity: 1; }
.theme {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.8;
}
.theme:hover { opacity: 1; }

.coords {
  position: absolute;
  top: 32px;
  right: max(24px, 20vw);
  font-size: 11px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.dim { opacity: 0.32; }

.content {
  margin-top: auto;
  padding: 0 24px 128px;
  margin-left: max(0px, calc(20vw - 24px));
  max-width: 54rem;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.tagline {
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: 0.02em;
  opacity: 0.45;
  white-space: pre-line;
  min-height: 3.3em;
}
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 4px;
  transform: translateY(0.15em);
  background: var(--fg);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.prose {
  font-size: 15px;
  line-height: max(22px, 3vh);
  transition: color 0.18s ease;
}
.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, var(--fg) 35%, transparent);
  transition: text-decoration-color 0.15s ease, color 0.18s ease;
}
.prose:has(a:hover) { color: color-mix(in srgb, var(--fg) 32%, transparent); }
.prose a:hover { color: var(--fg); text-decoration-color: var(--fg); }
.hello { margin-bottom: 0.2em; }

.links {
  font-size: 14px;
  margin-top: -16px;
}
.links a {
  opacity: 0.6;
  text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, var(--fg) 35%, transparent);
  transition: opacity 0.15s;
}
.links a:hover { opacity: 1; }
.sep { opacity: 0.3; }

@media (max-height: 720px) {
  .content { gap: 24px; padding-bottom: 48px; }
}
@media (max-width: 640px) {
  .nav { gap: 18px; top: 24px; }
  .coords { display: none; }
  .content { padding: 0 16px 64px; margin-left: 0; }
  .prose { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}
