/* ========================================
   ISAAC MERRILL — Portfolio
   Premium Design v2 — by Joi
   Taste Skill: VARIANCE 8 / MOTION 7 / DENSITY 4
   ======================================== */

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

:root {
  --black: #09090b;
  --white: #f5f0e8;
  --purple: #a78bfa;
  --purple-deep: #7c3aed;
  --purple-glow: #c4b5fd;
  --gray: #71717a;
  --gray-light: #a1a1aa;
  --border: rgba(245, 240, 232, 0.08);
  --surface: #111113;
  --surface-hover: #18181b;
  --container: 1200px;

  /* Fluid type scale */
  --text-display: clamp(3.5rem, 8vw, 7.5rem);
  --text-h1: clamp(2.8rem, 6vw, 5rem);
  --text-h2: clamp(2rem, 4vw, 3.5rem);
  --text-h3: clamp(1.25rem, 2vw, 1.6rem);
  --text-body: clamp(0.95rem, 1.2vw, 1.08rem);
  --text-small: clamp(0.68rem, 0.8vw, 0.75rem);
  --text-micro: clamp(0.58rem, 0.7vw, 0.65rem);

  /* Spacing scale */
  --space-section: clamp(100px, 12vw, 160px);
  --space-block: clamp(48px, 6vw, 80px);

  /* Tinted shadows */
  --shadow-card: 0 8px 32px rgba(167, 139, 250, 0.06);
  --shadow-card-hover: 0 16px 48px rgba(167, 139, 250, 0.1);
  --shadow-glow: 0 0 40px rgba(167, 139, 250, 0.12);

  /* Premium easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Satoshi', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
  line-height: 1.7;
}

/* Noise texture overlay — premium grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a { color: inherit; }

/* Accessible focus rings — visible on keyboard nav, hidden on mouse */
*:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Skip to content — hidden until focused */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 10001;
  background: var(--purple);
  color: var(--black);
  padding: 12px 24px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  transition: top 0.3s var(--ease-out-expo);
}

.skip-link:focus {
  top: 0;
}
img { max-width: 100%; display: block; }
::selection { background: rgba(167, 139, 250, 0.3); color: var(--white); }

/* Body text max-width for readability */
p { max-width: 65ch; }

/* Page transition — crossfade on navigation */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

body {
  animation: pageIn 0.5s var(--ease-out-expo) both;
}

/* View Transitions API support (modern browsers) */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 0.3s ease-out both fade-out;
}

::view-transition-new(root) {
  animation: 0.3s ease-out both fade-in;
}

@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* ----- Container ----- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 48px;
}

/* ========================================
   NAVIGATION — Floating Glass Pill
   ======================================== */
nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 32px;
  width: auto;
  max-width: calc(var(--container) - 96px);
  min-width: min(620px, calc(100vw - 48px));
  background: rgba(9, 9, 11, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 240, 232, 0.06);
  border-radius: 100px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.5s var(--ease-out-expo),
              padding 0.4s var(--ease-out-expo),
              border-color 0.5s var(--ease-out-expo),
              box-shadow 0.5s var(--ease-out-expo),
              top 0.4s var(--ease-out-expo);
}

nav.nav-scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: rgba(167, 139, 250, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  top: 12px;
  padding: 12px 32px;
}

.nav-logo {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  text-decoration: none;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-logo:hover { transform: scale(1.05); }
.nav-logo span { color: var(--purple); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links li { position: relative; }

.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.4s var(--ease-out-expo);
  font-family: 'Space Mono', monospace;
  position: relative;
  padding: 8px 16px;
  border-radius: 100px;
  display: block;
}

.nav-links a:hover { color: var(--white); }

.nav-links a.active {
  color: var(--white);
  background: rgba(167, 139, 250, 0.12);
}

/* Remove old underline, use pill highlight instead */
.nav-links a.active::after { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.4s var(--ease-out-expo), opacity 0.3s;
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  background: var(--purple);
  color: var(--black);
  padding: 16px 36px;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
  display: inline-block;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary:active {
  transform: scale(0.98) translateY(1px);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover {
  background: var(--white);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.3);
}

.btn-primary:hover::before { opacity: 1; }

.btn-outline {
  border: 1px solid rgba(245, 240, 232, 0.18);
  color: var(--gray);
  padding: 16px 36px;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.4s var(--ease-out-expo), color 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
  display: inline-block;
  background: transparent;
  cursor: pointer;
}

.btn-outline:active {
  transform: scale(0.98) translateY(1px);
}

.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.1);
}

/* ========================================
   HERO
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

/* Particle canvas */
#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
}

/* Gradient orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(167, 139, 250, 0.08);
  top: 10%;
  right: 15%;
  animation: orbFloat1 12s ease-in-out infinite;
}

.hero-orb-2 {
  width: 350px;
  height: 350px;
  background: rgba(124, 77, 255, 0.06);
  bottom: 20%;
  left: 10%;
  animation: orbFloat2 15s ease-in-out infinite;
}

.hero-orb-3 {
  width: 250px;
  height: 250px;
  background: rgba(212, 170, 255, 0.05);
  top: 40%;
  left: 40%;
  animation: orbFloat3 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.15); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-30px, 20px); }
  66% { transform: translate(20px, -20px); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(245, 240, 232, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 240, 232, 0.018) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Removed hero-number — editorial layout doesn't need it */

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* Editorial hero — full split layout */
.hero-inner-editorial {
  grid-template-columns: 1fr;
  max-width: 680px;
  margin: 0 0 0 max(48px, calc((100vw - var(--container)) / 2 + 48px));
}

.hero-content { max-width: 560px; }

.hero-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
  min-height: 1.4em;
}

.hero-tag .scramble-char {
  color: var(--purple-deep);
}

.hero-name {
  font-family: 'Clash Display', sans-serif;
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.03em;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-name .line2 {
  color: var(--purple);
}

.hero-name .line2 .char-reveal {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-glow) 50%, var(--purple) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: charSpring 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  margin-top: 28px;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  color: var(--gray);
  max-width: 460px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

/* ---- Hero Cinematic Image (Editorial Layout) ---- */
.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(15%) contrast(1.08) brightness(0.9);
  transition: filter 0.8s var(--ease-out-expo);
}

.hero:hover .hero-image img {
  filter: grayscale(5%) contrast(1.1) brightness(0.95);
}

/* Gradient fade — dark left bleeds into image */
.hero-image-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--black) 0%, rgba(9, 9, 11, 0.85) 20%, rgba(9, 9, 11, 0.4) 50%, transparent 75%),
    linear-gradient(to top, var(--black) 0%, transparent 30%),
    linear-gradient(to bottom, rgba(9, 9, 11, 0.5) 0%, transparent 15%);
  pointer-events: none;
  z-index: 2;
}

/* Subtle label pinned to bottom-right of image */
.hero-image-label {
  position: absolute;
  bottom: 32px;
  right: 32px;
  z-index: 3;
  font-family: 'Space Mono', monospace;
  font-size: var(--text-micro);
  letter-spacing: 0.15em;
  color: rgba(245, 240, 232, 0.5);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s 1.8s forwards;
}

.hero-image-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Hero Photo Mosaic (legacy — kept for other pages) */
.hero-mosaic {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 5px;
  height: 460px;
  opacity: 0;
  animation: fadeIn 1s 0.5s forwards;
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(15%) contrast(1.05);
  transition: filter 0.5s, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mosaic-item:hover img {
  filter: grayscale(0%) contrast(1.1) brightness(1.05);
  transform: scale(1.06);
}

.mosaic-main { grid-row: span 2; }

.mosaic-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.mosaic-item:hover .mosaic-label { opacity: 1; transform: translateY(0); }

.mosaic-corner-tl {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-top: 2px solid var(--purple);
  border-left: 2px solid var(--purple);
  opacity: 0;
  transition: opacity 0.3s;
}

.mosaic-corner-br {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-bottom: 2px solid var(--purple);
  border-right: 2px solid var(--purple);
  opacity: 0;
  transition: opacity 0.3s;
}

.mosaic-item:hover .mosaic-corner-tl,
.mosaic-item:hover .mosaic-corner-br { opacity: 1; }

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeIn 1s 1.4s forwards;
  z-index: 2;
}

.scroll-indicator span {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--gray);
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--purple), transparent);
  animation: scrollPulse 2s infinite;
}

/* ========================================
   TICKER
   ======================================== */
.ticker-section {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(167, 139, 250, 0.02);
}

.ticker-track {
  display: flex;
  animation: ticker 22s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  padding: 18px 48px;
  font-family: 'Clash Display', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 48px;
  flex-shrink: 0;
}

.ticker-item .dot {
  color: var(--purple);
  font-size: 0.6rem;
}

/* ========================================
   SECTION SHARED
   ======================================== */
section {
  padding: var(--space-section) 48px;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Clash Display', sans-serif;
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-block);
}

.section-desc {
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ========================================
   PAGE HEADER
   ======================================== */
/* ---- Cinematic Video Page Header ---- */
.page-header-cinematic {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 48px;
}

.page-header-cinematic .container {
  max-width: 520px;
  margin-left: max(32px, 5vw);
  margin-right: auto;
  padding-left: 0;
}

/* Photo variant — same cinematic split but with a static image */
.page-header-photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.page-header-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(15%) contrast(1.1) brightness(0.85);
  transition: filter 0.8s var(--ease-out-expo);
}

.page-header-cinematic:hover .page-header-photo img {
  filter: grayscale(5%) contrast(1.15) brightness(0.9);
}

.page-header-video {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.page-header-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  border: none;
  opacity: 0.6;
  filter: grayscale(20%) contrast(1.1);
}

.page-header-video-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to right, var(--black) 0%, rgba(9, 9, 11, 0.9) 25%, rgba(9, 9, 11, 0.4) 55%, transparent 80%),
    linear-gradient(to top, var(--black) 0%, transparent 40%),
    linear-gradient(to bottom, rgba(9, 9, 11, 0.6) 0%, transparent 20%);
  pointer-events: none;
}

.page-header {
  padding: 140px 48px 60px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 70% 40%, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
}

.page-header .container { position: relative; z-index: 2; }

.page-title {
  font-family: 'Clash Display', sans-serif;
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.page-subtitle {
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 500px;
  line-height: 1.7;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about { background: var(--black); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px 1fr;
  gap: 40px;
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
}

.about-text p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--gray-light);
  margin-bottom: 20px;
}

.about-text p strong {
  color: var(--white);
  font-weight: 500;
}

.about-photo {
  position: relative;
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  display: block;
  filter: grayscale(20%) contrast(1.05);
  transition: filter 0.5s, transform 0.5s;
}

.about-photo:hover img {
  filter: grayscale(0%) contrast(1.1);
  transform: scale(1.03);
}

.about-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.5) 0%, transparent 50%);
  pointer-events: none;
}

.about-photo-label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--purple);
  text-transform: uppercase;
}

.about-photo-corner-tl {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-top: 2px solid var(--purple);
  border-left: 2px solid var(--purple);
}

.about-photo-corner-br {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-bottom: 2px solid var(--purple);
  border-right: 2px solid var(--purple);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.stat-box {
  background: rgba(245, 240, 232, 0.02);
  border: 1px solid var(--border);
  padding: 28px 20px;
  transition: background 0.4s, border-color 0.4s, transform 0.3s;
}

.stat-box:hover {
  background: rgba(167, 139, 250, 0.06);
  border-color: rgba(167, 139, 250, 0.3);
  transform: translateY(-2px);
}

.stat-num {
  font-family: 'Clash Display', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--purple);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--gray);
  text-transform: uppercase;
}

/* ========================================
   FEATURED WORK
   ======================================== */
.featured { background: #0c0c0c; }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
}

.featured-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  display: block;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.featured-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: var(--shadow-card-hover);
}

.featured-card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.featured-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(15%);
  transition: filter 0.5s, transform 0.6s;
}

.featured-card:hover .featured-card-img img {
  filter: grayscale(0%);
  transform: scale(1.06);
}

.featured-card-body {
  padding: 24px 28px;
}

.featured-card-cat {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.featured-card-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  color: var(--white);
}

.featured-card-desc {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ========================================
   CTA BANNER
   ======================================== */
.cta-banner {
  padding: var(--space-section) 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--black);
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
}

.cta-banner-content {
  position: relative;
  z-index: 2;
}

.cta-banner h2 {
  font-family: 'Clash Display', sans-serif;
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.cta-banner h2 span { color: var(--purple); }

.cta-banner p {
  color: var(--gray);
  font-size: 1rem;
  margin-bottom: 36px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.cta-banner-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========================================
   WORK PAGE — Sections
   ======================================== */
.work-section {
  padding: 60px 48px 80px;
  border-bottom: 1px solid var(--border);
}

.work-section:last-of-type { border-bottom: none; }

.work-section .container { max-width: var(--container); margin: 0 auto; }

.category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.category-icon { font-size: 1.4rem; }

.category-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.category-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 16px;
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.media-grid.single { grid-template-columns: 1fr; max-width: 700px; }

.media-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.4s, box-shadow 0.4s;
}

.media-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.06);
}

.media-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.media-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.media-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.media-card:hover .media-card-img img { transform: scale(1.05); }

.media-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.15) 50%, transparent 100%);
  pointer-events: none;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-align: center;
}

.play-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  backdrop-filter: blur(4px);
}

.media-card:hover .play-circle {
  background: var(--purple);
  transform: scale(1.12);
  box-shadow: 0 0 30px rgba(167, 139, 250, 0.4);
}

.play-triangle {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid var(--black);
  margin-left: 3px;
}

.play-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
}

.media-card-body { padding: 16px 18px; }

.media-card-cat {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.media-card-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--white);
  margin-bottom: 4px;
}

.media-card-credit {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  color: rgba(245, 240, 232, 0.45);
  letter-spacing: 0.06em;
}

.media-card.featured { grid-column: span 2; }
.media-card.featured .media-card-img { aspect-ratio: 21 / 9; }

.media-card-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0a1a, #1a0e30);
  position: relative;
}

.media-card-placeholder .placeholder-shape {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.1);
  top: -40px;
  right: -40px;
  pointer-events: none;
}

.placeholder-text {
  text-align: center;
  opacity: 0.35;
}

.placeholder-text .icon { font-size: 2rem; margin-bottom: 8px; }

.placeholder-text p {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--white);
  text-transform: uppercase;
}

/* ========================================
   GALLERY (Photography)
   ======================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  cursor: pointer;
}

.gallery-item.wide { grid-column: span 2; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(10%);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: grayscale(0%) brightness(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--white);
  text-transform: uppercase;
}

.gallery-note {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--gray);
  text-transform: uppercase;
  margin-top: 14px;
  opacity: 0.5;
}

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  text-align: center;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid var(--border);
  transition: transform 0.3s;
}

.lightbox-caption {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--gray);
  text-transform: uppercase;
  margin-top: 16px;
}

.lightbox-counter {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(245, 240, 232, 0.3);
  margin-top: 6px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.2rem;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  z-index: 10;
  font-weight: 300;
  line-height: 1;
}

.lightbox-close:hover { color: var(--purple); transform: scale(1.1); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(245, 240, 232, 0.05);
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  z-index: 10;
  line-height: 1;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: var(--purple);
  color: var(--purple);
}

/* ========================================
   EXPERIENCE — Vertical Timeline
   ======================================== */
.experience { background: var(--black); }

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0;
}

/* Center vertical line */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

.timeline-line-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--purple), var(--purple-glow));
  border-radius: 2px;
  transition: height 0.1s linear;
}

/* Timeline items */
.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 40px 60px;
}

.timeline-item[data-side="left"] {
  left: 0;
  text-align: right;
  padding-right: 48px;
  padding-left: 0;
}

.timeline-item[data-side="right"] {
  left: 50%;
  text-align: left;
  padding-left: 48px;
  padding-right: 0;
}

/* Timeline dot on the center line */
.timeline-dot {
  position: absolute;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--black);
  border: 2px solid var(--border);
  z-index: 2;
  transition: border-color 0.5s var(--ease-out-expo), box-shadow 0.5s;
}

.timeline-item[data-side="left"] .timeline-dot {
  right: -8px;
}

.timeline-item[data-side="right"] .timeline-dot {
  left: -8px;
}

.timeline-dot-inner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: background 0.5s, transform 0.5s var(--ease-spring);
}

/* Activate on reveal */
.timeline-item.visible .timeline-dot {
  border-color: var(--purple);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.25);
}

.timeline-item.visible .timeline-dot-inner {
  background: var(--purple);
  transform: translate(-50%, -50%) scale(1.2);
}

/* Timeline card */
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 32px;
  border-radius: 8px;
  transition: border-color 0.4s var(--ease-out-expo), box-shadow 0.4s, transform 0.4s var(--ease-out-expo);
  position: relative;
}

.timeline-card:hover {
  border-color: rgba(167, 139, 250, 0.2);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

/* Card arrow pointing to timeline line */
.timeline-item[data-side="left"] .timeline-card::after {
  content: '';
  position: absolute;
  top: 14px;
  right: -8px;
  width: 14px;
  height: 14px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(-45deg);
}

.timeline-item[data-side="right"] .timeline-card::after {
  content: '';
  position: absolute;
  top: 14px;
  left: -8px;
  width: 14px;
  height: 14px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(-45deg);
}

.timeline-year {
  font-family: 'Space Mono', monospace;
  font-size: var(--text-micro);
  color: var(--purple);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.timeline-company {
  font-family: 'Clash Display', sans-serif;
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.timeline-role {
  font-size: 0.88rem;
  color: var(--gray);
  margin-bottom: 14px;
  font-style: italic;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--gray-light);
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: left;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-item[data-side="left"] .timeline-tags {
  justify-content: flex-end;
}

.timeline-item[data-side="left"] .timeline-desc {
  text-align: right;
  margin-left: auto;
}

.timeline-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--border);
  color: var(--gray);
  border-radius: 100px;
  transition: border-color 0.3s, color 0.3s;
}

.timeline-card:hover .timeline-tag {
  border-color: rgba(167, 139, 250, 0.2);
  color: var(--gray-light);
}

/* ========================================
   SKILLS
   ======================================== */
.skills { background: #0c0c0c; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  max-width: var(--container);
  margin: 0 auto;
}

.skill-card {
  padding: 28px 22px;
  background: rgba(245, 240, 232, 0.02);
  border: 1px solid var(--border);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

.skill-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--purple-glow));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s;
}

.skill-card:hover {
  background: rgba(167, 139, 250, 0.04);
  border-color: rgba(167, 139, 250, 0.2);
  box-shadow: 0 8px 24px rgba(167, 139, 250, 0.05);
}

.skill-card:hover::after { transform: scaleX(1); }

.skill-icon { font-size: 1.8rem; margin-bottom: 16px; }

.skill-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: rgba(245, 240, 232, 0.04);
  color: var(--gray);
  border: 1px solid var(--border);
  transition: border-color 0.3s, color 0.3s;
}

.skill-card:hover .skill-tag {
  border-color: rgba(167, 139, 250, 0.2);
  color: var(--gray-light);
}

/* ========================================
   CONTACT PAGE — Cinematic Split
   ======================================== */
.contact-page {
  background: var(--black);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.contact-page .contact-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 30% 50%, rgba(167, 139, 250, 0.05) 0%, transparent 70%);
}

/* Cinematic photo — right side */
.contact-hero-photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.contact-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(20%) contrast(1.05) brightness(0.8);
  transition: filter 0.8s var(--ease-out-expo);
}

.contact-page:hover .contact-hero-photo img {
  filter: grayscale(5%) contrast(1.1) brightness(0.85);
}

.contact-hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to right, var(--black) 0%, rgba(9, 9, 11, 0.85) 25%, rgba(9, 9, 11, 0.3) 60%, transparent 85%),
    linear-gradient(to top, var(--black) 0%, transparent 30%),
    linear-gradient(to bottom, rgba(9, 9, 11, 0.5) 0%, transparent 15%);
  pointer-events: none;
}

.contact-page-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 140px 0 80px;
}

.contact-content {
  max-width: 520px;
  margin-left: max(32px, 5vw);
}

h1.contact-big,
h2.contact-big,
.contact-big {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(48px, 8vw, 100px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.contact-big span { color: var(--purple); }

.contact-sub {
  font-size: var(--text-body);
  color: var(--gray);
  margin-bottom: 40px;
  line-height: 1.7;
  max-width: 420px;
}

/* Contact cards grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 32px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px 24px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.4s var(--ease-out-expo), box-shadow 0.4s, transform 0.4s var(--ease-out-expo);
  display: block;
}

.contact-card:hover {
  border-color: rgba(167, 139, 250, 0.25);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.contact-card-primary {
  grid-column: span 2;
  background: rgba(167, 139, 250, 0.06);
  border-color: rgba(167, 139, 250, 0.15);
}

.contact-card-primary:hover {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: var(--shadow-glow);
}

.contact-card-icon {
  font-size: 1.2rem;
  margin-bottom: 8px;
  opacity: 0.6;
}

.contact-card-primary .contact-card-icon {
  opacity: 1;
  color: var(--purple);
}

.contact-card-label {
  font-family: 'Space Mono', monospace;
  font-size: var(--text-micro);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 4px;
}

.contact-card-value {
  font-family: 'Satoshi', sans-serif;
  font-size: 0.9rem;
  color: var(--white);
  font-weight: 500;
}

.contact-card-primary .contact-card-value {
  color: var(--purple-glow);
}

.contact-location {
  font-family: 'Space Mono', monospace;
  font-size: var(--text-micro);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  opacity: 0.5;
}

/* ========================================
   CATEGORY JUMP NAV (Work Page)
   ======================================== */
.category-nav {
  position: sticky;
  top: 72px;
  z-index: 50;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.category-nav .container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-pill {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 20px;
  border: 1px solid var(--border);
  color: var(--gray);
  transition: all 0.25s;
  white-space: nowrap;
}

.cat-pill:hover,
.cat-pill.active {
  border-color: var(--purple);
  color: var(--purple);
  background: rgba(167, 139, 250, 0.08);
}

/* ========================================
   PROJECT CARDS (Horizontal Layout)
   ======================================== */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.project-card:hover {
  border-color: rgba(167, 139, 250, 0.25);
  box-shadow: 0 8px 32px rgba(167, 139, 250, 0.06);
}

.project-card-horizontal {
  display: grid;
  grid-template-columns: 2fr 3fr;
  min-height: 260px;
}

.project-card-img {
  position: relative;
  overflow: hidden;
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(10%);
  transition: filter 0.5s, transform 0.6s;
}

.project-card:hover .project-card-img img {
  filter: grayscale(0%) brightness(1.05);
  transform: scale(1.04);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

.project-card-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-card-cat {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.project-card-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.project-card-year {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  color: var(--gray);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.project-card-desc {
  font-size: 0.9rem;
  color: var(--gray-light);
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 480px;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--border);
  color: var(--gray);
  transition: border-color 0.3s, color 0.3s;
}

.project-card:hover .project-tag {
  border-color: rgba(167, 139, 250, 0.2);
  color: var(--gray-light);
}

/* ========================================
   PROJECT GRID (3-column for Video cards)
   ======================================== */
.project-grid {
  display: grid;
  gap: 14px;
}

.project-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.project-grid-3 .media-card-img {
  aspect-ratio: 4 / 3;
}

/* ========================================
   PHOTO SERIES (Photography sections)
   ======================================== */
.photo-series {
  margin-bottom: 48px;
}

.photo-series:last-child { margin-bottom: 0; }

.photo-series-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
}

.photo-series-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.photo-series-meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--gray);
  text-transform: uppercase;
  opacity: 0.6;
}

/* Legacy grid (fallback) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px;
}

.photo-grid .gallery-item {
  aspect-ratio: 1;
}

/* ---- Horizontal Scroll Gallery ---- */
.photo-scroll {
  position: relative;
  overflow: hidden;
  margin: 0 -48px; /* Bleed to edges */
  padding: 0 48px;
}

.photo-scroll-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  padding-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.photo-scroll-track::-webkit-scrollbar { display: none; }
.photo-scroll-track.is-dragging { cursor: grabbing; scroll-behavior: auto; }

.photo-scroll-track .gallery-item {
  flex: 0 0 auto;
  width: 280px;
  height: 210px;
  aspect-ratio: auto;
  border-radius: 4px;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
}

.photo-scroll-track .gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.photo-scroll-track .gallery-item img {
  border-radius: 4px;
}

/* Scroll progress indicator */
.photo-scroll-progress {
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
}

.photo-scroll-thumb {
  height: 100%;
  background: var(--purple);
  border-radius: 2px;
  width: 30%;
  transition: width 0.2s, transform 0.1s linear;
}

/* Series hint text */
.photo-series-hint {
  font-family: 'Space Mono', monospace;
  font-size: var(--text-micro);
  letter-spacing: 0.1em;
  color: var(--gray);
  opacity: 0.5;
  margin-left: auto;
  text-transform: uppercase;
  transition: opacity 0.4s;
}

.photo-series:hover .photo-series-hint { opacity: 0; }

/* ---- Inline Video Embed ---- */
.media-card-embed {
  cursor: pointer;
}

.media-card-embed .media-card-img { position: relative; }

.media-card-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  z-index: 5;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  padding: 40px 48px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

footer p {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--gray);
  text-transform: uppercase;
  max-width: none;
}

footer span { color: var(--purple); }

.footer-tagline {
  color: rgba(245, 240, 232, 0.25);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  transition: color 0.3s var(--ease-out-expo);
}

.footer-links a:hover { color: var(--purple); }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Character spring reveal */
@keyframes charSpring {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
    filter: blur(6px);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.02);
    filter: blur(0);
  }
  80% {
    transform: translateY(2px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Typewriter cursor */
.typewriter-cursor {
  display: inline;
  color: var(--purple);
  font-weight: 300;
  animation: cursorBlink 0.8s step-end infinite;
  margin-left: 2px;
}

.typewriter-cursor.cursor-fade {
  animation: cursorFadeOut 0.5s forwards;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes cursorFadeOut {
  to { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo), filter 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    padding: 16px 20px;
    min-width: 100%;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    background: var(--black);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    z-index: 9999;
  }
  nav.nav-scrolled {
    padding: 14px 20px;
    top: 0;
    transform: none;
    background: var(--black);
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--black);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out-expo);
    overflow: hidden;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
  }

  .nav-links.open li:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
  .nav-links.open li:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
  .nav-links.open li:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
  .nav-links.open li:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }

  .nav-links a {
    font-family: 'Clash Display', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    padding: 12px 24px;
    border-radius: 16px;
  }

  .nav-links a.active {
    background: rgba(167, 139, 250, 0.1);
  }

  .nav-toggle { display: flex; }

  section { padding: 60px 24px; }
  .container { padding: 0 24px; }

  .hero { padding: 100px 0 60px; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 24px;
  }

  .hero-inner-editorial {
    margin: 0 auto;
    padding: 0 24px;
    max-width: 100%;
  }

  .hero-image {
    width: 100%;
    height: 45%;
    top: auto;
    bottom: 0;
    opacity: 0.35;
  }

  .hero-image-gradient {
    background:
      linear-gradient(to bottom, var(--black) 0%, rgba(9, 9, 11, 0.6) 40%, transparent 100%),
      linear-gradient(to top, var(--black) 0%, transparent 40%);
  }

  .hero-image-label { display: none; }

  .hero-mosaic {
    height: 300px;
    max-width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-photo { max-width: 280px; }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-header { padding: 120px 24px 40px; }
  
  .page-header-cinematic { min-height: 45vh; }
  .page-header-cinematic .container {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .page-header-video,
  .page-header-photo {
    width: 100%;
    opacity: 0.3;
  }
  .page-header-video-gradient {
    background:
      linear-gradient(to bottom, var(--black) 0%, rgba(9, 9, 11, 0.5) 30%, transparent 100%),
      linear-gradient(to top, var(--black) 0%, transparent 50%);
  }

  .media-grid { grid-template-columns: 1fr; }
  .media-card.featured { grid-column: span 1; }
  .media-card.featured .media-card-img { aspect-ratio: 16 / 9; }

  .project-card-horizontal { grid-template-columns: 1fr; min-height: auto; }
  .project-card-img { aspect-ratio: 16 / 10; }
  .project-card-body { padding: 24px; }

  .project-grid-3 { grid-template-columns: 1fr; }

  .category-nav { top: 64px; }
  .category-nav .container { gap: 6px; }
  .cat-pill { padding: 6px 14px; font-size: 0.6rem; }

  .photo-grid { grid-template-columns: repeat(3, 1fr); }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.wide { grid-column: span 2; }

  .work-section { padding: 40px 24px 60px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }

  /* Timeline → single column on mobile */
  .timeline-line { left: 20px; }
  .timeline-item,
  .timeline-item[data-side="left"],
  .timeline-item[data-side="right"] {
    left: 0;
    width: 100%;
    text-align: left;
    padding-left: 52px;
    padding-right: 0;
  }
  .timeline-item[data-side="left"] .timeline-dot,
  .timeline-item[data-side="right"] .timeline-dot {
    left: 12px;
    right: auto;
  }
  .timeline-item[data-side="left"] .timeline-card::after,
  .timeline-item[data-side="right"] .timeline-card::after {
    left: -8px;
    right: auto;
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-right: none;
    border-bottom: none;
  }
  .timeline-item[data-side="left"] .timeline-tags { justify-content: flex-start; }
  .timeline-item[data-side="left"] .timeline-desc { text-align: left; margin-left: 0; }

  footer { padding: 32px 24px; }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-links { gap: 16px; flex-wrap: wrap; justify-content: center; }

  .cta-banner { padding: 60px 24px; }
  .contact-hero-photo {
    width: 100%;
    opacity: 0.25;
  }
  .contact-hero-gradient {
    background:
      linear-gradient(to bottom, var(--black) 0%, rgba(9, 9, 11, 0.5) 40%, transparent 100%),
      linear-gradient(to top, var(--black) 0%, transparent 50%);
  }
  .contact-content {
    margin-left: 24px;
    margin-right: 24px;
    max-width: 100%;
  }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card-primary { grid-column: span 1; }

  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 1.5rem; }
}

@media (max-width: 500px) {
  .hero-mosaic {
    grid-template-columns: 1fr 1fr;
    height: 240px;
  }

  .mosaic-main { grid-row: span 2; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.wide { grid-column: span 2; }

  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .contact-links { flex-direction: column; align-items: center; }

  .lightbox-prev, .lightbox-next { width: 36px; height: 36px; font-size: 1.2rem; }
  .lightbox-close { top: 16px; right: 20px; font-size: 1.8rem; }
}
