/* ============================================================
   Nova Reyes — 3D Artist & Motion Designer
   Theme tokens
   ============================================================ */
:root {
  --bg:        #0a0a12;
  --bg-2:      #0d0d18;
  --surface:   #14141f;
  --surface-2: #1b1b2b;
  --line:      rgba(255, 255, 255, 0.08);
  --text:      #f3f3fb;
  --muted:     #a3a3ba;

  --cyan:    #00D9FF;
  --magenta: #FF00FF;
  --lime:    #00FF41;
  --purple:  #7D2AFF;

  --grad-hero: linear-gradient(120deg, #00D9FF 0%, #7D2AFF 50%, #FF00FF 100%);

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --maxw: 1180px;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}

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

.grad-cyan    { color: var(--cyan); }
.grad-magenta { color: var(--magenta); }
.grad-lime    { color: var(--lime); }
.grad-purple  { color: var(--purple); }

/* ============================================================
   Loader
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.1rem;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: var(--cyan);
  border-right-color: var(--magenta);
  animation: spin .9s linear infinite;
}
.loader__label { color: var(--muted); font-size: .9rem; letter-spacing: .16em; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head);
  font-weight: 600; font-size: .98rem; letter-spacing: .01em;
  padding: .85rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  will-change: transform;
}
.btn--primary {
  background: var(--grad-hero); color: #05050b;
  box-shadow: 0 8px 30px rgba(125, 42, 255, .35);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(0, 217, 255, .45); }
.btn--outline {
  background: transparent; color: var(--text); border-color: rgba(255,255,255,.22);
}
.btn--outline:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,217,255,.2); }
.btn--ghost {
  background: rgba(255,255,255,.04); color: var(--text);
  border-color: var(--line); padding: .6rem 1.2rem; font-size: .9rem;
}
.btn--ghost:hover { border-color: var(--magenta); color: var(--magenta); }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10,10,18,.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex; align-items: center; gap: 1.5rem;
  height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; margin-right: auto; }
.brand__mark { display: grid; place-items: center; }
.brand__name {
  font-family: var(--font-head); font-weight: 700; letter-spacing: .12em; font-size: 1.02rem;
}
.brand__dot { color: var(--cyan); }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a {
  font-size: .95rem; color: var(--muted); font-weight: 500; position: relative; transition: color .2s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad-hero); transition: width .25s var(--ease); border-radius: 2px;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 6px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none; flex-direction: column; gap: .2rem;
  background: rgba(13,13,24,.96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: .5rem clamp(1.1rem, 4vw, 2.5rem) 1.1rem;
}
.nav__mobile a { padding: .8rem 0; color: var(--muted); border-bottom: 1px solid var(--line); font-weight: 500; }
.nav__mobile a:last-child { border-bottom: 0; }
.nav__mobile.is-open { display: flex; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  background:
    radial-gradient(1000px 600px at 75% 15%, rgba(125,42,255,.20), transparent 60%),
    radial-gradient(900px 600px at 15% 85%, rgba(0,217,255,.14), transparent 60%),
    var(--bg);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,18,.15) 0%, rgba(10,10,18,.35) 55%, var(--bg) 100%);
}
.hero__content { position: relative; z-index: 3; padding-block: 8rem 6rem; }
.hero__eyebrow {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .32em;
  color: var(--cyan); font-size: .8rem; margin-bottom: 1.2rem;
}
.hero__title {
  font-family: var(--font-head); font-weight: 700; line-height: 1.02;
  font-size: clamp(2.6rem, 8.5vw, 6rem); letter-spacing: -0.02em;
  text-shadow: 0 6px 40px rgba(0,0,0,.5);
}
.hero__tagline {
  margin-top: 1.4rem; font-family: var(--font-head); font-weight: 500;
  font-size: clamp(1rem, 2.6vw, 1.4rem); color: var(--text); letter-spacing: .04em;
}
.hero__tagline .sep { color: var(--magenta); margin-inline: .5rem; }
.hero__actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.35); border-radius: 999px;
  display: grid; place-items: start center; padding-top: 8px;
}
.hero__scroll-dot { width: 4px; height: 8px; border-radius: 4px; background: var(--cyan); animation: scrolldot 1.6s var(--ease) infinite; }
@keyframes scrolldot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ============================================================
   Section basics
   ============================================================ */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }
.section__kicker {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .28em;
  color: var(--muted); font-size: .78rem; margin-bottom: .9rem;
}
.section__title {
  font-family: var(--font-head); font-weight: 700; line-height: 1.08;
  font-size: clamp(1.9rem, 5vw, 3.2rem); letter-spacing: -0.01em;
}
.section__head { margin-bottom: 2.8rem; max-width: 640px; }

/* About */
.about { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.about__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about__bio { color: var(--muted); margin-top: 1.2rem; font-size: 1.05rem; }
.about__bio + .about__bio { margin-top: 1rem; }

.social { display: flex; gap: .8rem; margin-top: 1.8rem; }
.social--center { justify-content: center; margin-top: 2.4rem; }
.social__icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: transform .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.social__icon:hover { transform: translateY(-4px) scale(1.06); color: var(--cyan); border-color: var(--cyan); box-shadow: 0 8px 24px rgba(0,217,255,.28); }

.about__skills {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; position: relative; overflow: hidden;
}
.about__skills::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(0,217,255,.4), transparent 40%, rgba(255,0,255,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.about__skills-title { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  font-family: var(--font-head); font-size: .82rem; font-weight: 500;
  padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.chip:hover { transform: translateY(-2px); }
.chip--cyan    { color: var(--cyan);    border-color: rgba(0,217,255,.4); }
.chip--magenta { color: var(--magenta); border-color: rgba(255,0,255,.4); }
.chip--lime    { color: var(--lime);    border-color: rgba(0,255,65,.4); }
.chip--purple  { color: var(--purple);  border-color: rgba(125,42,255,.5); }

.about__stats { display: flex; gap: 1.4rem; margin-top: 1.8rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; line-height: 1; }
.stat__label { color: var(--muted); font-size: .82rem; margin-top: .3rem; }

/* Work grid */
.work { background: var(--bg-2); }
.work__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-8px); border-color: rgba(0,217,255,.4); box-shadow: 0 22px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(0,217,255,.15); }
.card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.07); }
.card__body { padding: 1.1rem 1.2rem 1.3rem; }
.card__title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; }
.card__meta { color: var(--muted); font-size: .88rem; margin-top: .25rem; }
.card__tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }
.card__tags span {
  font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 6px; background: var(--surface-2);
  color: var(--muted); border: 1px solid var(--line);
}

/* Reel */
.reel { background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%); }
.reel__inner { text-align: center; }
.reel .section__head { margin-inline: auto; text-align: center; }
.reel__lead { color: var(--muted); margin-top: .8rem; }
.reel__frame {
  position: relative; max-width: 960px; margin: 2.4rem auto 0; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(125,42,255,.28), 0 0 0 1px rgba(255,0,255,.12);
  background: #000;
}
.reel__poster { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.reel__motion {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease);
}
.reel__frame.is-playing .reel__motion { opacity: 1; visibility: visible; }
.reel__frame.is-playing .reel__poster { opacity: 0; }
.reel-rot { animation: reelRot 14s linear infinite; }
.reel-orbit { animation: reelRot 9s linear infinite reverse; }
.reel-pulse { transform-origin: 640px 360px; animation: reelPulse 2.6s var(--ease) infinite; }
.reel-pulse--2 { animation-delay: 1.1s; }
@keyframes reelRot { to { transform: rotate(360deg); } }
@keyframes reelPulse {
  0% { transform: scale(.6); opacity: .9; }
  70% { opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
.reel__play {
  position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content;
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .9rem 1.5rem .9rem 1.1rem; border-radius: 999px; border: 0;
  background: var(--grad-hero); color: #05050b; font-family: var(--font-head); font-weight: 600;
  box-shadow: 0 10px 40px rgba(0,217,255,.4);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.reel__play:hover { transform: scale(1.05); }
.reel__play.is-hidden { opacity: 0; visibility: hidden; }

/* Contact */
.contact { background: var(--bg); }
.contact__inner {
  max-width: 720px; margin-inline: auto; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(2rem, 6vw, 3.5rem);
  position: relative; overflow: hidden;
}
.contact__inner::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(600px 300px at 50% -10%, rgba(0,255,65,.12), transparent 60%);
}
.contact__inner > * { position: relative; z-index: 1; }
.contact__title { margin-top: .3rem; }
.contact__lead { color: var(--muted); margin-top: 1rem; }
.contact__email {
  display: inline-block; margin-top: 1.6rem; font-family: var(--font-head);
  font-size: clamp(1.2rem, 3.5vw, 1.7rem); font-weight: 600; color: var(--cyan);
  border-bottom: 2px solid transparent; transition: border-color .2s var(--ease);
}
.contact__email:hover { border-bottom-color: var(--cyan); }
.contact__form {
  display: flex; gap: .8rem; max-width: 460px; margin: 1.8rem auto 0; flex-wrap: wrap;
}
.contact__form input {
  flex: 1 1 200px; min-width: 0; padding: .85rem 1.1rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  font-family: var(--font-body); font-size: .95rem; transition: border-color .2s var(--ease);
}
.contact__form input::placeholder { color: var(--muted); }
.contact__form input:focus { outline: none; border-color: var(--cyan); }
.contact__note { min-height: 1.2rem; margin-top: .9rem; font-size: .9rem; color: var(--lime); }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--bg); }
.footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; padding-block: 1.8rem;
}
.footer__brand { font-family: var(--font-head); font-weight: 700; letter-spacing: .12em; }
.footer__copy { color: var(--muted); font-size: .85rem; }

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
}

@media (max-width: 560px) {
  .work__grid { grid-template-columns: 1fr; }
  .hero__content { padding-block: 7rem 5rem; }
  .hero__actions .btn { flex: 1 1 auto; }
  .about__stats { gap: 1rem; }
  .footer__inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll-dot, .loader__spinner { animation: none; }
}
