/* ==========================================================================
   MBarikh — portfolio
   ========================================================================== */

:root {
  --bg: #f5ecdf;
  --bg-alt: #efe3d1;
  --surface: #fbf6ee;
  --ink: #1f1b17;
  --muted: #6f675e;
  --accent: #b5573b;
  --accent-ink: #fff9f0;
  --gold: #b7793f;
  --line: rgba(31, 27, 23, 0.12);
  --frame: rgba(255, 255, 255, 0.7);
  --shadow: 0 30px 60px -30px rgba(60, 40, 20, 0.35);

  --serif: "Newsreader", "Times New Roman", Times, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 84px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120f;
    --bg-alt: #1c1814;
    --surface: #221d18;
    --ink: #f3eadd;
    --muted: #a89d90;
    --accent: #d27757;
    --accent-ink: #1a120d;
    --gold: #d69a5e;
    --line: rgba(243, 234, 221, 0.12);
    --frame: rgba(243, 234, 221, 0.14);
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15120f;
  --bg-alt: #1c1814;
  --surface: #221d18;
  --ink: #f3eadd;
  --muted: #a89d90;
  --accent: #d27757;
  --accent-ink: #1a120d;
  --gold: #d69a5e;
  --line: rgba(243, 234, 221, 0.12);
  --frame: rgba(243, 234, 221, 0.14);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font: 400 1.05rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); }
h2 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); letter-spacing: -0.015em; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.eyebrow {
  display: block;
  margin-bottom: 1.25rem;
  font: 600 .7rem/1.6 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.lede { font-size: 1.08rem; max-width: 34ch; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .75rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 .72rem/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: transform .2s, background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn svg { width: 14px; height: 14px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--ink);
  font: 600 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding-bottom: .5rem;
  transition: border-color .2s, gap .2s;
}
.link-arrow:hover { border-color: var(--ink); gap: .9rem; }
.link-arrow svg { width: 14px; height: 14px; flex: none; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--ink); }
.logo b { font: 500 1.65rem/1 var(--serif); letter-spacing: -0.03em; }
.logo small { margin-top: .4rem; font: 600 .5rem/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) {
  position: relative;
  font: 500 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  padding: .4rem 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { padding: .9rem 1.2rem; }
.menu-toggle { display: none; background: none; border: 0; padding: .5rem; color: var(--ink); }
.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 820px) {
  .menu-toggle { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 2rem;
    background: var(--bg);
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .nav a:not(.btn) { font: 500 2.2rem/1 var(--serif); letter-spacing: -0.02em; text-transform: none; }
  body.menu-open .nav { opacity: 1; visibility: visible; }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; padding: calc(var(--header-h) + 1rem) 0 0;
  background: radial-gradient(70% 55% at 85% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: end;
  padding: clamp(.5rem, 2vh, 1.5rem) 0 clamp(2.5rem, 6vh, 4rem);
}
.hero-grid .lede { justify-self: end; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero-media {
  position: relative; overflow: hidden;
  aspect-ratio: 21 / 9;
  box-shadow: var(--shadow);
}
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity .8s ease, transform 4.5s linear;
}
.hero-media img.is-active { opacity: 1; transform: scale(1); }
.hero-dots { position: absolute; z-index: 1; right: 1.25rem; bottom: 1.05rem; display: flex; gap: .4rem; }
.hero-dots button { width: 18px; height: 3px; padding: 0; border: 0; border-radius: 2px; background: rgba(255,249,240,.45); transition: background-color .3s, width .3s; }
.hero-dots button[aria-current="true"] { width: 30px; background: #fff9f0; }
.hero-media figcaption { z-index: 1; }
@media (max-width: 600px) {
  .hero-media figcaption { display: none; }
  .hero-dots { right: 50%; translate: 50% 0; bottom: .8rem; gap: .3rem; }
  .hero-dots button { width: 10px; }
  .hero-dots button[aria-current="true"] { width: 20px; }
}
.hero-media figcaption {
  position: absolute; left: 1.25rem; bottom: 1rem;
  font: 600 .62rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #fff9f0;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
@media (max-width: 820px) {
  .hero { padding-top: calc(var(--header-h) + 1rem); }
  .hero-grid { grid-template-columns: 1fr; align-items: start; gap: 1.5rem; padding: 1.5rem 0 2.5rem; }
  .hero-grid .lede { justify-self: start; }
  .hero-media { aspect-ratio: 4 / 3; }
}

/* page hero (inner pages) */
.page-hero { padding: calc(var(--header-h) + clamp(1.75rem, 4vh, 3rem)) 0 clamp(2.5rem, 5vh, 3.5rem); border-bottom: 1px solid var(--line); }
.page-hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: end; }
.page-hero .lede { justify-self: end; }
@media (max-width: 820px) {
  .page-hero { padding: calc(var(--header-h) + 1.75rem) 0 2.25rem; }
  .page-hero .wrap { grid-template-columns: 1fr; gap: 1.25rem; }
  .page-hero .lede { justify-self: start; }
}

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
main > .section:last-child:not(.section--alt) { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section--alt { background: var(--bg-alt); }
.section-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: end; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head > p { justify-self: end; max-width: 36ch; }
@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; gap: 1.25rem; }
  .section-head > p { justify-self: start; }
}

/* story (home) */
.story { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.portrait { position: relative; background: var(--surface); }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.portrait::after { content: ""; position: absolute; inset: 14px; border: 1px solid var(--frame); pointer-events: none; }
.story h2 { margin-bottom: 1.75rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 2.5rem; border-top: 1px solid var(--line); }
.stats div { padding: 1.4rem 1rem 0 0; }
.stats b { display: block; font-variant-numeric: tabular-nums; color: var(--ink); font: 500 2.4rem/1 var(--serif); letter-spacing: -0.03em; }
.stats span { font-size: .8rem; }
@media (max-width: 820px) { .story { grid-template-columns: 1fr; } }

/* process / services cards */
.cards { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); border: 1px solid var(--line); }
.card { padding: clamp(1.75rem, 3vw, 2.5rem); border-right: 1px solid var(--line); }
.card:last-child { border-right: 0; }
.card .num { display: block; margin-bottom: 3.5rem; font: 600 .7rem/1 var(--sans); letter-spacing: .18em; color: var(--gold); }
.card h3 { margin-bottom: .9rem; }
.card p { font-size: .95rem; }
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card { border-bottom: 1px solid var(--line); }
  .card:nth-child(2n) { border-right: 0; }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .card { border-right: 0; }
  .card .num { margin-bottom: 1.5rem; }
}

/* ---------- work grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.filters button {
  padding: .7rem 1.1rem; border: 1px solid var(--line); background: transparent;
  font: 500 .7rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: all .2s;
}
.filters button:hover { color: var(--ink); border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filters sup { margin-left: .35rem; font-size: .6rem; opacity: .7; }

.work-group + .work-group { margin-top: clamp(4rem, 9vw, 6.5rem); }
.work-group[hidden] { display: none; }
.work-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.work-group-head span { font: 500 .66rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.work-grid { display: grid; gap: clamp(28px, 3vw, 40px) clamp(14px, 2vw, 24px); align-items: start; }
.work-grid--land { grid-template-columns: repeat(3, 1fr); }
.work-grid--vert { grid-template-columns: repeat(5, 1fr); }
.tile { display: block; width: 100%; position: relative; text-align: left; padding: 0; border: 0; background: none; }
.tile-media { position: relative; overflow: hidden; background: var(--surface); aspect-ratio: 16 / 9; }
.work-grid--vert .tile-media, .tile--tall .tile-media { aspect-ratio: 9 / 16; }
.work-grid--land .tile:first-child { grid-column: span 2; grid-row: span 2; }
.work-grid--land .tile:first-child .tile-meta h3 { font-size: 1.75rem; }
.tile-media img, .tile-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .4s;
}
.tile-media video { opacity: 0; }
.tile.is-previewing .tile-media video { opacity: 1; }
.tile:hover .tile-media img, .tile:hover .tile-media video { transform: scale(1.04); }
.tile-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,10,6,.55), transparent 45%);
  opacity: .8; transition: opacity .3s;
}
.tile .play {
  position: absolute; z-index: 1; right: .9rem; bottom: .9rem;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,249,240,.92); color: #1f1b17;
  transition: transform .3s, background-color .3s;
}
.tile .play svg { width: 13px; height: 13px; margin-left: 2px; }
.tile:hover .play { transform: scale(1.1); background: var(--accent); color: #fff9f0; }
.tile .dur {
  position: absolute; z-index: 1; left: .9rem; bottom: 1.05rem;
  font: 600 .62rem/1 var(--sans); letter-spacing: .15em; color: #fff9f0;
}
.tile-meta { padding-top: .9rem; }
.tile-meta h3 { font-size: 1.2rem; line-height: 1.2; }
.tile-meta span { display: block; margin-top: .35rem; font: 500 .62rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tile[hidden] { display: none; }

/* the home "featured" block: one wide film, then a row of four reels */
.featured { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 3vw, 40px) clamp(14px, 2vw, 24px); align-items: start; }
.featured .tile:first-child { grid-column: 1 / -1; }
.featured .tile:first-child .tile-media { aspect-ratio: 21 / 9; }
.featured .tile:first-child .tile-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1.5rem; }
.featured .tile:first-child .tile-meta h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.featured .tile:not(:first-child) .tile-meta h3 { font-size: 1.1rem; }
@media (max-width: 1000px) {
  .work-grid--vert { grid-template-columns: repeat(3, 1fr); }
  .work-grid--land { grid-template-columns: repeat(2, 1fr); }
  .work-grid--land .tile:first-child { grid-row: auto; }
  .featured { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .work-grid--land { grid-template-columns: 1fr; }
  .work-grid--land .tile:first-child { grid-column: auto; }
  .work-grid--vert { grid-template-columns: 1fr 1fr; }
  .work-grid--vert .tile-meta h3 { font-size: 1rem; }
}

/* ---------- aerial gallery ---------- */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.5vw, 18px); }
.strip a { position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.strip a:nth-child(2) { margin-top: 3rem; }
.strip a:nth-child(4) { margin-top: 1.5rem; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.strip a:hover img { transform: scale(1.05); }
@media (max-width: 700px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .strip a:nth-child(n) { margin-top: 0; }
}

.gallery { columns: 3 320px; column-gap: clamp(12px, 1.6vw, 20px); }
.gallery a { position: relative; display: block; margin-bottom: clamp(12px, 1.6vw, 20px); break-inside: avoid; overflow: hidden; background: var(--surface); }
.gallery img { width: 100%; height: auto; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1rem .9rem;
  background: linear-gradient(to top, rgba(15,10,6,.6), transparent);
  font: 600 .62rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #fff9f0;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.gallery a:hover figcaption, .gallery a:focus-visible figcaption { opacity: 1; transform: none; }

/* ---------- lightbox ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(12, 9, 7, .94); color: #f3eadd;
}
.lightbox::backdrop { background: rgba(12, 9, 7, .94); }
.lightbox[open] { display: grid; place-items: center; animation: fade .25s ease; }
.lightbox .lb-stage { position: absolute; inset: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 64px 16px 72px; }
.lightbox .lb-stage > * { max-width: min(100%, 1400px); max-height: calc(100dvh - 136px); width: auto; height: auto; background: #000; }
.lightbox .lb-stage video.is-vertical { max-width: min(100%, 460px); }
.lightbox .lb-close, .lightbox .lb-nav {
  position: absolute; z-index: 2; display: grid; place-items: center;
  width: 48px; height: 48px; border: 1px solid rgba(243,234,221,.25); border-radius: 50%;
  background: rgba(12,9,7,.4); color: #f3eadd;
}
.lightbox .lb-close { top: 12px; right: 12px; }
.lightbox .lb-nav { top: 50%; transform: translateY(-50%); }
.lightbox .lb-prev { left: 12px; }
.lightbox .lb-next { right: 12px; }
.lightbox svg { width: 18px; height: 18px; }
.lightbox .lb-caption {
  position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; padding: 0 70px;
  font: 500 .72rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(243,234,221,.75);
}
@keyframes fade { from { opacity: 0; } }

/* ---------- video player ---------- */
.player {
  position: relative; display: block; overflow: hidden; outline: none;
  width: min(100%, 1400px, calc((100dvh - 136px) * 16 / 9)); aspect-ratio: 16 / 9;
  background: #000; color: #fff9f0; user-select: none; -webkit-user-select: none;
}
.player.is-vertical { width: min(100%, 460px, calc((100dvh - 136px) * 9 / 16)); aspect-ratio: 9 / 16; }
.lightbox .lb-stage > .player { width: min(100%, 1400px, calc((100dvh - 136px) * 16 / 9)); height: auto; max-width: none; max-height: none; }
.lightbox .lb-stage > .player.is-vertical { width: min(100%, 460px, calc((100dvh - 136px) * 9 / 16)); }
.lightbox .lb-stage > .player.is-fullscreen { width: 100vw; height: 100vh; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player.is-fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; }
.pl-big {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 76px; height: 76px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 249, 240, .92); color: #1f1b17; transition: transform .2s, opacity .2s, background-color .2s;
}
.pl-big svg { width: 24px; height: 24px; margin-left: 3px; }
.pl-big:hover { transform: scale(1.06); background: var(--accent); color: #fff9f0; }
.player.is-playing .pl-big { opacity: 0; pointer-events: none; }
.pl-spinner {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 3px solid rgba(255,249,240,.25); border-top-color: #fff9f0; border-radius: 50%;
  opacity: 0; pointer-events: none; animation: spin .8s linear infinite;
}
.player.is-loading.is-playing .pl-spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.pl-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; align-items: center; gap: .65rem; padding: 2.5rem .9rem .75rem;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  transition: opacity .3s;
}
.player.is-idle .pl-bar { opacity: 0; }
.player.is-idle { cursor: none; }
.pl-btn { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; }
.pl-btn:hover { background: rgba(255,249,240,.14); }
.pl-btn svg { width: 20px; height: 20px; }
.pl-time { flex: none; font: 500 .74rem/1 var(--sans); letter-spacing: .04em; font-variant-numeric: tabular-nums; opacity: .9; }
.pl-seek { position: relative; flex: 1; height: 24px; display: flex; align-items: center; }
.pl-track { position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(255,249,240,.25); overflow: hidden; }
.pl-buf, .pl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.pl-buf { background: rgba(255,249,240,.35); }
.pl-fill { background: var(--accent); }
.pl-seek input, .pl-vol { -webkit-appearance: none; appearance: none; background: transparent; margin: 0; cursor: pointer; }
.pl-seek input { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl-seek input::-webkit-slider-thumb, .pl-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff9f0; border: 0; }
.pl-seek input::-moz-range-thumb, .pl-vol::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff9f0; border: 0; }
.pl-vol { width: 72px; height: 4px; border-radius: 2px; background: rgba(255,249,240,.3); }
.player.is-vertical .pl-time { display: none; }
.player.is-vertical .pl-vol { width: 56px; }
.player.is-vertical .pl-bar { gap: .4rem; padding-inline: .6rem; }
@media (hover: none) { .pl-vol { display: none; } }
@media (max-width: 520px) { .pl-time { display: none; } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.about-grid .portrait { position: sticky; top: calc(var(--header-h) + 2rem); }
.prose { font-size: 1.08rem; max-width: 62ch; }
.prose .big { color: var(--ink); font: 400 clamp(1.5rem, 2.6vw, 2rem)/1.35 var(--serif); letter-spacing: -0.01em; margin-bottom: 2rem; }
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .portrait { position: static; max-width: 420px; }
}

/* services page */
.services { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding: clamp(1.75rem, 3.5vw, 3rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .3s; }
.service:hover { background: var(--surface); }
.service .num { font: 600 .66rem/1 var(--sans); letter-spacing: .18em; color: var(--gold); }
.service h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.service p { max-width: 46ch; margin: 0; }
.service .link-arrow { margin-top: auto; padding-top: 1.25rem; }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } }

/* service detail pages */
.back-link { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.5rem; font: 600 .66rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 14px; height: 14px; }
.svc-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.svc-body p { font-size: 1.08rem; max-width: 52ch; }
.related { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: clamp(28px, 3vw, 40px) clamp(14px, 2vw, 24px); align-items: start; }
.related.related--vert .tile-media { aspect-ratio: 9 / 16; }
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.3rem 0; cursor: pointer; list-style: none; color: var(--ink); font: 500 1.2rem/1.3 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 1.4rem/1 var(--sans); color: var(--gold); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.4rem; max-width: 60ch; }
@media (max-width: 820px) {
  .svc-body, .faq-wrap { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr; }
  .related.related--vert { grid-template-columns: 1fr 1fr; }
}

/* skills grid (about) */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.skill { padding: clamp(1.5rem, 2.4vw, 2rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 40%, transparent); transition: background-color .3s; }
.skill:hover { background: var(--surface); }
.skill .num { display: block; margin-bottom: 2rem; font: 600 .66rem/1 var(--sans); letter-spacing: .18em; color: var(--gold); }
.skill h3 { font-size: 1.45rem; }
.skill .tools { margin: .45rem 0 1.1rem; font: 600 .64rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.skill ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.skill li { position: relative; padding-left: 1rem; font-size: .9rem; line-height: 1.45; }
.skill li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
@media (max-width: 1000px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .skills { grid-template-columns: 1fr; } .skill .num { margin-bottom: 1rem; } }

/* experience timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 180px 1fr 1.3fr; gap: 1rem 2.5rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.timeline time { font: 600 .66rem/1.9 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.timeline h3 { font-size: 1.45rem; }
.timeline div span { display: block; margin-top: .35rem; font-size: .9rem; }
.timeline p { font-size: .95rem; }
@media (max-width: 820px) { .timeline li { grid-template-columns: 1fr; gap: .5rem; } }
.about-extra { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 3.5rem); margin-top: clamp(3rem, 6vw, 4rem); }
@media (max-width: 820px) { .about-extra { grid-template-columns: 1fr; } }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { padding: .55rem .95rem; border: 1px solid var(--line); font-size: .88rem; color: var(--ink); }
.certs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.certs li { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.certs b { color: var(--ink); font-weight: 500; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .certs li { flex-direction: column; gap: .25rem; } .certs b { white-space: normal; } }
.certs span { flex: none; font: 600 .62rem/2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 7vw, 7rem); }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.contact-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.contact-list span { font: 600 .66rem/1.8 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.contact-list a { color: var(--ink); text-align: right; word-break: break-word; }
.contact-list a:hover { color: var(--accent); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; margin-bottom: .5rem; font: 600 .66rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.form input, .form select, .form textarea {
  width: 100%; padding: .95rem 1rem; border: 1px solid var(--line); border-radius: 0;
  background: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--sans);
  transition: border-color .2s;
}
.form textarea { min-height: 160px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form .hp { display: none; }
.form-status { grid-column: 1 / -1; min-height: 1.5em; font-size: .95rem; }
.form-status.ok { color: #4f8a4b; }
.form-status.err { color: var(--accent); }
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
}

/* ---------- CTA + footer ---------- */
.cta { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 3.5rem); }
.cta .wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: end; }
.cta-side { display: grid; gap: 1.5rem; justify-items: start; }
@media (max-width: 820px) { .cta .wrap { grid-template-columns: 1fr; } }

.site-footer { padding: 2rem 0 2.5rem; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem;
  padding-top: 2rem; border-top: 1px solid var(--line);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.site-footer nav a, .site-footer small { font: 500 .66rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer small { color: var(--muted); }
@media (max-width: 820px) {
  .site-footer { padding: 1.5rem 0 5.5rem; }
  .site-footer .wrap { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.75rem; }
  .site-footer nav { display: none; }
  .site-footer small { font-size: .6rem; }
}

/* floating controls */
.theme-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--surface); box-shadow: 0 6px 24px -8px rgba(0,0,0,.25); border: 1px solid var(--line);
}
.theme-toggle button {
  width: 32px; height: 32px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: transparent; color: var(--muted);
}
.theme-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.theme-toggle svg { width: 15px; height: 15px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img { transition: opacity .6s ease; transform: none; }
  * { animation: none !important; }
}
