/* ============================================================
   Portfolio — Leandro Gomes
   Built on the Leandro. Design System (Brutalismo Refinado)
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-ExtraBold.ttf") format("truetype");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Black.ttf") format("truetype");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Regular.ttf") format("truetype");
  font-weight: 400 500; font-style: normal; font-display: swap;
}

/* ---------- Tokens (mirrors design system) ---------- */
:root {
  --graphite: #0B0B04;
  --soot:     #131309;
  --paper:    #FBFDFE;
  --linen:    #F2F0E8;
  --signal:   #1ED760;
  --alarm:    #E53935;

  --bg:        var(--graphite);
  --bg-panel:  var(--soot);
  --fg:        var(--paper);
  --fg-muted:  rgba(251, 253, 254, 0.62);
  --fg-quiet:  rgba(251, 253, 254, 0.40);
  --signal-fg: var(--graphite);

  --hairline:           rgba(251, 253, 254, 0.14);
  --hairline-emphasis:  rgba(251, 253, 254, 0.22);

  --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-pill: 999px;

  --font-sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms; --dur: 200ms; --dur-slow: 320ms;

  /* layout */
  --col: 1440px;
  --pad: clamp(24px, 4vw, 80px);
  --read: 760px; /* comfortable line length for prose */
  --topbar-h: 76px;

  /* hero scale */
  --hero-size: clamp(38px, 5.5vw, 82px);
  --hero-weight: 900;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--topbar-h); }
html, body, #root {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-sans); font-size: 16px;
  font-weight: 400; letter-spacing: -0.005em; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { min-height: 100vh; transition: background var(--dur-slow) var(--ease), color var(--dur-slow) var(--ease); }
::selection { background: var(--signal); color: var(--graphite); }
a { color: inherit; text-decoration: none; }

/* The period — only ornament */
.period { color: var(--signal); }

/* Mono label */
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  font-weight: 500;
  color: var(--fg-muted);
}
.mono--quiet { color: var(--fg-quiet); }

/* Top bar — stays graphite-tinted on every section (design-system allows backdrop blur here only) */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 76px;
  z-index: 50;
  background: var(--graphite);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background var(--dur) var(--ease);
}
.topbar__inner {
  max-width: var(--col);
  width: 100%;
  margin: 0 auto;
  height: 100%; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.topbar__brand {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.045em;
  color: var(--fg);
  display: inline-flex; align-items: baseline;
  transition: opacity var(--dur) var(--ease);
}
.topbar__brand:hover { opacity: 0.7; }
.topbar__brand .period { color: var(--signal); }

/* Logo glyph — ponto sobe até o topo do L no hover */
.topbar__logo { text-decoration: none; }
.logo__period {
  transition: transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
}
.topbar__logo:hover .logo__period {
  transform: translate(-24px, -25px);
}
.topbar__nav {
  display: flex; align-items: center;
  gap: 22px;
}
.topbar__nav a, .topbar__nav button {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg-muted);
  background: none; border: none; padding: 0; margin: 0;
  cursor: pointer;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.topbar__nav a:hover, .topbar__nav button:hover { color: var(--fg); }
.topbar__nav .sep {
  width: 1px; height: 12px; background: var(--hairline);
}

/* ---------- Page column ---------- */
.col {
  max-width: var(--col);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--pad);
}

main { padding-top: var(--topbar-h); }

/* ---------- Sections ---------- */
section[id] { scroll-margin-top: var(--topbar-h); }

.s-home    { background: var(--graphite); }
.s-works   { padding: 56px 0 48px; background: var(--soot); border-top: none; }
.s-about   {
  padding: 56px 0 56px;
  background: var(--soot);
  border-top: none;
}
.s-contact {
  padding: 56px 0 56px;
  background: var(--linen);
  border-top: none;
}

/* Paper inversion — flips foreground tokens within any element marked
   data-surface="paper". Used both by the About section and by the root-level
   Tweaks toggle. */
[data-surface="paper"] {
  --bg:       var(--paper);
  --bg-panel: var(--linen);
  --fg:       var(--graphite);
  --fg-muted: rgba(11, 11, 4, 0.62);
  --fg-quiet: rgba(11, 11, 4, 0.40);
  --hairline:          rgba(11, 11, 4, 0.14);
  --hairline-emphasis: rgba(11, 11, 4, 0.22);
  color: var(--graphite);
}
.s-about-wrap {
  background: var(--linen);
  padding: 120px 0;
}
.s-about-wrap .s-about { background: transparent; padding: 0; }

/* About inverts the avatar fallback too */
.s-about-wrap .about__avatar {
  background: var(--paper);
}

/* Footer sits on a different surface than the contact section above it */
.footer { background: var(--linen); }

/* ---------- Hero ---------- */
.s-home {
  height: calc(100vh - var(--topbar-h));
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--graphite);
  overflow: clip;
}
.s-home > .col {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 80px;
  position: relative;
}
.hero__mid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Opção B+D — cor dividida */
.hero__emphasis { color: var(--fg); }
.hero__secondary { display: block; color: var(--fg); opacity: 0.38; }
/* Scroll button — anchored to bottom of section, always visible */
.hero__end {
  position: absolute;
  bottom: 40px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.hero__end .hero__scroll { pointer-events: auto; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0;
}
.hero__dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--signal);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--signal) 60%, transparent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--signal) 60%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in oklab, var(--signal) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--signal) 0%, transparent); }
}
.hero__head {
  font-family: var(--font-sans);
  font-size: var(--hero-size);
  font-weight: var(--hero-weight);
  letter-spacing: -0.04em;
  line-height: 1.06;
  color: var(--fg);
  text-align: left;
  max-width: 100%;
  margin: 0;
  cursor: default;
}
@keyframes heroWordIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__word {
  display: inline-block;
  opacity: 0;
  animation: heroWordIn 500ms var(--ease) forwards;
  animation-delay: calc(60ms + var(--wi, 0) * 55ms);
  transition: color 80ms var(--ease);
  cursor: default;
}
.hero__word:hover { color: var(--signal); }
.hero__head .ink {
  color: inherit;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  cursor: pointer;
}
.hero__head .ink .hero__word:hover { color: var(--signal); }

.hero__sub {
  margin-top: 36px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: var(--read);
  font-weight: 400;
  letter-spacing: -0.005em;
}
.hero__sub em {
  font-style: italic;
  color: var(--fg);
  font-weight: 400;
}

.hero__meta {
  margin-top: 0;
  display: flex; gap: 22px; align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* Bottom info row — pinned to bottom of the 100vh hero */
.hero__bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 var(--pad) 28px;
  max-width: var(--col); width: 100%; margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  pointer-events: none;
}
.hero__bottom > * { pointer-events: auto; }
.hero__bottom-cell {
  display: flex; flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
}
.hero__bottom-cell--right {
  text-align: right;
  align-items: flex-end;
}
.hero__bottom-cell b {
  color: var(--fg);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero__bottom-cell .quiet { color: var(--fg-quiet); }
.hero__bottom-cell .dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--signal);
  animation: pulse 2.6s var(--ease) infinite;
}

/* Scroll indicator */
.hero__scroll {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 0;
  cursor: pointer;
  background: none; border: none;
  padding: 8px 12px;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}
.hero__scroll:hover { color: var(--fg); }

.hero__scroll__chevrons {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 0;
}
.hero__scroll__chevron {
  display: block;
  width: 14px; height: 9px;
  opacity: 0;
}
.hero__scroll__chevron svg {
  width: 100%; height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero__scroll__chevron:nth-child(1) {
  animation: chevron-cascade 1.6s ease-in-out infinite;
}
.hero__scroll__chevron:nth-child(2) {
  animation: chevron-cascade 1.6s ease-in-out infinite 0.22s;
}
@keyframes chevron-cascade {
  0%   { opacity: 0;   transform: translateY(-4px); }
  30%  { opacity: 0.9; transform: translateY(0);    }
  70%  { opacity: 0.9; transform: translateY(0);    }
  100% { opacity: 0;   transform: translateY(4px);  }
}
.hero__meta .mono { color: var(--fg-quiet); }
.hero__meta .divider { width: 1px; height: 10px; background: var(--hairline); }

/* ---------- Page entrance ---------- */
@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#root {
  animation: page-fade-in 400ms ease forwards;
}

/* ---------- Section eyebrows ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 500;
}
.eyebrow .count { color: var(--fg-quiet); }
.eyebrow--signal { color: var(--signal) !important; }

/* ---------- Works ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.work-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
  transition: opacity var(--dur) var(--ease);
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  width: 100%;
  height: 100%;
  font: inherit;
  cursor: default;
}
.work-card--live { cursor: pointer; }
.work-card--live:hover .work-card__title { color: var(--fg); }

.work-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
}

/* P&B por padrão — cor no hover */
.work-card__img-inner {
  position: absolute; inset: 0;
  filter: grayscale(1) brightness(0.60);
  transition: filter 700ms ease, transform 700ms var(--ease);
}
.work-card--live:hover .work-card__img-inner,
.work-card--soon:hover .work-card__img-inner {
  filter: grayscale(0) brightness(1);
  transform: scale(1.04);
}
.work-card__img svg {
  width: 100%; height: 100%; display: block;
}

/* ---------- ThumbVideo ---------- */
.thumb-video-file {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- ThumbTotem ---------- */
.thumb-totem {
  width: 100%; height: 100%;
  display: flex; align-items: flex-start; justify-content: center;
  position: relative; overflow: hidden;
}
/* Fundo borrado */
.thumb-totem__bgimg {
  position: absolute; inset: -10%;
  width: 120%; height: 120%;
  object-fit: cover;
  filter: blur(28px) brightness(0.38) saturate(0.6);
  transition: filter 700ms ease;
}
.work-card--live:hover .thumb-totem__bgimg {
  filter: blur(24px) brightness(0.52) saturate(0.8);
}
/* Imagem reta sangrando para baixo */
.thumb-totem__tilt {
  position: relative;
  width: auto;
  height: 130%;
  flex-shrink: 0;
  object-fit: cover;
  object-position: top center;
  margin-top: 28px;
  z-index: 2;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.08);
  transition: transform 700ms var(--ease);
}
.work-card--live:hover .thumb-totem__tilt {
  transform: scale(1.04) translateY(-6px);
}

/* ---------- ThumbImg — imagem completa, fundo borrado ---------- */
.thumb-img-wrap {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
}
/* Fundo: mesma imagem borrada e escurecida preenche as laterais */
.thumb-img-bg {
  position: absolute; inset: -8%;
  width: 116%; height: 116%;
  object-fit: cover;
  filter: blur(18px) brightness(0.55) saturate(0.8);
}
/* Imagem principal: nítida, sem corte */
.thumb-img-fg {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

/* ---------- ThumbBYU ---------- */
.thumb-byu {
  width: 100%; height: 100%;
  overflow: hidden;
}
.thumb-byu__cover {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 32%;
  display: block;
  transition: transform 600ms var(--ease);
}
.work-card--soon:hover .thumb-byu__cover,
.work-card--live:hover .thumb-byu__cover { transform: scale(1.05); }


/* ---------- ThumbBradescoVideo ---------- */
.thumb-video {
  width: 100%; height: 100%;
  background: transparent;         /* P&B: pai já aplica grayscale */
  transition: background 700ms ease;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
/* No hover: fundo vira vermelho Bradesco oficial */
.work-card--live:hover .thumb-video { background: #E00B39; }

/* Vignette nas bordas */
.thumb-video::before {
  content: "";
  position: absolute; inset: 0; z-index: 3;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 45%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 700ms ease;
}
.work-card--live:hover .thumb-video::before { opacity: 1; }

/* Logo vertical — estático, zoom no hover */
.thumb-video__logo {
  position: relative; z-index: 2;
  width: 38%;
  display: block;
  transition: transform 600ms var(--ease);
}
.work-card--live:hover .thumb-video__logo {
  transform: scale(1.12);
}

/* Overlay inside card — gradient + title + tag */
.work-card__overlay {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to top,
    rgba(0,0,0,0.80) 0%,
    rgba(0,0,0,0.28) 50%,
    transparent 100%
  );
  pointer-events: none;
}
.work-card__overlay-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
  margin: 0 0 5px;
}
.work-card__overlay-title {
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
  margin: 0;
}

/* Badge "coming soon" — top left, apenas nos cards sem case */
.work-card__badge {
  position: absolute;
  top: 16px; left: 16px; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 10px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.work-card__badge .dot {
  width: 5px; height: 5px; border-radius: 999px;
  background: var(--fg-quiet);
}

/* Body below card */
.work-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 2px 0;
}
.work-card__body .work-card__overlay-tag {
  color: var(--fg);
  opacity: 0.4;
  margin: 0 0 2px;
}
.work-card__body .work-card__overlay-title {
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 600;
  color: var(--fg);
  opacity: 0.9;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}
.work-card__desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-muted);
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-card__cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  opacity: 0.6;
  transition: opacity var(--dur) var(--ease);
}
.work-card--live:hover .work-card__cta { opacity: 1; }
.work-card__cta .arrow { transition: transform var(--dur) var(--ease); }
.work-card--live:hover .work-card__cta .arrow { transform: translateX(4px); }

/* ---------- Old project tile (kept for fallback) ---------- */
.work__desc {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: var(--read);
  margin: 0;
}
.work__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  gap: 56px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.metric__n {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
  margin-bottom: 10px;
}
.metric__n .accent { color: var(--signal); }
.metric__l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  line-height: 1.4;
}

.work__cta {
  margin-top: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.work__cta .arrow { transition: transform var(--dur) var(--ease); }
.work--live:hover .work__cta .arrow { transform: translateX(4px); }

.work__soon {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- About ---------- */
/* About — Option D: foto larga à esquerda */
.about__layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
  align-items: start;
  margin-top: 48px;
}
.about__photo-col { position: sticky; top: calc(var(--topbar-h) + 32px); }
.about__avatar {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  border: 1px solid var(--hairline);
  background: var(--bg-panel);
  overflow: hidden;
}
.about__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  filter: grayscale(100%) brightness(0.82) contrast(1.08);
}

/* Right side — stacked content */
.about__content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.about__headline {
  font-size: clamp(26px, 2.8vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--fg);
  margin: 0;
}
.about__bio {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-muted);
  margin: 0;
}
.about__bio strong { color: var(--fg); font-weight: 600; }
.about__divider {
  height: 1px;
  background: var(--hairline);
  margin: 8px 0;
}
.about__block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about__block-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  font-weight: 500;
  padding-top: 4px;
}

.exp-list, .edu-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--hairline);
}
.exp-list--no-top { border-top: none; }
.exp-row, .edu-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.exp-row:last-child, .edu-row:last-child { border-bottom: none; }
.exp-row__time, .edu-row__time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-quiet);
  text-transform: uppercase;
  font-weight: 500;
}
.exp-row__body, .edu-row__body {
  font-size: 15px;
  color: var(--fg);
  line-height: 1.45;
}
.exp-row__role, .edu-row__role {
  font-weight: 500;
  color: var(--fg);
}
.exp-row__where, .edu-row__where {
  color: var(--fg-muted);
}

.pill-list {
  display: flex; flex-wrap: wrap;
  gap: 8px;
}
.pill-list .pill {
  display: inline-flex; align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 0.5px solid var(--hairline-emphasis);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: -0.005em;
  color: var(--fg);
  font-weight: 400;
  background: transparent;
  transition: border-color var(--dur) var(--ease);
}
.pill-list .pill:hover { border-color: var(--fg); }

/* ---------- Contact ---------- */
.contact__head {
  font-family: var(--font-sans);
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 24px;
  color: var(--fg);
  max-width: 880px;
  text-wrap: pretty;
}

/* Impact headline */
.contact__impact {
  font-family: var(--font-sans);
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 48px 0 56px;
  color: var(--fg);
}

/* Social icon row */
.contact__social {
  display: flex;
  gap: 16px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.contact__social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--fg);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.contact__social-link:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.contact__social-link svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
}
.contact__desc {
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: var(--read);
  margin: 0 0 28px;
}
.contact__status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 40px;
  font-weight: 500;
}
.contact__status .dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--signal);
  animation: pulse 2.6s var(--ease) infinite;
}
.contact__status b { color: var(--fg); font-weight: 500; }
.contact__status .sep { width: 1px; height: 10px; background: var(--hairline); margin: 0 2px; }

.contact__links {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--hairline);
}
.contact__link {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--fg);
  gap: 16px;
  transition: opacity var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.contact__link:hover { opacity: 0.7; }
.contact__link__type {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  font-weight: 500;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0 56px;
}
.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__copy-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  font-weight: 500;
}
.footer__copy--quiet {
  opacity: 0.5;
}
.footer__links {
  display: flex; align-items: center; gap: 22px;
}
.footer__links a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}
.footer__links a:hover { color: var(--fg); }

/* ---------- Lock badge on card ---------- */
.work-card__lock {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
  z-index: 2;
}
.work-card__lock svg { width: 16px; height: 16px; }
.work-card--locked:hover .work-card__lock { color: var(--fg); }

/* ---------- Password modal ---------- */
.pwd-modal-backdrop {
  position: fixed; inset: 0; z-index: 900;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
}
.pwd-modal {
  background: var(--bg-panel);
  border: 1px solid color-mix(in oklab, var(--fg) 8%, transparent);
  border-radius: 20px;
  padding: 16px;
  width: min(340px, 92vw);
  box-shadow: 0 32px 80px color-mix(in oklab, #000 40%, transparent);
}
.pwd-modal__lock-icon {
  color: var(--fg-muted);
}
.pwd-modal__lock-icon svg { width: 24px; height: 24px; display: block; }
@keyframes pwd-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}
.pwd-modal--shake { animation: pwd-shake 0.45s ease; }
.pwd-modal__icon {
  width: 48px; height: 48px;
  background: color-mix(in oklab, var(--fg) 6%, transparent);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted);
}
.pwd-modal__icon svg { width: 22px; height: 22px; }
.pwd-modal__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.pwd-modal__form {
  display: flex;
  gap: 0;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}
.pwd-modal__input {
  flex: 1;
  background: color-mix(in oklab, var(--fg) 6%, transparent);
  border: none;
  border-radius: 0;
  padding: 13px 16px;
  font-size: 15px;
  color: var(--fg);
  font-family: var(--font-sans);
  outline: none;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}
.pwd-modal__input::placeholder { color: var(--fg-muted); }
.pwd-modal__input--error { background: color-mix(in oklab, #e05 15%, transparent); }
.pwd-modal__btn {
  background: var(--signal);
  color: var(--signal-fg);
  border: none;
  border-radius: 0;
  padding: 13px 20px;
  font-size: 17px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--dur) var(--ease);
}
.pwd-modal__btn:hover { opacity: 0.85; }

/* ---------- Fade-up reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Case Study ---------- */
.cs-back {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  margin: 0 0 56px;
  letter-spacing: -0.005em;
  transition: color var(--dur) var(--ease);
}
.cs-back:hover { color: var(--fg); }

.cs-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 28px;
  font-weight: 500;
}
.cs-eyebrow .signal-period { color: var(--signal); }

.cs-title {
  font-family: var(--font-sans);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0 0 48px;
  color: var(--fg);
  text-wrap: balance;
}
.cs-title .period { color: var(--signal); }

.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
  margin-bottom: 56px;
}
.cs-meta__cell { display: flex; flex-direction: column; gap: 8px; }
.cs-meta__lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  font-weight: 500;
}
.cs-meta__val {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
}

/* Context + Problem 2-column layout (cs3) */
.cs-ctx-problem {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.cs-ctx-problem__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 768px) {
  .cs-ctx-problem { grid-template-columns: 1fr; gap: 40px; }
}

.cs-cover {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  overflow: hidden;
  margin-bottom: 80px;
  background: var(--bg-panel);
}
.cs-cover svg { width: 100%; height: 100%; display: block; }

.cs-section {
  margin: 80px 0;
}

/* Two-column split: headline left, body right */
.cs-section__split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
  margin-bottom: 40px;
}
.cs-section__split-left .cs-section__h {
  max-width: none;
  margin-bottom: 0;
}
.cs-section__split-right {
  padding-top: 42px; /* alinha com o topo do h2 (abaixo do label) */
}
.cs-section__split-right .cs-section__p {
  max-width: none;
  margin: 0;
}
/* ---------- Generic CaseCarousel (cs1, cs3) ---------- */
.case-carousel { position: relative; margin-top: 32px; }
.case-carousel__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--hairline);
}
.case-carousel__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
}
.case-carousel__slide > * { width: 100%; height: 100%; display: block; }
.case-carousel__slide--in-left   { animation: cs2-slide-in-left   0.52s cubic-bezier(0.25,1,0.3,1) both; }
.case-carousel__slide--in-right  { animation: cs2-slide-in-right  0.52s cubic-bezier(0.25,1,0.3,1) both; }
.case-carousel__slide--out-left  { animation: cs2-slide-out-left  0.52s cubic-bezier(0.25,1,0.3,1) both; }
.case-carousel__slide--out-right { animation: cs2-slide-out-right 0.52s cubic-bezier(0.25,1,0.3,1) both; }

/* ---------- CS2 Carousel ---------- */
.cs2-carousel { position: relative; margin-top: 32px; }
.cs2-carousel__stage {
  position: relative;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
}
/* Pair container — absolute fill, flex row */
.cs2-carousel__pair {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 24px 112px 56px;
  box-sizing: border-box;
}
.cs2-carousel__pair .cs2-stage__screen {
  flex-shrink: 1;
  width: auto;
  height: auto;
  max-height: 80%;
  max-width: 38%;
  object-fit: contain;
}
.cs2-carousel__pair--trio .cs2-stage__screen {
  max-width: 26%;
  max-height: 76%;
}

/* Slide animations — suaves, curta distância */
@keyframes cs2-slide-in-left {
  from { transform: translateX(28%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}
@keyframes cs2-slide-in-right {
  from { transform: translateX(-28%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes cs2-slide-out-left {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(-28%); opacity: 0; }
}
@keyframes cs2-slide-out-right {
  from { transform: translateX(0);   opacity: 1; }
  to   { transform: translateX(28%); opacity: 0; }
}
.cs2-carousel__pair--in-left   { animation: cs2-slide-in-left   0.52s cubic-bezier(0.25,1,0.3,1) both; }
.cs2-carousel__pair--in-right  { animation: cs2-slide-in-right  0.52s cubic-bezier(0.25,1,0.3,1) both; }
.cs2-carousel__pair--out-left  { animation: cs2-slide-out-left  0.52s cubic-bezier(0.25,1,0.3,1) both; }
.cs2-carousel__pair--out-right { animation: cs2-slide-out-right 0.52s cubic-bezier(0.25,1,0.3,1) both; }

.cs2-carousel__btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.55);
  color: var(--fg);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, border-color 0.18s;
  backdrop-filter: blur(6px);
}
.cs2-carousel__btn:hover { background: rgba(0,0,0,0.82); border-color: rgba(255,255,255,0.3); }
.cs2-carousel__btn--prev { left: 16px; }
.cs2-carousel__btn--next { right: 16px; }
.cs2-carousel__dots {
  position: absolute;
  bottom: 16px;
  left: 50%; transform: translateX(-50%);
  z-index: 10;
  display: flex; align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  padding: 6px 12px;
  border-radius: 999px;
}
.cs2-carousel__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg);
  opacity: 0.22;
  border: none; padding: 0;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.18s, background 0.18s;
}
.cs2-carousel__dot--on {
  opacity: 1;
  transform: scale(1.4);
  background: var(--signal);
}

/* ---------- CS2 Problem — grade 2×2 de telas antigas ---------- */
/* ---------- CS2 Problem — trio de cards separados ---------- */
.cs2-old-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.cs2-old-trio .cs2-stage {
  margin: 0;
}

.cs-section__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0 0 28px;
  font-weight: 500;
}
.cs-section__h {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 28px;
  color: var(--fg);
  text-wrap: balance;
  max-width: 760px;
}
.cs-section__p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: var(--read);
  margin: 0 0 18px;
}
.cs-section__p strong { color: var(--fg); font-weight: 500; }

.cs-process {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.cs-process__card {
  padding: 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color var(--dur) var(--ease);
}
.cs-process__card:hover { border-color: var(--hairline-emphasis); }
.cs-process__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-quiet);
  font-weight: 500;
}
.cs-process__h {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
}
.cs-process__p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0;
}

.cs-shots {
  display: flex; flex-direction: column; gap: 16px;
}
.cs-shot {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--bg-panel);
  position: relative;
}
.cs-shot svg { width: 100%; height: 100%; display: block; }

/* ── Image slot ─────────────────────────────────────────── */
.cs-img-slot {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r-lg);
  border: 1.5px dashed rgba(255,255,255,0.12);
  background: var(--graphite);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 32px 0 0;
  color: rgba(255,255,255,0.22);
  transition: border-color 300ms ease, background 300ms ease;
}
.cs-img-slot:hover {
  border-color: rgba(255,255,255,0.26);
  background: color-mix(in oklab, var(--graphite) 80%, white 20%);
}
.cs-img-slot__icon {
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
}
.cs-img-slot__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── CS2 cinematic stage ─────────────────────────────────── */
.cs2-stage {
  position: relative;
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 32px 0 0;
  /* aspect-ratio set inline */
}
/* ---- Animações do cover ---- */
@keyframes cs2-screen-enter {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cs2-stage--cover {
  margin: 0 0 80px;
}

/* Blurred backdrop — padrão para stages com frames de tela */
.cs2-stage__bg {
  position: absolute;
  inset: -32px;
  background-size: cover;
  background-position: center top;
  filter: blur(48px) brightness(0.45) saturate(1.6);
  transform: scale(1.08);
}
/* Cover: foto da agência visível — blur mínimo, overlay escuro */
.cs2-stage--cover .cs2-stage__bg {
  filter: blur(3px) brightness(0.55) saturate(1.1);
  transform: scale(1.04);
  inset: 0;
}
/* Overlay escuro sobre a foto para as telas destacarem */
.cs2-stage--cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 0;
}
.cs2-stage--cover .cs2-stage__screens {
  z-index: 1;
}
/* Tela única no cover — maior, proeminente, com entrada animada */
.cs2-stage--cover .cs2-stage__screen {
  height: 90%;
  box-shadow: 0 40px 100px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.13);
  animation: cs2-screen-enter 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 120ms;
}
/* Cover + bleed: tela sangra a partir do topo */
.cs2-stage--cover.cs2-stage--bleed-bottom .cs2-stage__screens {
  align-items: flex-start;
  padding-top: 28px;
  padding-bottom: 0;
}
.cs2-stage--cover.cs2-stage--bleed-bottom .cs2-stage__screen {
  height: 115%;
}

/* Screens row — absolute fill, centered, floating on top */
.cs2-stage__screens {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 56px;
  box-sizing: border-box;
  overflow: hidden; /* clips 4-screen carousel naturally */
}

.cs2-stage__screen {
  /* Height drives sizing — width auto-derived from 9:16 ratio */
  height: 78%;
  width: auto;
  flex-shrink: 0;   /* intentional: 4 screens carousel-clip on edges */
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.10);
  display: block;
}

/* Bleed bottom — tela única sangra para além da borda inferior */
.cs2-stage--bleed-bottom .cs2-stage__screens {
  align-items: flex-start;
  padding-top: 36px;
  padding-bottom: 0;
}
.cs2-stage--bleed-bottom .cs2-stage__screen {
  height: 118%;   /* ultrapassa a altura do container */
  flex-shrink: 0;
  object-position: top center;
}

.cs-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.cs-result {
  padding: 28px 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 180px;
  gap: 32px;
}
.cs-result--feature {
  background: var(--signal);
  color: var(--graphite);
  border-color: transparent;
}
.cs-result__n {
  font-family: var(--font-sans);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--fg);
}
.cs-result--feature .cs-result__n { color: var(--graphite); }
.cs-result__l {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  line-height: 1.4;
  font-weight: 500;
}
.cs-result--feature .cs-result__l { color: rgba(11,11,4,0.7); }

.cs-next {
  display: flex; align-items: center; justify-content: space-between;
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
  margin-top: 96px;
  cursor: pointer;
  transition: opacity var(--dur) var(--ease);
}
.cs-next:hover { opacity: 0.7; }
.cs-next__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-quiet);
  margin-bottom: 8px;
  font-weight: 500;
}
.cs-next__title {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg);
}
.cs-next__arrow {
  font-family: var(--font-sans);
  font-size: 22px;
  color: var(--fg-muted);
  transition: transform var(--dur) var(--ease);
}
.cs-next:hover .cs-next__arrow { transform: translateX(6px); }

/* ============================================================
   MENU PILL + HOVER DROPDOWN
   ============================================================ */
.menu-wrap {
  position: relative;
  display: inline-block;
  /* Reserve space for the pill so layout doesn't shift when it morphs */
  min-width: 120px;
  height: 40px;
}
.menu-pill {
  display: inline-flex; align-items: center;
  gap: 8px;
  height: 40px;
  padding: 4px 18px 4px 4px;
  background: var(--signal);
  color: var(--signal-fg);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: opacity var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
  position: absolute;
  top: 0; right: 0;
  z-index: 2;
  white-space: nowrap;
}
.menu-pill:active { transform: scale(0.97); }
/* When the dropdown is open, the trigger pill fades out — the dropdown
   takes its place so they read as a single element, not two. */
.menu-wrap.is-open .menu-pill {
  opacity: 0;
  pointer-events: none;
}

.menu-pill__icon {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--graphite);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.menu-pill__icon svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.menu-pill__lbl { padding-right: 4px; line-height: 1; }

/* Dropdown — standalone rounded panel anchored at the pill's position.
   Top edge sits exactly where the pill was, then grows downward. */
.menu-dropdown {
  position: absolute;
  top: 0;
  right: 0;
  width: 132px;                 /* matches .menu-wrap min-width — pill stays same width */
  background: var(--signal);
  color: var(--paper);
  border-radius: 32px;
  padding: 8px;
  display: flex; flex-direction: column;
  gap: 4px;
  transform-origin: top right;
  overflow: hidden;
  max-height: 40px;            /* matches pill height when closed */
  opacity: 0;
  pointer-events: none;
  transition:
    max-height 340ms var(--ease),
    opacity 200ms var(--ease);
  z-index: 1;
}
.menu-wrap.is-open .menu-dropdown {
  max-height: 520px;
  opacity: 1;
  pointer-events: auto;
}

/* Sliding pill that follows the cursor — rendered behind all items */
.menu-highlight {
  position: absolute;
  left: 8px; right: 8px;
  border-radius: 999px;
  background: var(--paper);
  pointer-events: none;
  z-index: 0;
  transition:
    top 200ms var(--ease),
    height 160ms var(--ease),
    opacity 140ms var(--ease);
}

.menu-dropdown__item {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--paper);
  cursor: pointer;
  text-align: center;
  width: 100%;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 220ms var(--ease),
    transform 220ms var(--ease),
    color 120ms var(--ease);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.menu-wrap.is-open .menu-dropdown__item {
  opacity: 1;
  transform: translateY(0);
}
.menu-dropdown__item:hover { color: var(--graphite); }
.menu-dropdown__item.is-active { color: var(--graphite); }

/* Language toggle — same size/weight/casing as items, just two-segment */
.menu-dropdown__lang {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 14px 22px;
  border-radius: 999px;
  background: none; border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--paper);
  width: 100%;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 220ms var(--ease),
    transform 220ms var(--ease),
    color 120ms var(--ease);
}
.menu-wrap.is-open .menu-dropdown__lang {
  opacity: 1;
  transform: translateY(0);
}
.menu-dropdown__lang:hover { color: var(--graphite); }
.menu-dropdown__lang b { font-weight: 700; transition: opacity var(--dur-fast) var(--ease); }
.menu-dropdown__lang .slash { opacity: 0.5; font-weight: 500; }

/* Language toggle — standalone, outside dropdown */
.lang-toggle {
  display: inline-flex; align-items: center;
  gap: 3px;
  background: none; border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--signal);
  padding: 4px 2px;
  transition: opacity var(--dur-fast) var(--ease);
}
.lang-toggle:hover { opacity: 0.75; }
.lang-toggle b { font-weight: 700; transition: opacity var(--dur-fast) var(--ease); }
.lang-toggle__sep { opacity: 0.4; font-weight: 500; }

/* ============================================================
   END menu
   ============================================================ */

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --pad: 32px; }
  .works-grid { grid-template-columns: 1fr; gap: 32px; }
  .about__block { grid-template-columns: 180px 1fr; gap: 28px; }
  .cs-process { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --pad: 24px; --hero-size: 36px; }
  .hero__mid { gap: 44px; }
  .menu-pill { height: 36px; padding: 4px 14px 4px 4px; font-size: 13px; }
  .menu-pill__icon { width: 28px; height: 28px; }
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer__links { margin-top: 4px; }
  .about__block { grid-template-columns: 1fr; gap: 20px; }
  .about__layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px;
    margin-top: 28px;
  }
  .about__photo-col {
    position: static !important;
    width: 100%;
  }
  .about__avatar {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }
  .about__headline { font-size: 26px; }
  .about__content { gap: 24px; }
  .exp-row, .edu-row { grid-template-columns: 1fr; gap: 4px; }
  .cs2-old-trio { grid-template-columns: 1fr; }
  .cs2-stage__screens { gap: 8px; padding: 20px 24px; }
  .cs2-stage--cover .cs2-stage__screen:nth-child(n+4) { display: none; }
  .cs-meta, .cs-results, .cs-process { grid-template-columns: 1fr; }
  .cs-section__split { grid-template-columns: 1fr; gap: 16px; }
  .cs-section__split-right { padding-top: 0; }
  .case-carousel__stage { aspect-ratio: 3/4 !important; }
  .cs2-carousel__pair .cs2-stage__screen { max-width: 84%; max-height: 92%; }
  .cs2-carousel__pair { padding: 20px 24px; }
  .work__metrics { grid-template-columns: 1fr; gap: 12px; }
  .contact__link { font-size: 17px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .s-home { padding: 80px 0; }
  .s-works   { padding: 40px 0 36px; }
  .s-about   { padding: 40px 0 40px; }
  .s-contact { padding: 40px 0 40px; }
}
