/* ==========================================================================
   Theme — change the accent here
   ========================================================================== */
:root {
  --bg: #0b0b0c;
  --bg-2: #141416;
  --line: #26262a;
  --text: #f2f0ec;
  --muted: #8d8c90;
  --accent: #ff5a1f;

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(20px, 4vw, 56px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--pad); }
.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 8px; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(8px);
  cursor: pointer; white-space: nowrap;
  font-size: 15px; font-weight: 500;
  transition: border-color .2s, background .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { border-color: var(--text); }
.btn:active { transform: scale(.97); }
.btn--small { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #0b0b0c; }
.btn--accent:hover { background: var(--text); border-color: var(--text); }
.btn--accent .label { color: rgba(0,0,0,.55); }
.btn.is-disabled { opacity: .3; pointer-events: none; }

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative; min-height: min(80svh, 900px); padding-top: clamp(48px, 8vh, 96px);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__ph {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 50% at 70% 40%, rgba(255,90,31,.55), transparent 70%),
    radial-gradient(35% 45% at 30% 65%, rgba(120,60,255,.35), transparent 70%),
    radial-gradient(30% 30% at 85% 80%, rgba(0,180,255,.25), transparent 70%);
  filter: blur(30px);
  animation: drift 18s var(--ease) infinite alternate;
}
/* A tilted wall of phone-sized loops */
.hero__tiles {
  position: absolute; inset: -10% -20%;
  display: flex; align-items: center; justify-content: center; gap: clamp(12px, 1.4vw, 22px);
  transform: rotate(-7deg); opacity: .6;
}
.hero__tile {
  position: relative; flex: none; height: min(74vh, 760px); aspect-ratio: 9 / 16;
  overflow: hidden; border-radius: 18px; background: var(--bg-2);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.hero__tile:nth-child(even) { transform: translateY(9vh); }
.hero__tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__tiles:not([hidden]) ~ .grain { opacity: .08; }
.hero:has(.hero__tiles:not([hidden])) .hero__media::after {
  background: linear-gradient(to bottom, rgba(11,11,12,.55) 0%, rgba(11,11,12,.55) 40%, var(--bg) 96%);
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11,11,12,.25) 0%, rgba(11,11,12,.2) 50%, var(--bg) 100%);
}
@keyframes drift {
  0% { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
  100% { transform: translate3d(-6%,4%,0) rotate(12deg) scale(1.12); }
}
.grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .14; mix-blend-mode: overlay;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__inner { padding-bottom: clamp(40px, 7vh, 80px); }
.hero__status { display: inline-flex; align-items: center; gap: 10px; color: var(--text); margin-bottom: 28px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.hero__name {
  font-size: clamp(56px, 12vw, 200px);
  line-height: .88; letter-spacing: -.045em; font-weight: 600;
}
.hero__role { margin-top: 18px; font-size: clamp(20px, 2.4vw, 32px); font-weight: 500; letter-spacing: -.02em; }
.hero__tagline { margin-top: 10px; max-width: 44ch; white-space: pre-line; color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__foot {
  display: flex; justify-content: space-between;
  padding-block: 20px; border-top: 1px solid var(--line);
}
.hero__links { display: flex; gap: clamp(16px, 2.5vw, 32px); }
.hero__links a { color: var(--text); transition: color .2s; }
.hero__links a:hover { color: var(--accent); }

/* Sections ----------------------------------------------------------------- */
.section { padding-block: clamp(80px, 12vw, 160px) 0; scroll-margin-top: 40px; }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.section__title { font-size: clamp(36px, 5vw, 72px); line-height: 1; letter-spacing: -.035em; font-weight: 600; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: none; cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  transition: all .2s;
}
.filter:hover { color: var(--text); border-color: var(--muted); }
.filter[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter sup { font-size: 10px; margin-left: 4px; opacity: .6; }

/* Grid & cards — 12 columns: wide cards take 6, vertical (9:16) cards take 3 */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: dense; gap: clamp(28px, 3vw, 44px) clamp(14px, 1.6vw, 24px); }
.card { display: block; position: relative; grid-column: span 6; min-width: 0; }
.card.is-vertical { grid-column: span 3; }
.card.is-featured { grid-column: 1 / -1; }
.card.is-vertical .card__media { aspect-ratio: 9 / 16; }
.card.is-vertical .card__meta { flex-direction: column; gap: 6px; padding-top: 12px; }
.card.is-vertical .card__tags { text-align: left; }
.card.is-vertical .card__title { font-size: 17px; }
.card.is-vertical .card__sub { font-size: 14px; }
.card__dur {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px);
}
.card.is-hidden { display: none; }
.card__media {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-2);
}
.card.is-featured .card__media { aspect-ratio: 21 / 9; }
.card__media img, .card__media video, .card__media .ph {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease), opacity .4s;
}
.card__media video { opacity: 0; }
.card:hover .card__media img, .card:hover .card__media .ph { transform: scale(1.035); }
.card.is-playing .card__media video { opacity: 1; }
.card__view {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  height: 36px; padding: 0 14px; display: inline-flex; align-items: center;
  border-radius: 999px; background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 500;
  opacity: 0; transform: translateY(8px); transition: all .35s var(--ease);
}
.card:hover .card__view, .card:focus-visible .card__view { opacity: 1; transform: none; }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 16px; }
.card__title { font-size: clamp(19px, 1.7vw, 24px); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.card__sub { margin-top: 4px; color: var(--muted); font-size: 15px; }
.card__tags { text-align: right; flex-shrink: 0; }

/* Placeholder artwork (used until a cover image is set) */
.ph {
  --h: 20;
  background:
    radial-gradient(70% 90% at 25% 30%, hsl(var(--h) 85% 58% / .95), transparent 62%),
    radial-gradient(60% 80% at 80% 75%, hsl(calc(var(--h) + 50) 75% 42% / .9), transparent 60%),
    radial-gradient(40% 40% at 60% 20%, hsl(calc(var(--h) - 30) 90% 70% / .5), transparent 70%),
    #121214;
}
.ph::after {
  content: ""; position: absolute; inset: 0; opacity: .22; mix-blend-mode: overlay;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ph__num {
  position: absolute; left: 20px; top: 16px; z-index: 1;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: rgba(255,255,255,.75);
}

/* About -------------------------------------------------------------------- */
.about__body { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); margin-top: 40px; }
.about__body:not(:has(.about__photo:not([hidden]))) { grid-template-columns: 1fr; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about__bio { font-size: clamp(22px, 2.6vw, 36px); line-height: 1.25; letter-spacing: -.02em; max-width: 30ch; }
.about__bio p + p { margin-top: .8em; color: var(--muted); font-size: .72em; line-height: 1.45; max-width: 46ch; }
.about__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: clamp(56px, 7vw, 96px); padding-top: 32px; border-top: 1px solid var(--line); }
.about__cols h3, .clients h3 { margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.timeline li { display: grid; gap: 2px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border: 0; margin: 0; padding: 0; }
.timeline b { font-weight: 500; }
.timeline span { color: var(--muted); font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin: clamp(56px, 7vw, 96px) 0 0; }
.stats dt { font-size: clamp(40px, 5vw, 72px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.stats dd { margin: 10px 0 0; color: var(--muted); font-size: 15px; max-width: 26ch; }
.ai { margin-top: 40px; }
.ai h3 { margin-bottom: 16px; }
.clients { margin-top: 56px; }
.clients__list { display: flex; flex-wrap: wrap; gap: 12px 40px; font-size: clamp(18px, 2vw, 26px); font-weight: 500; color: var(--muted); letter-spacing: -.02em; }

/* Contact ------------------------------------------------------------------ */
.contact { padding-bottom: clamp(80px, 10vw, 140px); }
.contact__title { margin-top: 16px; font-size: clamp(44px, 9vw, 140px); line-height: .92; letter-spacing: -.045em; font-weight: 600; }
.contact__email {
  display: inline-block; margin-top: 28px;
  font-size: clamp(22px, 3vw, 40px); letter-spacing: -.02em;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
  transition: background-size .45s var(--ease), color .2s;
}
.contact__email:hover { background-size: 100% 2px; color: var(--accent); }
.contact__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.socials { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 56px; }
.socials a { color: var(--muted); transition: color .2s; }
.socials a:hover { color: var(--text); }
.socials a::after { content: " ↗"; }

.footer { display: flex; justify-content: space-between; padding-block: 24px; border-top: 1px solid var(--line); }
.footer a:hover { color: var(--text); }

/* Project overlay ---------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  animation: rise .5s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.overlay__bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  height: 72px; padding-inline: var(--pad);
  background: rgba(11,11,12,.85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.overlay__nav { display: flex; gap: 8px; }
.project { padding-block: clamp(40px, 6vw, 80px) clamp(80px, 10vw, 140px); }
.project__head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.project__title { font-size: clamp(40px, 7vw, 110px); line-height: .92; letter-spacing: -.045em; font-weight: 600; margin-top: 12px; }
.project__summary { color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); max-width: 44ch; }
.project__facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-top: 48px; padding-block: 24px; border-block: 1px solid var(--line);
}
.project__facts dt { margin-bottom: 6px; }
.project__facts dd { margin: 0; font-size: 15px; }
.project__hero { margin-top: 40px; }
.media-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.media-frame iframe, .media-frame video, .media-frame img, .media-frame .ph { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.media-frame video { object-fit: contain; background: #000; }
.media-frame__note { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 2; color: rgba(255,255,255,.8); text-align: center; }
.project__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; margin-top: clamp(56px, 7vw, 96px); }
.project__text p { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; max-width: 60ch; }
.project__text p + p { margin-top: 1em; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: clamp(48px, 6vw, 80px); }
.gallery figure:first-child:nth-last-child(odd), .gallery figure.is-wide { grid-column: 1 / -1; }
.gallery img { width: 100%; border-radius: var(--radius); background: var(--bg-2); }
.gallery figcaption { margin-top: 10px; }
.project__next {
  display: block; margin-top: clamp(80px, 10vw, 140px); padding-top: 32px; border-top: 1px solid var(--line);
}
.project__next strong { display: block; margin-top: 10px; font-size: clamp(32px, 5vw, 72px); font-weight: 600; letter-spacing: -.035em; line-height: 1; transition: color .2s; }
.project__next:hover strong { color: var(--accent); }

/* Vertical project: phone-sized video left, info right */
.project--vertical { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.project__phone { position: sticky; top: 96px; }
.media-frame--vertical { aspect-ratio: 9 / 16; height: min(78vh, 820px); width: auto; }
.project--vertical .project__title { font-size: clamp(36px, 5vw, 72px); }
.project--vertical .project__summary { margin-top: 20px; }
.project__facts--stack { grid-template-columns: 1fr 1fr; margin-top: 36px; }
.project--vertical .project__text { margin-top: 36px; }
.project--vertical .project__text p { font-size: 18px; }
.project--vertical .project__next { margin-top: 64px; }

/* Reel overlay ------------------------------------------------------------- */
.reel {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: var(--pad);
  background: rgba(0,0,0,.92); backdrop-filter: blur(10px);
  animation: fade .3s ease;
}
@keyframes fade { from { opacity: 0; } }
.reel__frame { width: min(100%, calc((100vh - 140px) * 16 / 9)); }
.reel__frame:has(.media-frame--vertical) { width: auto; }
.reel .media-frame--vertical { height: min(86vh, 900px); max-width: calc(100vw - 2 * var(--pad)); }
.reel__close { position: absolute; top: 18px; right: var(--pad); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg);
  transform: translate(-50%, 40px); opacity: 0; transition: all .35s var(--ease); pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .card.is-vertical { grid-column: span 4; }
}
@media (max-width: 900px) {
  .project__head, .project__body, .about__body, .project--vertical { grid-template-columns: 1fr; }
  .project__phone { position: static; }
  .media-frame--vertical { height: auto; width: min(100%, 420px); margin-inline: auto; }
  .hero__tile { height: 58vh; }
  .project__facts { grid-template-columns: repeat(2, 1fr); }
  .about__cols { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 680px) {
  .card, .card.is-featured { grid-column: 1 / -1; }
  .card.is-vertical { grid-column: span 6; }
  .card.is-vertical .card__view, .card.is-vertical .card__sub { display: none; }
  .card.is-featured .card__media { aspect-ratio: 16 / 9; }
  .card__view { opacity: 1; transform: none; }
  .gallery { grid-template-columns: 1fr; }
  .card__meta { flex-direction: column; gap: 6px; }
  .card__tags { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
