/* Joe Yoav Arden — portfolio styles
   Light theme by default; dark theme turns on with <html data-theme="dark">, set from the
   device's own light/dark setting or the visitor's toggle (see the inline script in each page's head). */

:root {
  --bg: #F1EFEA;
  --surface: #E7E4DD;
  --ink: #161513;
  --muted: #615E57;
  --rule: #D9D5CC;
  --rule-strong: #161513;
  --accent: #B83A22;
  --frame: #2B2A27;
  --chip-bg: #F1EFEA;
  --chip-ink: #161513;
  --available: #2F8A52;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1360px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #141311;
  --surface: #1E1D1A;
  --ink: #F1EFEA;
  --muted: #A39F96;
  --rule: #34322D;
  --rule-strong: #F1EFEA;
  --accent: #E2704F;
  --frame: #24231F;
  --chip-bg: #F1EFEA;
  --chip-ink: #161513;
  --available: #5BC184;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
a:hover { color: var(--muted); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 16px; top: 16px; z-index: 20; padding: 8px 12px; background: var(--ink); color: var(--bg); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */

/* Right side of the header: page buttons on top, language + theme underneath. */
.header-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.main-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 28px; font-size: 16px; font-weight: 500; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.main-nav a:hover {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.main-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.utils { display: flex; align-items: center; gap: 14px; }

.lang { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.lang a { text-decoration: none; color: var(--muted); padding: 10px 2px; }
.lang a.is-active { color: var(--ink); font-weight: 500; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--rule); border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color .2s ease;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.masthead {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap;
  gap: 16px 32px;
  padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 3vw, 36px);
}

.name {
  display: block;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(46px, 9vw, 132px); line-height: .9; letter-spacing: -.045em;
  text-decoration: none;
}
.name:hover { color: var(--ink); }
/* On the home page the name is the page's main heading; it looks the same as elsewhere. */
.site-title { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }

.tagline {
  margin: 16px 0 0;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}

.masthead--compact { padding: clamp(24px, 4vw, 40px) 0 clamp(20px, 3vw, 28px); border-bottom: 1px solid var(--rule); }
.masthead--compact .name { font-size: clamp(34px, 5vw, 64px); }
.masthead--compact .tagline { margin-top: 10px; }

/* ---------- Reel ---------- */

.reel { margin-top: clamp(24px, 3vw, 36px); }
.reel-player {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: 0; cursor: pointer; font: inherit; color: #fff;
  background: #1E1D1B center / cover no-repeat;
}
.reel-player::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, .28); transition: background .2s ease;
}
.reel-player:hover::after { background: rgba(0, 0, 0, .14); }
.reel-player .play {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: clamp(64px, 8vw, 96px); height: clamp(64px, 8vw, 96px);
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #F1EFEA; color: #161513;
  transition: transform .2s ease;
}
.reel-player:hover .play { transform: translate(-50%, -50%) scale(1.06); }
.reel-label, .reel-note {
  position: absolute; top: clamp(12px, 2vw, 20px); z-index: 1;
  font-family: var(--font-mono); font-size: 12px;
}
.reel-label { left: clamp(14px, 2vw, 24px); letter-spacing: .06em; text-transform: uppercase; }
.reel-note { right: clamp(14px, 2vw, 24px); color: #DAD6CD; }
.reel iframe, .project-main iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }

/* ---------- Sections ---------- */

.section { padding-top: clamp(64px, 9vw, 112px); }

.section-head {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
  gap: 8px 24px; margin-bottom: 24px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(32px, 4vw, 44px); line-height: 1; letter-spacing: -.03em;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Work grid ---------- */

/* Three rows of three. On phones each row becomes a small gallery: one video at a time,
   with arrows (and swipe) to the other two. */
.work-grid { display: flex; flex-direction: column; gap: 20px; }
.work-row { position: relative; }
.work-row-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.row-arrow { display: none; }

.work-link {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  padding: 0; border: 0; cursor: pointer; text-align: left; font: inherit; color: #fff;
  background: var(--frame);
}
.work-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
/* Vertical or square versions: show the whole thumbnail inside the 16:9 tile. */
.work-link[data-ratio] img { object-fit: contain; }
.work-link:hover img { transform: scale(1.03); }
/* Darkens the lower part of each still so the caption stays readable on real footage. */
.work-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0));
}

.tag {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  padding: 5px 8px; line-height: 1.2;
  background: var(--chip-bg); color: var(--chip-ink);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
}
.award {
  position: absolute; top: 14px; right: 14px; z-index: 1; max-width: 60%;
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 5px 8px;
  background: rgba(22, 21, 19, .86); color: #fff;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.25; letter-spacing: .04em;
  text-transform: uppercase; text-align: right;
}
.award svg { color: #E9B949; }
.award svg { flex: none; }
.tile-play {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 56px; height: 56px; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(241, 239, 234, .92); color: #161513;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .25);
  transition: transform .2s ease, background-color .2s ease;
}
.tile-play svg { margin-left: 3px; }
.work-link:hover .tile-play, .work-link:focus-visible .tile-play { transform: translate(-50%, -50%) scale(1.08); background: #F1EFEA; }
.meta {
  position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1;
  display: flex; flex-direction: column; gap: 2px;
}
.meta .title { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; }
.meta .sub { font-size: 13px; color: #E6E2DA; }

/* Small laptops: three narrow tiles per row, so the labels on each still get smaller. */
@media (min-width: 960px) and (max-width: 1199px) {
  .tag, .award { top: 10px; padding: 4px 6px; font-size: 10px; }
  .tag { left: 10px; }
  .award { right: 10px; max-width: 58%; }
  .tile-play { width: 44px; height: 44px; }
  .meta { left: 14px; right: 14px; bottom: 11px; }
  .meta .title { font-size: 17px; }
  .meta .sub { font-size: 12px; }
}

/* ---------- Work page: a main film, a short text, then its versions ---------- */

.work-intro { padding-top: clamp(32px, 5vw, 64px); max-width: 760px; }
.work-intro .page-title { margin-bottom: 16px; }
.work-lede { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); }

.project {
  margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--rule);
}
.project-main { max-width: 1000px; margin: 0 auto; }
.project-text { max-width: 760px; margin: 18px auto 0; font-size: 17px; line-height: 1.6; text-align: center; }

.versions { max-width: 1000px; margin: clamp(24px, 3vw, 32px) auto 0; }
.versions-list { gap: 16px; }
.versions-list .tile-play { width: 44px; height: 44px; }
.versions-list .meta { left: 12px; right: 12px; bottom: 10px; }
.versions-list .meta .title { font-size: 16px; }
.versions-list .meta .sub { font-size: 12px; }
.versions-list .tag { top: 10px; left: 10px; font-size: 10px; padding: 4px 6px; }
/* Below 960px the versions become a one-at-a-time gallery, like the home rows. */
@media (max-width: 959px) {
  .versions-list { gap: 14px; max-width: 640px; margin: 0 auto; }
}

/* Work page for now: one big "Coming soon". */
.soon-hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 50vh; padding: clamp(48px, 7vw, 96px) 0; text-align: center;
}
.soon-hero .page-title { margin: 0; font-size: clamp(48px, 9vw, 120px); line-height: .95; letter-spacing: -.045em; }

/* Empty frame until a video is added. */
.frame-soon {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 9; background: var(--frame); color: #DAD6CD;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.frame-soon--main { font-size: 14px; }

/* ---------- Lightbox ---------- */

/* The width is also capped by screen height, so the whole video and its close button
   stay on screen when a phone is turned sideways. --ratio is the video's width / height
   (set by the script for vertical or square videos); it defaults to 16:9. */
.lightbox {
  width: min(1200px, 92vw, (100vh - 130px) * var(--ratio, 16 / 9));
  width: min(1200px, 92vw, (100dvh - 130px) * var(--ratio, 16 / 9));
  max-width: none; max-height: none; padding: 0; border: 0;
  background: transparent; color: #fff; overflow: visible;
}
.lightbox::backdrop { background: rgba(10, 10, 9, .9); }
.lightbox-frame {
  position: relative; aspect-ratio: var(--ratio, 16 / 9); background: #000;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox-msg {
  margin: 0; padding: 0 24px; text-align: center;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #DAD6CD;
}
.lightbox-close {
  position: absolute; right: 0; bottom: calc(100% + 12px);
  width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%;
  background: transparent; color: #fff; cursor: pointer;
}
/* Short, wide screens (a phone held sideways): the video uses nearly the full height
   and the close button moves to its right instead of above it. */
@media (max-height: 500px) and (orientation: landscape) {
  .lightbox {
    width: min(100vw - 136px, (100vh - 24px) * var(--ratio, 16 / 9));
    width: min(100vw - 136px, (100dvh - 24px) * var(--ratio, 16 / 9));
  }
  .lightbox-close { bottom: auto; top: 0; right: auto; left: calc(100% + 12px); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
.btn:hover { color: var(--bg); opacity: .86; }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--bg); opacity: 1; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(96px, 12vw, 160px);
  padding-bottom: 32px;
}
.footer-main {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 32px;
  padding-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--rule-strong);
}

.contact-cta {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 7vw, 96px); line-height: .92; letter-spacing: -.04em;
  text-decoration: none;
}
.contact-cta:hover { color: var(--ink); }
.contact-cta .arrow { display: inline-block; color: var(--accent); transition: transform .2s ease; }
.contact-cta:hover .arrow { transform: translate(4px, -4px); }

.contact-lines { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 18px 0 0; font-size: 16px; }
.contact-lines a { display: inline-flex; align-items: center; min-height: 44px; }

.social { display: flex; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 1px solid var(--ink); border-radius: 50%;
  color: var(--ink); text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.icon-btn:hover { background: var(--ink); color: var(--bg); }
.imdb {
  font-weight: 700; font-size: 10px; line-height: 1.2; letter-spacing: -.02em;
  padding: 1px 3px; border: 1.5px solid currentColor; border-radius: 3px;
}

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  margin-top: 48px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- About ---------- */

/* The About page is a scroll story: one step at a time, centred on screen.
   Without JS, on small screens or with reduced motion, the steps simply stack. */

.story { position: relative; }
.story-stage { position: relative; }
.story-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.story-step {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(56px, 10vw, 96px) 0;
}
.story-step + .story-step { border-top: 1px solid var(--rule); }

/* Stacked mode: each step fades up as it scrolls into view. */
.story--reveal .story-step > * { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.story--reveal .story-step.is-visible > * { opacity: 1; transform: none; }

/* Pinned mode: the stage sticks to the screen and steps swap in place. */
.story--pinned .story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.story--pinned .story-inner { position: relative; height: 100%; }
.story--pinned .story-step {
  position: absolute; inset: 0; padding: 0 var(--gutter); border: 0;
  opacity: 0; transform: translateY(32px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.story--pinned .story-step.is-past { transform: translateY(-32px); }
.story--setup .story-step, .story--setup .story-counter .sc-bar i { transition: none !important; }
.story--pinned .story-step.is-active { opacity: 1; transform: none; pointer-events: auto; }

.story-progress { display: none; }
.story--pinned .story-progress {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
}
.story-progress span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--rule);
  transition: background-color .3s ease, transform .3s ease;
}
.story-progress span.is-active { background: var(--accent); transform: scale(1.5); }

/* Overall progress through the CV story: "04 ━━── 13" at the bottom of the screen. */
.story-counter { display: none; }
.story--pinned .story-counter {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--muted);
}
.story-counter .sc-now { min-width: 2ch; text-align: right; color: var(--ink); font-weight: 500; }
.story-counter .sc-bar { position: relative; width: 140px; height: 2px; overflow: hidden; background: var(--rule); }
.story-counter .sc-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width .35s ease; }

/* About intro: photo on one side, story on the other. */
.about-intro {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
  padding-top: clamp(32px, 5vw, 64px);
}
.about-photo { margin: 0; }
.about-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--frame); }
.about-story p { margin: 0 0 16px; font-size: 18px; line-height: 1.65; max-width: 58ch; }
.about-story .page-title { margin-bottom: 20px; text-wrap: balance; }
/* Each sentence of the title starts on its own line. */
.about-story .page-title span { display: block; }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: clamp(48px, 7vw, 88px); padding-top: 28px;
  border-top: 1px solid var(--rule);
  text-align: center; text-decoration: none;
}
.scroll-cue:hover { color: var(--ink); }
.cue-sub {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
.cue-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 2.8vw, 34px); letter-spacing: -.025em; line-height: 1.1; }
.cue-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-top: 6px;
  border: 1px solid var(--ink); border-radius: 50%;
  transition: background-color .2s ease, color .2s ease;
}
.scroll-cue:hover .cue-arrow { background: var(--ink); color: var(--bg); }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: no-preference) {
  .cue-arrow svg { animation: nudge 1.8s ease-in-out infinite; }
}

/* CV breakdown steps */
.role { width: 100%; max-width: 860px; margin: 0 auto; text-align: left; }
.role .eyebrow { margin-bottom: 10px; }
.role-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.03em;
}
.role-meta { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.role-points { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.role-points li { position: relative; padding-left: 22px; font-size: 17px; line-height: 1.5; }
.role-points li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: 10px; height: 2px; background: var(--accent);
}
.role-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; font-family: var(--font-mono); font-size: 13px; }
.sub-head {
  margin: 24px 0 0;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}

.skills {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px; width: 100%; max-width: 960px; margin-top: 28px; text-align: left;
}
.skills h3 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.skills ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-strong); }
.skills li { padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }

/* "My setup": tool logos in a row of tiles under Where & how I work. */
.setup-head { margin-top: 28px; text-align: center; }
.setup {
  list-style: none; margin: 12px auto 0; padding: 0; width: 100%; max-width: 960px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.setup li {
  flex: 1 1 0; min-width: 150px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 10px 16px; border: 1px solid var(--rule);
}
.setup .logo { display: flex; align-items: center; justify-content: center; height: 30px; color: var(--ink); }
.setup .logo svg { height: 30px; width: auto; }
.setup .logo--wide svg { height: 18px; }
.setup .tool-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1.15; text-align: center; }
.setup .tool-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-align: center; }

.tool-name { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.tool-role {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}

.lang-note { margin: 28px 0 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.story-title {
  margin: 0 auto; max-width: 20ch;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.2vw, 56px); line-height: 1.04; letter-spacing: -.035em;
}
.story-big {
  margin: 0;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(44px, 8vw, 112px); line-height: .92; letter-spacing: -.045em;
}
.story-lead {
  margin: 0 auto 20px; max-width: 32ch;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 2.8vw, 36px); line-height: 1.2; letter-spacing: -.02em;
}
.story-text { margin: 0 auto 14px; max-width: 58ch; font-size: 18px; line-height: 1.65; }
.profile-facts {
  margin: 18px auto 0;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}
.story-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

.glance {
  list-style: none; margin: 40px auto 0; padding: 0; width: 100%; max-width: 960px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  border-top: 1px solid var(--rule-strong);
}
.glance li { padding: 20px 16px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.glance .label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
.glance .value { font-size: 18px; }

.langs {
  list-style: none; margin: 44px auto 0; padding: 0; width: 100%; max-width: 960px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 40px;
}
.lang-item { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lang-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.03em; line-height: 1; }
.lang-level {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.lang-level .learning { color: var(--accent); }
.meter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; width: 100%; max-width: 220px; margin-top: 4px; }
.meter i { display: block; height: 6px; background: var(--rule); }
.meter i.on { background: var(--ink); }
.meter i.next { background: var(--accent); opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .meter i.next { animation: learning 2.2s ease-in-out infinite; }
  @keyframes learning { 0%, 100% { opacity: .25; } 50% { opacity: .75; } }
}
.meter-scale {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; width: 100%; max-width: 220px;
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
}
.meter-scale b { color: var(--ink); font-weight: 500; }

.page-title {
  margin: 0 0 28px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -.035em;
}


/* ---------- Contact ---------- */

/* Contact top: centred "Let's talk", email, then call and WhatsApp buttons. */
.contact-hero {
  display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 3vw, 32px);
  padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 7vw, 88px);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact-hero .page-title { margin: 0; font-size: clamp(42px, 6.5vw, 88px); line-height: .95; letter-spacing: -.045em; }

.message { padding-top: clamp(48px, 7vw, 88px); }
.message .section-title { text-align: center; }
.message .contact-form { max-width: 880px; margin: 0 auto; }
.section-title {
  margin: 0 0 28px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -.03em;
}

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); column-gap: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.field label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
.field .opt { text-transform: none; letter-spacing: 0; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 0;
  font: inherit; font-size: 17px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
}
.field select { appearance: none; background-image: none; cursor: pointer; padding-right: 28px; }
.field--select { position: relative; }
.field--select::after {
  content: ""; position: absolute; right: 6px; bottom: 22px;
  width: 8px; height: 8px; pointer-events: none;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
}
.field textarea { min-height: 168px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom: 2px solid var(--accent); padding-bottom: 11px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field [aria-invalid="true"] { border-bottom: 2px solid var(--accent); padding-bottom: 11px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.form-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); max-width: 52ch; }
.form-error { margin: 16px 0 0; font-size: 15px; color: var(--accent); }
.form-status { margin: 16px 0 0; font-size: 17px; font-weight: 500; }
/* Spam trap: hidden from people, filled in only by bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.big-email {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 7vw, 96px); line-height: .95; letter-spacing: -.04em;
  text-decoration: none; overflow-wrap: anywhere;
}
.big-email:hover { color: var(--accent); }

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .about-intro { grid-template-columns: 1fr; }
  .about-photo { max-width: 460px; }
}

/* Phones and narrow tablets: the menu sits on its own row under the name. */
@media (max-width: 800px) {
  .masthead { flex-direction: column; align-items: stretch; gap: 20px; }
  .header-controls {
    flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--rule);
  }
  .main-nav { justify-content: flex-start; gap: 0 12px; font-size: 13.5px; }
  .utils { gap: 6px; margin-left: auto; }
  /* The language switch shows only the other language here, so the menu fits on one line. */
  .lang .is-active, .lang:has(.is-active) > span[aria-hidden] { display: none; }
}

/* Phones and tablets: each work row shows one video, with arrows (and swipe) to the other two. */
@media (max-width: 959px) {
  .work-grid { gap: 28px; }
  .work-row-list { grid-template-columns: 1fr; }
  .work-row.is-carousel { touch-action: pan-y; }
  .work-row.is-carousel .work-row-list { max-width: 640px; margin: 0 auto; }
  .work-row.is-carousel .work-card { grid-area: 1 / 1; visibility: hidden; }
  .work-row.is-carousel .work-card.is-current { visibility: visible; }
  /* The visible circle is small so the still shows; the tap area stays 44px. */
  .work-row.is-carousel .row-arrow {
    position: absolute; top: 50%; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; transform: translateY(-50%);
    border: 0; background: transparent; color: #161513; cursor: pointer;
  }
  .work-row.is-carousel .row-arrow::before {
    content: ""; position: absolute; width: 28px; height: 28px; border-radius: 50%;
    background: rgba(241, 239, 234, .82); box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
  }
  .work-row.is-carousel .row-arrow svg { position: relative; width: 15px; height: 15px; }
  .row-arrow--prev { left: 0; }
  .row-arrow--next { right: 0; }
  .work-row.is-carousel .tile-play { width: 46px; height: 46px; }
}
@media (max-width: 959px) and (prefers-reduced-motion: no-preference) {
  .work-row.is-carousel .work-card.enter-next { animation: row-in-next .28s ease-out; }
  .work-row.is-carousel .work-card.enter-prev { animation: row-in-prev .28s ease-out; }
}
@keyframes row-in-next { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes row-in-prev { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }

/* Phones: the pinned CV story uses tighter type so each step fits on one screen. */
@media (max-width: 700px) {
  .story--pinned .story-step { padding: 0 20px; }
  .story--pinned .story-progress { right: 6px; gap: 8px; }
  .story--pinned .story-progress span { width: 5px; height: 5px; }
  .story--pinned .story-counter { bottom: 14px; gap: 10px; font-size: 11px; }
  .story-counter .sc-bar { width: 96px; }
  .story--pinned .eyebrow { margin-bottom: 10px; }
  .story--pinned .story-lead { font-size: 21px; margin-bottom: 14px; }
  .story--pinned .story-text { font-size: 15px; line-height: 1.5; margin-bottom: 10px; }
  .story--pinned .profile-facts { margin-top: 10px; font-size: 10px; }
  .story--pinned .story-big { font-size: 42px; }
  .story--pinned .story-title { font-size: 26px; }
  .story--pinned .glance { margin-top: 24px; }
  .story--pinned .glance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story--pinned .glance li { padding: 10px 4px; align-items: center; text-align: center; gap: 4px; }
  .story--pinned .glance .label { font-size: 10px; }
  .story--pinned .glance .value { font-size: 12.5px; line-height: 1.3; }
  .story--pinned .setup-head { margin-top: 16px; }
  .story--pinned .setup { gap: 6px; margin-top: 8px; }
  .story--pinned .setup li { flex: 0 0 calc((100% - 12px) / 3); min-width: 0; padding: 10px 4px; gap: 5px; }
  .story--pinned .setup .logo, .story--pinned .setup .logo svg { height: 22px; }
  .story--pinned .setup .logo--wide svg { height: 13px; }
  .story--pinned .setup .tool-name { font-size: 12.5px; }
  .story--pinned .setup .tool-role { font-size: 9.5px; }
  .story--pinned .role-title { font-size: 22px; }
  .story--pinned .role-meta { font-size: 13px; margin-top: 6px; }
  .story--pinned .role-points { margin-top: 14px; gap: 7px; }
  .story--pinned .role-points li { font-size: 14.5px; line-height: 1.45; padding-left: 18px; }
  .story--pinned .sub-head { margin-top: 16px; }
  .story--pinned .skills { gap: 18px; margin-top: 18px; }
  .story--pinned .skills h3 { font-size: 17px; margin-bottom: 6px; }
  .story--pinned .skills li { padding: 5px 0; font-size: 13.5px; }
  .story--pinned .role-points + .role-link { margin-top: 4px; }
  .story--pinned .langs { margin-top: 22px; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .story--pinned .lang-item { gap: 6px; }
  .story--pinned .lang-name { font-size: 19px; }
  .story--pinned .lang-level { font-size: 10px; }
  .story--pinned .meter, .story--pinned .meter-scale { gap: 2px; }
  .story--pinned .meter-scale { font-size: 8px; }
  .story--pinned .lang-note { margin-top: 18px; }
  .story--pinned .tool-role { font-size: 10px; }
  .story--pinned .story-actions { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
