/* Charles Ayats — site.css */
:root {
  --bg: #f6f3ea; --fg: #1b1d22; --muted: #5f5a4e; --line: rgba(0,0,0,.12); --card: #ece8dc;
  --accent: #5a2fd6; --accent-fg: #fbf9f3; --hero-fg: #f3f0e6;
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --header-h: 64px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
:root.dark {
  --bg: #0b0d11; --fg: #f3f0e6; --muted: #9a9ca6; --line: rgba(255,255,255,.12); --card: #14171d;
  --accent: #8b5cff; --accent-fg: #fbf9f3;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-fg); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-fg); padding: 10px 14px; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 12px; }
.eyebrow { font: 500 .72rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  transition: background .3s, backdrop-filter .3s, opacity .4s var(--ease), transform .4s var(--ease);
}
.site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.is-home .site-header:not(.is-scrolled) { color: var(--hero-fg); }
.brand { font: 800 1.05rem/1 var(--display); letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.nav ul { display: flex; align-items: center; gap: 0; }
.nav li + li::before { content: "·"; opacity: .4; margin-inline: .55em; }
.nav a { font: 500 .72rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: 10px 2px; display: inline-block; opacity: .85; transition: opacity .2s, color .2s; }
.nav a:hover, .nav a[aria-current] { opacity: 1; color: var(--accent); }
.is-home .site-header:not(.is-scrolled) .nav a:hover { color: #fff; }
.nav .lang { border: 1px solid currentColor; border-radius: 99px; padding: 7px 10px; opacity: .9; }
.menu-btn { display: none; font: 500 .75rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 12px 14px; border: 1px solid currentColor; border-radius: 99px; min-height: 44px; }
.menu-close { display: none; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; position: relative; z-index: 2; }
  .nav { position: fixed; inset: 0; z-index: 1; background: var(--bg); color: var(--fg); display: flex; align-items: center; padding: calc(var(--header-h) + 24px) var(--gutter) 40px; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; overflow-y: auto; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav li + li::before { content: none; }
  .nav a { font: 800 clamp(2rem, 10vw, 3.2rem)/1.15 var(--display); letter-spacing: -.03em; text-transform: lowercase; padding: 4px 0; opacity: 1; }
  .nav .lang { font: 500 .85rem/1 var(--mono); letter-spacing: .14em; margin-top: 18px; padding: 12px 16px; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .site-header { color: var(--fg) !important; }
  .menu-open .menu-label { display: none; }
  .menu-open .menu-close { display: inline; }
  .menu-open { overflow: hidden; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 99px; border: 1px solid currentColor; font: 500 .74rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s, transform .2s var(--ease); }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, white); color: var(--accent-fg); }
.socials { display: flex; gap: 10px; }
.socials a { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid currentColor; transition: background .2s, color .2s; }
.socials a:hover { background: var(--hero-fg); color: #0b0d11; }
.socials svg { width: 18px; height: 18px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; color: var(--hero-fg); background: #050608; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; transition: opacity .6s var(--ease); }
.hero-bg img, .hero-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(5,6,8,.45) 0%, rgba(5,6,8,0) 28%, rgba(5,6,8,.1) 55%, rgba(5,6,8,.85) 100%),
  linear-gradient(90deg, rgba(5,6,8,.6) 0%, rgba(5,6,8,0) 60%); }
.hero-content { padding-top: calc(var(--header-h) + 40px); padding-bottom: clamp(40px, 9vh, 96px); transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s; }
.hello { font: 800 clamp(4.5rem, 17vw, 12.5rem)/.86 var(--display); letter-spacing: -.055em; margin: .18em 0 .2em -.04em; }
.lead { font-size: clamp(1.1rem, 1.6vw + .6rem, 1.6rem); line-height: 1.38; max-width: 34ch; margin-bottom: 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero-actions .socials { margin-left: 4px; }

.showreel-btn { position: absolute; right: max(var(--gutter), env(safe-area-inset-right)); bottom: clamp(40px, 9vh, 96px); display: inline-flex; align-items: center; gap: 12px; font: 500 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 8px 18px 8px 8px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .25s, opacity .4s var(--ease), visibility .4s; }
.showreel-btn:hover { background: rgba(255,255,255,.18); }
.showreel-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.showreel-ico svg { width: 18px; height: 18px; margin-left: 2px; }
.showreel-close { position: absolute; top: 16px; right: max(16px, env(safe-area-inset-right)); z-index: 3; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 99px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.3); font: 500 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #fff; opacity: .7; transition: opacity .2s; }
.showreel-close:hover, .showreel-close:focus-visible { opacity: 1; }
.showreel-close svg { width: 18px; height: 18px; }
.hero-player { position: absolute; inset: 0; z-index: 2; background: #000; opacity: 0; transition: opacity .6s var(--ease); }
.hero-player iframe, .hero-player > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* playing: everything that could get in the way fades out */
.hero.is-playing .hero-content, .hero.is-playing [data-hide-on-play] { opacity: 0; visibility: hidden; transform: translateY(12px); }
.hero.is-playing .hero-bg { opacity: 0; }
.hero.is-playing .hero-player { opacity: 1; }
.showreel-playing .site-header { opacity: 0; transform: translateY(-100%); pointer-events: none; }

@media (max-width: 760px) {
  .card-media { aspect-ratio: 16/9; }
  .hero { align-items: flex-end; }
  .hero-content { padding-bottom: 112px; }
  .showreel-btn { left: max(var(--gutter), env(safe-area-inset-left)); right: auto; bottom: 28px; }
  .hero-actions .socials { margin-left: 0; width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 11vw, 140px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: clamp(20px, 3vw, 36px); }
.section-title, .page-title { font: 800 clamp(3rem, 10vw, 7.5rem)/.9 var(--display); letter-spacing: -.05em; overflow-wrap: anywhere; }
.section-intro { color: var(--muted); max-width: 42ch; margin: 0; }
.see-all { font: 500 .75rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 12px 0; }
.see-all:hover { color: var(--accent); }

/* rows (works list) */
.rows { border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row a { position: relative; display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center; gap: 16px; padding: clamp(14px, 2vw, 22px) 0; text-decoration: none; }
.row-year, .row-cat { font: 400 .78rem/1 var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.row-title { font: 800 clamp(1.9rem, 5.6vw, 4.6rem)/1 var(--display); letter-spacing: -.045em; transition: transform .35s var(--ease), color .2s; overflow-wrap: anywhere; }
.row a:hover .row-title, .row a:focus-visible .row-title { color: var(--accent); transform: translateX(10px); }
.row-thumb { position: absolute; right: 9rem; top: 50%; width: min(32vw, 360px); aspect-ratio: 16/10; transform: translateY(-50%) scale(.94) rotate(-2deg); opacity: 0; pointer-events: none; transition: opacity .3s, transform .45s var(--ease); z-index: 2; border-radius: 6px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (min-width: 761px) {
  .row a:hover .row-thumb { opacity: 1; transform: translateY(-50%) scale(1) rotate(-2deg); }
}
@media (max-width: 760px) {
  .row a { grid-template-columns: 1fr 88px; grid-template-areas: "meta thumb" "title thumb"; gap: 6px 14px; padding: 16px 0; }
  .row-year { grid-area: meta; }
  .row-cat { grid-area: meta; justify-self: end; margin-right: 4px; }
  .row-title { grid-area: title; font-size: clamp(1.7rem, 8.4vw, 2.4rem); }
  .row-thumb { grid-area: thumb; position: static; width: 88px; opacity: 1; transform: none; box-shadow: none; border-radius: 4px; }
  .row a:hover .row-title { transform: none; }
}
.row[hidden] { display: none; }
.row .row-in { display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center; gap: 16px; padding: clamp(14px, 2vw, 22px) 0; }
.row.is-static .row-thumb { display: none; }
@media (max-width: 760px) { .row .row-in { grid-template-columns: 1fr; grid-template-areas: "meta" "title"; gap: 6px; padding: 16px 0; } .row-in .row-year { grid-area: meta; } .row-in .row-cat { grid-area: meta; justify-self: end; } .row-in .row-title { grid-area: title; font-size: clamp(1.7rem, 8.4vw, 2.4rem); } }

/* news */
.news { border-top: 1px solid var(--line); }
.news-item { display: grid; grid-template-columns: 9rem 1fr; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.news-year { font: 400 .78rem/1.7 var(--mono); letter-spacing: .08em; color: var(--muted); }
.news-title { font-weight: 500; font-size: 1.08rem; margin: 0 0 .25em; }
.news-title a { text-decoration: none; }
.news-title a:hover { color: var(--accent); text-decoration: underline; }
.news-text { color: var(--muted); margin: 0; max-width: 70ch; }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; } }

/* cards (consulting / playground) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(20px, 3vw, 36px); }
.card a, .card-in { display: flex; flex-direction: column; gap: 12px; text-decoration: none; height: 100%; }
.card-media { aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; background: var(--card); display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card a:hover .card-media img { transform: scale(1.04); }
.card-ph { width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 18px; font: 800 clamp(1.8rem, 3vw, 2.4rem)/.95 var(--display); letter-spacing: -.04em; color: var(--accent);
  background: radial-gradient(90% 80% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 70%), var(--card); border: 1px solid var(--line); border-radius: 6px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.card-title { font: 800 1.6rem/1.05 var(--display); letter-spacing: -.035em; }
.card a:hover .card-title { color: var(--accent); }
.card-year { font: 400 .78rem/1 var(--mono); color: var(--muted); }
.card-desc { color: var(--muted); }

/* showreel section */
.showreel-section { padding-bottom: 8px; }
.showreel-poster { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #050608; color: #fff; }
.showreel-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .7; transition: opacity .3s, transform .8s var(--ease); }
.showreel-poster:hover img { opacity: .55; transform: scale(1.02); }
.showreel-poster-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; font: 500 .85rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.showreel-poster-label svg { width: 22px; height: 22px; }

/* ---------- inner pages ---------- */
.page { padding-top: calc(var(--header-h) + clamp(40px, 8vw, 96px)); padding-bottom: clamp(48px, 8vw, 96px); }
.back { display: inline-block; font: 500 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 12px 0; margin-bottom: 12px; }
.back:hover { color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.filters button { min-height: 44px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line); font: 500 .74rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.facts { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 32px 0; padding: 20px 0; border-block: 1px solid var(--line); }
.facts dt { font: 400 .7rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.facts dd { margin: 0; font-size: 1.05rem; }

/* gallery */
.gallery { margin: 8px 0 clamp(36px, 6vw, 64px); }
.g-stage { position: relative; }
.g-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: 8px; background: #050608; }
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; position: relative; aspect-ratio: 16/9; max-height: 78vh; display: flex; align-items: center; justify-content: center; }
.g-zoom { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.g-slide img { width: 100%; height: 100%; object-fit: contain; }
.g-slide figcaption { position: absolute; left: 12px; bottom: 12px; font: 400 .72rem/1.3 var(--mono); color: #fff; background: rgba(0,0,0,.55); padding: 6px 10px; border-radius: 4px; max-width: calc(100% - 24px); }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; border: 1px solid rgba(255,255,255,.25); transition: background .2s, opacity .2s; z-index: 2; }
.g-nav:hover { background: rgba(0,0,0,.8); }
.g-nav[disabled] { opacity: 0; pointer-events: none; }
.g-nav svg { width: 22px; height: 22px; }
.g-prev { left: 12px; } .g-next { right: 12px; }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: thin; }
.g-thumbs button { position: relative; width: 96px; aspect-ratio: 16/10; border-radius: 4px; overflow: hidden; opacity: .5; transition: opacity .2s, outline-color .2s; outline: 2px solid transparent; outline-offset: -2px; flex: 0 0 auto; background: #050608; }
.g-thumbs button[aria-current="true"] { opacity: 1; outline-color: var(--accent); }
.g-thumbs button:hover { opacity: .9; }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumb-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.3); }
.thumb-play svg { width: 22px; height: 22px; }
@media (max-width: 760px) {
  .g-nav { display: none; }
  .g-track { border-radius: 0; margin-inline: calc(-1 * var(--gutter)); }
  .g-thumbs button { width: 72px; }
}

/* YouTube (loads only when clicked: faster + no cookies before play) */
.yt { position: relative; width: 100%; height: 100%; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; color: #fff; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.45)); }
.yt-ico { width: clamp(64px, 9vw, 92px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--accent); box-shadow: 0 10px 40px rgba(0,0,0,.4); transition: transform .3s var(--ease); }
.yt-ico svg { width: 40%; height: 40%; margin-left: 6%; }
.yt-play:hover .yt-ico { transform: scale(1.07); }
.yt-label { font: 500 .78rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; background: rgba(0,0,0,.5); padding: 7px 12px; border-radius: 99px; }

/* body */
.work-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.prose p { font-size: clamp(1.02rem, .4vw + .95rem, 1.18rem); line-height: 1.7; max-width: 66ch; }
.prose p:first-child { font-size: clamp(1.2rem, .9vw + 1rem, 1.55rem); line-height: 1.45; }
.work-side h2, .about-side h2 { font: 400 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.work-side h2:not(:first-child), .about-side h2:not(:first-child) { margin-top: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 400 .78rem/1 var(--mono); padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; }
.links li + li { margin-top: 2px; }
.links a, .plain a { display: inline-block; padding: 6px 0; text-decoration: none; }
.links a:hover, .plain a:hover { color: var(--accent); text-decoration: underline; }
.plain li { padding: 3px 0; }
@media (max-width: 860px) { .work-body { grid-template-columns: 1fr; } }

.next-work { display: block; margin-top: clamp(56px, 9vw, 120px); padding-top: 28px; border-top: 1px solid var(--line); text-decoration: none; }
.next-title { display: block; margin-top: 10px; font: 800 clamp(2.6rem, 9vw, 7rem)/.95 var(--display); letter-spacing: -.05em; transition: color .2s; overflow-wrap: anywhere; }
.next-work:hover .next-title { color: var(--accent); }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(28px, 5vw, 56px); }
.prose-lg p { font-size: clamp(1.1rem, .7vw + 1rem, 1.4rem); line-height: 1.55; }
.prose-lg p:first-child { font-size: clamp(1.35rem, 1.4vw + 1rem, 2rem); line-height: 1.3; }
.talks-title { margin: clamp(64px, 10vw, 120px) 0 28px; font-size: clamp(2.4rem, 7vw, 5rem); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* lightbox */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5,6,8,.96); color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(0,0,0,.8); }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; }
.lb-close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); }
.lb-close svg, .lb-nav svg { width: 24px; height: 24px; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
@media (max-width: 760px) { .lb-nav { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); transform: none; } }

/* footer */
.site-footer { margin-top: clamp(80px, 12vw, 160px); border-top: 1px solid var(--line); padding-block: 40px max(40px, env(safe-area-inset-bottom)); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px 24px; align-items: center; }
.footer-mail { font: 800 clamp(1.6rem, 5vw, 3.4rem)/1 var(--display); letter-spacing: -.04em; text-decoration: none; grid-column: 1 / -1; overflow-wrap: anywhere; }
.footer-mail:hover { color: var(--accent); }
.footer-social { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-social a { font: 500 .74rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: 10px 0; display: inline-block; }
.footer-social a:hover { color: var(--accent); }
.footer-grid .eyebrow { grid-column: 1 / -1; }
.footer-copy { color: var(--muted); font-size: .85rem; margin: 0; grid-column: 1; }
.theme-btn { grid-column: 2; grid-row: 3 / span 2; align-self: center; justify-self: end; font: 500 .7rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 12px 16px; border: 1px solid var(--line); border-radius: 99px; min-height: 44px; }
.theme-btn:hover { border-color: var(--fg); }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } .theme-btn { grid-column: 1; grid-row: auto; justify-self: start; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hero-loop { display: none; }
}
