/* ============================================================
   PORTFOLIO B&W — Theme CSS
   Inspired by landonorris.com — editorial, kinetic, bold
   ============================================================ */

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

:root {
  --black:     #0a0a0a;
  --white:     #f5f0e8;   /* warm off-white, editorial feel */
  --pure-white:#ffffff;
  --gray-200:  #d4d0c8;
  --gray-400:  #888880;
  --gray-600:  #444440;
  --gray-800:  #1a1a18;

  --font-serif:   'DM Serif Display', 'Georgia', serif;
  --font-sans:    'Inter', 'Helvetica Neue', Helvetica, sans-serif;
  --font-display: 'Bebas Neue', 'Arial Narrow', Arial, sans-serif;

  --ease-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart:  cubic-bezier(0.76, 0, 0.24, 1);
}

html {
  font-size: 16px;
  overflow-x: hidden;
  scroll-behavior: auto;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ── Contour background ─────────────────────────────────── */
/* Subtle topographic SVG texture on sections */
.contour-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  overflow: hidden;
}
.contour-bg svg { width: 100%; height: 100%; }

/* ── Page Transition ────────────────────────────────────── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  transform-origin: bottom;
  pointer-events: none;
}

/* ── Custom Cursor ──────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .3s var(--ease-expo), height .3s var(--ease-expo);
  will-change: transform;
}
.cursor--grow { width: 56px; height: 56px; }

/* ── Site Header ────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 1.5rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  pointer-events: none;
}
.site-header__logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--pure-white);
  pointer-events: all;
}
.site-header__logo span { display: block; }
.site-header__nav {
  display: flex;
  gap: 2rem;
  pointer-events: all;
}
.site-header__nav a {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pure-white);
  font-weight: 500;
  opacity: 0.5;
  transition: opacity .2s;
}
.site-header__nav a:hover,
.site-header__nav a.is-active { opacity: 1; }

/* ══════════════════════════════════════════════════════════
   § 1  HERO
   ══════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--black);
  display: flex;
  align-items: flex-end;
}

.hero__img-wrap {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%) contrast(1.1);
  transform-origin: center center;
}

/* Gradient: bottom lift for text legibility */
.hero__grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,10,0.88) 0%,
    rgba(10,10,10,0.25) 45%,
    transparent 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 2.5rem 3.5rem;
}

.hero__eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(12px);
}

/* Name splits into two lines like "LANDO / NORRIS" */
.hero__name {
  font-family: var(--font-serif);
  font-size: clamp(4.5rem, 13vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.hero__name-line {
  display: block;
  transform: translateY(110%);
  opacity: 0;
}

.hero__sub {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 300;
  color: var(--gray-200);
  max-width: 40ch;
  opacity: 0;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  opacity: 0;
}
.hero__scroll span {
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-400);
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px;
  height: 52px;
  background: var(--gray-600);
  overflow: hidden;
  position: relative;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  background: var(--gray-400);
  animation: scanDown 2s var(--ease-quart) infinite 1.2s;
}
@keyframes scanDown {
  0%   { height: 0%; top: 0%; }
  50%  { height: 100%; top: 0%; }
  100% { height: 0%; top: 100%; }
}

/* ══════════════════════════════════════════════════════════
   § 2  SKILLS / TRANSITION ZONE
   Hero image persists, skills marquee scrolls behind it
   ══════════════════════════════════════════════════════════ */
#skills {
  position: relative;
  /* height set by JS: ~250vh for pinning room */
  background: var(--black);
}

.skills__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* The persisted hero image — starts full-bleed, shrinks on scroll */
.skills__img {
  position: absolute;
  inset: 0;
  z-index: 2;
  will-change: clip-path, opacity;
  /* clip-path starts full, GSAP shrinks it */
  clip-path: inset(0% 0% 0% 0%);
}
.skills__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%) contrast(1.1);
}
/* Dark gradient stays on image so marquee text stays invisible beneath it initially */
.skills__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(10,10,10,0.3) 0%,
    rgba(10,10,10,0.7) 100%
  );
}

/* Marquee container — sits behind image (z-index: 1) */
.skills__marquee-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  opacity: 0; /* GSAP fades this in */
  overflow: hidden;
  background: var(--white);
}

/* Single marquee row */
.marquee-row {
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(10,10,10,0.1);
}
.marquee-row:last-child { border-bottom: 1px solid rgba(10,10,10,0.1); }

.marquee-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  will-change: transform;
}

.marquee-item {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 1.1;
  color: var(--black);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}
/* Alternate rows: outlined / filled */
.marquee-row:nth-child(even) .marquee-item {
  -webkit-text-stroke: 1.5px var(--black);
  color: transparent;
  font-style: italic;
}

.marquee-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--black);
  flex-shrink: 0;
}
.marquee-row:nth-child(even) .marquee-dot {
  background: transparent;
  border: 1.5px solid var(--black);
}

/* Section heading that appears as image exits */
.skills__label {
  position: absolute;
  z-index: 3;
  bottom: 3rem;
  left: 2.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--black);
  opacity: 0;
}

/* ══════════════════════════════════════════════════════════
   § 3  BIO
   ══════════════════════════════════════════════════════════ */
#bio {
  position: relative;
  min-height: 100vh;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10rem 2.5rem 8rem;
  overflow: hidden;
}

.bio__contour { color: var(--white); }

.bio__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.bio__eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  transform: translateY(16px);
}
.bio__eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gray-600);
}

/* Large editorial statement — words revealed word by word */
.bio__statement {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 5rem;
  max-width: 18ch;
}

/* Each word is wrapped in a span.word > span.word-inner by JS */
.bio__statement .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  margin-right: 0.25em;
}
.bio__statement .word-inner {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
}
/* Accent words */
.bio__statement em {
  font-style: italic;
  color: var(--gray-400);
}

/* Two-col lower bio */
.bio__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--gray-800);
  opacity: 0;
  transform: translateY(32px);
}
.bio__col-label {
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 1rem;
}
.bio__col-body {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--gray-200);
}
.bio__col-body strong { color: var(--white); font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   § 4  WORK — Horizontal scroll
   ══════════════════════════════════════════════════════════ */
#work {
  position: relative;
  background: var(--white);
  color: var(--black);
  /* height set by JS */
}

.work__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 3rem;
}

.work__top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 2.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  z-index: 3;
}

.work__heading {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(20px);
}

.work__index-num {
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: 1;
  color: var(--gray-200);
  pointer-events: none;
  user-select: none;
  transition: color .3s;
}

/* Contour lines on work (light version) */
.work__contour { color: var(--black); }

/* Horizontal track */
.work__track-outer {
  padding-left: 2.5rem;
  overflow: visible;
}
.work__track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  align-items: flex-end;
  will-change: transform;
}

/* Cards */
.work-card {
  flex-shrink: 0;
  cursor: pointer;
  color: var(--black);
}
.work-card--lg { width: clamp(320px, 38vw, 520px); }
.work-card--sm { width: clamp(240px, 26vw, 360px); }

.work-card__frame {
  position: relative;
  overflow: hidden;
  background: var(--gray-200);
}
.work-card--lg .work-card__frame { height: clamp(360px, 52vh, 580px); }
.work-card--sm .work-card__frame { height: clamp(260px, 38vh, 420px); }

.work-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transform: scale(1.06);
  transition: transform .8s var(--ease-expo), filter .4s;
}
.work-card:hover .work-card__img {
  transform: scale(1);
  filter: grayscale(20%);
}

/* Wipe overlay */
.work-card__wipe {
  position: absolute;
  inset: 0;
  background: var(--white);
  transform-origin: left;
  z-index: 1;
}

/* Top-right arrow */
.work-card__cta {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 2;
  width: 36px; height: 36px;
  border: 1px solid rgba(10,10,10,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.7);
  transition: opacity .25s, transform .25s, border-color .25s;
}
.work-card:hover .work-card__cta {
  opacity: 1; transform: scale(1);
  border-color: rgba(10,10,10,0.7);
}
.work-card__cta svg { width: 12px; height: 12px; stroke: var(--black); }

.work-card__meta {
  padding: 1rem 0 0;
}
.work-card__cat {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.35rem;
}
.work-card__title {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.15;
}
.work-card__year {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--gray-400);
  margin-top: 0.25rem;
}

/* Progress bar */
.work__progress {
  position: absolute;
  bottom: 1.5rem; right: 2.5rem;
  display: flex; align-items: center; gap: 1rem;
  z-index: 3;
}
.work__prog-track {
  width: 100px; height: 1px;
  background: var(--gray-200);
  position: relative; overflow: hidden;
}
.work__prog-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%; width: 0%;
  background: var(--black);
}
.work__prog-label {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-400);
}

/* ══════════════════════════════════════════════════════════
   § 5  CONTACT
   ══════════════════════════════════════════════════════════ */
#contact {
  position: relative;
  min-height: 100vh;
  background: var(--black);
  color: var(--white);
  padding: 10rem 2.5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Giant background text */
.contact__bg-word {
  position: absolute;
  bottom: -4vw;
  left: -1rem;
  font-family: var(--font-serif);
  font-size: clamp(10rem, 26vw, 26rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  -webkit-text-stroke: 1px rgba(245,240,232,0.06);
  color: transparent;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.contact__top { position: relative; z-index: 2; }

.contact__eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 2.5rem;
  opacity: 0; transform: translateY(16px);
}

.contact__heading {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 11vw, 10rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin-bottom: 5rem;
  overflow: hidden;
}
.contact__heading-line {
  display: block;
  opacity: 0;
  transform: translateY(110%);
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  opacity: 0; transform: translateY(32px);
}
.contact__col-label {
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}
.contact__col-value {
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--gray-200);
}
.contact__col-value a {
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.contact__col-value a:hover { border-bottom-color: var(--gray-400); }
.contact__social { display: flex; flex-direction: column; gap: .4rem; }

.contact__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid var(--gray-800);
  padding-top: 3rem;
  margin-top: 5rem;
  position: relative; z-index: 2;
  opacity: 0; transform: translateY(16px);
}
.contact__copy {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-600);
}
.contact__back-top {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: .6rem;
  cursor: pointer; background: none; border: none;
  color: var(--gray-400); font-family: inherit;
  transition: color .2s;
}
.contact__back-top:hover { color: var(--white); }
.contact__back-top-circle {
  width: 26px; height: 26px;
  border: 1px solid var(--gray-700);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  .site-header { padding: 1.25rem 1.5rem; }
  #hero .hero__content,
  #bio, #contact { padding-left: 1.5rem; padding-right: 1.5rem; }
  .work__track-outer { padding-left: 1.5rem; }
  .work__top-bar { padding: 2rem 1.5rem; }
  .bio__cols { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact__grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact__bottom { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}
@media (max-width: 580px) {
  .site-header__nav { display: none; }
  .work-card--lg { width: 82vw; }
  .work-card--sm { width: 72vw; }
  .marquee-item { font-size: clamp(2rem, 8vw, 3rem); }
}

.no-js .cursor { display: none; }
