/* ============================================================
   Reset & tokens
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* surfaces */
  --bg: #ffffff;
  --panel: #f9f9f9;
  --card: #f2f2f4;
  --border: #ececec;

  /* text */
  --ink: #000000;
  --ink-1: #1d1d1d;
  --ink-2: #3f3f43;
  --muted: #898989;
  --muted-2: #8f8f8f;
  --muted-3: #95959a;

  /* accents */
  --btn-bg: #262626;
  --btn-bg-hover: #3a3a3a;
  --btn-text: #ffffff;
  --tag-web: #b4e3cb;
  --tag-mobile: #d4eed0;
  --ok: #5fa84d;
  --no: #e5484d;

  /* fonts */
  --font-mono: 'PT Mono', monospace;
  --font-display: 'Yantramanav', sans-serif;
  --font-sans: 'Inter', sans-serif;

  /* layout */
  --page-max: none;     /* grey blocks stretch to the full viewport width */
  --read-max: 800px;    /* max width of readable content inside a block */
  --gap: 8px;
  --pad-x: 36px;
  --radius: 8px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-family: var(--font-sans);
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ============================================================
   Page shell & panels
   ============================================================ */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--gap);
}

/* #view wraps everything below the header; stays a flex column with the
   same gap .page used before content was wrapped, and grows to fill the
   remaining height so things like the PDF viewer can stretch to the bottom */
#view {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* readable content inside a block: max 800, centered, never grows */
.inner {
  width: 100%;
  max-width: var(--read-max);
  margin: 0 auto;
}

/* placeholder for empty pages */
.placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 120px var(--pad-x);
  text-align: center;
}
.placeholder__title {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.1;
  color: var(--ink);
  text-transform: lowercase;
}
.placeholder__text {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--muted);
  text-transform: lowercase;
}

/* PDF viewer (CV page) */
.pdf-viewer {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.pdf-viewer__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius);
}
.pdf-viewer__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--muted);
  text-align: center;
}
.pdf-viewer__fallback a { color: var(--ink); text-decoration: underline; }

/* ============================================================
   Header / nav
   ============================================================ */
.header {
  position: sticky;
  top: var(--gap);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad-x);
  flex-wrap: wrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__item {
  position: relative;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--muted);
  text-decoration: none;
  user-select: none;
  /* matches the brackets' opacity duration so the text color and the
     bracket fade finish together instead of one trailing the other */
  transition: color 0.45s ease;
}

/* Bracket indicator: [ ] wrap the active item and slide to whatever is hovered */
.nav__item::before,
.nav__item::after {
  position: absolute;
  top: 0;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}
.nav__item::before { content: "["; left: -0.5em;  transform: translateX(0.45em); }
.nav__item::after  { content: "]"; right: -0.5em; transform: translateX(-0.45em); }

/* expanded (brackets embrace the word) — for the active page and on hover.
   transition-delay on the active item's default (re-)appearance absorbs the
   brief hover-loss when the cursor crosses the gap between nav items, so a
   fast hover skim across the menu doesn't make the brackets flicker back in
   for a single frame before the next item grabs hover. */
.nav__item--active::before,
.nav__item--active::after {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.12s;
}
a.nav__item:hover::before,
a.nav__item:hover::after {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0s;
}
.nav__item--active,
a.nav__item:hover { color: var(--ink); }

/* when another item is hovered, the active brackets contract away so the pair "moves" */
.nav:has(a.nav__item:hover) .nav__item--active:not(:hover)::before { opacity: 0; transform: translateX(0.45em); transition-delay: 0s; }
.nav:has(a.nav__item:hover) .nav__item--active:not(:hover)::after  { opacity: 0; transform: translateX(-0.45em); transition-delay: 0s; }

/* Page-switch animation: only the content area animates, header stays put.
   Default (initial page load, or no nav relation between pages) fades up.
   nav.js sets data-dir="left"/"right" based on where the target page sits
   in the nav relative to the page being left, so the new content slides in
   from the matching side instead of always popping up from the bottom. */
#view.page-enter-play { animation: page-enter 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
#view.page-enter-play[data-dir="right"] { animation-name: page-enter-right; }
#view.page-enter-play[data-dir="left"]  { animation-name: page-enter-left; }
@keyframes page-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes page-enter-right {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes page-enter-left {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav__item::before,
  .nav__item::after { transition: opacity 0.15s ease; }
  #view.page-enter-play { animation: none; }
}

.location {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--muted-2);
  white-space: nowrap;
}

/* ============================================================
   Buttons, tags, icons
   ============================================================ */
.buttons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 18px;
  min-height: 38px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--btn-bg-hover); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 24px; height: 24px; flex-shrink: 0; transition: transform 0.15s ease; }
.btn:hover .icon { transform: translate(2px, -2px); }

.icon { display: inline-block; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* tag pill */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 3px 8px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: #060606;
  white-space: nowrap;
}
.tag--web { background: var(--tag-web); }
.tag--mobile { background: var(--tag-mobile); }

/* dark chip (case hero) */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

/* ============================================================
   HOMEPAGE — hero
   ============================================================ */
.hero {
  padding: 100px var(--pad-x) 96px;
}
.hero__row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.hero__left {
  flex: 1 1 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
  max-width: 766px;
}

.id { display: flex; align-items: flex-end; gap: 23px; }
.id__avatar {
  width: 73px;
  height: 73px;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: 60% 30%;
  flex-shrink: 0;
}
.id__name {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.id__role {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--muted-2);
}

.hero__bio {
  font-family: var(--font-sans);
  font-size: 26px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 641px;
}

.hero__right {
  flex: 1 1 480px;
  display: flex;
  flex-direction: column;
  gap: 49px;
  padding: 12px 0 10px;
  max-width: 588px;
}

/* experience rows */
.xp { display: flex; gap: 30px; align-items: flex-start; }
.xp__year {
  flex: 0 0 70px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--muted);
}
.xp__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.xp__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.xp__org {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}
.xp__sep {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  text-transform: lowercase;
}
.xp__role {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}
.xp__desc {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--muted);
}

/* ============================================================
   HOMEPAGE — project cards
   ============================================================ */
.projects { display: flex; gap: var(--gap); flex-wrap: wrap; }

.project {
  /* flex-basis 0 -> widths are strictly proportional to 798:618,
     so heights match when both cover images share the same aspect ratio */
  flex: 1 1 0;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.project--crm { flex-grow: 798; }
.project--chatbot { flex-grow: 618; }

/* container mirrors the image's aspect ratio so it's shown in full, uncropped;
   both cover source images are 495px tall, so the resulting heights match */
.project__cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 798 / 495;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.project--chatbot .project__cover-wrap { aspect-ratio: 618 / 495; }
.project__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* on hover the image scales up smoothly from the center, staying within the container */
.project:hover .project__cover { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) {
  .project__cover { transition: none; }
  .project:hover .project__cover { transform: none; }
}

.project__bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 24px var(--pad-x);
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  flex: 1 1 auto;
}
.project__meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-right: 40px; }
.project__title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}
.project__sub {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--muted);
}
.project__tags { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ============================================================
   CASE — hero (two panels)
   ============================================================ */
.case-hero { display: flex; gap: var(--gap); align-items: stretch; flex-wrap: wrap; }

.case-hero__aside {
  flex: 1 1 360px;
  max-width: 480px;
  padding: 100px var(--pad-x) 96px;
  display: flex;
  flex-direction: column;
  gap: 52px;
}
.case-hero__main {
  flex: 3 1 520px;
  padding: 100px var(--pad-x) 96px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--ink);
  text-decoration: none;
  width: max-content;
}
.back .icon { width: 24px; height: 24px; }
.back:hover { opacity: 0.6; }

.case-id { display: flex; flex-direction: column; gap: 14px; }
.case-id__row { display: flex; align-items: center; gap: 23px; }
.case-id__avatar {
  width: 46px; height: 46px;
  border-radius: var(--radius);
  background: #d9d9d9;
  flex-shrink: 0;
}
.case-id__name {
  font-family: var(--font-sans);
  font-size: 26px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.case-id__tags { display: flex; gap: 10px; padding-left: 69px; flex-wrap: wrap; }

.case-hero__title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.case-hero__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  max-width: 641px;
}

.case-meta { display: flex; gap: 64px; flex-wrap: wrap; }
.case-meta__item { display: flex; flex-direction: column; gap: 12px; }
.case-meta__key {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--muted-3);
}
.case-meta__val {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

/* ============================================================
   CASE — text sections
   ============================================================ */
.section { padding: 100px var(--pad-x); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--muted-3);
}

.h2 {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--ink-1);
}

.prose {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.prose p + p { margin-top: 14px; }
.prose ul { margin: 14px 0; padding-left: 22px; }
.prose li { margin-top: 6px; }

/* vertical rhythm helpers inside a section */
.stack { display: flex; flex-direction: column; }
.stack--12 { gap: 12px; }
.stack--20 { gap: 20px; }
.stack--28 { gap: 28px; }
.stack--40 { gap: 40px; }

/* small grey info cards (problems found during research) */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--muted);
}

/* numbered list (what was done, results) */
.steps { display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; gap: 14px; align-items: baseline; }
.step__n {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--muted-3);
}
.step__n::before { content: ">\00a0"; }
.step__text {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

/* results highlight card */
.highlight {
  margin-top: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.highlight__text {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.highlight__metric {
  font-family: var(--font-mono);
  font-size: 48px;
  line-height: 1;
  color: var(--ok);
}

/* ============================================================
   CASE — figures (exported mockups)
   ============================================================ */
.figure { width: 100%; }
.figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* comparison (03) — two grey cards: mockup + caption + text */
.compare { display: flex; gap: var(--gap); flex-wrap: wrap; }
.compare__col {
  flex: 1 1 360px;
  background: #ececef;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.compare__shot {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: none;
}
.compare__caption {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.compare__caption--no { color: #f53e1d; }
.compare__caption--ok { color: #1b8700; }
.mark { flex-shrink: 0; display: block; width: 24px; height: 24px; }
.compare__text {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

/* ============================================================
   CASE — footer
   ============================================================ */
.case-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 70px var(--pad-x);
  flex-wrap: wrap;
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--ink-1);
  text-decoration: none;
}
.more .icon { width: 20px; height: 20px; }
.more:hover { opacity: 0.6; }

/* ============================================================
   Scroll reveal (case page) — progressive enhancement via html.js
   ============================================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Clickable images / lightbox
   ============================================================ */
.figure img, .compare__shot { cursor: zoom-in; }

.lb {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 8, 8, 0.9);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  overscroll-behavior: contain; touch-action: none;
}
.lb.is-open { opacity: 1; visibility: visible; }
.lb__img {
  max-width: 92vw; max-height: 92vh;
  border-radius: 6px;
  transform-origin: center center;
  cursor: grab; user-select: none; -webkit-user-drag: none;
  will-change: transform;
}
.lb__img.is-panning { cursor: grabbing; }
.lb.is-loading-full .lb__img { cursor: wait; }
.lb__close {
  position: fixed; top: 20px; right: 24px;
  width: 40px; height: 40px; border: none; border-radius: 8px;
  background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.lb__close:hover { background: rgba(255, 255, 255, 0.22); }
.lb__close svg { width: 22px; height: 22px; }
.lb__hint {
  position: fixed; bottom: 18px; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: 12px; text-transform: lowercase;
  color: rgba(255, 255, 255, 0.5); pointer-events: none;
}

/* ============================================================
   Before / after slider
   ============================================================ */
.ba {
  position: relative; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  touch-action: pan-y; user-select: none;
}
.ba__base { display: block; width: 100%; height: auto; }
.ba__before {
  position: absolute; top: 0; left: 0; height: 100%; width: 27%;
  overflow: hidden;
}
.ba__before img {
  position: absolute; top: 0; left: 0; height: 100%; width: auto;
  max-width: none; display: block;
}
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: 27%;
  width: 2px; background: #fff; transform: translateX(-1px);
  cursor: ew-resize; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.ba__grip {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex; align-items: center; justify-content: center;
  color: #262626;
}
.ba__grip svg { width: 22px; height: 22px; }
.ba__label {
  position: absolute; top: 16px;
  padding: 4px 10px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 13px; text-transform: lowercase;
  color: #fff; background: rgba(38, 38, 38, 0.72);
  pointer-events: none;
}
.ba__label--before { left: 16px; }
.ba__label--after { right: 16px; }

/* ============================================================
   404
   ============================================================ */
.error { flex: 1; padding: 100px var(--pad-x) 0; }
.error__content { display: flex; flex-direction: column; gap: 62px; }
.error__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: #bcbcbc;
}
.error__accent { color: #1c1c1c; }
.error__subtext {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.1;
  text-transform: lowercase;
  color: var(--muted);
}

/* ============================================================
   Mobile gate (<768)
   ============================================================ */
.mobile-gate { display: none; }

@media (max-width: 767px) {
  .page { display: none; }
  .mobile-gate {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    text-align: left;
    gap: 20px;
    width: 100vw;
    min-height: 100vh;
    padding: 32px 24px;
    box-sizing: border-box;
  }
  .mobile-gate .buttons { justify-content: flex-start; }
  .mobile-gate > * { max-width: 340px; }
  .mobile-gate__title, .mobile-gate__text { overflow-wrap: break-word; }
  .mobile-gate__title {
    font-family: var(--font-sans);
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ink);
    overflow-wrap: anywhere;
  }
  .mobile-gate__text {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.5;
    text-transform: lowercase;
    color: var(--muted);
  }
  .mobile-gate .buttons { margin-top: 8px; }
}

/* ============================================================
   Responsive scaling (≤1100 / ≤900)
   ============================================================ */
@media (max-width: 1100px) {
  :root { --pad-x: 28px; }
  .hero { padding: 72px var(--pad-x) 64px; }
  .hero__bio { font-size: 23px; }
  .case-hero__aside, .case-hero__main { padding: 72px var(--pad-x) 64px; }
  .section { padding: 86px var(--pad-x); }
}

@media (max-width: 900px) {
  .hero__row { gap: 40px; }
  .hero__left { justify-content: flex-start; }
  .case-hero__aside { max-width: none; }
  .cards { grid-template-columns: 1fr; }
  .case-meta { gap: 40px; }
  .hero__bio { font-size: 21px; }
}
