/* ==========================================================================
   Dennis Dimangondayao, 2026
   Dark, kinetic, red accent (carried over from the original red top border).
   ========================================================================== */

:root {
  --bg: #08080c;
  --bg-2: #0e0e14;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .1);
  --text: #f3f3f6;
  --muted: #9c9cab;
  --red: #ff2b2b;
  --orange: #ff7a1a;
  --pink: #ff2d8f;
  --grad: linear-gradient(100deg, var(--red) 0%, var(--pink) 50%, var(--orange) 100%);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', var(--font);
  --radius: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 76px;
  --gutter: clamp(16px, 4vw, 48px);
}

@view-transition { navigation: auto; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain over everything */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip {
  position: fixed;
  left: 16px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  transition: top .2s;
}
.skip:focus { top: 16px; }

.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.wide { width: min(1500px, 100%); }
.wrap.narrow { width: min(820px, 100%); }
.center { text-align: center; }

/* Type ------------------------------------------------------------------ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin: 0 0 1.25rem;
  font: 500 .8rem/1 var(--font);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  width: 28px; height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

.h2, .h3, .page-title, .hero-title {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.02;
  margin: 0;
}
.h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }

.grad {
  font-style: normal;
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: grad-shift 6s ease-in-out infinite alternate;
}
@keyframes grad-shift { to { background-position: 100% 0; } }

.lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--muted); max-width: 46ch; margin: 1.5rem 0 0; }
.lead a, .prose a, .credit a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 4px; }
.lead a:hover, .prose a:hover, .credit a:hover { color: var(--orange); }

.prose { font-size: 1.15rem; }
.prose p { margin: 0 0 1.4em; }
.prose p:first-child::first-letter {
  float: left;
  font: 700 4.2em/.85 var(--display);
  margin: .06em .12em 0 0;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Scroll progress + cursor glow ------------------------------------------ */

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  z-index: 150;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

.cursor-glow {
  position: fixed;
  left: 0; top: 0;
  width: 560px; height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(255, 43, 43, .12), transparent 65%);
  transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0);
  transition: opacity .4s;
}
@media (hover: none) { .cursor-glow { display: none; } }

/* Header ----------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: var(--header-h);
  transition: background .4s, border-color .4s, transform .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8, 8, 12, .7);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-color: var(--line);
}
.site-header.hidden { transform: translateY(-100%); }

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--grad);
  font: 700 1rem/1 var(--display);
  color: #fff;
  letter-spacing: -.02em;
  transition: transform .5s var(--ease), border-radius .5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); border-radius: 50%; }
.brand-name { font: 300 1.05rem/1.1 var(--display); letter-spacing: -.01em; }
.brand-name b { font-weight: 700; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  position: relative;
  display: block;
  padding: 10px 14px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  transition: color .25s, background .25s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current] { color: var(--text); }
.site-nav a[aria-current]::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 4px;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.nav-toggle .bars, .nav-toggle .bars::before {
  position: absolute;
  left: 13px;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .4s var(--ease);
}
.nav-toggle .bars { top: 19px; }
.nav-toggle .bars::before { content: ''; left: 0; top: 6px; }
.nav-open .nav-toggle .bars { transform: translateY(3px) rotate(45deg); }
.nav-open .nav-toggle .bars::before { transform: translateY(-6px) rotate(-90deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    padding: var(--header-h) var(--gutter) 40px;
    background: rgba(8, 8, 12, .96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    clip-path: circle(0 at calc(100% - 46px) 38px);
    transition: clip-path .7s var(--ease);
    visibility: hidden;
  }
  .nav-open .site-nav { clip-path: circle(150% at calc(100% - 46px) 38px); visibility: visible; }
  .nav-open { overflow: hidden; }
  .site-nav ul { flex-direction: column; gap: 0; width: 100%; }
  .site-nav li {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s, transform .6s var(--ease);
    transition-delay: calc(var(--i) * .05s + .15s);
  }
  .nav-open .site-nav li { opacity: 1; transform: none; }
  .site-nav a {
    font: 700 clamp(2.2rem, 10vw, 3.4rem)/1.15 var(--display);
    letter-spacing: -.03em;
    padding: 6px 0;
    color: var(--text);
    background: none !important;
    border-radius: 0;
  }
  .site-nav a[aria-current] { background: var(--grad) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent; }
  .site-nav a[aria-current]::after { display: none; }
  .header-inner { position: relative; }
  .brand { position: relative; z-index: 2; }
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 16px 28px;
  border-radius: 999px;
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transform: translate(var(--mx), var(--my));
  transition: transform .4s var(--ease), box-shadow .3s, background .3s, border-color .3s;
}
.btn .icon { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn-primary { background: var(--grad); background-size: 150% 100%; color: #fff; box-shadow: 0 10px 40px -10px rgba(255, 43, 43, .6); }
.btn-primary:hover { box-shadow: 0 16px 50px -10px rgba(255, 45, 143, .8); background-position: 100% 0; }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .3); background: var(--surface-2); }
.btn[disabled] { opacity: .6; cursor: wait; }

.link-arrow { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; text-decoration: none; }
.link-arrow .icon { width: 18px; transition: transform .4s var(--ease); }
.link-arrow:hover .icon { transform: translateX(6px); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  transition: border-color .3s, background .3s;
}
.chip .icon { width: 16px; }
.chip:hover { border-color: var(--red); background: rgba(255, 43, 43, .08); }

.icon { width: 24px; height: 24px; flex: none; }

/* Hero blobs ------------------------------------------------------------- */

.hero-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; filter: blur(70px) saturate(1.3); opacity: .55; }
.hero-blobs span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  animation: blob 18s ease-in-out infinite alternate;
}
.hero-blobs span:nth-child(1) { width: 46vmax; height: 46vmax; left: -10vmax; top: -16vmax; background: var(--red); }
.hero-blobs span:nth-child(2) { width: 38vmax; height: 38vmax; right: -12vmax; top: 4vmax; background: var(--pink); animation-duration: 22s; animation-delay: -6s; }
.hero-blobs span:nth-child(3) { width: 30vmax; height: 30vmax; left: 30%; bottom: -18vmax; background: var(--orange); animation-duration: 26s; animation-delay: -12s; }
@keyframes blob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vmax, 6vmax) scale(1.15); }
  100% { transform: translate(-6vmax, 10vmax) scale(.9); }
}

/* Home hero -------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: calc(var(--header-h) + 40px) 0 100px;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(transparent, var(--bg));
  z-index: -1;
}
.hero .hero-blobs { z-index: -2; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-inner { position: relative; }

.hero-title { font-size: clamp(3rem, 11vw, 9.5rem); line-height: .92; }
.hero-title .line { display: block; }
.hero-title em { font-style: normal; }

.hero-rotator {
  display: flex;
  gap: .4em;
  margin: 2rem 0 0;
  font: 400 clamp(1.2rem, 2.4vw, 1.8rem)/1.3 var(--display);
  color: var(--muted);
}
.rot { position: relative; display: inline-block; height: 1.3em; overflow: hidden; color: var(--text); font-weight: 500; }
.rot span { display: block; animation: rot 10s var(--ease) infinite; }
@keyframes rot {
  0%, 20% { transform: translateY(0); }
  25%, 45% { transform: translateY(-100%); }
  50%, 70% { transform: translateY(-200%); }
  75%, 95% { transform: translateY(-300%); }
  100% { transform: translateY(0); }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.5rem; }

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 32px;
  width: 28px; height: 46px;
  margin-left: -14px;
  border: 2px solid var(--line);
  border-radius: 20px;
}
.scroll-cue span {
  position: absolute;
  left: 50%; top: 8px;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--red);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

.hero-404 .lead { margin-top: 2rem; }

/* Split text animation --------------------------------------------------- */

[data-split] .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.5em) rotate(6deg);
  filter: blur(8px);
  animation: char-in .9s var(--ease) forwards;
  animation-delay: calc(var(--ci) * .025s + var(--li, 0) * .15s);
}
[data-split] .word { display: inline-block; white-space: nowrap; }
@keyframes char-in { to { opacity: 1; transform: none; filter: none; } }

/* Reveal on scroll ------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* Sections --------------------------------------------------------------- */

.section { position: relative; padding: clamp(70px, 10vw, 140px) 0; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 800px; }

/* Spotlight cards (pointer tracked radial highlight) */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity .4s;
  background: radial-gradient(400px circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 60, 90, .18), transparent 60%);
}
.spot:hover::before { opacity: 1; }

[data-tilt] { transform-style: preserve-3d; transition: transform .6s var(--ease), border-color .3s; will-change: transform; }

/* Disciplines */
.disciplines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1024px) { .disciplines { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .disciplines { grid-template-columns: 1fr; } }

.discipline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 340px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  overflow: hidden;
}
.discipline:hover { border-color: rgba(255, 43, 43, .45); }
.discipline-num { font: 500 .85rem/1 var(--display); color: var(--muted); letter-spacing: .1em; }
.discipline-icon {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin-top: auto;
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--red);
  transition: background .4s, color .4s, transform .6s var(--ease);
}
.discipline-icon .icon { width: 30px; height: 30px; }
.discipline:hover .discipline-icon { background: var(--grad); color: #fff; transform: translateZ(40px) rotate(-6deg); }
.discipline-title { font: 700 2rem/1 var(--display); letter-spacing: -.03em; }
.discipline-blurb { color: var(--muted); font-size: .98rem; }
.discipline-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9rem; font-weight: 500; }
.discipline-meta .icon { width: 18px; transition: transform .4s var(--ease); }
.discipline:hover .discipline-meta .icon { transform: translateX(6px); color: var(--red); }

/* Marquee */
.marquee-section { overflow: hidden; }
.marquee { --gap: 16px; display: flex; overflow: hidden; margin-bottom: var(--gap); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: var(--gap); flex: none; animation: marquee 70s linear infinite; padding-right: var(--gap); }
.marquee.reverse .marquee-track { animation-direction: reverse; animation-duration: 80s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-item {
  position: relative;
  flex: none;
  width: clamp(240px, 26vw, 360px);
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.marquee-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .5s; filter: grayscale(.6) brightness(.8); }
.marquee-item span {
  position: absolute;
  inset: auto 0 0;
  padding: 30px 16px 14px;
  font-size: .9rem;
  font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
  opacity: 0;
  transform: translateY(10px);
  transition: .4s var(--ease);
}
.marquee-item:hover img { transform: scale(1.06); filter: none; }
.marquee-item:hover span { opacity: 1; transform: none; }
.marquee-section .center { margin-top: 48px; }

/* Door */
.door { min-height: 90vh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.door-inner { display: flex; justify-content: flex-end; }
.door-card { max-width: 520px; padding: clamp(28px, 4vw, 48px); }
.door-card p { color: var(--muted); }
.door-card p a { color: var(--text); text-decoration-color: var(--red); text-underline-offset: 4px; }

.glass {
  background: rgba(14, 14, 20, .6);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}

/* Interior page hero ----------------------------------------------------- */

.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(60px, 10vw, 140px)) 0 clamp(40px, 6vw, 80px);
  overflow: hidden;
  isolation: isolate;
}
.page-hero .hero-blobs { z-index: -2; opacity: .3; }
.page-hero .hero-blobs span:nth-child(1) { top: -30vmax; }
.page-title { font-size: clamp(3rem, 10vw, 8rem); }

/* About */
.about-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }

/* Web grid --------------------------------------------------------------- */

.web-grid { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.web-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
}
.web-card.feature { grid-column: span 2; }
@media (max-width: 600px) { .web-card.feature { grid-column: auto; } }
a.web-card:hover { border-color: rgba(255, 43, 43, .5); }
.web-card-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.web-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
a.web-card:hover .web-card-media img { transform: scale(1.06); }
.web-card-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
.web-card-title { font: 600 1.05rem/1.3 var(--display); }
.web-card-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .85rem; }
.web-card-link .icon { width: 14px; height: 14px; transition: transform .3s var(--ease), color .3s; }
a.web-card:hover .web-card-link .icon { transform: translate(2px, -2px); color: var(--red); }
.credit { margin-top: 48px; color: var(--muted); }

/* Masonry + lightbox ----------------------------------------------------- */

.masonry { columns: 3 320px; column-gap: 16px; }
.masonry-item {
  position: relative;
  display: block;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  break-inside: avoid;
  cursor: zoom-in;
}
.masonry-item img { width: 100%; transition: transform 1s var(--ease), filter .6s; }
.masonry-item:hover img { transform: scale(1.05); filter: brightness(.7); }
.masonry-caption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 18px 16px;
  font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
  opacity: 0;
  transform: translateY(12px);
  transition: .5s var(--ease);
}
.masonry-caption .icon { width: 20px; }
.masonry-item:hover .masonry-caption, .masonry-item:focus-visible .masonry-caption { opacity: 1; transform: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(4, 4, 6, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .35s;
  border: 0;
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  padding: 0;
  color: var(--text);
}
.lightbox[open] { opacity: 1; }
.lightbox:not([open]) { display: none; } /* closed dialog must not block clicks */
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; display: grid; gap: 14px; justify-items: center; padding: 70px 16px; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 80vh; width: auto; border-radius: 10px; box-shadow: 0 40px 100px rgba(0, 0, 0, .7); animation: lb-in .5s var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: scale(.96); } }
.lightbox figcaption { color: var(--muted); font-size: .95rem; }
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  cursor: pointer;
  transition: background .3s, transform .3s var(--ease);
}
.lb-btn:hover { background: var(--red); transform: scale(1.06); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -27px; }
.lb-next { right: 16px; top: 50%; margin-top: -27px; }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 16px; margin: 0; } }

/* Video facades ---------------------------------------------------------- */

.yt {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  color: #fff;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: transform 1s var(--ease), opacity .5s; }
.yt:hover img { transform: scale(1.05); opacity: .6; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play {
  position: absolute;
  left: 50%; top: 50%;
  display: grid;
  place-items: center;
  width: 84px; height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 0 rgba(255, 43, 43, .6);
  animation: pulse 2.4s infinite;
  transition: transform .5s var(--ease);
}
.yt-play .icon { width: 30px; height: 30px; margin-left: 4px; }
.yt:hover .yt-play { transform: scale(1.12); }
@keyframes pulse { 70% { box-shadow: 0 0 0 26px rgba(255, 43, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 43, 43, 0); } }
.yt.playing .yt-play, .yt.playing img { display: none; }

.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.video-cell.full { grid-column: 1 / -1; }
@media (max-width: 760px) { .video-grid { grid-template-columns: 1fr; } }

.media-list { display: grid; gap: clamp(40px, 6vw, 80px); }
.media-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.media-row:nth-child(even) { grid-template-columns: 1fr 1.6fr; }
.media-row:nth-child(even) .yt { order: 2; }
.media-meta p { color: var(--muted); margin: .8rem 0 0; }
.media-meta .h3 { margin-top: .6rem; }
@media (max-width: 760px) {
  .media-row, .media-row:nth-child(even) { grid-template-columns: 1fr; }
  .media-row:nth-child(even) .yt { order: 0; }
}

/* Downloads -------------------------------------------------------------- */

.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 1rem; }
@media (max-width: 600px) { .downloads { grid-template-columns: 1fr; } }
.download {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .3s;
}
.download:hover { border-color: var(--red); }
.download-res { font: 700 2rem/1 var(--display); }
.download-size { color: var(--muted); }
.download-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; }
.download-cta .icon { width: 18px; color: var(--red); }

/* Contact form ----------------------------------------------------------- */

.contact-form { padding: clamp(24px, 5vw, 48px); display: grid; gap: 18px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%;
  padding: 26px 18px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font: inherit;
  resize: vertical;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.field textarea { min-height: 170px; }
.field label {
  position: absolute;
  left: 19px; top: 18px;
  color: var(--muted);
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform .3s var(--ease), color .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); background: rgba(255, 43, 43, .04); box-shadow: 0 0 0 4px rgba(255, 43, 43, .12); }
.field input:focus + label, .field textarea:focus + label,
.field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-11px) scale(.75); color: var(--text); }
.field label span { color: var(--red); }
.field .error { display: block; min-height: 0; color: #ff8080; font-size: .85rem; margin-top: 6px; }
.field .error:empty { display: none; }
.field.invalid input, .field.invalid textarea { border-color: #ff5a5a; }
.contact-form .btn { justify-self: start; }
.form-note { margin: 0; color: var(--muted); font-size: .85rem; }
.status { padding: 14px 18px; border-radius: 12px; font-weight: 500; }
.status.ok { background: rgba(40, 200, 120, .12); border: 1px solid rgba(40, 200, 120, .4); }
.status.err { background: rgba(255, 43, 43, .12); border: 1px solid rgba(255, 43, 43, .4); }

/* Footer ----------------------------------------------------------------- */

.site-footer { position: relative; padding: clamp(70px, 10vw, 140px) 0 32px; border-top: 1px solid var(--line); overflow: hidden; }
.site-footer::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  width: 70vw; height: 300px;
  transform: translate(-50%, -60%);
  background: radial-gradient(ellipse, rgba(255, 43, 43, .25), transparent 70%);
  pointer-events: none;
}
.footer-cta { margin-bottom: clamp(60px, 8vw, 110px); }
.footer-big {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  font: 700 clamp(3rem, 12vw, 10rem)/.95 var(--display);
  letter-spacing: -.045em;
  text-decoration: none;
  background: linear-gradient(90deg, var(--text) 50%, transparent 50%), var(--grad);
  background-size: 200% 100%, 100% 100%;
  background-position: 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-position .8s var(--ease);
}
.footer-big:hover { background-position: -100% 0, 0 0; }
.footer-big .icon { width: .7em; height: .7em; color: var(--red); transition: transform .6s var(--ease); }
.footer-big:hover .icon { transform: rotate(-45deg); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-bottom nav a { text-decoration: none; font-size: .95rem; }
.footer-bottom nav a:hover { color: var(--text); }

/* Reduced motion --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
  .rot span { animation: none; }
  .hero-canvas, .cursor-glow { display: none; }
  [data-split] .char { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ==========================================================================
   Hero visuals (all drawn in CSS, no stock imagery)
   ========================================================================== */

.page-hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
.has-visual .page-hero-grid { grid-template-columns: 1.1fr 1fr; }
.page-hero-visual { position: relative; display: grid; place-items: center; min-height: 340px; }
@media (max-width: 900px) {
  .has-visual .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero-visual { min-height: 280px; }
}

/* About: code card */
.v-code { width: min(100%, 470px); overflow: hidden; transform: rotate(-2deg); animation: float 7s ease-in-out infinite; }
.v-code-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.v-code-bar i, .v-browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.v-code-bar i:nth-child(2), .v-browser-bar i:nth-child(2) { background: #febc2e; }
.v-code-bar i:nth-child(3), .v-browser-bar i:nth-child(3) { background: #28c840; }
.v-code-bar span { margin-left: 10px; font-size: .8rem; color: var(--muted); }
.v-code pre { margin: 0; padding: 20px 18px 24px; font: 400 clamp(.72rem, 1.4vw, .9rem)/1.9 ui-monospace, 'SF Mono', Menlo, monospace; white-space: pre; overflow: hidden; }
.v-code .ln { display: block; opacity: 0; transform: translateX(-10px); animation: line-in .5s var(--ease) forwards; animation-delay: calc(var(--n) * .18s + .6s); }
.v-code .ln b { display: inline-block; width: 2.2em; font-weight: 400; color: rgba(255, 255, 255, .25); }
.t-k { color: var(--pink); }
.t-s { color: #ffb36b; }
.t-p { color: var(--text); }
.caret { display: inline-block; width: 8px; height: 1.1em; margin-left: 2.2em; vertical-align: middle; background: var(--red); animation: blink 1s steps(1) infinite; }
@keyframes line-in { to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes float { 50% { transform: rotate(-2deg) translateY(-14px); } }

/* Web: stacked browser windows with real portfolio screenshots */
.v-browsers { position: relative; width: min(100%, 520px); aspect-ratio: 5 / 4; }
.v-browser {
  position: absolute;
  width: 78%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  left: calc(var(--i) * 11%);
  top: calc(var(--i) * 15%);
  transform: rotate(calc((var(--i) - 1) * 4deg));
  animation: browse 8s ease-in-out infinite;
  animation-delay: calc(var(--i) * -2.6s);
}
.v-browser-bar { display: flex; gap: 6px; padding: 10px 12px; background: rgba(255, 255, 255, .05); }
.v-browser-bar i { width: 9px; height: 9px; }
.v-browser img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; }
@keyframes browse { 50% { translate: 0 -14px; } }

/* Photography: fanned prints */
.v-prints { position: relative; width: min(100%, 480px); aspect-ratio: 1; }
.v-print {
  position: absolute;
  left: 50%; top: 50%;
  width: 66%;
  margin: 0;
  padding: 10px 10px 40px;
  background: #f4f1ea;
  border-radius: 4px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8);
  translate: -50% -50%;
  rotate: calc((var(--i) - 1) * 13deg);
  transition: rotate .8s var(--ease), translate .8s var(--ease);
}
.v-print img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.v-prints:hover .v-print { rotate: calc((var(--i) - 1) * 22deg); translate: calc(-50% + (var(--i) - 1) * 30%) -50%; }

/* Music: equalizer */
.v-eq { display: flex; align-items: flex-end; gap: 6px; width: min(100%, 480px); height: 280px; padding: 20px; border-radius: 28px; }
.v-eq span {
  flex: 1;
  height: var(--h);
  border-radius: 6px;
  background: linear-gradient(to top, var(--red), var(--pink) 60%, var(--orange));
  transform-origin: bottom;
  animation: eq var(--s) ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -.13s);
  box-shadow: 0 0 20px rgba(255, 43, 43, .3);
}
@keyframes eq { 0% { transform: scaleY(.15); } 100% { transform: scaleY(1); } }

/* Video: reel */
.v-reel { position: relative; width: min(100%, 360px); aspect-ratio: 1; display: grid; place-items: center; }
.v-reel-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--red), var(--pink), var(--orange), transparent 70%, var(--red)); mask: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%); animation: spin 6s linear infinite; }
.v-reel-ring.r2 { inset: 14%; animation-duration: 9s; animation-direction: reverse; mask: radial-gradient(circle, transparent 60%, #000 61%, #000 63%, transparent 64%); }
.v-reel-play { display: grid; place-items: center; width: 110px; height: 110px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 80px rgba(255, 43, 43, .6); animation: pulse 2.4s infinite; }
.v-reel-play .icon { width: 42px; height: 42px; margin-left: 6px; color: #fff; }
.v-reel-bar { position: absolute; left: 8%; right: 8%; bottom: -6%; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.v-reel-bar span { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: 0; animation: scrub 8s linear infinite; }
.v-reel-time { position: absolute; bottom: -16%; font: 500 .8rem/1 ui-monospace, Menlo, monospace; color: var(--muted); letter-spacing: .1em; }
.v-reel-time span { color: var(--red); animation: blink 1.2s steps(1) infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes scrub { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Contact: signal */
.v-signal { position: relative; width: min(100%, 320px); aspect-ratio: 1; display: grid; place-items: center; }
.v-signal > span { position: absolute; inset: 30%; border-radius: 50%; border: 2px solid var(--red); opacity: 0; animation: ripple 3.6s var(--ease) infinite; }
.v-signal > span:nth-child(2) { animation-delay: 1.2s; }
.v-signal > span:nth-child(3) { animation-delay: 2.4s; }
.v-signal-core { display: grid; place-items: center; width: 110px; height: 110px; border-radius: 32px; background: var(--grad); box-shadow: 0 0 80px rgba(255, 45, 143, .5); animation: float 6s ease-in-out infinite; }
.v-signal-core .icon { width: 46px; height: 46px; color: #fff; }
@keyframes ripple { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.4); } }

/* Home: open door with light spilling out */
.door-media { position: absolute; inset: 0; z-index: -1; display: flex; align-items: center; padding-left: 12%; overflow: hidden; }
.v-door { position: relative; width: clamp(160px, 18vw, 240px); aspect-ratio: 1 / 2.1; perspective: 900px; }
.v-door-light { position: absolute; left: 50%; bottom: -30%; width: 600%; height: 80%; translate: -30% 0; background: radial-gradient(ellipse at 22% 0%, rgba(255, 210, 190, .35), rgba(255, 60, 90, .15) 30%, transparent 60%); filter: blur(10px); transform: perspective(400px) rotateX(70deg); transform-origin: top; }
.v-door-frame { position: absolute; inset: 0; border: 6px solid #1c1c24; border-bottom: 0; background: #fff8f2; box-shadow: 0 0 120px 30px rgba(255, 120, 120, .35), 0 0 300px 80px rgba(255, 43, 43, .2); overflow: visible; }
.v-door-glow { position: absolute; inset: 0; background: linear-gradient(to bottom, #fff, #ffd9cc 60%, #ff9a8a); animation: glow 5s ease-in-out infinite alternate; }
.v-door-leaf { position: absolute; inset: 0; transform-origin: left center; background: linear-gradient(90deg, #15151c, #22222c); border-right: 1px solid rgba(255, 255, 255, .08); transform: rotateY(-62deg); box-shadow: 20px 0 60px rgba(0, 0, 0, .6); animation: door 9s var(--ease) infinite alternate; }
.v-door-leaf i { position: absolute; right: 12%; top: 50%; width: 8%; height: 2%; border-radius: 4px; background: #8a8a96; }
.v-door-floor { position: absolute; left: -200%; right: -200%; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); }
@keyframes door { 0% { transform: rotateY(-48deg); } 100% { transform: rotateY(-72deg); } }
@keyframes glow { to { filter: brightness(1.15) hue-rotate(-10deg); } }
@media (max-width: 760px) { .door-media { padding-left: 0; justify-content: center; align-items: flex-start; padding-top: 60px; opacity: .55; } }

@media (prefers-reduced-motion: reduce) {
  .v-code .ln { opacity: 1; transform: none; }
}

/* Cloudflare Turnstile */
.turnstile-field { min-height: 65px; }
.turnstile-field.invalid .cf-turnstile { outline: 1px solid #ff5a5a; border-radius: 8px; }
