:root {
  --bg: #0d0d0c;
  --bg-2: #161614;
  --line: #2a2a27;
  --fg: #f2efe8;
  --muted: #9a978f;
  --accent: #ff5b2e;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --max: 1440px; /* content width on big screens */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; margin: 0; letter-spacing: -0.02em; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.logo { font: 800 22px var(--display); text-decoration: none; letter-spacing: -0.03em; }
.logo span, .accent { color: var(--accent); }
.nav nav { display: flex; gap: clamp(12px, 3vw, 32px); align-items: center; }
.nav nav a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--fg); }
.nav .nav-cta { color: var(--fg); border: 1px solid var(--line); padding: 8px 14px; border-radius: 99px; }
.nav .nav-cta:hover { border-color: var(--accent); }


/* ---------- HERO ---------- */
.hero { padding: clamp(48px, 10vw, 120px) var(--gutter) 48px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 #3ddc8480; animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px #3ddc8400; } 100% { box-shadow: 0 0 0 0 #3ddc8400; } }

.hero-title { font-size: clamp(56px, 13vw, calc(var(--max) / 8)); font-weight: 800; letter-spacing: -0.045em; line-height: .9; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line { animation: rise .9s var(--ease) both; }
.hero-title .line:nth-child(2) { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }

.hero-sub { max-width: 540px; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); margin: 28px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(40px, 7vw, 80px); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px var(--body); padding: 14px 22px; border-radius: 99px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--fg); }

.reel {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--bg-2);
}
.reel-poster { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .8s var(--ease); }
.reel-poster.placeholder {
  background:
    radial-gradient(60% 80% at 20% 30%, #ff5b2e55, transparent 60%),
    radial-gradient(50% 70% at 80% 70%, #1f3dff55, transparent 60%),
    var(--bg-2);
}
.reel:hover .reel-poster { transform: scale(1.03); }
.reel-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 88px; height: 88px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--bg);
  transition: scale .3s var(--ease);
}
.reel:hover .reel-play { scale: 1.1; }
@media (max-width: 560px) { .reel-play { width: 60px; height: 60px; } }
.reel-label { position: absolute; left: 20px; bottom: 16px; z-index: 2; font: 600 14px var(--body); color: var(--fg); text-align: left; }
.reel-label span { color: #ffffffb3; font-weight: 400; }
.reel-play { z-index: 2; }

/* auto-showreel thumbnail wall */
.reel-poster.has-wall { background: #000; }
.reel-poster.has-wall::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, #0d0d0c40 0%, #0d0d0cd9 85%), linear-gradient(transparent 60%, #0d0d0ce6);
}
.reel-wall { position: absolute; inset: -6% -10%; display: grid; grid-template-rows: repeat(4, 1fr); gap: 10px; transform: rotate(-4deg); }
.wall-row { overflow: hidden; }
.wall-track { display: flex; gap: 10px; width: max-content; height: 100%; animation: wall 60s linear infinite; }
.wall-row.rev .wall-track { animation-direction: reverse; animation-duration: 75s; }
.wall-track img { height: 100%; aspect-ratio: 16 / 9; width: auto; object-fit: cover; border-radius: 8px; filter: saturate(.9); }
@keyframes wall { to { transform: translateX(-50%); } }
.reel:hover .wall-track { animation-play-state: paused; }

/* ---------- MARQUEE ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: scroll 40s linear infinite; font: 600 clamp(18px, 2vw, 24px) var(--display); white-space: nowrap; }
.marquee-track span:nth-child(even) { color: var(--accent); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- SECTIONS ---------- */
.section { padding: clamp(64px, 10vw, 120px) var(--gutter); }
.section > h2, .section-head h2 { font-size: clamp(36px, 6vw, 72px); font-weight: 800; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: 500 14px var(--body); color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; cursor: pointer;
  transition: all .2s;
}
.filters button:hover { color: var(--fg); }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- WORK GRID ---------- */
.grid { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 28px); }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }
.work { all: unset; cursor: pointer; display: block; min-width: 0; }
.work.featured { grid-column: span 2; }
@media (max-width: 720px) { .work.featured { grid-column: auto; } }
.work.hide { display: none; }
.work:focus-visible .work-media { outline: 2px solid var(--accent); outline-offset: 4px; }

.work-media { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.work.featured .work-media { aspect-ratio: 21 / 9; }
@media (max-width: 720px) { .work.featured .work-media { aspect-ratio: 16 / 10; } }
.work-media img, .work-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .3s; }
.work-media video { opacity: 0; }
.work:hover .work-media video.ready { opacity: 1; }
.work:hover .work-media img { transform: scale(1.04); }
.cover-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 800 clamp(28px, 4vw, 56px) var(--display); letter-spacing: -0.03em; color: #ffffffd9;
  padding: 24px; text-align: center;
}
.work-badge {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--fg); color: var(--bg);
  scale: .6; opacity: 0; transition: all .3s var(--ease);
}
.work:hover .work-badge, .work:focus-visible .work-badge { scale: 1; opacity: 1; }
.work-info { display: flex; justify-content: space-between; gap: 16px; padding: 14px 4px 0; }
.work-info h3 { font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.work-info p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.work-year { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* ---------- REELS ---------- */
.reels-nav { display: flex; gap: 8px; }
.reels-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--fg); font-size: 18px; cursor: pointer; transition: border-color .2s;
}
.reels-btn:hover { border-color: var(--accent); }
.reels-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(200px, 22vw, 280px);
  gap: clamp(12px, 1.6vw, 20px); overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
}
@media (max-width: 560px) { .reels-track { grid-auto-columns: 62vw; } }
.reel-card { all: unset; cursor: pointer; scroll-snap-align: start; min-width: 0; }
.reel-card:focus-visible .reel-media { outline: 2px solid var(--accent); outline-offset: 4px; }
.reel-media { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.reel-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.reel-card:hover .reel-media img { transform: scale(1.05); }
.reel-media .cover-fallback { font-size: clamp(20px, 2vw, 28px); }
.reel-card-play {
  position: absolute; left: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: #0d0d0cb3; color: #fff;
  backdrop-filter: blur(6px); transition: scale .3s var(--ease), background .3s;
}
.reel-card:hover .reel-card-play { background: var(--accent); color: var(--bg); }
.reel-card:hover .reel-card-play { scale: 1.12; }
.reel-info { padding: 12px 2px 0; }
.reel-info h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.reel-info p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .reels-nav { display: none; } }

/* vertical lightbox for reels */
.lightbox.vertical { max-width: min(420px, 92vw, calc(76vh * 9 / 16)); }
.lightbox.vertical .lb-media { aspect-ratio: 9 / 16; }
.lightbox.vertical .lb-info { padding: 16px 20px 20px; }

/* ---------- ABOUT ---------- */
.about-body { max-width: 820px; margin: 32px auto 56px; text-align: center; }
#about > h2 { text-align: center; }
.about-body p { color: var(--muted); font-size: 18px; }
.about-body .lead { color: var(--fg); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.35; font-family: var(--display); letter-spacing: -0.01em; }
.about-body a { color: var(--accent); text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { font-size: 20px; margin-bottom: 16px; }
.card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.card strong { color: var(--fg); font-weight: 600; }
.chips { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
.chips li { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--fg); }

/* ---------- TIMELINE ---------- */
#experience > h2 { text-align: center; }
#experience .timeline { max-width: 900px; margin-inline: auto; }
.timeline { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .timeline li { grid-template-columns: 1fr; gap: 8px; } }
.t-when { color: var(--muted); font-size: 14px; padding-top: 6px; }
.t-what h3 { font-size: clamp(22px, 2.4vw, 30px); }
.t-org { color: var(--accent); margin: 6px 0 10px; font-weight: 500; }
.t-what p:last-child { color: var(--muted); margin: 0; max-width: 620px; }

/* ---------- CONTACT ---------- */
.contact { text-align: center; border-top: 1px solid var(--line); }
.contact-title { font-size: clamp(40px, 8vw, 110px); font-weight: 800; letter-spacing: -0.04em; margin: 8px 0 32px; }
.contact-mail {
  display: inline-block; font: 600 clamp(20px, 3vw, 36px) var(--display); color: var(--accent);
  text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 4px;
  overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--fg); }
.contact-phone { margin: 20px 0 0; font-size: 18px; }
.contact-phone a { color: var(--muted); text-decoration: none; }
.contact-phone a:hover { color: var(--fg); }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.socials a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border: 1px solid var(--line); border-radius: 99px;
  color: var(--muted); text-decoration: none; font-weight: 500;
  transition: color .2s, border-color .2s, transform .2s var(--ease);
}
.socials a:hover { color: var(--fg); border-color: var(--accent); transform: translateY(-2px); }
.socials a:hover svg rect { fill: var(--accent); }
.socials svg rect { transition: fill .2s; }

.footer { display: flex; justify-content: space-between; padding: 24px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer a { text-decoration: none; }

/* ---------- LIGHTBOX ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%; color: var(--fg); }
.lightbox::backdrop { background: #000000d9; backdrop-filter: blur(6px); }
.lightbox[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.lb-inner { position: relative; background: var(--bg-2); border-radius: var(--radius); overflow: hidden; }
.lb-media { aspect-ratio: 16 / 9; background: #000; }
.lb-media iframe, .lb-media video { width: 100%; height: 100%; border: 0; }
.lb-empty { height: 100%; display: grid; place-items: center; color: var(--muted); padding: 24px; text-align: center; }
.lb-info { padding: 24px 28px 28px; }
.lb-info h3 { font-size: clamp(22px, 3vw, 32px); margin: 4px 0 10px; }
.lb-info p { margin: 0; color: var(--muted); }
.lb-meta { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.lb-role { margin-top: 12px !important; color: var(--fg) !important; font-size: 14px; }
.lb-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: #000000a0; color: #fff; font-size: 16px; cursor: pointer;
}

/* ---------- SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}


/* ============================================================
   RESPONSIVE
   ≤560 phone · 561–900 tablet portrait · 901–1279 tablet landscape / small laptop
   1280–1599 laptop / MacBook · ≥1600 desktop · ≥2200 large / 4K
   ============================================================ */

/* Keep content in a centred column on wide screens; borders stay full-bleed */
.nav, .hero, .section, .footer {
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
}
.reels-track { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; }

/* Mobile menu button (hidden on larger screens) */
.menu-btn { display: none; }

/* ----- Phones ----- */
@media (max-width: 720px) {
  /* backdrop-filter would trap the fixed menu overlay inside the bar */
  .nav { padding-block: 14px; backdrop-filter: none; background: color-mix(in srgb, var(--bg) 96%, transparent); }
  .menu-btn {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; z-index: 2;
  }
  .menu-btn span { display: block; width: 18px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .3s var(--ease); }
  .nav.open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .nav nav {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; gap: 28px;
    background: var(--bg); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav.open nav { opacity: 1; visibility: visible; }
  .nav nav a { font: 700 34px var(--display); color: var(--fg); }
  .nav .nav-cta { font-size: 20px !important; padding: 12px 24px; margin-top: 8px; }
  body.menu-open { overflow: hidden; }

  .hero { padding-top: 40px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .section-head { align-items: start; }
  .filters { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; }
  .reels-track { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .about-body p { font-size: 16px; }
  .card { padding: 22px; }
  .contact-mail { font-size: clamp(17px, 5.2vw, 26px); }
  .socials a { flex: 1 1 100%; justify-content: center; max-width: 320px; }
  .footer { flex-direction: column; gap: 8px; align-items: center; text-align: center; }
  .lb-info { padding: 18px 18px 22px; }
}

/* ----- Tablet portrait ----- */
@media (min-width: 721px) and (max-width: 900px) {
  .reels-track { grid-auto-columns: 32vw; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: span 2; }
  .timeline li { grid-template-columns: 170px 1fr; }
}

/* ----- Tablet landscape / small laptop ----- */
@media (min-width: 901px) and (max-width: 1279px) {
  .reels-track { grid-auto-columns: calc((100% - 3 * 16px) / 4.3); }
  .cards { grid-template-columns: repeat(3, 1fr); }
}

/* ----- Laptop & MacBook (incl. short 800–900px tall screens) ----- */
@media (min-width: 1280px) {
  .reels-track { grid-auto-columns: calc((100% - 4 * 20px) / 5.3); }
}
@media (min-width: 1024px) and (max-height: 900px) {
  .hero { padding-top: 64px; }
  .hero-title { font-size: clamp(56px, 11vw, calc(var(--max) / 8.5)); }
  .hero-sub { margin: 22px 0 26px; }
}

/* ----- Large desktop / 4K ----- */
@media (min-width: 2200px) {
  :root { --max: 1760px; }
  body { font-size: 18px; }
  .reels-track { grid-auto-columns: calc((100% - 5 * 20px) / 6.3); }
}

/* Lightbox: keep 16:9 video on screen on short / landscape phones */
.lightbox { max-width: min(1100px, 94vw, calc((100vh - 60px) * 16 / 9)); }
.lightbox { max-height: 96vh; overflow: auto; }
@media (max-height: 500px) and (orientation: landscape) { .lb-info { display: none; } }

/* Hover-only effects shouldn't stick on touch screens */
@media (hover: none) {
  .work-badge { opacity: 1; scale: .85; }
  .btn:hover, .socials a:hover { transform: none; }
}
