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

/* ── Tokens ── */
:root {
  --bg:     #060810;
  --fg:     #ede9e1;
  --fg-dim: #c2bcb3;
  --accent: #c9a05a;
  --border: rgba(201, 160, 90, 0.12);
}

html, body { height: 100%; }

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 5vw, 4rem);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Grain overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 100;
}

/* ── Stars ── */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--dur, 3s) var(--delay, 0s) ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: var(--min, 0.1); }
  to   { opacity: var(--max, 0.8); }
}

.drifter {
  position: fixed;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

/* ── Horizon glow ── */
.horizon {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 35vh;
  background: radial-gradient(ellipse 80% 100% at 50% 100%, rgba(201, 160, 90, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── z-index layer ── */
header, nav, footer {
  position: relative;
  z-index: 1;
}

/* ── Domain TLD ── */
.domain-tld {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.8rem, 8vw, 7rem);
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 0.9;
}

/* ── Domain name entrance ── */
.domain-name {
  line-height: 1;
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

/* ── Tagline ── */
.tagline {
  margin-top: clamp(1.2rem, 2.5vw, 2rem);
  font-size: clamp(0.75rem, 1.3vw, 0.9rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  opacity: 0;
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

/* ── Nav ── */
nav {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  opacity: 0;
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.74s forwards;
}

nav ul { list-style: none; }

nav li { border-top: 1px solid var(--border); }
nav li:last-child { border-bottom: 1px solid var(--border); }

nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.85rem, 1.6vw, 1.1rem) 0;
  text-decoration: none;
  color: var(--fg-dim);
  gap: 1rem;
  transition: color 0.2s ease;
}

nav a:hover { color: var(--accent); }

.nav-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-label {
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-desc {
  font-size: clamp(0.68rem, 1vw, 0.78rem);
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--fg-dim);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

nav a:hover .nav-desc { opacity: 1; }

.arrow {
  font-size: 0.9em;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

nav a:hover .arrow { transform: translate(3px, -3px); }

/* ── Footer ── */
footer {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.2rem;
  border-top: 1px solid rgba(201, 160, 90, 0.15);
  opacity: 0;
  animation: rise 0.5s ease 1.1s forwards;
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  opacity: 0.7;
}

.footer-main a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

.footer-main a:hover {
  color: var(--accent);
  opacity: 1;
}

.footer-sep {
  margin: 0 0.6rem;
  opacity: 0.4;
}

/* ── Animations ── */
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Desktop: 3-column nav grid ── */
@media (min-width: 640px) {
  nav ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  nav li {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  nav li:nth-child(3n) {
    border-right: none;
  }

  nav a {
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(1rem, 1.8vw, 1.5rem);
  }

  .arrow {
    margin-top: auto;
    padding-top: 1.5rem;
    align-self: flex-end;
  }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  .star { animation: none; opacity: 0.15; }
  .domain-name, .tagline, .venture-role, .linkedin-cta,
  .profile-cta, .about, nav, footer {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
