/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg-base: #1c1c1e;
  --bg-sidebar: #191919;
  --bg-card: #ffffff;
  --bg-nav-active: #2a2a2a;
  --text-primary: #ffffff;
  --text-muted: #888888;
  --text-subtle: #666666;
  --accent-blue: #2563eb;
  --accent-orange: #f97316;
  --border: #2e2e2e;
  --sidebar-width: 210px;

  /* Type: headings are Inter Medium */
  --weight-heading: 500;

  /* Case-study contents rail: its own width + the gutter reserved for it */
  --rail-width: 150px;
  --rail-inset: 36px;
  --rail-gutter: 220px;
}

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

html {
  font-size: 16px;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

a {
  color: inherit;
}

/* ─── Two-Column Layout ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-sidebar);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 0 0;
  overflow: hidden;
  z-index: 100;
}

.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0 0 12px;
}

.sidebar-section-label {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 16px;
  margin-top: 20px;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
  margin: 1px 6px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--bg-nav-active);
}

.sidebar-nav .ext-icon {
  margin-left: auto;
  color: var(--text-subtle);
  flex-shrink: 0;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}

/* The cursive "a." monogram beside the name */
.logo-mark {
  width: 23px;
  height: 15px;
  flex-shrink: 0;
  color: #f3eee4;
}

/* Each project's real logo, as a round mark in the nav.
   The source marks are JPEGs, so clip just inside the disc to
   cut the compression halo off its edge. */
.nav-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  clip-path: circle(47%);
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-nav-active);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-copyright {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── Top Bar ───────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
  z-index: 50;
  font-size: 13px;
  color: var(--text-muted);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-breadcrumb a:hover {
  color: var(--text-primary);
}

.topbar-sep {
  color: var(--text-subtle);
}

.topbar-page {
  display: flex;
  align-items: center;
  gap: 5px;
}

.copy-link-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: inherit;
  transition:
    color 0.15s,
    background 0.15s;
}

.copy-link-btn:hover {
  color: var(--text-primary);
  background: var(--bg-nav-active);
}

/* ─── Announcement Banner ───────────────────────────────────── */
.announcement-banner {
  background: var(--accent-blue);
  color: #fff;
  font-size: 13px;
  text-align: center;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── Main Content Area ─────────────────────────────────────── */
.content {
  padding: 40px 50px 80px;
  width: 100%;
  max-width: none;
}

/* ─── Home: Hero Image ──────────────────────────────────────── */
.home-hero {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 48px;
}

.home-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ─── Home: Hero Block ──────────────────────────────────────── */
.hero-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-nav-active);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-heading {
  font-size: 22px;
  font-weight: var(--weight-heading);
  margin-top: 16px;
  line-height: 1.35;
}

.hero-bio {
  font-size: 14px;
  margin-top: 8px;
  color: var(--text-primary);
}

.hero-prev {
  font-size: 14px;
  margin-top: 8px;
}

.hero-prev strong {
  font-weight: 700;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Experience Table ──────────────────────────────────────── */
.section-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 48px;
  margin-bottom: 12px;
}

.experience-table {
  width: 100%;
}

.experience-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}

.experience-row:last-child {
  border-bottom: 1px solid var(--border);
}

.company-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-nav-active);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
  overflow: hidden;
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-name {
  font-size: 14px;
  font-weight: 600;
}

.company-sep {
  color: var(--text-subtle);
  margin: 0 2px;
}

.company-role {
  font-size: 14px;
  color: var(--text-muted);
}

.company-year {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ─── Home: Project Preview Blocks ─────────────────────────── */
.project-preview {
  margin-top: 64px;
}

.project-title {
  font-size: 16px;
  font-weight: var(--weight-heading);
}

.project-role-subtitle {
  font-size: 13px;
  color: var(--proj, var(--accent-orange));
  margin-top: 3px;
}

.project-description {
  font-size: 14px;
  margin-top: 8px;
  color: var(--text-primary);
}

/* Pill CTA under each preview's description. Solid black in its
   resting state, inverts to solid white on hover. */
.view-case-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding: 13px 26px;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-size: 15px;
  font-weight: var(--weight-heading);
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.view-case-btn:hover {
  background: #ffffff;
  color: #000000;
}

.project-hero-link {
  text-decoration: none;
  display: block;
}

.project-hero {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-nav-active);
  transition: border-color 0.2s ease;
}

.project-hero-link:hover .project-hero {
  border-color: #4a4a4a;
}

/* Each preview keeps the source media's own aspect ratio (--ar),
   so `cover` fills the frame with nothing cropped or stretched. */
.project-hero-inner {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 16 / 9);
  display: block;
  overflow: hidden;
  background: color-mix(in srgb, var(--proj, #ffffff) 14%, var(--bg-base));
}

.project-hero-inner img,
.project-hero-inner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── Per-project accent ───────────────────────────────────────
   One brand colour per project. It tints that project's icon, its
   accent line, and the panel behind its media while that loads. */
.proj-arkam,
.hero-arkam {
  --proj: #ee881a;
}
.proj-tokyo,
.hero-lottox {
  --proj: #bde920;
}
.proj-owled,
.hero-owled {
  --proj: #cf1134;
}
.proj-prestige,
.hero-prestige {
  --proj: #feefb1;
}

/* Icons take a muted mix of the brand colour rather than the colour
   itself: enough hue to read as this project's, not so much that a
   page full of 12px glyphs starts shouting. */
.proj-arkam,
.proj-tokyo,
.proj-owled,
.proj-prestige {
  --proj-soft: color-mix(in srgb, var(--proj) 52%, var(--text-muted));
  --proj-chip: color-mix(in srgb, var(--proj) 11%, transparent);
}

/* ─── Case Study: Hero ──────────────────────────────────────── */
.cs-hero {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 16 / 9);
  max-height: 80vh;
  overflow: hidden;
  background: color-mix(in srgb, var(--proj, #ffffff) 14%, var(--bg-base));
}

.cs-hero img,
.cs-hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0) 38%,
    rgba(0, 0, 0, 0.3) 66%,
    rgba(0, 0, 0, 0.82) 100%
  );
}

.cs-hero-caption {
  position: absolute;
  left: 50px;
  right: 50px;
  bottom: 26px;
}

.cs-hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--proj, var(--accent-orange));
  font-weight: 600;
}

.cs-hero-name {
  font-size: clamp(28px, 4.4vw, 50px);
  font-weight: var(--weight-heading);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: 6px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

/* ─── Case Study: Title + Metadata ─────────────────────────── */
.cs-title {
  font-size: 28px;
  font-weight: var(--weight-heading);
  margin-top: 48px;
  line-height: 1.25;
}

.cs-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.cs-meta-label {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.cs-meta-value {
  font-size: 14px;
}

/* ─── Case Study: Body ──────────────────────────────────────── */
.cs-body {
  margin-top: 32px;
}

.cs-body h2 {
  font-size: 20px;
  font-weight: var(--weight-heading);
  margin-top: 44px;
  margin-bottom: 16px;
}

.cs-body p {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
}

.cs-body strong {
  font-weight: 700;
}

.cs-body a {
  text-decoration: underline;
  color: var(--text-primary);
}

/* ─── Icon-Highlighted Point Breakdown ─────────────────────── */
.point-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.point-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.point-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.point-title {
  font-size: 15px;
  font-weight: var(--weight-heading);
  margin-bottom: 4px;
}

.point-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Media Grid ────────────────────────────────────────────── */
/* Every frame is sized to its source media's own aspect ratio (--ar),
   so object-fit: cover fills the frame edge to edge with no crop and
   no distortion. Click any frame to open it full size in the lightbox. */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
  align-items: start;
}

.media-grid.cols-1 {
  grid-template-columns: minmax(0, 1fr);
}
.media-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-sidebar);
}

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--ar, 16 / 9);
  overflow: hidden;
  background: #0e0e10;
  cursor: zoom-in;
  border: none;
  padding: 0;
}

.media-frame img,
.media-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s ease;
  pointer-events: none;
}

.media-frame:hover::after {
  background: rgba(255, 255, 255, 0.05);
}

.media-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 4px 7px;
  pointer-events: none;
}

.media-figure figcaption {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
}

/* ─── Lightbox (uncropped full view) ────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 10, 12, 0.94);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 48px 40px 40px;
}

.lightbox.open {
  display: flex;
}

.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.lightbox-caption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  max-width: 640px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  line-height: 0;
  transition:
    color 0.15s,
    background 0.15s;
}

.lightbox-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* ─── Inline CTA button ─────────────────────────────────────── */
.cs-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none !important;
  transition: border-color 0.15s;
  margin-bottom: 8px;
}

.cs-cta:hover {
  border-color: #888;
}

/* ─── Next Steps ────────────────────────────────────────────── */
.next-steps-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 56px;
  margin-bottom: 4px;
}

.next-steps-title {
  font-size: 20px;
  font-weight: var(--weight-heading);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.next-step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.next-step-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-muted);
  margin-top: 2px;
}

.next-step-title {
  font-size: 18px;
  font-weight: var(--weight-heading);
  margin-bottom: 4px;
}

.next-step-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Case Study: project-tinted icons ──────────────────────────
   Every icon on a case study — breadcrumb, Scope/Role, the approach
   points, the next steps, the CTA — carries the project's accent. */
.topbar-page > svg,
.cs-meta-label > svg,
.next-steps-title > svg,
.next-step-icon,
.cs-cta > svg {
  color: var(--proj-soft, var(--text-muted));
}

.point-icon {
  color: var(--proj-soft, var(--text-muted));
  background: var(--proj-chip, rgba(255, 255, 255, 0.04));
}

/* ─── Contents Nav (Scroll Spy Rail) ───────────────────────── */
.contents-nav {
  position: fixed;
  right: var(--rail-inset);
  top: 50%;
  transform: translateY(-50%);
  width: var(--rail-width);
  z-index: 20;
  display: none; /* shown only on case study pages via class */
}

.contents-nav.visible {
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.contents-nav.visible.show {
  opacity: 1;
  pointer-events: auto;
}

.contents-nav-label {
  font-size: 11px;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-left: 15px;
}

.contents-nav ul {
  list-style: none;
  border-left: 1px solid var(--border);
}

.contents-nav a {
  position: relative;
  display: block;
  font-size: 13px;
  line-height: 1.4;
  padding: 6px 0 6px 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

/* Sits on top of the ul's track line, so the active item reads as a
   segment of the rail rather than a separate bar next to it. */
.contents-nav a::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background: transparent;
  transition: background 0.15s;
}

.contents-nav a:hover {
  color: var(--text-primary);
}

.contents-nav a.active {
  color: var(--text-primary);
  font-weight: 600;
}

.contents-nav a.active::before {
  background: var(--accent-orange);
}

/* ─── About Page ────────────────────────────────────────────── */
.about-title {
  font-size: 28px;
  font-weight: var(--weight-heading);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-top: 8px;
}

.about-section {
  margin-top: 40px;
}

.about-section-heading {
  font-size: 18px;
  font-weight: var(--weight-heading);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.about-section p {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
}

/* ─── About: scrapbook hero ────────────────────────────────────
   The collage ships as one artwork (a wide crop and a tall crop).
   It is drawn on pure black, so `lighten` lets the page background
   through instead of parking a black slab on it. */
.about-hero {
  display: block;
  margin: 28px 0 8px;
  z-index: 1000;
}

.about-hero img {
  z-index: 1000;
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: lighten;
}

/* ─── About: four-column facts row ──────────────────────────── */
.about-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin-top: 56px;
}

.fact-title {
  font-size: 13px;
  font-weight: var(--weight-heading);
  margin-bottom: 8px;
}

.fact-body {
  font-size: 13px;
  line-height: 1.62;
  color: var(--text-muted);
}

.footer-cta {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-cta p {
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.65;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.15s;
}

.cta-btn:hover {
  border-color: #888;
}

/* ─── Hamburger Button (mobile only) ────────────────────────── */
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  margin-right: 4px;
  transition:
    color 0.15s,
    background 0.15s;
  flex-shrink: 0;
}

.hamburger-btn:hover {
  color: var(--text-primary);
  background: var(--bg-nav-active);
}

/* ─── Sidebar Overlay (mobile drawer backdrop) ───────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99;
  backdrop-filter: blur(2px);
}

body.sidebar-open .sidebar-overlay {
  display: block;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (min-width: 1201px) {
  body:has(.contents-nav.visible) .content {
    padding-right: var(--rail-gutter);
  }
}

@media (max-width: 1200px) {
  .contents-nav {
    display: none !important;
  }
}

/* ── Tablet (sidebar still visible, contents nav gone) ─────── */
@media (max-width: 900px) {
  .content {
    padding: 32px 32px 64px;
  }

  /* Facts row: 4 → 2 columns */
  .about-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 26px;
  }
}

/* ── Mobile (≤ 768px) — slide-in drawer sidebar ─────────────── */
@media (max-width: 768px) {
  /* Show hamburger, hide it from topbar flow on desktop */
  .hamburger-btn {
    display: flex;
  }

  /* Sidebar: fixed, slides in from left */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    min-width: unset;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow-y: auto;
    padding-top: 16px;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.5);
  }

  /* Copyright stays pinned inside the drawer */
  .sidebar-copyright {
    position: sticky;
    bottom: 0;
    left: 0;
    padding: 16px;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border);
    margin-top: auto;
  }

  /* Main panel: full width, no left offset */
  .main {
    margin-left: 0;
  }

  /* Content padding */
  .content {
    padding: 24px 16px 56px;
  }

  /* Topbar: keep it compact */
  .topbar {
    padding: 0 12px 0 8px;
    gap: 4px;
  }

  /* On very small screens hide "Home /" — just show page name */
  .topbar-sep,
  .topbar-breadcrumb > a:first-child {
    display: none;
  }

  /* Case study hero */
  .cs-hero {
    max-height: 60vh;
  }
  .cs-hero-caption {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  /* Case study title */
  .cs-title {
    font-size: 22px;
    margin-top: 32px;
  }

  /* Metadata: single column */
  .cs-meta-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Hero heading */
  .hero-heading {
    font-size: 19px;
  }

  /* Body text slightly smaller on mobile */
  .cs-body p {
    font-size: 14px;
  }
  .cs-body h2 {
    font-size: 18px;
    margin-top: 32px;
  }

  /* Experience rows: year wraps to next line on very small screens */
  .experience-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .company-year {
    margin-left: auto;
  }

  /* Media grid: single column so nothing is squeezed */
  .media-grid,
  .media-grid.cols-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .lightbox {
    padding: 48px 16px 24px;
  }
  .lightbox img,
  .lightbox video {
    max-height: calc(100vh - 160px);
  }

  /* Facts row: single column on phones */
  .about-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    margin-top: 40px;
  }

  /* Next steps */
  .next-steps-title {
    font-size: 17px;
  }
  .next-step-title {
    font-size: 16px;
  }

  /* Announcement banner: smaller text */
  .announcement-banner {
    font-size: 12px;
  }
}

/* ── Small phone (≤ 400px) ──────────────────────────────────── */
@media (max-width: 400px) {
  .content {
    padding: 20px 14px 48px;
  }
  .hero-heading {
    font-size: 17px;
  }
  .cs-title {
    font-size: 20px;
  }
  /* Keep copy link text — fits fine at this width with breadcrumb hidden */
}
