/* Dania El Adhami — portfolio
   Layout: a screening room. Showreel first, two ways of working, the series, the pipeline, then a wall of 16:9 frames. */
:root {
  --bg: #0f1218;
  --surface: #171b23;
  --line: #262c38;
  --fg: #ece8e1;
  --muted: #9097a5;
  --accent: #ffcf6e;
  --accent-ink: #1a1408;
  --warn: #f29b7f;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 4px; z-index: 99; }
.skip:focus { left: 8px; }

/* Header */
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; padding-block: 14px; flex-wrap: wrap; }
.logo { font: 800 20px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.logo span { color: var(--accent); }
nav.main { display: flex; gap: 6px clamp(14px, 2.4vw, 26px); flex-wrap: wrap; align-items: center; font-size: 14.5px; }
nav.main a { text-decoration: none; color: var(--muted); transition: color .2s; }
nav.main a:hover, nav.main a[aria-current] { color: var(--fg); }
nav.main a.cv { color: var(--fg); border: 1px solid var(--line); padding: 4px 12px; border-radius: 99px; }

/* Type */
.eyebrow { font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0; }
h1, h2, h3 { text-wrap: balance; }
section { padding-block: clamp(48px, 7vw, 88px); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head h2 { font: 800 clamp(30px, 4vw, 52px)/1 var(--display); letter-spacing: -0.03em; margin: 0; }
.hint { font: 400 12.5px var(--mono); color: var(--muted); margin: -16px 0 24px; }
.ruled { border-top: 1px solid var(--line); }

/* Hero */
.hero { padding-block: clamp(44px, 7vw, 88px) clamp(28px, 4vw, 48px); display: grid; gap: 26px; }
.hero h1 { font: 800 clamp(40px, 7.4vw, 104px)/0.95 var(--display); letter-spacing: -0.035em; margin: 0; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 62ch; margin: 0; }

/* Video player */
.player { position: relative; aspect-ratio: 16/9; max-width: 100%; background: #000; border-radius: 6px; overflow: hidden; }
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.player .start { all: unset; position: absolute; inset: 0; cursor: pointer; display: grid; place-items: center; z-index: 1; }
.player .start img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player .start::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, #000a); }
.player .start b { position: relative; z-index: 1; width: clamp(60px, 8vw, 96px); aspect-ratio: 1; border-radius: 50%; background: var(--accent); display: grid; place-items: center; transition: transform .3s; box-shadow: 0 8px 40px #0007; }
.player .start:hover b, .player .start:focus-visible b { transform: scale(1.08); }
.player .start b::before { content: ""; border-left: 22px solid var(--accent-ink); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.player .start .lab { position: absolute; z-index: 1; left: 18px; bottom: 14px; right: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 500 12px var(--mono); color: #ffffffcc; text-transform: uppercase; letter-spacing: .08em; }
.player.playing .start { display: none; }

/* How I help */
.help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
@media (max-width: 820px) { .help { grid-template-columns: 1fr; } }
.help article { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: clamp(24px, 3vw, 40px); display: grid; gap: 16px; align-content: start; }
.help .tag { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0; }
.help h3 { font: 800 clamp(28px, 3.4vw, 44px)/1 var(--display); letter-spacing: -0.03em; margin: 0; }
.help p { margin: 0; color: var(--muted); max-width: 52ch; }
.help ul { list-style: none; margin: 0; padding: 0; display: grid; }
.help li { padding-block: 11px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.4em minmax(0, 1fr); }
.help li::before { content: "→"; color: var(--accent); }
.more { color: var(--fg); font-weight: 600; text-decoration: none; justify-self: start; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.more:hover { color: var(--accent); }

/* Frames (thumbnails) */
.frame { position: relative; aspect-ratio: 16/9; max-width: 100%; border-radius: 4px; overflow: hidden; background: var(--surface); }
.frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.frame .strip { position: absolute; inset: 0; background-size: 1200% 100%; background-repeat: no-repeat; opacity: 0; }
.frame .scrub { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ffffff26; opacity: 0; transition: opacity .2s; z-index: 2; }
.frame .scrub i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--accent); }
.frame .tcode { position: absolute; top: 9px; left: 10px; z-index: 2; font: 500 10.5px var(--mono); color: #fff; background: #000a; padding: 2px 7px; border-radius: 3px; opacity: 0; transition: opacity .2s; font-variant-numeric: tabular-nums; }
.frame.scrubbing .strip, .frame.scrubbing .scrub, .frame.scrubbing .tcode { opacity: 1; }
a:hover .frame > img { transform: scale(1.04); }
.frame .badge { position: absolute; right: 10px; top: 9px; z-index: 2; font: 500 10.5px var(--mono); color: #fff; background: #000a; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; letter-spacing: .06em; }

/* Series */
.series { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
@media (max-width: 760px) { .series { grid-template-columns: 1fr; } }
.series a { display: grid; gap: 14px; align-content: start; text-decoration: none; }
.series h3 { font: 600 clamp(22px, 2.4vw, 30px)/1.15 var(--display); letter-spacing: -0.02em; margin: 0; }
.series p { margin: 0; color: var(--muted); max-width: 60ch; }
.role { font: 500 12.5px/1.5 var(--mono); color: var(--accent); margin: 0; }

/* Pipeline */
.pipe-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.pipe-toggle button { font: 600 13px var(--body); background: transparent; color: var(--muted); border: 0; border-radius: 99px; padding: 7px 16px; cursor: pointer; }
.pipe-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.track { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 2px; background: var(--line); }
.track .fill { position: absolute; left: 0; top: 17px; height: 2px; background: var(--accent); transition: width .45s cubic-bezier(.2,.7,.2,1); }
.stage { all: unset; position: relative; display: grid; gap: 10px; cursor: pointer; padding-right: 8px; }
.stage .dot { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); display: grid; place-items: center; font: 500 12px var(--mono); color: var(--muted); transition: all .25s; }
.stage .nm { font: 600 14.5px/1.25 var(--body); color: var(--muted); transition: color .2s; }
.stage:hover .nm { color: var(--fg); }
.stage.done .dot { border-color: var(--accent); color: var(--accent); }
.stage[aria-selected="true"] .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.1); }
.stage[aria-selected="true"] .nm { color: var(--fg); }
.stage:focus-visible .dot { outline: 2px solid var(--accent); outline-offset: 3px; }
.panel { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: clamp(20px, 3vw, 36px); }
@media (max-width: 760px) { .panel { grid-template-columns: 1fr; } }
.panel h3 { font: 800 clamp(26px, 3vw, 38px)/1.05 var(--display); letter-spacing: -0.03em; margin: 6px 0 12px; }
.panel p { margin: 0; color: var(--muted); max-width: 56ch; }
.panel .mine { border-left: 2px solid var(--accent); padding-left: 16px; display: grid; gap: 8px; align-content: start; }
.panel .mine p { color: var(--fg); }
.panel .eg { font: 400 12.5px var(--mono); color: var(--muted); }
.panel .weak { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; align-items: baseline; }
.panel .weak .eyebrow { color: var(--warn); }
@media (max-width: 560px) { .panel .weak { grid-template-columns: 1fr; } }
.anim { animation: rise .35s cubic-bezier(.2,.7,.2,1); }
@keyframes rise { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Work grid */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { font: 500 13px var(--body); background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; 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); }
.filters .n { font-family: var(--mono); font-size: 11px; opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 26px) clamp(14px, 2vw, 24px); }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { display: grid; gap: 10px; text-decoration: none; min-width: 0; }
.card[hidden] { display: none; }
.card h3 { font: 600 17px/1.25 var(--display); letter-spacing: -0.01em; margin: 0; }
.meta { display: flex; justify-content: space-between; gap: 12px; font: 400 12px/1.4 var(--mono); color: var(--muted); min-width: 0; }
.meta span:last-child { text-align: right; }

/* About + contact */
.about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }
.about p.big { font: 400 clamp(20px, 2.1vw, 27px)/1.45 var(--display); letter-spacing: -0.01em; margin: 0; max-width: 34ch; }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 12px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.facts dd { margin: 0; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.contact h2 { font: 800 clamp(40px, 6vw, 80px)/0.95 var(--display); letter-spacing: -0.035em; margin: 0 0 18px; }
.contact p { color: var(--muted); margin: 0; max-width: 46ch; }
.socials { display: grid; gap: 0; }
.socials a { text-decoration: none; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-block: 14px; font-size: 18px; transition: color .2s; }
.socials a:hover { color: var(--accent); }
footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Project page */
.proj-head { padding-block: clamp(36px, 6vw, 72px) 28px; display: grid; gap: 14px; }
.back { font: 500 13px var(--mono); color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.proj-head h1 { font: 800 clamp(36px, 6vw, 84px)/0.98 var(--display); letter-spacing: -0.035em; margin: 0; }
.credits { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 4px 0 0; }
.credits div { display: grid; gap: 2px; min-width: 0; }
.credits dt { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.credits dd { margin: 0; font-size: 15px; max-width: 46ch; }
.credits .is-role dd { color: var(--accent); }
.media { display: grid; gap: clamp(16px, 2vw, 24px); }
.media.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .media.two { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.5vw, 18px); }
.gallery.one { grid-template-columns: 1fr; }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } }
.gallery img { width: 100%; height: auto; border-radius: 4px; background: var(--surface); }
.gallery img.wide { grid-column: 1 / -1; }
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(20px, 4vw, 64px); padding-block: clamp(36px, 5vw, 64px); }
@media (max-width: 820px) { .story { grid-template-columns: 1fr; } }
.story .copy p { margin: 0 0 1em; max-width: 66ch; color: #d7d3cc; }
.story .copy p:first-child { font: 400 clamp(19px, 1.8vw, 23px)/1.45 var(--display); color: var(--fg); }
.next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-block: 40px 64px; border-top: 1px solid var(--line); }
.next a { text-decoration: none; display: grid; gap: 4px; }
.next a:last-child { text-align: right; }
.next a span { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.next a b { font: 700 clamp(18px, 2.2vw, 28px)/1.15 var(--display); letter-spacing: -0.02em; }
.next a:hover b { color: var(--accent); }
[id] { scroll-margin-top: 84px; }
.media.two > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Workshop */
.workshop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(18px, 3vw, 36px); }
@media (max-width: 860px) { .workshop { grid-template-columns: 1fr; } }
.workshop figure { margin: 0; display: grid; gap: 10px; }
.workshop figure img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; }
.workshop figcaption { font: 400 12px/1.5 var(--mono); color: var(--muted); }
.workshop .tag { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 10px; }
.workshop h2 { font: 800 clamp(30px, 3.6vw, 48px)/1 var(--display); letter-spacing: -0.03em; margin: 0 0 14px; }
.workshop h2 span { color: var(--accent); }
.workshop p { margin: 0 0 18px; color: var(--muted); max-width: 54ch; }
.workshop p b { color: var(--fg); font-weight: 600; }
.waves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
@media (max-width: 480px) { .waves { grid-template-columns: 1fr; } }
.waves div { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: grid; gap: 2px; background: var(--bg); }
.waves dt { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.waves dd { margin: 0; font: 700 22px/1.2 var(--display); }
.waves dd small { display: block; font: 400 13px var(--body); color: var(--muted); }
.ws-facts { font: 400 12.5px var(--mono); color: var(--muted); margin: 0 0 20px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.btn { font: 600 15px var(--body); background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 13px 24px; text-decoration: none; transition: transform .15s; }
.btn:hover { transform: translateY(-1px); }
@media (max-width: 640px) {
  nav.main { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; padding-bottom: 2px; }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { white-space: nowrap; }
}

/* Series: three across, plus the in-development card */
.series { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .series { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .series { grid-template-columns: 1fr; } }
.cooking { display: grid; gap: 14px; align-content: start; }
.cooking h3 { font: 600 clamp(22px, 2.4vw, 30px)/1.15 var(--display); letter-spacing: -0.02em; margin: 0; }
.cooking p { margin: 0; color: var(--muted); max-width: 60ch; }
.frame.cook { background: #0b0d12; border: 1px dashed #3a4150; }
.frame.cook .simmer { position: absolute; inset: -20%; filter: blur(28px); opacity: .85;
  background: radial-gradient(30% 40% at 30% 60%, #ffcf6e55, transparent 70%), radial-gradient(35% 45% at 70% 40%, #f29b7f44, transparent 70%), radial-gradient(25% 35% at 50% 80%, #6fa8ff33, transparent 70%);
  animation: simmer 9s ease-in-out infinite alternate; }
@keyframes simmer { from { transform: translate(-4%, 3%) scale(1); } to { transform: translate(5%, -4%) scale(1.12); } }
.frame.cook .stamp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-6deg); font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: .2em; color: var(--accent); border: 2px solid var(--accent); padding: 8px 14px; border-radius: 4px; white-space: nowrap; }
.frame.cook .slate { position: absolute; left: 12px; bottom: 10px; font: 400 10.5px var(--mono); color: #ffffff66; letter-spacing: .08em; }
.all-cta { display: flex; justify-content: center; margin-top: clamp(28px, 4vw, 44px); }
.yt { display: grid; gap: 18px; margin-top: clamp(20px, 3vw, 36px); }
.yt-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; }
.yt-head h2 { font: 800 clamp(26px, 3vw, 40px)/1 var(--display); letter-spacing: -0.03em; margin: 6px 0 0; }
.frame.cook > img { transform: scale(1.06); }
.frame.cook .simmer { opacity: .35; mix-blend-mode: screen; }
.frame.cook .stamp { background: #0f1218b3; }
