/* Hannibal Poenaru — byhannibal.com
   Cinematic CV. Dark, gold, grain. */

:root {
  --bg: #080706;
  --bg-2: #100e0c;
  --ink: #ece4d6;
  --muted: #9a9084;
  --gold: #c9a46c;
  --gold-soft: #e4d0a8;
  --line: rgba(201, 164, 108, 0.28);
  --veil: rgba(8, 7, 6, 0.72);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --display: "Syne", "Futura", "Trebuchet MS", sans-serif;
  --sans: "Outfit", "Gill Sans", "Segoe UI", sans-serif;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.65;
  background: var(--bg);
  letter-spacing: 0.01em;
}

img { max-width: 100%; display: block; }

section[id] {
  scroll-margin-top: 4.5rem;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
  transition: color 0.25s ease;
}
a:hover { color: #fff; }
a:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #111;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* Film grain overlay */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.18;
  background-image: url("../img/grain.png");
  background-size: 256px 256px;
  mix-blend-mode: overlay;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  mix-blend-mode: difference;
}
.nav-mark {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--gold-soft);
}
.nav nav {
  display: flex;
  gap: 1.4rem;
}
.nav nav a {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg-wrap {
  position: absolute;
  inset: -8%;
  z-index: -1;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url("../img/hero-speed-racer.jpg") center / cover no-repeat;
  filter: blur(10px) saturate(0.85) brightness(0.55);
  transform: scale(1.18);
  animation: kenburns 42s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,7,6,0.35) 0%, rgba(8,7,6,0.25) 40%, rgba(8,7,6,0.88) 100%),
    radial-gradient(ellipse at center, transparent 20%, rgba(8,7,6,0.55) 100%);
}

@keyframes kenburns {
  from { transform: scale(1.14) translate3d(0, 0, 0); }
  to   { transform: scale(1.28) translate3d(-1.5%, -1.2%, 0); }
}

.hero-inner {
  text-align: center;
  padding: 6rem var(--pad) 4rem;
  max-width: 56rem;
}

.kicker,
.section-kicker {
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.4rem;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.4rem, 12vw, 8.4rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
}
.name-line { display: block; }

.hero-title {
  margin: 1.6rem auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.65rem);
  font-weight: 400;
  color: var(--gold-soft);
  line-height: 1.35;
  max-width: 22em;
  padding: 0 0.6rem;
}
.hero-meta {
  margin: 1.4rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.scroll-hint span {
  display: block;
  width: 3px;
  height: 8px;
  margin: 7px auto 0;
  background: var(--gold);
  border-radius: 2px;
  animation: drip 1.8s ease-in-out infinite;
}
@keyframes drip {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* About */
.about {
  padding: 8rem var(--pad) 5rem;
  max-width: var(--max);
  margin: 0 auto;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(8rem, 0.35fr) 1fr;
  gap: 2rem 4rem;
  align-items: start;
}
.about-copy { max-width: 38rem; }
.lead {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 1.4rem;
  font-weight: 400;
}
.about-copy p { color: var(--muted); }
.about-copy strong { color: var(--ink); font-weight: 500; }
.about-copy em { color: var(--gold-soft); font-style: italic; }
.about-links {
  display: flex;
  gap: 1.6rem;
  margin-top: 2rem;
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Cavanimox feature */
.own-film {
  position: relative;
  margin: 2rem var(--pad) 4rem;
  padding: clamp(4rem, 10vw, 8rem) clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(1200px 400px at 80% 20%, rgba(201,164,108,0.08), transparent 50%),
    linear-gradient(180deg, #0e0c0a, #0a0908);
}
.own-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.own-year {
  position: absolute;
  inset: auto 0 20%;
  font-family: var(--serif);
  font-size: clamp(6rem, 22vw, 16rem);
  line-height: 0.8;
  color: rgba(201,164,108,0.07);
  pointer-events: none;
  margin: 0;
  font-weight: 500;
}
.own-film h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  margin: 0.2rem 0 0.6rem;
  letter-spacing: 0.02em;
}
.own-roles {
  font-family: var(--display);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 1.2rem;
}
.own-note {
  color: var(--muted);
  max-width: 28rem;
  margin: 0 auto;
}

/* Works */
.works {
  padding: 5rem var(--pad) 3rem;
  max-width: var(--max);
  margin: 0 auto;
}
.works-head { margin-bottom: 2.8rem; }
.works-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin: 0.2rem 0 0.5rem;
}
.works-sub { color: var(--muted); margin: 0; max-width: 34rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2.6rem 1.4rem;
}

.card {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.card-visual {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #161310;
  border: 1px solid rgba(201,164,108,0.12);
}
.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.92) contrast(1.04);
  transform: scale(1.02);
  transition: transform 1.1s ease, filter 0.6s ease;
}
.card:hover .card-visual img {
  transform: scale(1.08);
  filter: saturate(1.05) contrast(1.08);
}
.card-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(8,7,6,0.75));
  pointer-events: none;
}

.card-meta {
  padding: 0.95rem 0.1rem 0;
}
.card-meta time {
  display: block;
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 600;
}
.card-meta h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.28rem;
  line-height: 1.2;
  margin: 0.25rem 0 0.35rem;
}
.card-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}
.credit-note {
  font-size: 0.75rem;
  color: #7a736a;
}

.card--known .card-visual {
  border-color: rgba(201,164,108,0.38);
}

/* Typographic placeholder posters */
.card--typo .card-visual {
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(201,164,108,0.1), transparent 55%),
    repeating-linear-gradient(
      135deg,
      #120f0d 0 12px,
      #0e0c0a 12px 24px
    );
}
.typo-year {
  font-family: var(--serif);
  font-size: 4.2rem;
  line-height: 1;
  color: var(--gold-soft);
  opacity: 0.85;
}
.typo-kind {
  position: absolute;
  bottom: 1.1rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.works--games { padding-bottom: 6rem; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 3rem var(--pad) 3.5rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 0.7rem;
  text-align: center;
}
.footer-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 0;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0.4rem 0 0;
}
.footer-note {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0.3rem 0 0;
}

@media (max-width: 760px) {
  .nav nav { gap: 0.85rem; }
  .nav nav a { letter-spacing: 0.08em; font-size: 0.64rem; }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.6rem 0.8rem;
  }
  .card-meta h3 { font-size: 1.05rem; }
}

@media (max-width: 480px) {
  .nav nav a:nth-child(2) { display: none; } /* Cavanimox label, reachable via scroll */
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg,
  .parallax-hero,
  .parallax-card {
    animation: none !important;
    transform: none !important;
    will-change: auto;
  }
  .hero-bg {
    transform: scale(1.12) !important;
    filter: blur(8px) saturate(0.85) brightness(0.5);
  }
  .card-visual img,
  .card:hover .card-visual img {
    transform: none;
    transition: none;
  }
  .scroll-hint span { animation: none; }
}
