/* ═══════════════════════════════════════════════════════════════
   HMI Control Room — Bruno Miotto Portfolio
   THESIS: Industrial HMI palette + editorial asymmetry, not bento.
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  /* 4 blues — FleetOps HMI */
  --blue-deep:      #050a12;
  --blue-surface:   #0f172a;
  --blue-accent:    #2563eb;
  --blue-ultra:     #3b82f6;
  --blue-deep-accent: #1d4ed8;
  --blue-soft:      #6478a0;

  --ink:            var(--blue-deep);
  --ink-soft:       var(--blue-surface);
  --ink-panel:      #162033;
  --paper:          var(--blue-surface);
  --paper-dim:      #1a2438;
  --bg:             var(--blue-deep);
  --surface:        var(--blue-surface);
  --surface-raised: #162033;
  --text:           #f1f5f9;
  --text-muted:     var(--blue-soft);
  --text-dim:       #4a5d7a;
  --border:         rgba(148, 163, 184, 0.12);
  --border-strong:  rgba(148, 163, 184, 0.22);
  --amber:          var(--blue-accent);
  --cyan:           var(--blue-accent);
  --coral:          #1d4ed8;
  --violet:         #3b82f6;
  --font-display:   'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:      'Sora', system-ui, sans-serif;
  --font-mono:      'Geist Mono', ui-monospace, monospace;
  --topbar-h:       56px;
  --nav-h:          56px;
  --header-h:       56px;
  --ease:           cubic-bezier(0.22, 1, 0.36, 1);
  --container:      1200px;
  --radius-sm:      12px;
  --radius-md:      20px;
  --radius-lg:      28px;
  --shader-fade-h:  clamp(5rem, 14vh, 9rem);
  --section-fade-h: var(--shader-fade-h);
  --status-open:    var(--blue-accent);
  --status-done:    var(--blue-accent);
  --status-current: #3b82f6;
  --shadow-sm:      0 2px 8px rgba(0, 0, 0, 0.35);
  --glow:           0 0 40px rgba(37, 99, 235, 0.25);
  --glass:          rgba(15, 23, 42, 0.72);
  --glass-border:   rgba(148, 163, 184, 0.14);

  /* Display titles — soft diagonal fade into blue-ultra (bottom-left lift) */
  --title-gradient: linear-gradient(
    148deg,
    #ffffff 0%,
    #eef4fc 14% 24%,
    #9ec0ef 36% 52%,
    #5b9cf5 62% 78%,
    var(--blue-ultra) 100%
  );

  /* Hero name — premium layered luminance (unique, not shared pattern) */
  --intro-name-light: radial-gradient(
    ellipse 88% 72% at 16% 6%,
    #ffffff 0%,
    rgba(255, 255, 255, 0.55) 32%,
    transparent 62%
  );
  --intro-name-fade-a: linear-gradient(
    118deg,
    #ffffff 0%,
    #f6faff 28%,
    #c8daf5 58%,
    #7eb0f5 100%
  );
  --intro-name-glow-a: radial-gradient(
    ellipse 70% 50% at 78% 88%,
    rgba(59, 130, 246, 0.38) 0%,
    transparent 62%
  );
  --intro-name-fade-b: linear-gradient(
    162deg,
    #eef4fc 0%,
    #b4cff0 36%,
    #6ba3f7 66%,
    var(--blue-ultra) 100%
  );
}

html {
  scroll-behavior: smooth;
  background: var(--blue-deep);
}

/* Lenis owns wheel smoothing — disable native CSS smooth to avoid fighting it */
html.lenis {
  scroll-behavior: auto;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: 0;
  padding-bottom: 0;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

::selection { background: rgba(37, 99, 235, 0.4); color: #fff; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-panel); border-radius: 6px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2.5rem; }
}

/* ── Display titles — gradient fill ── */
.deliver__title,
.work__title,
.stack__title,
.xp__title,
.study__title,
.shelf__title,
.contact__title,
.project-hero__title,
.wh-hero__title,
.wh-cases__title,
.wh-services__title,
.wh-stack__title {
  background: var(--title-gradient);
  background-size: 115% 130%;
  background-position: 28% 18%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── REVEAL ── */
.reveal-element {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
}

.reveal-element.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-element { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── BUTTONS ── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s;
}

.btn--sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn--lg { padding: 0.95rem 1.75rem; font-size: 1rem; }

.btn--accent,
.btn--primary {
  color: #fff;
  background: var(--blue-accent);
  border-color: var(--blue-accent);
}

.btn--accent:hover,
.btn--primary:hover {
  transform: translateY(-2px);
  background: var(--blue-deep-accent);
  border-color: var(--blue-deep-accent);
}

.btn--ghost,
.btn--secondary {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}

.btn--ghost:hover,
.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--blue-ultra);
  color: #bfdbfe;
}

.btn--dark {
  color: #fff;
  background: var(--blue-accent);
  border-color: var(--blue-accent);
}

.btn--dark:hover { transform: translateY(-1px); background: #3b82f6; }

.btn--shimmer::after { display: none; }

/* ── GLASS CARD ── */
.glass-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.75rem;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.glass-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.glass-card--accent {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.12), var(--blue-surface) 60%);
}

.glass-card--lead {
  position: relative;
  grid-column: 1 / -1;
  gap: 0.75rem;
  padding: 1.85rem 1.85rem 1.95rem;
  overflow: hidden;
  border-color: rgba(59, 130, 246, 0.72);
  background:
  radial-gradient(
    ellipse 85% 130% at 100% 0%,
    rgba(59, 130, 246, 0.48) 0%,
    rgba(37, 99, 235, 0.18) 42%,
    transparent 58%
  ),
  radial-gradient(
    ellipse 65% 90% at 0% 100%,
    rgba(37, 99, 235, 0.4) 0%,
    rgba(29, 78, 216, 0.14) 45%,
    transparent 55%
  ),
  radial-gradient(
    ellipse 50% 60% at 50% 50%,
    rgba(59, 130, 246, 0.14) 0%,
    transparent 70%
  ),
  linear-gradient(135deg, #0c1f52 0%, #081428 40%, #04080d 100%);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.32),
    0 0 64px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(147, 197, 253, 0.2);
}

.glass-card--lead::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent 32%,
    rgba(59, 130, 246, 0.14) 62%,
    rgba(96, 165, 250, 0.24) 100%
  );
  opacity: 0.95;
}

.glass-card--lead > * {
  position: relative;
  z-index: 1;
}

.glass-card--lead:hover {
  border-color: #60a5fa;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.35),
    0 0 72px rgba(59, 130, 246, 0.45),
    inset 0 1px 0 rgba(191, 219, 254, 0.28);
}

.glass-card__lead-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.glass-card__kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.glass-card__cta-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #93c5fd;
  transition: color 0.2s, transform 0.2s;
}

.glass-card--lead .glass-card__kicker {
  color: #bfdbfe;
}

.glass-card--lead .glass-card__cta-link {
  color: var(--blue-ultra);
}

.glass-card--lead:hover .glass-card__cta-link {
  color: #dbeafe;
  transform: translateX(2px);
}

.glass-card--lead .glass-card__title {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: #f8fafc;
}

.glass-card--lead .glass-card__desc {
  max-width: 62ch;
  font-size: 1rem;
  color: #94a8c8;
}

.glass-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.glass-card__desc {
  font-size: 0.9375rem;
  color: var(--blue-soft);
  line-height: 1.65;
}

/* ── DOCK (FleetOps / 21st floating nav) ── */
.dock {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.dock__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--blue-soft);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.dock__item svg {
  width: 20px;
  height: 20px;
}

.dock__item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.dock__item.is-active {
  color: #fff;
  background: var(--blue-accent);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
}

.dock__item--cta {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
}

.dock__item--cta:hover,
.dock__item--cta.is-active {
  background: var(--blue-accent);
  color: #fff;
}

/* ── LANG SWITCH ── */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  background: var(--ink-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-switch--mobile { margin-top: 2rem; }

.lang-switch__pill {
  position: absolute;
  top: 3px;
  left: 0;
  z-index: 0;
  height: calc(100% - 6px);
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 999px;
  pointer-events: none;
  transition: transform 0.3s var(--ease), width 0.3s var(--ease);
}

.lang-switch__btn {
  position: relative;
  z-index: 1;
  padding: 0.35rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.lang-switch__btn:hover { color: var(--text-muted); }
.lang-switch__btn--active { color: var(--blue-accent); }

/* ═══════════════════════════════════════════════════════════════
   TOPBAR — floating glass menu
   ═══════════════════════════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 100;
  width: min(1180px, calc(100% - 1.5rem));
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.topbar--scrolled,
.header--scrolled {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--topbar-h);
  padding: 0 0.5rem 0 1.15rem;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  flex-shrink: 0;
}

.topbar__mark {
  width: 7px;
  height: 7px;
  background: var(--blue-accent);
  border-radius: 2px;
}

.topbar__nav {
  display: none;
  align-items: center;
  gap: 0.1rem;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .topbar__nav { display: flex; }
}

.topbar__link,
.header__link {
  padding: 0.4rem 0.8rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.topbar__link:hover,
.header__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.topbar__link.is-active,
.header__link.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.25);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Website hub / project subpages: brand | center | actions */
.topbar__inner--hub {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.55rem 0 1.15rem;
}

.topbar__inner--hub .topbar__brand {
  justify-self: start;
}

.topbar__inner--hub .topbar__nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.topbar__inner--hub .topbar__actions {
  justify-self: end;
  margin-left: 0;
}

.topbar__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1.15rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  background: var(--blue-accent);
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 999px;
  box-shadow:
    0 4px 16px rgba(37, 99, 235, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}

.topbar__home:hover {
  background: #3b82f6;
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px rgba(37, 99, 235, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

@media (max-width: 560px) {
  .topbar__inner--hub {
    grid-template-columns: auto 1fr auto;
    padding-left: 0.85rem;
  }

  .topbar__inner--hub .topbar__nav {
    display: none;
  }

  .topbar__inner--hub .topbar__brand span:not(.topbar__mark),
  .topbar__inner--hub .topbar__brand {
    font-size: 0;
  }

  .topbar__inner--hub .topbar__brand .topbar__mark {
    font-size: initial;
  }

  .topbar__inner--hub .topbar__brand {
    gap: 0;
  }

  .topbar__home {
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
  }
}

.topbar__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1.15rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  background: var(--blue-accent);
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 999px;
  box-shadow:
    0 4px 16px rgba(37, 99, 235, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
  flex-shrink: 0;
}

.topbar__cta:hover {
  background: #3b82f6;
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px rgba(37, 99, 235, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

@keyframes topbar-cta-glow {
  0%, 100% {
    box-shadow:
      0 4px 16px rgba(37, 99, 235, 0.35),
      0 0 0 0 rgba(59, 130, 246, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow:
      0 6px 22px rgba(37, 99, 235, 0.5),
      0 0 0 5px rgba(59, 130, 246, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar__cta { animation: none; }
}

@media (max-width: 560px) {
  .topbar__cta {
    padding: 0.45rem 0.75rem;
    font-size: 0.7rem;
  }
}

.topbar__menu,
.header__menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  cursor: pointer;
}

@media (min-width: 900px) {
  .topbar__menu, .header__menu { display: none; }
}

.topbar__menu span,
.header__menu span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.topbar__menu.is-open span:nth-child(1),
.header__menu.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar__menu.is-open span:nth-child(2),
.header__menu.is-open span:nth-child(2) { opacity: 0; }
.topbar__menu.is-open span:nth-child(3),
.header__menu.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.mobile-menu.is-open { opacity: 1; visibility: visible; }

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  text-align: center;
}

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-dim);
  transition: color 0.2s;
}

.mobile-menu__link:hover { color: var(--amber); }

.mobile-menu__cta-item {
  margin-bottom: 0.5rem;
}

.mobile-menu__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  background: var(--blue-accent);
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 999px;
  box-shadow:
    0 8px 28px rgba(37, 99, 235, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}

.mobile-menu__cta:hover {
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(37, 99, 235, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* ═══════════════════════════════════════════════════════════════
   INTRO / HERO
   ═══════════════════════════════════════════════════════════════ */
.intro {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(1rem + var(--topbar-h) + 1.25rem) 1.5rem 2rem;
  overflow: hidden;
}

.intro__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse 55% 50% at 68% 32%,
      rgba(59, 130, 246, 0.14) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 70% 60% at 82% 18%,
      rgba(37, 99, 235, 0.1) 0%,
      transparent 60%
    ),
    linear-gradient(165deg, #050a12 0%, #07101c 48%, #0a1424 100%);
}

.intro__atmosphere.shader-bg--active {
  background: #050a12;
  animation: none;
}

@keyframes intro-atmosphere-drift {
  from, to { filter: none; }
}

/* WebGL mesh-drift canvas (hero + contact) */
.shader-bg__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.intro__grain,
.work__grain,
.section-grain,
.contact__grain {
  display: none !important;
}

.deliver,
.work,
.xp,
.study,
.shelf {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

/* .stack keeps full layout — CSS sticky cards need continuous metrics */

.section-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.work__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.deliver > *:not(.section-atmosphere):not(.section-grain),
.work > *:not(.work__atmosphere):not(.work__grain),
.stack > *:not(.section-atmosphere):not(.section-grain),
.xp > *:not(.section-atmosphere):not(.section-grain),
.study > *:not(.section-atmosphere):not(.section-grain),
.shelf > *:not(.section-atmosphere):not(.section-grain):not(.lamp) {
  position: relative;
  z-index: 2;
}

/* Shader fades — only at animated-background boundaries */
.intro::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--shader-fade-h);
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 10, 18, 0.45) 42%, #050a12 100%);
}

.work__atmosphere::before,
.work__atmosphere::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: var(--shader-fade-h);
  pointer-events: none;
  z-index: 2;
}

.work__atmosphere::before {
  top: 0;
  background: linear-gradient(180deg, #050a12 0%, rgba(5, 10, 18, 0.5) 45%, transparent 100%);
}

.work__atmosphere::after {
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 18, 32, 0.5) 42%, #0a1220 100%);
}

.contact__atmosphere::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--shader-fade-h);
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(180deg, #0c1524 0%, rgba(12, 21, 36, 0.5) 48%, transparent 100%);
}

/* Section seam blends — sit above atmosphere, below content (z-index 2) */
.deliver::before,
.deliver::after,
.work::after,
.stack::before,
.stack::after,
.xp::before,
.xp::after,
.study::before,
.study::after,
.shelf::before,
.shelf::after,
.contact--forge::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: var(--section-fade-h);
  pointer-events: none;
  z-index: 1;
}

.deliver::before {
  top: 0;
  background: linear-gradient(180deg, #050a12 0%, rgba(5, 10, 18, 0.6) 42%, transparent 100%);
}

.deliver::after {
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 10, 18, 0.55) 38%, #050a12 100%);
}

.work::after {
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 18, 32, 0.5) 40%, #0a1220 100%);
}

.stack::before {
  top: 0;
  background: linear-gradient(180deg, #0a1220 0%, rgba(10, 18, 32, 0.55) 42%, transparent 100%);
}

.stack::after {
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 10, 18, 0.5) 40%, #050a12 100%);
}

.xp::before {
  top: 0;
  background: linear-gradient(180deg, #0a1220 0%, rgba(10, 18, 32, 0.5) 45%, transparent 100%);
}

.xp::after {
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 10, 18, 0.45) 38%, #050a12 100%);
}

.study::before {
  top: 0;
  background: linear-gradient(180deg, #050a12 0%, rgba(5, 10, 18, 0.5) 42%, transparent 100%);
}

.study::after {
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 21, 36, 0.45) 40%, #0c1524 100%);
}

.shelf::before {
  top: 0;
  background: linear-gradient(180deg, #050a12 0%, rgba(5, 10, 18, 0.4) 45%, transparent 100%);
}

.shelf::after {
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 11, 20, 0.5) 42%, #060b14 100%);
}

.contact--forge::before {
  top: 0;
  background: linear-gradient(180deg, #0c1524 0%, rgba(12, 21, 36, 0.55) 45%, transparent 100%);
}

.deliver .section-atmosphere {
  background:
    linear-gradient(180deg, #050a12 0%, transparent 22%),
    linear-gradient(0deg, #050a12 0%, transparent 20%),
    radial-gradient(ellipse 55% 42% at 14% 18%, rgba(37, 99, 235, 0.2), transparent 58%),
    radial-gradient(ellipse 45% 40% at 88% 62%, rgba(59, 130, 246, 0.12), transparent 55%),
    linear-gradient(165deg, #050a12 0%, #07101c 52%, #0a1424 100%);
}

.stack .section-atmosphere {
  background:
    linear-gradient(180deg, #0a1220 0%, transparent 22%),
    linear-gradient(0deg, #050a12 0%, transparent 24%),
    radial-gradient(ellipse 70% 55% at 50% 8%, rgba(59, 130, 246, 0.18), transparent 62%),
    radial-gradient(ellipse 40% 45% at 8% 70%, rgba(37, 99, 235, 0.12), transparent 55%),
    radial-gradient(ellipse 35% 40% at 92% 55%, rgba(29, 78, 216, 0.1), transparent 55%),
    linear-gradient(165deg, #0a1220 0%, #0d1526 45%, #0f172a 100%);
}

.xp .section-atmosphere {
  background:
    linear-gradient(180deg, #0a1220 0%, transparent 22%),
    linear-gradient(0deg, #050a12 0%, transparent 22%),
    radial-gradient(ellipse 48% 42% at 22% 28%, rgba(37, 99, 235, 0.18), transparent 58%),
    radial-gradient(ellipse 42% 38% at 86% 72%, rgba(59, 130, 246, 0.12), transparent 55%),
    linear-gradient(165deg, #050a12 0%, #07101c 50%, #09131f 100%);
}

.study .section-atmosphere {
  background:
    linear-gradient(180deg, #050a12 0%, transparent 24%),
    linear-gradient(0deg, #0c1524 0%, transparent 22%),
    radial-gradient(ellipse 50% 35% at 80% 12%, rgba(59, 130, 246, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 45% at 12% 85%, rgba(29, 78, 216, 0.1), transparent 55%),
    linear-gradient(180deg, #050a12 0%, #060d18 55%, #0a1422 100%);
}

.shelf .section-atmosphere {
  background:
    linear-gradient(180deg, #050a12 0%, transparent 18%),
    linear-gradient(0deg, #060b14 0%, transparent 20%),
    radial-gradient(ellipse 55% 40% at 14% 88%, rgba(37, 99, 235, 0.16), transparent 60%),
    radial-gradient(ellipse 42% 36% at 88% 82%, rgba(59, 130, 246, 0.1), transparent 58%),
    linear-gradient(180deg, #0c1524 0%, #0c1524 58%, #0a1220 100%);
}

.intro__stage {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
  gap: 2.5rem 4rem;
  align-items: end;
}

.intro__copy { max-width: min(100%, 28rem); }

.intro__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8.5vw, 6.75rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin-bottom: 1.2rem;
  text-wrap: balance;
}

.intro__title-line {
  display: block;
  overflow: hidden;
}

.intro__title-line > span {
  display: block;
  transform: translateY(110%);
  opacity: 0;
  animation: intro-title-rise 0.9s var(--ease) forwards;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-repeat: no-repeat;
}

.intro__title-line:first-child > span {
  background-image: var(--intro-name-light), var(--intro-name-fade-a);
  background-size: 145% 165%, 128% 142%;
  background-position: 0% 0%, 18% 12%;
}

.intro__title-line:nth-child(2) > span {
  background-image: var(--intro-name-glow-a), var(--intro-name-fade-b);
  background-size: 135% 155%, 122% 138%;
  background-position: 92% 96%, 32% 18%;
}

.intro__title-line:nth-child(2) > span { animation-delay: 0.1s; }

@keyframes intro-title-rise {
  to { transform: translateY(0); opacity: 1; }
}

.intro__role {
  font-size: 1.0625rem;
  font-weight: 500;
  color: #93c5fd;
  margin-bottom: 1.75rem;
  max-width: 34ch;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  animation: intro-fade-up 0.7s var(--ease) 0.28s forwards;
}

.intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(12px);
  animation: intro-fade-up 0.7s var(--ease) 0.4s forwards;
}

@keyframes intro-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

.intro__visual {
  position: relative;
  justify-self: end;
  width: min(100%, 300px);
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  animation: intro-fade-scale 0.9s var(--ease) 0.22s forwards;
}

@keyframes intro-fade-scale {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.intro__photo {
  position: relative;
  z-index: 1;
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  isolation: isolate;
}

.intro__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 10, 18, 0.55) 100%);
  pointer-events: none;
  z-index: 2;
}

.intro__photo img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% 18%;
}

.intro__facts {
  list-style: none;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: var(--container);
  width: 100%;
  margin: 2.75rem auto 0;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  opacity: 0;
  animation: intro-fade-up 0.7s var(--ease) 0.55s forwards;
}

.intro__facts li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 1.25rem 0 0;
}

.intro__facts li:not(:last-child) {
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  margin-right: 1.25rem;
}

.intro__facts-k {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.intro__facts-v {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
  color: var(--text);
}

.intro__facts-v a {
  color: #93c5fd;
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 197, 253, 0.35);
}

.intro__facts-v a:hover {
  color: #bfdbfe;
}

@media (prefers-reduced-motion: reduce) {
  .intro__atmosphere { animation: none; }
  .intro__title-line > span,
  .intro__role,
  .intro__actions,
  .intro__visual,
  .intro__facts {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   DELIVER — Services
   ═══════════════════════════════════════════════════════════════ */
.deliver {
  position: relative;
  padding: 6rem 1.5rem;
  background: #050a12;
  color: var(--text);
  overflow: hidden;
}

.deliver__head {
  max-width: var(--container);
  margin: 0 auto 3rem;
}

.deliver__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.deliver__sub {
  font-size: 1.0625rem;
  color: var(--blue-soft);
  line-height: 1.7;
  max-width: 52ch;
}

.deliver__grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 760px) {
  .deliver__grid { grid-template-columns: 1fr; }
}

.deliver__list { display: none; }

/* ═══════════════════════════════════════════════════════════════
   CASES BENTO — restrained 12-col, equal row units
   Lead: websites hub · Support: IMP + Fleet · Strip: Habilita site
   ═══════════════════════════════════════════════════════════════ */
.dest-bento {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(2, minmax(148px, 170px)) minmax(200px, 240px);
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .dest-bento {
    padding: 0 2.5rem;
    gap: 1rem;
    grid-template-rows: repeat(2, minmax(160px, 180px)) minmax(230px, 270px);
  }
}

.dest-card {
  --theme: 217 91% 40%;
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 0;
  border-radius: 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: var(--blue-surface);
  transition: box-shadow 0.3s var(--ease), border-color 0.25s, transform 0.25s var(--ease);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.dest-card:hover {
  border-color: hsl(var(--theme) / 0.5);
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.42),
    0 0 28px hsl(var(--theme) / 0.18);
}

.dest-card--hero {
  grid-column: 1 / span 7;
  grid-row: 1 / span 2;
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.36),
    0 0 36px rgba(37, 99, 235, 0.14);
}

.dest-card--side-a {
  grid-column: 8 / span 5;
  grid-row: 1;
}

.dest-card--side-b {
  grid-column: 8 / span 5;
  grid-row: 2;
}

.dest-card--wide {
  grid-column: 1 / -1;
  grid-row: 3;
}

.dest-card--ecommerce {
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.38),
    0 0 28px rgba(37, 99, 235, 0.1);
}

.dest-card--ecommerce:hover {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.46),
    0 0 36px rgba(37, 99, 235, 0.2);
}

.dest-card--featured .dest-card__img {
  object-position: center center;
}

.dest-card--featured:hover {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(37, 99, 235, 0.22);
}

.dest-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.55s var(--ease);
}

.dest-card:hover .dest-card__img {
  transform: scale(1.04);
}

.dest-card__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, hsl(var(--theme) / 0.9) 0%, hsl(var(--theme) / 0.28) 38%, transparent 66%),
    linear-gradient(to top, rgba(5, 10, 18, 0.65) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.dest-card--featured .dest-card__shade {
  background:
    linear-gradient(to top, hsl(217 91% 18% / 0.96) 0%, hsl(217 91% 28% / 0.72) 32%, hsl(217 91% 38% / 0.28) 58%, transparent 78%),
    linear-gradient(to top, rgba(5, 10, 18, 0.7) 0%, rgba(5, 10, 18, 0.28) 42%, transparent 68%);
}

.dest-card--side-a .dest-card__shade {
  background:
    linear-gradient(to top, hsl(221 70% 20% / 0.92) 0%, hsl(221 70% 28% / 0.55) 36%, hsl(221 70% 32% / 0.2) 58%, transparent 74%),
    linear-gradient(to top, rgba(5, 10, 18, 0.62) 0%, rgba(5, 10, 18, 0.22) 46%, transparent 66%);
}

.dest-card--side-b .dest-card__shade {
  background:
    linear-gradient(to top, hsl(215 60% 16% / 0.92) 0%, hsl(215 60% 24% / 0.55) 36%, hsl(215 60% 28% / 0.2) 58%, transparent 74%),
    linear-gradient(to top, rgba(5, 10, 18, 0.62) 0%, rgba(5, 10, 18, 0.22) 46%, transparent 66%);
}

.dest-card--wide .dest-card__img {
  object-position: center 42%;
}

.dest-card--ecommerce .dest-card__shade {
  background:
    linear-gradient(105deg, rgba(4, 10, 22, 0.88) 0%, rgba(4, 10, 22, 0.55) 38%, rgba(4, 10, 22, 0.12) 62%, transparent 78%),
    linear-gradient(to top, hsl(217 55% 10% / 0.94) 0%, hsl(217 50% 16% / 0.55) 34%, transparent 68%);
}

.dest-card--ecommerce .dest-card__body {
  max-width: min(34rem, 72%);
  padding: 1.25rem 1.4rem 1.35rem;
  gap: 0.3rem;
}

.dest-card--ecommerce .dest-card__title {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.dest-card--ecommerce .dest-card__stats {
  max-width: 46ch;
  color: rgba(226, 232, 240, 0.82);
}

.dest-card--ecommerce .dest-card__cta {
  margin-top: 0.45rem;
}

.dest-card--ecommerce:hover .dest-card__cta {
  background: rgba(59, 130, 246, 0.85);
  border-color: rgba(96, 165, 250, 0.9);
  transform: translateX(2px);
}

.dest-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 1.2rem 1.2rem;
}

.dest-card--featured .dest-card__body {
  padding: 1.35rem 1.45rem 1.5rem;
  gap: 0.35rem;
  max-width: 32rem;
}

.dest-card__kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, 0.92);
}

.dest-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.dest-card--hero .dest-card__title {
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.dest-card__stats {
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.45;
}

.dest-card--featured .dest-card__stats {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.84);
  max-width: 40ch;
}

.dest-card__cta {
  display: inline-flex;
  margin-top: 0.55rem;
  padding: 0.45rem 0.9rem;
  width: fit-content;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.dest-card--featured:hover .dest-card__cta {
  background: var(--blue-accent);
  border-color: var(--blue-accent);
  transform: translateX(2px);
}

@media (max-width: 900px) {
  .dest-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    grid-auto-rows: minmax(200px, 28vw);
  }

  .dest-card--hero {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 240px;
  }

  .dest-card--side-a,
  .dest-card--side-b {
    grid-column: auto;
    grid-row: auto;
  }

  .dest-card--wide {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 240px;
  }
}

@media (max-width: 560px) {
  .dest-bento {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
    gap: 0.75rem;
  }

  .dest-card--hero,
  .dest-card--side-a,
  .dest-card--side-b,
  .dest-card--wide {
    grid-column: 1;
    min-height: 0;
  }

  .dest-card--ecommerce {
    min-height: 260px;
  }

  .dest-card--ecommerce .dest-card__body {
    max-width: 100%;
  }

  .dest-card--featured .dest-card__body {
    padding: 1.15rem 1.2rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dest-card,
  .dest-card__img { transition: none; transform: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   WORK — section shell (cases use dest-bento)
   ═══════════════════════════════════════════════════════════════ */
.work {
  position: relative;
  padding: 6rem 0 5rem;
  background: #050a12;
  overflow: hidden;
}

.work__atmosphere {
  background:
    radial-gradient(
      ellipse 55% 50% at 68% 32%,
      rgba(59, 130, 246, 0.14) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 70% 60% at 82% 18%,
      rgba(37, 99, 235, 0.1) 0%,
      transparent 60%
    ),
    linear-gradient(165deg, #050a12 0%, #07101c 48%, #0a1424 100%);
}

.work__atmosphere.shader-bg--active {
  background: #050a12;
  animation: none;
}

.work__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  max-width: var(--container);
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .work__head { padding: 0 2.5rem; }
}

.work__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.65rem;
}

.work__sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 44ch;
}

.work__hub {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  min-width: 240px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.work__hub:hover {
  border-color: rgba(37, 99, 235, 0.5);
  transform: translateY(-3px);
  box-shadow: var(--glow);
}

.work__hub-k {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.work__hub-t {
  font-weight: 600;
  font-size: 1rem;
  color: var(--amber);
}

.work__hub-arrow {
  align-self: flex-end;
  font-size: 1.25rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.hub-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  width: calc(100% - 3rem);
  max-width: var(--container);
  margin: 3rem auto 0;
  padding: 1.65rem 1.5rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(15, 23, 42, 0.92) 58%);
  border: 1px solid rgba(37, 99, 235, 0.38);
  border-radius: var(--radius-md);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.28),
    0 0 40px rgba(37, 99, 235, 0.1);
}

@media (min-width: 768px) {
  .hub-band {
    width: calc(100% - 5rem);
    padding: 1.65rem 1.85rem;
  }
}

.hub-band--compact {
  width: 100%;
  max-width: var(--container);
  margin: 3rem auto 0;
  padding: 1.35rem 1.5rem;
}

@media (min-width: 768px) {
  .hub-band--compact { padding: 1.35rem 1.65rem; }
}

.hub-band__copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 280px;
  min-width: 0;
}

.hub-band__kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.hub-band__title {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
  max-width: 52ch;
}

.hub-band__title--inline {
  flex: 1 1 240px;
  margin: 0;
  max-width: none;
}

.hub-band__btn {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .hub-band,
  .hub-band--compact {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 1.5rem 1.35rem;
  }

  .hub-band__copy { align-items: center; }
  .hub-band__btn,
  .hub-band .btn { width: 100%; }
}

.work-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1.5rem;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}

.work-scroller::-webkit-scrollbar { height: 6px; }
.work-scroller::-webkit-scrollbar-thumb { background: var(--amber); border-radius: 6px; }

.work-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  padding: 0 1.5rem 0.5rem;
}

@media (min-width: 768px) {
  .work-track { padding: 0 2.5rem 0.5rem; }
  .work-scroller { scroll-padding-inline: 2.5rem; }
}

.work-card {
  display: flex;
  flex-direction: column;
  width: min(88vw, 420px);
  scroll-snap-align: start;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-image: radial-gradient(ellipse at top right, rgba(37, 99, 235, 0.18), transparent 55%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}

.work-card--lead {
  width: min(92vw, 680px);
  flex-direction: row;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: var(--glow), 0 16px 48px rgba(0, 0, 0, 0.35);
}

.work-card__shot {
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
}

.work-card--lead .work-card__shot {
  width: 55%;
  aspect-ratio: auto;
  min-height: 100%;
}

.work-card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s var(--ease);
}

.work-card:hover .work-card__shot img { transform: scale(1.03); }

.work-card__panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  flex: 1;
}

.work-card__tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
}

.work-card__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.work-card__problem {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.work-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.work-card__stats li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.work-card__stats strong {
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  color: var(--amber);
}

.work-card__stats span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.work-card__go {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.work-card:hover .work-card__go { color: var(--amber); }

/* ═══════════════════════════════════════════════════════════════
   STACK — glass panels + delivery tiles
   ═══════════════════════════════════════════════════════════════ */
.stack {
  position: relative;
  padding: 6rem 1.5rem;
  background: #0a1220;
  overflow: visible;
}

.stack-deck {
  position: relative;
}

.stack__head,
.process-title.stack__head {
  position: relative;
  max-width: var(--container);
  margin: 0 auto 3rem;
}

.stack__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
}

.stack__sub {
  font-size: 1.0625rem;
  color: var(--blue-soft);
  line-height: 1.7;
  max-width: 52ch;
}

.stack__body {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  counter-reset: stack-group;
}

@media (min-width: 900px) {
  .stack-deck:not(.is-stack) .stack__body {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }

  .stack-deck:not(.is-stack) .stack-card:has(.stack-group--lead),
  .stack-deck:not(.is-stack) .stack-card:has(.stack-group--span) {
    grid-column: 1 / -1;
  }
}

/* ── Sticky baralho (GSAP pin) ── */
html.stack-deck-pinning {
  scroll-behavior: auto;
}

html.stack-deck-pinning body {
  overflow-x: visible;
}

.stack-deck.is-stack .process-title {
  z-index: 40;
  margin-bottom: 0;
  padding: 0.75rem 0 1.1rem;
  background: transparent;
  isolation: isolate;
}

.stack-deck.is-stack .process-title::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    #0a1220 0%,
    #0a1220 58%,
    rgba(10, 18, 32, 0.82) 78%,
    transparent 100%
  );
  z-index: -1;
  pointer-events: none;
}

.stack-deck.is-stack .stack__body {
  display: block;
  max-width: none;
  margin-top: 1.25rem;
  gap: 0;
}

.stack-deck.is-stack .stack-card {
  position: relative;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: block;
}

.stack-deck.is-stack .stack-card:not(:last-child) {
  min-height: 42dvh;
}

.stack-deck.is-stack .stack-card:last-child {
  min-height: 0;
  padding-bottom: 2.5rem;
}

.stack-deck.is-stack .stack-card-inner {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  transform-origin: top center;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.stack-deck.is-stack .pin-spacer {
  position: relative !important;
}

.stack-deck.is-stack .stack-group {
  overflow: visible;
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.62),
    0 0 40px rgba(59, 130, 246, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .stack-deck.is-stack .stack-card-inner {
    will-change: auto;
  }
}

.stack-group {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.5rem 1.65rem;
  background:
    linear-gradient(90deg, var(--blue-ultra) 0%, rgba(59, 130, 246, 0.55) 40%, transparent 78%) top / 100% 3px no-repeat,
    #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-md);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(59, 130, 246, 0.1);
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.stack-group:hover {
  border-color: rgba(59, 130, 246, 0.55);
}

.stack-group--lead {
  padding: 1.6rem 1.6rem 1.75rem;
  background:
    linear-gradient(90deg, var(--blue-ultra) 0%, rgba(59, 130, 246, 0.65) 38%, transparent 72%) top / 100% 3px no-repeat,
    linear-gradient(145deg, #15233d 0%, #0f172a 55%);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.58),
    0 0 48px rgba(59, 130, 246, 0.14);
}

.stack-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.stack-group__label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.stack-group__label::before {
  counter-increment: stack-group;
  content: counter(stack-group, decimal-leading-zero);
  font-family: var(--font-mono, var(--font-display));
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #93c5fd;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.14);
}

.stack-group--lead .stack-group__label {
  font-size: 1.2rem;
}

/* ── Stack river + opaque titanium chips ── */
.stack-river {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(7.5rem, auto);
  gap: 1rem;
}

.stack-group--lead .stack-river {
  grid-auto-rows: minmax(8.25rem, auto);
  gap: 1.1rem;
}

.stack-chip {
  --chip-radius: 14px;
  position: relative;
  isolation: isolate;
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1.05rem 1.1rem 1.15rem;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(198, 210, 226, 0.48);
  border-radius: var(--chip-radius);
  background: #182338;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 10px 24px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.stack-chip--md,
.stack-chip--lg,
.stack-chip--xl {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 1.15rem;
  row-gap: 0.3rem;
  align-content: center;
  align-items: start;
}

.stack-chip > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.stack-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(186, 198, 214, 0.4) 35%,
    rgba(90, 106, 130, 0.5) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
  opacity: 0.85;
}

.stack-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(220, 230, 242, 0.62);
  background: #1e2c44;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.09) inset,
    0 14px 32px rgba(0, 0, 0, 0.42);
}

.stack-chip:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.7);
  outline-offset: 3px;
}

.stack-chip--md {
  grid-column: span 2;
  padding: 1.15rem 1.25rem;
  --chip-radius: 16px;
}

.stack-chip--lg {
  grid-column: span 3;
  padding: 1.2rem 1.3rem;
  --chip-radius: 16px;
}

.stack-chip--xl {
  grid-column: span 4;
  padding: 1.25rem 1.35rem;
  --chip-radius: 16px;
}

.stack-chip--tall { grid-row: span 2; }

.stack-group--lead .stack-chip {
  padding: 1.2rem 1.25rem;
  --chip-radius: 16px;
}

.stack-chip__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 11px;
  background: #0c1424;
  border: 1px solid rgba(186, 198, 214, 0.32);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.stack-chip--md .stack-chip__icon,
.stack-chip--lg .stack-chip__icon,
.stack-chip--xl .stack-chip__icon {
  grid-row: 1 / -1;
  align-self: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-top: 0.1rem;
}

.stack-group--lead .stack-chip__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.stack-chip__icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.stack-chip--md .stack-chip__icon img,
.stack-chip--lg .stack-chip__icon img,
.stack-chip--xl .stack-chip__icon img,
.stack-group--lead .stack-chip__icon img {
  width: 26px;
  height: 26px;
}

.stack-chip__name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #f8fafc;
  overflow-wrap: break-word;
}

.stack-chip--md .stack-chip__name,
.stack-chip--lg .stack-chip__name,
.stack-chip--xl .stack-chip__name {
  align-self: end;
  font-size: 0.98rem;
}

.stack-group--lead .stack-chip__name { font-size: 1rem; }

.stack-chip__desc {
  display: block;
  font-size: 0.72rem;
  color: #8b9bb3;
  line-height: 1.45;
}

.stack-chip--md .stack-chip__desc,
.stack-chip--lg .stack-chip__desc,
.stack-chip--xl .stack-chip__desc {
  align-self: start;
  font-size: 0.78rem;
}

@media (max-width: 720px) {
  .stack-river {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(7rem, auto);
    gap: 0.85rem;
  }
  .stack-chip--md,
  .stack-chip--lg,
  .stack-chip--xl { grid-column: span 2; }
  .stack-chip--tall { grid-row: span 1; }
  .stack-group { padding: 1.15rem; }
}

@media (max-width: 420px) {
  .stack-river { grid-template-columns: 1fr; }
  .stack-chip,
  .stack-chip--md,
  .stack-chip--lg,
  .stack-chip--xl { grid-column: span 1; }
  .stack-chip--md,
  .stack-chip--lg,
  .stack-chip--xl { grid-template-columns: 44px minmax(0, 1fr); }
}


/* ═══════════════════════════════════════════════════════════════
   XP — Experience & Education (premium dual panel)
   ═══════════════════════════════════════════════════════════════ */
.xp {
  position: relative;
  padding: 6.5rem 1.5rem;
  background: #050a12;
  color: var(--text);
  overflow: hidden;
}

.xp__head {
  max-width: var(--container);
  margin: 0 auto 3.25rem;
}

.xp__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
}

.xp__sub {
  font-size: 1.0625rem;
  color: var(--blue-soft);
  line-height: 1.7;
  max-width: 52ch;
}

.xp__grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.xp-card {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding: 1.85rem 1.85rem 1.75rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-md);
  min-height: 100%;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.xp-card.titanium {
  border: none;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(22, 32, 51, 0.94) 0%, rgba(8, 13, 24, 0.98) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 14px 36px rgba(0, 0, 0, 0.32);
}

.xp-card.titanium > * {
  position: relative;
  z-index: 1;
}

.xp-card.titanium::before {
  background: linear-gradient(
    135deg,
    rgba(186, 198, 214, 0.55) 0%,
    rgba(90, 106, 130, 0.45) 22%,
    rgba(148, 163, 184, 0.35) 45%,
    rgba(42, 53, 72, 0.7) 68%,
    rgba(154, 168, 188, 0.4) 100%
  );
  opacity: 0.55;
}

.xp-card.titanium::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 28%),
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59, 130, 246, 0.05), transparent 60%);
}

.xp-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.xp-card.titanium:hover {
  border-color: transparent;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 20px 44px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(59, 130, 246, 0.18);
}

.xp-card--work {
  background:
    linear-gradient(165deg, rgba(37, 99, 235, 0.1), rgba(15, 23, 42, 0.75) 48%);
  border-color: rgba(37, 99, 235, 0.22);
}

.xp-card--work.titanium {
  background:
    linear-gradient(165deg, rgba(37, 99, 235, 0.12), rgba(8, 13, 24, 0.98) 52%);
  border-color: transparent;
}

.xp-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.xp-card__kind {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.xp-card__period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--blue-soft);
}

.xp-card__brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.xp-card__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  padding: 8px;
  background: rgba(5, 10, 18, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
}

.xp-card__org {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

.xp-card__role {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--blue-soft);
}

.xp-card__desc {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(148, 163, 184, 0.95);
  line-height: 1.7;
  max-width: 42ch;
  flex: 1;
}

.xp-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.xp-card__tags li {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #93c5fd;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
}

@media (max-width: 800px) {
  .xp__grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   STUDY — Academic journey (compact accordion + flat lists)
   ═══════════════════════════════════════════════════════════════ */
.study {
  position: relative;
  padding: 5rem 1.5rem 5.5rem;
  background: #050a12;
  overflow: hidden;
  contain: layout paint style;
}

.study__head {
  max-width: var(--container);
  margin: 0 auto 2rem;
  text-align: left;
}

.study__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.65rem;
  text-align: left;
}

.study__sub {
  font-size: 1rem;
  color: var(--blue-soft);
  line-height: 1.65;
  max-width: 52ch;
  text-align: left;
}

.tabs--journey {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.5rem;
  background: rgba(10, 16, 28, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-md);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 768px) {
  .tabs--journey { padding: 1.5rem 1.75rem 1.75rem; }
}

.journey-stats {
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.journey-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--blue-soft);
  cursor: pointer;
  transition: color 0.2s;
}

.journey-stat:hover { color: #cbd5e1; }

.journey-stat strong {
  font-family: var(--font-mono);
  font-size: 1.0625rem;
  font-weight: 600;
  color: #e2e8f0;
}

.journey-stat--current strong { color: #93c5fd; }
.journey-stat--future strong { color: rgba(148, 163, 184, 0.85); }

.tabs__nav {
  grid-column: 1;
  position: relative;
  display: flex;
  justify-content: flex-start;
  gap: 0.15rem;
  width: 100%;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs--journey .tabs__nav {
  grid-row: 2;
}

.tabs__nav::-webkit-scrollbar { display: none; }

.tabs__btn {
  position: relative;
  z-index: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue-soft);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
  transition: color 0.2s;
}

.tabs__btn:hover { color: #e2e8f0; }
.tabs__btn--active { color: #fff; }

.tabs__indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--blue-accent);
  border-radius: 2px 2px 0 0;
  transition: transform 0.3s var(--ease), width 0.3s var(--ease);
}

.tabs__panel {
  text-align: left;
}

.journey-panels {
  grid-row: 3;
  grid-column: 1;
  position: relative;
  min-height: 20rem;
}

.journey-panels > .tabs__panel {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.journey-panels > .tabs__panel::-webkit-scrollbar {
  width: 6px;
}

.journey-panels > .tabs__panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.journey-panels > .tabs__panel[hidden] {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}

.journey-hint {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  color: rgba(148, 163, 184, 0.75);
  line-height: 1.5;
}

.journey-panel-label {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #93c5fd;
}

.course-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.course-semester {
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(5, 10, 18, 0.45);
  overflow: hidden;
  transition:
    border-color 0.35s var(--ease),
    background 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.course-semester.is-open {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(8, 14, 26, 0.65);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.course-semester__summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #93c5fd;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.course-semester__summary::-webkit-details-marker { display: none; }

.course-semester__label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.course-semester__summary:hover {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.04);
}

.course-semester.is-open > .course-semester__summary {
  color: #dbeafe;
}

.course-semester__count {
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.65);
  transition: color 0.25s var(--ease);
}

.course-semester.is-open .course-semester__count {
  color: rgba(147, 197, 253, 0.75);
}

.course-semester__toggle {
  position: relative;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.05);
  transition:
    border-color 0.35s var(--ease),
    background 0.35s var(--ease);
}

.course-semester__toggle::before,
.course-semester__toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 1.5px;
  border-radius: 1px;
  background: rgba(148, 163, 184, 0.8);
  transition:
    transform 0.38s var(--ease),
    opacity 0.28s var(--ease),
    background 0.25s var(--ease);
}

.course-semester__toggle::before {
  transform: translate(-50%, -50%);
}

.course-semester__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.course-semester.is-open .course-semester__toggle {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.1);
}

.course-semester.is-open .course-semester__toggle::before,
.course-semester.is-open .course-semester__toggle::after {
  background: #93c5fd;
}

.course-semester.is-open .course-semester__toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg) scaleX(0.2);
}

.course-semester__body {
  height: 0;
  overflow: hidden;
  transition: height 0.48s var(--ease);
}

.course-semester__inner .course-list {
  padding: 0 0.95rem 0.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  opacity: 0.35;
  transform: translateY(-4px);
  transition:
    opacity 0.36s var(--ease),
    transform 0.42s var(--ease);
}

.course-semester.is-open .course-semester__inner .course-list {
  opacity: 1;
  transform: none;
  transition-delay: 0.12s;
}

.course-semester.is-opening .course-semester__inner .course-item {
  animation: courseRowIn 0.42s var(--ease) both;
}

.course-semester.is-opening .course-semester__inner .course-item:nth-child(1) { animation-delay: 0.14s; }
.course-semester.is-opening .course-semester__inner .course-item:nth-child(2) { animation-delay: 0.19s; }
.course-semester.is-opening .course-semester__inner .course-item:nth-child(3) { animation-delay: 0.24s; }
.course-semester.is-opening .course-semester__inner .course-item:nth-child(4) { animation-delay: 0.29s; }
.course-semester.is-opening .course-semester__inner .course-item:nth-child(5) { animation-delay: 0.34s; }
.course-semester.is-opening .course-semester__inner .course-item:nth-child(6) { animation-delay: 0.39s; }

@keyframes courseRowIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-semester,
  .course-semester__summary,
  .course-semester__toggle,
  .course-semester__toggle::before,
  .course-semester__toggle::after,
  .course-semester__body,
  .course-semester__inner .course-list {
    transition: none;
  }

  .course-semester.is-opening .course-semester__inner .course-item {
    animation: none;
  }
}

.course-list {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.course-list--flat {
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(5, 10, 18, 0.45);
  padding: 0.15rem 0.95rem;
}

.course-item {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.65rem;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  color: rgba(226, 232, 240, 0.88);
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
  text-align: left;
}

.course-list--flat .course-item:first-child { padding-top: 0.65rem; }
.course-list--flat .course-item:last-child {
  border-bottom: none;
  padding-bottom: 0.65rem;
}

.course-item:last-child { border-bottom: none; }

.course-item::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-soft);
  justify-self: start;
}

.course-name {
  min-width: 0;
  text-align: left;
  line-height: 1.35;
}

.course-item--done::before { background: var(--blue-accent); }
.course-item--current::before {
  background: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
}
.course-item--future::before {
  background: var(--blue-soft);
  opacity: 0.45;
}

.course-item--future {
  color: var(--blue-soft);
}

.course-grade {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.35rem;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 4px;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.06);
  justify-self: end;
}

/* ═══════════════════════════════════════════════════════════════
   SHELF — Physical book cards (opaque) + local wheel browse
   Stack: top-left = back → bottom-right = front (open)
   ═══════════════════════════════════════════════════════════════ */
.shelf {
  padding: 0 0 7.5rem;
  background: #0c1524;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.shelf__pin {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Lamp Spotlight (Biblioteca) ──
   FUNDO/máscaras = #0c1524 (mesmo bg flat da seção)
   cones #93b4d8 · glow #3b82f6 · halo #e8eef6 · linha #c5d4e8
*/
.lamp {
  --lamp-ink: #0c1524;
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  /* Clip only sideways (wide cones); never clip the beam vertically */
  overflow-x: hidden;
  overflow-y: visible;
  background: var(--lamp-ink);
  padding-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .lamp {
    min-height: min(70dvh, 32rem);
    justify-content: center;
    padding-bottom: 4rem;
  }
}

.lamp__stage {
  position: relative;
  height: 13.5rem;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--lamp-ink);
}

@media (min-width: 768px) {
  .lamp__stage {
    height: 28rem;
    overflow: visible;
  }
}

.lamp__stage-inner {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  height: 32rem;
  width: 56rem;
  transform-origin: top center;
  transform: translateX(-50%) scale(0.38);
  align-items: center;
  justify-content: center;
  /* Fill the scaled stage so side wings aren't a different color */
  background: var(--lamp-ink);
}

@media (min-width: 768px) {
  .lamp__stage-inner {
    left: 0;
    width: 100%;
    transform: translateX(0) scaleX(1) scaleY(1.25);
  }
}

.lamp__cone {
  position: absolute;
  inset: auto;
  height: 16rem;
  width: 15rem;
  opacity: 0.5;
  color: #fff;
  transition:
    width 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.lamp.is-lit .lamp__cone {
  width: 36rem;
  opacity: 1;
}

.lamp__cone--left {
  right: 50%;
  overflow: visible;
}

.lamp__cone--right {
  left: 50%;
}

.lamp__mask {
  position: absolute;
  bottom: 0;
  z-index: 20;
  background: var(--lamp-ink);
}

.lamp__mask--bottom {
  left: 0;
  height: 10rem;
  width: 100%;
  -webkit-mask-image: linear-gradient(to top, white, transparent);
  mask-image: linear-gradient(to top, white, transparent);
}

.lamp__cone--right .lamp__mask--bottom {
  left: auto;
  right: 0;
}

.lamp__mask--side-l {
  left: 0;
  height: 100%;
  width: 10rem;
  -webkit-mask-image: linear-gradient(to right, white, transparent);
  mask-image: linear-gradient(to right, white, transparent);
}

.lamp__mask--side-r {
  right: 0;
  height: 100%;
  width: 10rem;
  -webkit-mask-image: linear-gradient(to left, white, transparent);
  mask-image: linear-gradient(to left, white, transparent);
}

.lamp__blot {
  position: absolute;
  top: 50%;
  height: 14rem;
  width: 100%;
  transform: translateY(3rem) scaleX(1.5);
  background: radial-gradient(ellipse at center, var(--lamp-ink) 20%, transparent 70%);
  opacity: 0.95;
}

/* Skip backdrop-filter — frosts a visible rectangular band */
.lamp__atmosphere {
  position: absolute;
  top: 50%;
  z-index: 50;
  height: 12rem;
  width: 100%;
  pointer-events: none;
  opacity: 0;
}

.lamp__glow {
  position: absolute;
  inset: auto;
  left: 50%;
  z-index: 50;
  height: 12rem;
  width: 36rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.55) 0%, rgba(59, 130, 246, 0.15) 45%, transparent 70%);
  opacity: 0.9;
}

.lamp__halo {
  position: absolute;
  inset: auto;
  left: 50%;
  z-index: 30;
  height: 12rem;
  width: 9rem;
  transform: translate(-50%, -6rem);
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(232, 238, 246, 0.85) 0%, rgba(232, 238, 246, 0.2) 50%, transparent 72%);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.lamp.is-lit .lamp__halo {
  width: 20rem;
}

.lamp__line {
  position: absolute;
  inset: auto;
  left: 50%;
  z-index: 50;
  height: 2px;
  width: 15rem;
  transform: translate(-50%, -7rem);
  background: #c5d4e8;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.lamp.is-lit .lamp__line {
  width: 36rem;
}

.lamp__cap {
  position: absolute;
  inset: auto;
  z-index: 40;
  height: 11rem;
  width: 100%;
  transform: translateY(-12.5rem);
  background: var(--lamp-ink);
}

.lamp__content {
  position: relative;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -6rem;
  padding: 0 1.25rem;
  text-align: center;
  width: 100%;
}

@media (min-width: 768px) {
  .lamp__content {
    margin-top: -9rem;
  }
}

.lamp .lamp__title {
  margin: 0;
  padding: 0.25rem 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background-image: linear-gradient(
    175deg,
    #f8fafc 0%,
    #e2e8f0 28%,
    #93b4d8 68%,
    #3b82f6 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 0.5;
  transform: translateY(100px);
  transition:
    opacity 0.8s ease-in-out 0.3s,
    transform 0.8s ease-in-out 0.3s;
}

.lamp.is-lit .lamp__title {
  opacity: 1;
  transform: none;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .lamp .lamp__title {
    color: #e2e8f0;
    -webkit-text-fill-color: #e2e8f0;
    background-image: none;
  }
}

.lamp .lamp__sub {
  margin: 1rem auto 0;
  max-width: 44ch;
  font-size: 1rem;
  color: var(--blue-soft);
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease-in-out 0.55s,
    transform 0.7s ease-in-out 0.55s;
}

.lamp.is-lit .lamp__sub {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .lamp__cone,
  .lamp__halo,
  .lamp__line,
  .lamp .lamp__title,
  .lamp .lamp__sub {
    transition: none !important;
  }

  .lamp .lamp__cone {
    width: 36rem;
    opacity: 1;
  }

  .lamp .lamp__halo {
    width: 20rem;
  }

  .lamp .lamp__line {
    width: 36rem;
  }

  .lamp .lamp__title {
    opacity: 1;
    transform: none;
  }

  .lamp .lamp__sub {
    opacity: 1;
    transform: none;
  }
}

.shelf__head {
  position: relative;
  margin-bottom: 1.75rem;
  text-align: center;
  width: 100%;
}

.shelf__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.65rem;
}

.shelf__sub {
  font-size: 1rem;
  color: var(--blue-soft);
  max-width: 44ch;
  margin: 0 auto;
}

html.library-deck-hot {
  overscroll-behavior: none;
}

.display-cards {
  position: relative;
  display: grid;
  grid-template-areas: "stack";
  place-items: center;
  width: min(72rem, 100%);
  min-height: 480px;
  margin: 0 auto;
  padding: 2.75rem 1rem 3.5rem;
  touch-action: none;
  overscroll-behavior: contain;
  cursor: ns-resize;
  outline: none;
  pointer-events: auto;
}

.display-cards.is-hot {
  cursor: ns-resize;
}

.display-card {
  grid-area: stack;
  position: relative;
  width: 11rem;
  height: 16.25rem;
  transform-origin: center center;
  user-select: none;
  backface-visibility: hidden;
}

.display-card.is-visible {
  pointer-events: auto;
}

.display-card__inner {
  position: relative;
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #121c2e;
  border-radius: 3px 5px 5px 3px;
  transition: box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    0 -3px 0 0 #f3efe6,
    0 -5px 0 0 #e4ddd0,
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.45);
}

/* Left = the book itself (cover flush to card edge) */
.display-card__book {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a1220;
  border-radius: inherit;
  transition:
    flex-basis 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: inset 12px 0 18px -12px rgba(0, 0, 0, 0.8);
}

.display-card__book::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 11px;
  z-index: 2;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(255, 255, 255, 0.18) 38%,
    rgba(0, 0, 0, 0.35) 72%,
    rgba(0, 0, 0, 0.15) 100%
  );
  pointer-events: none;
}

/* Right stack — spine on the outer (right) edge */
.display-card.is-shelf-right .display-card__book {
  box-shadow: inset -12px 0 18px -12px rgba(0, 0, 0, 0.8);
  border-radius: 5px 3px 3px 5px;
}

.display-card.is-shelf-right .display-card__book::before {
  left: auto;
  right: 0;
  background: linear-gradient(
    270deg,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(255, 255, 255, 0.18) 38%,
    rgba(0, 0, 0, 0.35) 72%,
    rgba(0, 0, 0, 0.15) 100%
  );
}

.display-card__book::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 18px 28px -18px rgba(255, 255, 255, 0.12),
    inset 0 -20px 32px -20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.display-card__cover {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  opacity: 1;
}

.display-card__info-btn {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: var(--info-fg, rgba(255, 255, 255, 0.95));
  background: var(--info-bg, rgba(15, 23, 42, 0.78));
  box-shadow:
    0 0 0 1px var(--info-ring, rgba(148, 163, 184, 0.35)),
    0 2px 8px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}

.display-card__info-btn:hover {
  transform: scale(1.08);
}

.display-card__info-btn.is-active {
  box-shadow:
    0 0 0 2px var(--info-ring, rgba(148, 163, 184, 0.45)),
    0 6px 18px rgba(0, 0, 0, 0.35);
}

.display-card__info-icon {
  display: block;
}

.display-card__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  flex: 0 0 0;
  width: 0;
  max-width: 0;
  min-width: 0;
  padding: 1.1rem 0;
  overflow: hidden;
  background: #162033;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.display-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.25;
  white-space: nowrap;
}

.display-card__desc {
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-width: 12rem;
}

.display-card__meta {
  font-size: 0.72rem;
  color: #6478a0;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Stage 1 — livro pegado / reto, só a capa (flat 2D = texto/capa nítidos) */
.display-card.is-front {
  /* keep will-change: transform from base — removing it mid-animation causes GPU layer tear */
  backface-visibility: visible;
  transform-style: flat;
}

.display-card.is-front .display-card__inner {
  overflow: hidden;
  transform: none;
  transform-style: flat;
  filter: none;
  box-shadow:
    0 -3px 0 0 #f3efe6,
    0 -5px 0 0 #e4ddd0,
    0 28px 56px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(37, 99, 235, 0.35),
    0 0 28px rgba(37, 99, 235, 0.12);
}

.display-card.is-front .display-card__cover {
  transform: none;
  image-rendering: auto;
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
}

.display-card.is-front .display-card__title,
.display-card.is-front .display-card__desc,
.display-card.is-front .display-card__meta {
  -webkit-font-smoothing: subpixel-antialiased;
  text-rendering: geometricPrecision;
  transform: none;
}

.display-card.is-front .display-card__book {
  flex: 0 0 100%;
  max-width: none;
  border-radius: inherit;
  transform: none;
}

/* Stage 2 — painel lateral com título/descrição */
.display-card.is-front.is-open {
  width: min(28rem, calc(100vw - 2.5rem));
  height: 18.5rem;
  transition:
    width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.display-card.is-front.is-open .display-card__book {
  flex: 0 0 12.5rem;
  max-width: 12.5rem;
  border-radius: 3px 0 0 3px;
}

.display-card.is-front.is-open .display-card__info {
  flex: 1 1 auto;
  width: auto;
  max-width: 15rem;
  padding: 1rem 1.1rem 1rem 0.95rem;
  opacity: 1;
  /* translateX(0) still promotes a blurry layer under perspective — use none */
  transform: none;
  pointer-events: auto;
}

.display-card.is-front.is-open .display-card__title,
.display-card.is-front.is-open .display-card__meta {
  white-space: normal;
}

/* While info panel is open */
.display-cards.is-reading .display-card.is-front {
  z-index: 40;
}

.shelf__hint {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}

.shelf__progress {
  position: relative;
  width: min(14rem, 50%);
  height: 3px;
  margin: 1.25rem auto 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.shelf__progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-accent), var(--blue-ultra));
}

@media (max-width: 767px) {
  .shelf {
    padding: 0 0 5.5rem;
  }

  .shelf__pin {
    padding: 0 1.25rem;
  }

  .display-cards {
    min-height: 480px;
    width: 100%;
    padding: 1.25rem 0.5rem 2.5rem;
  }

  .display-card {
    width: 9rem;
    height: 13.25rem;
  }

  .display-card.is-front.is-open {
    width: min(22rem, calc(100vw - 2rem));
    height: 15.15rem;
  }

  .display-card.is-front.is-open .display-card__book {
    flex-basis: 10.25rem;
    max-width: 10.25rem;
  }

  .display-card__desc {
    -webkit-line-clamp: 4;
    min-width: 9rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT — Titanium forge (full section + form)
   ═══════════════════════════════════════════════════════════════ */
:root {
  --titanium-hi: #f2f5f9;
  --titanium-mid: #9aa8bc;
  --titanium-lo: #5a6a82;
  --titanium-deep: #2a3548;
  --contact-ink: #060b14;
}

.titanium {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(160deg, rgba(22, 32, 51, 0.94) 0%, rgba(8, 13, 24, 0.98) 100%);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 18px 48px rgba(0, 0, 0, 0.45);
}

.titanium::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    var(--titanium-hi) 0%,
    var(--titanium-mid) 14%,
    var(--titanium-lo) 28%,
    #c9d3e0 42%,
    var(--titanium-deep) 55%,
    var(--titanium-hi) 70%,
    var(--titanium-mid) 85%,
    #7f8fa8 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.titanium::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(18px - 1px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, transparent 28%),
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59, 130, 246, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.contact--forge {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4.5rem, 10vh, 7rem) 0 calc(3.5rem + 5.5rem);
  overflow: hidden;
  color: var(--text);
  background: var(--contact-ink);
  text-align: left;
}

.contact__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 12% 20%, rgba(37, 99, 235, 0.22), transparent 58%),
    radial-gradient(ellipse 40% 40% at 88% 75%, rgba(59, 130, 246, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 35% at 50% 100%, rgba(29, 78, 216, 0.18), transparent 60%),
    linear-gradient(180deg, #04080f 0%, #070e18 45%, #050a12 100%);
}

.contact__atmosphere.shader-bg--active {
  background: #04080f;
}

.contact__atmosphere.shader-bg--active .contact__orb {
  display: none;
}

.contact__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: contact-orb 14s var(--ease) infinite alternate;
}

.contact__orb--a {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  top: -8%;
  right: -6%;
  background: rgba(59, 130, 246, 0.35);
}

.contact__orb--b {
  width: min(36vw, 340px);
  height: min(36vw, 340px);
  bottom: 8%;
  left: -8%;
  background: rgba(37, 99, 235, 0.28);
  animation-delay: -4s;
  animation-duration: 18s;
}

@keyframes contact-orb {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(2%, 4%, 0) scale(1.08); }
}

.contact__shell {
  position: relative;
  z-index: 2;
  width: 100%;
}

.contact__stage {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: stretch;
}

.contact__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}


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

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin-bottom: 1rem;
  max-width: 11ch;
  text-wrap: balance;
}

.contact__sub {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  color: #94a8c4;
  max-width: 36ch;
  margin-bottom: 1.5rem;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.contact__channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}

.contact__channels a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #c5d0e0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.contact__channels a:hover {
  color: #93c5fd;
  border-bottom-color: rgba(147, 197, 253, 0.45);
}

.contact__channels a:focus-visible {
  outline: 2px solid var(--blue-ultra);
  outline-offset: 4px;
}

/* Form panel */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
  z-index: 1;
}

.contact__form > * {
  position: relative;
  z-index: 1;
}

.contact__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.contact__field {
  display: block;
  min-width: 0;
}

.contact__field--full {
  grid-column: 1 / -1;
}

.contact__input {
  width: 100%;
  padding: 0.9rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: #f1f5f9;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(8, 14, 26, 0.96));
  border: 1px solid rgba(154, 168, 188, 0.28);
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(0, 0, 0, 0.25);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.contact__input::placeholder {
  color: #6b7f9c;
}

.contact__input:hover {
  border-color: rgba(186, 198, 214, 0.45);
}

.contact__input:focus {
  border-color: rgba(147, 197, 253, 0.65);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 0 0 3px rgba(37, 99, 235, 0.22);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.95), rgba(10, 16, 30, 0.98));
}

.contact__input.is-invalid {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.contact__select {
  background-image:
    linear-gradient(45deg, transparent 50%, #93a8c4 50%),
    linear-gradient(135deg, #93a8c4 50%, transparent 50%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(8, 14, 26, 0.96));
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    0 0;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
  cursor: pointer;
  color: #c5d0e0;
}

.contact__select:valid {
  color: #f1f5f9;
}

.contact__select option {
  background: #0f172a;
  color: #f1f5f9;
}

.contact__textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.55;
}

.contact__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 1rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.9875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f8fbff;
  cursor: pointer;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 40%),
    linear-gradient(135deg, #3b82f6 0%, #2563eb 48%, #1d4ed8 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 0 0 1px rgba(147, 197, 253, 0.35),
    0 14px 32px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
}

.contact__submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.22) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 0.55s var(--ease);
}

.contact__submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.32) inset,
    0 0 0 1px rgba(191, 219, 254, 0.45),
    0 18px 40px rgba(37, 99, 235, 0.45);
}

.contact__submit:hover::before {
  transform: translateX(120%);
}

.contact__submit:active {
  transform: translateY(0);
}

.contact__submit:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

.contact__submit svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.contact__form-status {
  padding: 0.7rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(147, 197, 253, 0.3);
  color: #bfdbfe;
}

.contact__form-status[hidden] {
  display: none;
}

.contact--forge .contact__copy {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: #6a7f9c;
}

.contact:not(.contact--forge) .contact__copy {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: #6a7f9c;
}

/* Legacy compact contact (websites hub) */
.contact:not(.contact--forge) {
  padding: 5rem 1.5rem calc(3.5rem + 5.5rem);
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(37, 99, 235, 0.2), transparent 60%),
    linear-gradient(180deg, #060b14 0%, #0a1220 100%);
  color: #fff;
  text-align: center;
}

.contact:not(.contact--forge) .contact__panel {
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.contact:not(.contact--forge) .contact__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
  max-width: none;
}

.contact:not(.contact--forge) .contact__sub {
  font-size: 1.125rem;
  margin-bottom: 1.75rem;
  max-width: none;
  color: #94a8c4;
}

.contact:not(.contact--forge) .btn--dark {
  color: #fff;
  background: var(--blue-accent);
  border-color: var(--blue-accent);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
}

.contact:not(.contact--forge) .btn--dark:hover {
  background: var(--blue-ultra);
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 2rem;
  margin-bottom: 2rem;
}

.contact__links a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #93c5fd;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.contact__links a:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 960px) {
  .contact__stage {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact__title {
    max-width: 14ch;
  }

  .contact__sub {
    max-width: 42ch;
  }
}

@media (max-width: 640px) {
  .contact--forge {
    padding-top: 4rem;
  }

  .contact__fields {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact__orb,
  .contact__submit::before {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .intro__stage {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
  }

  .intro__copy { max-width: none; }

  .intro__visual {
    justify-self: start;
    width: min(100%, 260px);
    order: -1;
  }

  .intro__facts {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .intro__facts li:not(:last-child) {
    border-right: none;
    margin-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding-bottom: 1rem;
  }

  .work-card--lead { flex-direction: column; width: min(92vw, 520px); }
  .work-card--lead .work-card__shot { width: 100%; aspect-ratio: 16/10; min-height: auto; }
}

@media (max-width: 760px) {
  .intro {
    padding-top: calc(0.75rem + var(--topbar-h) + 1.25rem);
    padding-bottom: 1.5rem;
    min-height: auto;
  }
  .intro__visual { width: min(100%, 200px); }
  .intro__title { font-size: clamp(2.75rem, 14vw, 3.5rem); }
  .intro__stage { gap: 1.35rem; }
  .intro__facts { margin-top: 1.75rem; }
  .intro__actions { flex-direction: column; }
  .intro__actions .btn { width: 100%; }
  .work__head { flex-direction: column; align-items: flex-start; }
  .work__hub { width: 100%; }
  .topbar {
    width: calc(100% - 1rem);
    top: 0.75rem;
    border-radius: 1.25rem;
  }
  .topbar__inner { padding: 0 0.4rem 0 1rem; }
  .xp__grid { grid-template-columns: 1fr; }
  .lang-switch:not(.lang-switch--mobile) { display: none; }
}

@media (max-width: 480px) {
  .dock {
    bottom: 0.75rem;
    gap: 0.15rem;
    padding: 0.35rem;
  }
  .dock__item {
    width: 40px;
    height: 40px;
  }
  .dock__item svg {
    width: 18px;
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn--shimmer::after { animation: none; display: none; }
}
/* ═══════════════════════════════════════════════════════════════
   NAV — Subpages (project / website hub)
   ═══════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 2rem;
  background: rgba(8, 12, 20, 0.96);
  border-bottom: 1px solid var(--border);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav__link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}

.nav__link:hover {
  color: var(--text);
}

.nav__link.is-active {
  color: var(--text);
}

.nav__link--muted {
  color: var(--text-dim);
  font-size: 0.68rem;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav__hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.25s var(--ease);
}

.nav__hamburger.is-open span:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}

.nav__hamburger.is-open span:nth-child(2) {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════════
   PROJECT PAGES
   ═══════════════════════════════════════════════════════════════ */
.project-page {
  position: relative;
  isolation: isolate;
}

.project-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 45% at 82% 12%, rgba(59, 130, 246, 0.11), transparent 58%),
    radial-gradient(ellipse 40% 35% at 8% 70%, rgba(37, 99, 235, 0.06), transparent 55%),
    linear-gradient(165deg, #050a12 0%, #07101c 48%, #0a1424 100%);
}

.project-page > main,
.project-page > footer,
.project-page > .contact {
  position: relative;
  z-index: 1;
}

.project-hero {
  position: relative;
  padding: calc(1rem + var(--topbar-h) + 2rem) 0 4.5rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.project-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 55% at 88% 18%, rgba(59, 130, 246, 0.14), transparent 60%);
  z-index: 0;
}

.project-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.project-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  transition: color 0.2s var(--ease);
}

.project-back:hover {
  color: #93c5fd;
}

.project-hero__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.project-hero__type {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93c5fd;
}

.project-hero__year {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.project-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.project-hero__subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 58ch;
  margin-bottom: 1.5rem;
}

.project-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.project-hero__tags:has(+ .project-links) {
  margin-bottom: 1.25rem;
}

.portfolio-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 8px;
}

.project-impact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 2.5rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.88);
}

.project-impact__col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.75rem;
  border-right: 1px solid var(--border);
}

.project-impact__col:last-of-type {
  border-right: none;
}

.project-impact__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.project-impact__label--solution {
  color: #93c5fd;
}

.project-impact__label--result {
  color: var(--blue-ultra);
}

.project-impact__text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.project-impact__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  grid-column: 1 / -1;
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border);
  background: rgba(5, 10, 18, 0.35);
}

.project-hero__cover {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.project-hero__cover img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.5rem;
}

.project-section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.project-section--alt {
  background: rgba(15, 23, 42, 0.42);
}

.project-section__grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 3rem;
  align-items: start;
}

.project-section__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 0.35rem;
}

.project-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
  max-width: 62ch;
}

.project-text:last-child {
  margin-bottom: 0;
}

.project-text strong {
  color: var(--text);
  font-weight: 600;
}

.project-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.project-heading {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.project-gallery__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.project-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  margin-top: 2rem;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-feature {
  padding: 1.75rem;
  background: var(--bg);
  transition: background 0.25s var(--ease);
}

.project-section--alt .project-feature {
  background: var(--surface);
}

.project-feature:hover {
  background: var(--surface-raised);
}

.project-feature__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}

.project-feature__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.project-feature__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.project-flow {
  position: relative;
  margin-top: 2rem;
  overflow-x: auto;
}

.project-flow__line {
  position: absolute;
  top: 14px;
  left: calc(8.33% + 14px);
  right: calc(8.33% + 14px);
  height: 1px;
  background: var(--border);
  pointer-events: none;
}

.project-flow__steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  min-width: 480px;
}

.project-flow__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

.project-flow__num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.project-flow__step:hover .project-flow__num {
  border-color: var(--text-dim);
  color: var(--text);
}

.project-flow__label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 76px;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-gallery__item {
  overflow: hidden;
  background: var(--surface);
  transition: background 0.25s var(--ease);
}

.project-gallery__item:hover {
  background: var(--surface-raised);
}

.project-gallery__trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: var(--surface-raised);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.project-gallery__trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s var(--ease);
}

.project-gallery__item:hover .project-gallery__trigger img {
  transform: scale(1.02);
}

.project-gallery__zoom {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
}

.project-gallery__item:hover .project-gallery__zoom {
  opacity: 1;
  transform: none;
}

.project-gallery__item figcaption {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
}

.project-gallery__item--wide {
  grid-column: span 2;
}

@media (max-width: 720px) {
  .project-gallery__item--wide {
    grid-column: span 1;
  }
}

.project-gallery__trigger--tall {
  aspect-ratio: 3 / 4;
}

.project-gallery__trigger--tall img {
  object-fit: cover;
  object-position: top center;
}

/* ── Bento gallery (ecommerce / asymmetric cases) ── */
.project-gallery--bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 0.75rem;
  background: transparent;
  border: none;
}

.project-gallery--bento .project-gallery__item {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.project-gallery--bento .project-gallery__item:hover {
  border-color: rgba(96, 165, 250, 0.35);
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
  transform: translateY(-2px);
}

.project-gallery--bento .project-gallery__item--hero {
  grid-column: span 2;
  grid-row: span 2;
}

.project-gallery--bento .project-gallery__item--tall {
  grid-column: span 1;
  grid-row: span 2;
}

.project-gallery--bento .project-gallery__item--wide {
  grid-column: span 2;
  grid-row: span 1;
}

.project-gallery--bento .project-gallery__item--full {
  grid-column: 1 / -1;
  grid-row: span 1;
}

.project-gallery--bento .project-gallery__trigger {
  flex: 1 1 auto;
  aspect-ratio: unset;
  height: 100%;
  min-height: 0;
  background: #070d18;
}

.project-gallery--bento .project-gallery__trigger::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(3, 8, 18, 0.55));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.project-gallery--bento .project-gallery__item:hover .project-gallery__trigger::after {
  opacity: 1;
}

.project-gallery--bento .project-gallery__trigger--tall {
  aspect-ratio: unset;
}

.project-gallery--bento .project-gallery__trigger img {
  object-fit: cover;
  object-position: top center;
  transition: transform 0.55s var(--ease);
}

.project-gallery--bento .project-gallery__item:hover .project-gallery__trigger img {
  transform: scale(1.04);
}

.project-gallery--bento .project-gallery__item--full .project-gallery__trigger img,
.project-gallery--bento .project-gallery__item--wide .project-gallery__trigger img {
  object-position: center top;
}

.project-gallery--bento .project-gallery__zoom {
  top: 0.75rem;
  right: 0.75rem;
  bottom: auto;
  border-radius: 0.5rem;
  background: rgba(5, 10, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.project-gallery--bento .project-gallery__item figcaption {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  padding: 0.7rem 0.95rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

@media (max-width: 900px) {
  .project-gallery--bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 200px;
  }

  .project-gallery--bento .project-gallery__item--hero {
    grid-column: 1 / -1;
    grid-row: span 2;
  }

  .project-gallery--bento .project-gallery__item--full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .project-gallery--bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 0.65rem;
  }

  .project-gallery--bento .project-gallery__item,
  .project-gallery--bento .project-gallery__item--hero,
  .project-gallery--bento .project-gallery__item--tall,
  .project-gallery--bento .project-gallery__item--wide,
  .project-gallery--bento .project-gallery__item--full {
    grid-column: 1;
    grid-row: span 1;
  }

  .project-gallery--bento .project-gallery__trigger,
  .project-gallery--bento .project-gallery__trigger--tall {
    min-height: 200px;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .project-gallery--bento .project-gallery__item--tall .project-gallery__trigger {
    aspect-ratio: 3 / 4;
    min-height: 280px;
  }

  .project-gallery--bento .project-gallery__item:hover {
    transform: none;
  }
}

.project-scroll {
  margin-top: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.project-scroll::-webkit-scrollbar {
  height: 6px;
}

.project-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.project-scroll__strip {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  padding: 0.15rem 0.15rem 0.75rem;
}

.project-scroll__frame {
  flex: 0 0 auto;
  width: min(240px, 62vw);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.project-scroll__frame:hover {
  border-color: var(--text-dim);
  transform: translateY(-2px);
}

.project-scroll__frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.project-scroll__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.55rem 0.65rem;
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
}

.wh-cases__list {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wh-case {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0 0 6rem;
}

.wh-case + .wh-case {
  padding-top: 5.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.wh-case:last-child {
  padding-bottom: 0;
}

.wh-case__head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wh-case__index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.55);
}

.wh-case__badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.wh-case__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding-top: 0.25rem;
}

.wh-case__gallery {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.wh-case__gallery-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.65);
}

.wh-live-btn {
  padding: 0.8rem 1.55rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.35),
    0 8px 32px rgba(37, 99, 235, 0.32);
}

.wh-live-btn:hover {
  box-shadow:
    0 0 0 1px rgba(147, 197, 253, 0.5),
    0 12px 36px rgba(37, 99, 235, 0.42);
}

.project-versions {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.project-versions__item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  padding: 1rem 1.25rem;
  align-items: baseline;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.project-versions__item:last-child {
  border-bottom: none;
}

.project-versions__ver {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
}

.project-versions__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.project-stack {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  overflow: hidden;
}

.project-stack__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.project-stack__item:last-child {
  border-bottom: none;
}

.project-stack__name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

.project-stack__role {
  font-size: 0.76rem;
  color: var(--text-dim);
  text-align: right;
}

.project-cta {
  padding: 5rem 0;
}

.project-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.project-cta__text {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 11, 0.94);
  cursor: zoom-out;
}

.lightbox__figure {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: min(1100px, 92vw);
  max-height: 90vh;
  margin: 0;
  animation: lightboxIn 0.35s var(--ease);
}

.lightbox__img {
  width: 100%;
  max-height: calc(90vh - 3rem);
  object-fit: contain;
  border: 1px solid var(--border);
  background: var(--bg);
}

.lightbox__caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  border-color: var(--text-dim);
  background: var(--surface-raised);
}

.lightbox__close {
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  padding-bottom: 2px;
}

.lightbox__nav--prev { left: 1.25rem; }
.lightbox__nav--next { right: 1.25rem; }

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   WEBSITE HUB — premium Experience surface
   ═══════════════════════════════════════════════════════════════ */
.website-hub {
  position: relative;
  isolation: isolate;
}

.wh-case {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

.website-hub::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 45% 40% at 90% 8%, rgba(59, 130, 246, 0.08), transparent 55%);
}

.website-hub > main,
.website-hub > footer,
.website-hub > .contact {
  position: relative;
  z-index: 1;
}

/* ── Cinematic hero ── */
.wh-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin: 0;
}

.wh-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.wh-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.02);
}

.wh-hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5, 10, 18, 0.97) 0%, rgba(5, 10, 18, 0.72) 42%, rgba(5, 10, 18, 0.35) 70%, rgba(5, 10, 18, 0.55) 100%),
    radial-gradient(ellipse at 78% 18%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(37, 99, 235, 0.2), transparent 55%);
}

.wh-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(1rem + var(--topbar-h) + 2.5rem) 1.5rem 4.5rem;
}

@media (min-width: 768px) {
  .wh-hero__content { padding-left: 2.5rem; padding-right: 2.5rem; padding-bottom: 5rem; }
}

.wh-hero__kicker {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.wh-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0 0 1rem;
  max-width: 12ch;
  text-wrap: balance;
}

.wh-hero__sub {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  max-width: 42ch;
}

.wh-hero__pitch {
  margin: 0 0 2rem;
  font-size: 1rem;
  color: var(--blue-soft);
  line-height: 1.7;
  max-width: 48ch;
}

.wh-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ── Cases ── */
.wh-cases {
  padding: 7rem 1.5rem 8rem;
  background: var(--ink);
}

@media (min-width: 768px) {
  .wh-cases { padding-left: 2.5rem; padding-right: 2.5rem; }
}

.wh-cases__head {
  max-width: var(--container);
  margin: 0 auto 5rem;
}

.wh-cases__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.wh-cases__sub {
  font-size: 1.0625rem;
  color: var(--blue-soft);
  line-height: 1.7;
  max-width: 48ch;
}

.wh-feature {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: var(--blue-surface);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

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

.wh-feature:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.38),
    0 0 48px rgba(37, 99, 235, 0.1);
}

.wh-feature__media {
  position: relative;
  min-height: 400px;
  overflow: hidden;
}

.wh-feature__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.7s var(--ease);
}

.wh-feature:hover .wh-feature__media img {
  transform: scale(1.04);
}

.wh-feature__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, rgba(15, 23, 42, 0.55) 100%);
  pointer-events: none;
}

.wh-feature__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding: 2.25rem 2.25rem 2.5rem;
  background:
    linear-gradient(165deg, rgba(37, 99, 235, 0.1), rgba(15, 23, 42, 0.98) 55%);
}

.wh-feature__kicker {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.wh-feature__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.wh-feature__desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--blue-soft);
  line-height: 1.7;
  max-width: 38ch;
}

.wh-feature__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.wh-feature__tags li {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: #93c5fd;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
}

.wh-feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--blue-soft);
}

.wh-feature__meta strong {
  color: #fff;
  font-weight: 600;
}

.wh-feature__cta {
  display: inline-flex;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  width: fit-content;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.wh-feature:hover .wh-feature__cta {
  background: var(--blue-accent);
  border-color: var(--blue-accent);
  transform: translateX(2px);
}

.wh-shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  container-type: inline-size;
}

.wh-shot {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  height: calc((100cqw - 3 * 1.25rem) / 4 * 10 / 16);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: var(--blue-surface);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.wh-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.55s var(--ease);
}

.wh-shot span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1.5rem 0.85rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(5, 10, 18, 0.9), transparent);
}

.wh-shot:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

.wh-shot:hover img {
  transform: scale(1.05);
}

/* ── Services ── */
.wh-services {
  padding: 6rem 1.5rem;
  background: var(--blue-deep);
}

@media (min-width: 768px) {
  .wh-services { padding-left: 2.5rem; padding-right: 2.5rem; }
}

.wh-services__head {
  max-width: var(--container);
  margin: 0 auto 2.75rem;
}

.wh-services__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
}

.wh-services__sub {
  font-size: 1.0625rem;
  color: var(--blue-soft);
  line-height: 1.7;
  max-width: 52ch;
}

.wh-services__grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.wh-services__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #93c5fd;
}

/* ── Stack ── */
.wh-stack {
  padding: 6rem 1.5rem;
  background: var(--ink-soft);
}

@media (min-width: 768px) {
  .wh-stack { padding-left: 2.5rem; padding-right: 2.5rem; }
}

.wh-stack__head {
  max-width: var(--container);
  margin: 0 auto 2.75rem;
}

.wh-stack__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
}

.wh-stack__sub {
  font-size: 1.0625rem;
  color: var(--blue-soft);
  line-height: 1.7;
  max-width: 52ch;
}

.wh-stack__grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.wh-stack__card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem 1.5rem 1.65rem;
  background:
    linear-gradient(90deg, var(--blue-ultra) 0%, rgba(59, 130, 246, 0.45) 42%, transparent 78%) top / 100% 2px no-repeat,
    rgba(15, 23, 42, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.wh-stack__card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.wh-stack__card--accent {
  border-color: rgba(37, 99, 235, 0.35);
  background:
    linear-gradient(90deg, var(--blue-ultra) 0%, rgba(59, 130, 246, 0.55) 40%, transparent 78%) top / 100% 2px no-repeat,
    linear-gradient(160deg, rgba(37, 99, 235, 0.12), var(--blue-surface) 60%);
}

.wh-stack__card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.wh-stack__num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #93c5fd;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.14);
}

.wh-stack__label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.wh-stack__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  flex: 1;
}

.wh-stack__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.wh-stack__card:hover .wh-stack__tag {
  border-color: rgba(59, 130, 246, 0.28);
}

.wh-stack__tag:hover {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(37, 99, 235, 0.18);
  color: #f8fafc;
}

@media (max-width: 900px) {
  .wh-cases {
    padding-top: 5rem;
    padding-bottom: 6rem;
  }

  .wh-cases__head {
    margin-bottom: 3.5rem;
  }

  .wh-case {
    gap: 1.75rem;
    padding-bottom: 4.5rem;
  }

  .wh-case + .wh-case {
    padding-top: 4rem;
  }

  .wh-case__gallery {
    padding-top: 1.25rem;
    gap: 1rem;
  }

  .wh-case__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wh-case__actions .btn {
    justify-content: center;
    text-align: center;
  }

  .wh-feature {
    grid-template-columns: 1fr;
  }

  .wh-feature__media {
    min-height: 260px;
    aspect-ratio: 16 / 10;
  }

  .wh-feature__shade {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.5), transparent 50%);
  }

  .wh-shots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .wh-shot {
    height: calc((100cqw - 1rem) / 2 * 10 / 16);
  }

  .wh-services__grid,
  .wh-stack__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .wh-hero__title {
    max-width: none;
  }

  .wh-shots {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .wh-shot {
    height: calc(100cqw * 10 / 16);
  }

  .wh-hero__actions .btn {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero__photo {
    width: min(260px, 70vw);
    margin: 0 auto;
    order: -1;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .case--featured {
    grid-template-columns: 1fr;
  }

  .cases__row {
    grid-template-columns: 1fr;
  }

  .portfolio-card--featured {
    grid-template-columns: 1fr;
  }

  .xp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 1.25rem;
  }

  .section {
    padding: 4.5rem 0;
  }

  .hero {
    padding: 2.5rem 0 4rem;
  }

  .hero__meta-row {
    grid-template-columns: 80px 1fr;
  }

  .hero__cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .skill-cards {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .books__grid {
    grid-template-columns: 1fr;
  }

  .case-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .case-banner__arrow {
    align-self: flex-end;
  }

  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .lang-switch:not(.lang-switch--mobile) {
    display: none;
  }

  .project-impact {
    grid-template-columns: 1fr;
  }

  .project-impact__col {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .project-impact__col:last-of-type {
    border-bottom: none;
  }

  .project-section__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-flow__line {
    display: none;
  }

  .project-flow__steps {
    flex-direction: column;
    min-width: 0;
    gap: 0;
    padding-left: 1.5rem;
  }

  .project-flow__steps::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: var(--border);
  }

  .project-flow__step {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
    padding: 0.65rem 0;
  }

  .project-flow__label {
    max-width: none;
    text-align: left;
  }

  .project-stack__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .project-stack__role {
    text-align: left;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .website-hero__stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer {
    padding: 4.5rem 0 2.5rem;
  }

  .footer__links {
    gap: 1.25rem;
  }

  .lightbox__nav--prev { left: 0.5rem; }
  .lightbox__nav--next { right: 0.5rem; }
  .lightbox__close { top: 0.75rem; right: 0.75rem; }
}

/* ═══════════════════════════════════════════════════════════════
   VIEWPORT VEIL — Progressive blur fixo no rodapé
   ═══════════════════════════════════════════════════════════════ */
.viewport-blur-veil {
  pointer-events: none !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 40 !important;
  height: 10vh !important;
  width: 100% !important;
  contain: strict !important;
  transform: translateZ(0);
}

@media (min-width: 640px) {
  .viewport-blur-veil {
    height: 14vh !important;
  }
}

.viewport-blur-veil .gradient-blur {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  height: 100%;
  width: 100%;
}

.viewport-blur-veil .gradient-blur > div {
  position: absolute;
  inset: 0;
}

/* ═══════════════════════════════════════════════════════════════
   PERF OVERRIDES
   ═══════════════════════════════════════════════════════════════ */
.display-card {
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .viewport-blur-veil .gradient-blur {
    display: none;
  }
}
