@font-face {
  font-family: "Gunbai";
  src: url("assets/fonts/gunbaihalf.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

:root {
  --black: #050505;
  --bone: #e6d6b0;
  --bone-bright: #fff4da;
  --emerald: #00e59b;
  --violet: #8d73ff;
  --muted: rgba(230, 214, 176, 0.72);
  --line: rgba(230, 214, 176, 0.42);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--black);
  color: var(--bone);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a { color: inherit; }

.cv-page {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background: #030303;
}

.cv-media,
.cv-media::after,
.cv-video,
.cv-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cv-video,
.cv-poster {
  object-fit: cover;
  object-position: center;
}

.cv-poster { background-size: cover; background-position: center; }
.cv-video { z-index: 0; }

.cv-media::after {
  content: "";
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 28%, rgba(0,0,0,.18) 62%, rgba(0,0,0,.65) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.20), rgba(0,0,0,.06) 45%, rgba(0,0,0,.58));
}

.cv-grain,
.cv-scan,
.cv-vignette {
  position: absolute;
  inset: -20%;
  z-index: 2;
  pointer-events: none;
}

.cv-grain {
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  animation: grainShift .22s steps(2) infinite;
  mix-blend-mode: soft-light;
}

.cv-scan {
  opacity: .10;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.14) 0 1px, transparent 1px 4px);
}

.cv-vignette {
  inset: 0;
  box-shadow: inset 0 0 16vmax rgba(0,0,0,.72);
}

@keyframes grainShift {
  0% { transform: translate3d(-2%, -1%, 0); }
  25% { transform: translate3d(1%, -2%, 0); }
  50% { transform: translate3d(-1%, 2%, 0); }
  75% { transform: translate3d(2%, 1%, 0); }
  100% { transform: translate3d(-2%, -1%, 0); }
}

.cv-shell {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(18px, 3vw, 40px);
}

.cv-topline,
.cv-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(230,214,176,.72);
}

.cv-center {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px 0;
}

.cv-stack {
  width: min(760px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cv-title,
.cv-heading {
  margin: 0;
  font-family: Gunbai, Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  color: var(--bone-bright);
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(141,115,255,.48), 0 2px 18px rgba(0,0,0,.85);
}

.cv-title {
  font-size: clamp(3.6rem, 10vw, 7.6rem);
  line-height: .82;
  letter-spacing: .02em;
}

.cv-heading {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: .9;
  margin-bottom: 28px;
}

.cv-planet {
  width: clamp(72px, 10vw, 110px);
  margin: 22px 0 18px;
  color: var(--bone);
  filter: drop-shadow(0 0 14px rgba(0,229,155,.35));
}

.cv-orbit {
  transform-box: fill-box;
  transform-origin: center;
  animation: orbitSpin 9s linear infinite;
}

.cv-dot { animation: dotPulse 3s ease-in-out infinite; transform-origin: center; }

@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes dotPulse { 50% { opacity: .35; transform: scale(.72); } }

.cv-copy {
  margin: 0;
  font-size: clamp(.92rem, 1.8vw, 1.08rem);
  line-height: 1.9;
  letter-spacing: .16em;
  text-transform: lowercase;
  color: var(--muted);
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}

.cv-copy strong { color: var(--bone); font-weight: 600; }

.cv-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(340px, 86vw);
  margin-top: 30px;
  padding: 16px 28px;
  border: 1px solid var(--line);
  background: rgba(2,2,2,.24);
  color: var(--bone-bright);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

.cv-button::before,
.cv-button::after {
  content: "";
  position: absolute;
  inset: -5px;
  pointer-events: none;
  background:
    linear-gradient(var(--bone),var(--bone)) left top/12px 1px no-repeat,
    linear-gradient(var(--bone),var(--bone)) left top/1px 12px no-repeat,
    linear-gradient(var(--bone),var(--bone)) right bottom/12px 1px no-repeat,
    linear-gradient(var(--bone),var(--bone)) right bottom/1px 12px no-repeat;
  opacity: .7;
}
.cv-button::after { transform: rotate(180deg); }

.cv-button:hover,
.cv-button:focus-visible {
  border-color: rgba(0,229,155,.78);
  background: rgba(0,229,155,.07);
  box-shadow: 0 0 24px rgba(0,229,155,.18);
}

.cv-about-panel {
  width: min(700px, 92vw);
  padding: clamp(28px, 5vw, 54px);
  background: linear-gradient(180deg, rgba(5,5,5,.72), rgba(5,5,5,.48));
  border: 1px solid rgba(230,214,176,.22);
  backdrop-filter: blur(7px);
  text-align: left;
}

.cv-about-panel p {
  margin: 0 0 1.15em;
  font-size: clamp(.98rem, 1.8vw, 1.08rem);
  line-height: 1.75;
  color: rgba(255,244,218,.84);
}
.cv-about-panel p:last-child { margin-bottom: 0; }

.cv-back {
  text-decoration: none;
  transition: color .2s ease;
}
.cv-back:hover { color: var(--emerald); }

@media (max-width: 640px) {
  .cv-shell { padding: 16px; }
  .cv-topline, .cv-bottomline { font-size: 9px; letter-spacing: .16em; }
  .cv-title { font-size: clamp(3.2rem, 20vw, 5.2rem); }
  .cv-copy { font-size: .82rem; letter-spacing: .10em; line-height: 1.8; }
  .cv-button { min-width: 0; width: 100%; }
  .cv-about-panel { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .cv-grain, .cv-orbit, .cv-dot { animation: none; }
}
