@font-face {
  font-family: "A Big Deal";
  src: url("/assets/fonts/aBigDeal.otf") format("opentype");
  font-display: swap;
}

:root {
  --ink: #f4f1ea;
  --quiet: rgba(244, 241, 234, 0.74);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #07040f;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

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

.nav {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 1.3rem 6vw;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav a { color: var(--ink); text-decoration: none; }

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18vh 6vw 12vh;
}
.hero h1 {
  margin: 0;
  max-width: 100%;
  font-family: "A Big Deal", "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 7.2vw, 6.2rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
}
.hero h1 .line {
  display: block;
  white-space: nowrap;
  line-height: 1.08;
}
.hero h1 .ch {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(0.35em);
  animation: settle 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes settle {
  to { opacity: 1; filter: blur(0); transform: none; }
}
.zh {
  margin: 1.2rem 0 0;
  color: var(--quiet);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}
.mail {
  margin-top: 1.8rem;
  color: var(--quiet);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.mail:hover { color: var(--ink); }

.work {
  position: relative;
  z-index: 1;
  padding: 14vh 0 6vh;
  background: linear-gradient(180deg, rgba(7, 4, 15, 0.2), rgba(7, 4, 15, 0.88) 12%, #07040f 30%);
}
.work h2 {
  margin: 0 6vw 1.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.board {
  position: relative;
  min-height: 70vh;
}
.piece {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  cursor: grab;
  touch-action: none;
}
.piece.live {
  cursor: grabbing;
  z-index: 8;
}
.piece h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.piece video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
  object-fit: contain;
}

@media (max-width: 720px) {
  .nav {
    padding: max(0.85rem, env(safe-area-inset-top)) 1.1rem 0.7rem;
    font-size: 0.7rem;
  }
  .hero {
    min-height: 100dvh;
    justify-content: flex-end;
    padding: 20vh 1.15rem max(2.2rem, env(safe-area-inset-bottom));
  }
  .hero h1 {
    max-width: 100%;
    font-size: clamp(1.45rem, 6.2vw, 2.1rem);
    line-height: 1.12;
  }
  .hero h1 .line { line-height: 1.12; }
  .zh { font-size: 1.05rem; margin-top: 0.9rem; }
  .mail {
    margin-top: 1.2rem;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
  }
  .work { padding-top: 11vh; }
  .work h2 { margin-left: 1rem; margin-right: 1rem; }
  .piece h3 { font-size: 1.25rem; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 .ch {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
}
