/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg:           #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary:  #fafafa;
  --border:       #e8e8ed;
  --border-light: #f0f0f2;
  --text-primary: #1d1d1f;
  --text-secondary:#6e6e73;
  --text-tertiary: #aeaeb2;
  --accent:        #1d1d1f;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-pill:  100px;
  --nav-h:        60px;
  --max-w:        1080px;
  --pad-x:        40px;
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

/* Dark mode */
.dark {
  --bg:           #1d1d1f;
  --bg-secondary: #2d2d2f;
  --bg-tertiary:  #3a3a3c;
  --border:       #424245;
  --border-light: #48484a;
  --text-primary: #f5f5f7;
  --text-secondary:#d1d1d5;
  --text-tertiary: #86868b;
  --accent:        #f5f5f7;
}

.dark #navbar {
  background: rgba(29,29,31,0.82);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), filter 0.4s cubic-bezier(0.4,0,0.2,1); }
img:hover, video:hover { transform: scale(1.05); filter: brightness(1.05); }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
hr { border: none; border-top: 0.5px solid var(--border-light); }

/* ─── Layout helpers ─────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); }
.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.section-intro {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ─── Navbar ─────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border-light);
  z-index: 100;
  transition: background var(--transition);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cv {
  font-size: 13px;
  color: var(--text-primary);
  border: 0.5px solid var(--border);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  transition: background var(--transition), border-color var(--transition);
}
.nav-cv:hover { background: var(--bg-secondary); border-color: #c7c7cc; }
.dark .nav-cv {
  border-color: var(--border);
  color: var(--text-primary);
}
.dark .nav-cv:hover { background: var(--bg-secondary); border-color: var(--border-light); }
.nav-theme-toggle {
  font-size: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  margin-left: 8px;
}
.nav-theme-toggle:hover { background: var(--bg-secondary); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ─── Hero ───────────────────────────────────────────────────── */
#hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  display: flex;
  align-items: center;
}
.hero-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x); width: 100%; }
.hero-label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}
.hero-name {
  font-size: clamp(60px, 10vw, 108px);
  font-weight: 500;
  letter-spacing: -4px;
  line-height: 0.95;
  color: var(--text-primary);
  margin-bottom: 28px;
}
.hero-location {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-location { flex-wrap: wrap; gap: 8px; }
.hero-location .dot { color: var(--text-tertiary); }
.hero-quote {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.4;
  max-width: 640px;
  margin-bottom: 20px;
  font-style: italic;
  letter-spacing: -0.5px;
}
.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
  margin: 20px 0 32px;
}
.hero-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.hero-badges {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  min-height: 40px;
  min-width: 0;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}
.hero-cta:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}
.dark .hero-cta {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.badge {
  font-size: 12px;
  padding: 10px 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 0.5px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg);
  white-space: nowrap;
}
.hero-badges {
  margin-top: 0;
}
.badge.open {
  border-color: #86efac;
  color: #166534;
  background: #f7fef9;
}
.dark .badge.open {
  border-color: #4ade80;
  color: #4ade80;
  background: #0f1a0f;
}
@media (max-width: 900px) {
  .hero-row {
    width: 100%;
    flex-direction: column;
  }
  .hero-cta {
    width: 100%;
  }
  .hero-badges {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ─── Section wrapper ────────────────────────────────────────── */
.section {
  padding: 64px 0;
}

/* ─── Work preview (2×2 grid) ────────────────────────────────── */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.preview-card {
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.preview-card:hover {
  border-color: #c7c7cc;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
}
.preview-thumb {
  height: 160px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 0.5px solid var(--border);
  overflow: hidden;
  position: relative;
}
.preview-thumb-placeholder {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 16px;
  line-height: 1.5;
}
/* colour accent per card */
.preview-card:nth-child(1) .preview-thumb { background: #f0ede8; }
.preview-card:nth-child(2) .preview-thumb { background: #edf0ea; }
.preview-card:nth-child(3) .preview-thumb { background: #eaedf5; }
.preview-card:nth-child(4) .preview-thumb { background: #f5eaed; }
.preview-body { padding: 16px 18px 18px; }
.preview-name { font-size: 16px; font-weight: 500; color: var(--text-primary); margin-bottom: 5px; }
.preview-desc { font-size: 13px; color: var(--text-tertiary); line-height: 1.5; margin-bottom: 12px; }
.preview-cta {
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition), gap var(--transition);
}
.preview-card:hover .preview-cta { color: var(--text-primary); gap: 6px; }

/* ─── Case studies ───────────────────────────────────────────── */
.cases-stack { display: flex; flex-direction: column; gap: 64px; }
.case {
  border: 0.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.case-hero {
  height: 400px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.case-hero-placeholder {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.6;
}
/* per-case hero colours */
#case-sensi .case-hero    { background: linear-gradient(135deg, #e8e0d5 0%, #d4c9b8 100%); }
#case-piastro .case-hero  { background: linear-gradient(135deg, #e2e8da 0%, #c8d4be 100%); }
#case-bsk .case-hero      { background: linear-gradient(135deg, #dde0ec 0%, #c4c9dd 100%); }
#case-bagano .case-hero   { background: #fbfaf9; }
#case-bagano .case-hero { height: auto; aspect-ratio: 1280 / 716; }
#case-bagano .case-hero video {
  object-fit: contain;
  position: relative;
  flex: 0 0 auto;
  top: -3px; left: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
}

.case-body { padding: 32px 36px 36px; }
.case-header { margin-bottom: 24px; padding: 0 16px; }
.case-title { font-size: 27px; font-weight: 500; color: var(--text-primary); letter-spacing: -0.7px; margin-bottom: 7px; }
.case-meta { font-size: 13px; color: var(--text-tertiary); line-height: 1.5; }
.case-section {
  margin-bottom: 28px;
  padding: 0 16px;
}
.case-section:has(.case-stats) {
  padding: 0;
}
.case-section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}
.case-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.case-list {
  list-style: none;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-list li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}
.case-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
}

/* image mosaic */
.case-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.case-img-block {
  width: 100%;
  height: 256px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
}
.case-img-block img,
.case-img-block video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#case-sensi  .case-img-block { background: #f2ede6; }
#case-piastro .case-img-block { background: #edf2e6; }
#case-bsk    .case-img-block { background: #e8eaf5; }
#case-bagano .case-img-block { background: #f7f3ef; }
#case-bagano .case-img-block img { object-position: top left; }
#case-bagano .case-img-block.contain img { object-fit: contain; object-position: top center; }

/* two-part case (Bagano: platform + brand) */
.case-part-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 0 16px;
  margin-bottom: 20px;
}
.case-part-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: rgba(166,58,70,0.10);
  color: #a63a46;
  white-space: nowrap;
}
.case-part-badge.neutral {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 500;
}
.dark .case-part-badge { background: rgba(224,122,132,0.16); color: #e9a3ab; }
.case-part-meta { font-size: 13px; color: var(--text-tertiary); line-height: 1.5; }
.case-part-lead .case-part-badge { font-size: 12px; padding: 8px 15px; }
.case-part-divider {
  border-top: 0.5px solid var(--border-light);
  margin: 44px 16px;
}

/* Hub mosaic: every screen shown whole, never cropped.
   Each block carries its media's aspect ratio in --ar and grows
   proportionally to it, so blocks in a row share the same height. */
.hub-grid { display: flex; gap: 8px; margin-bottom: 8px; }
.hub-col-left  { flex: 0 0 28.2%; display: flex; }
.hub-col-right { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hub-row { display: flex; gap: 8px; }
.hub-col-left .case-img-block { width: 100%; }
.hub-row .case-img-block { flex: var(--ar) 1 0%; min-width: 0; }
.hub-grid .case-img-block {
  height: auto;
  aspect-ratio: var(--ar);
  background: #fbfaf9;
}
/* The recordings/captures carry the app window's own rounded dark edge.
   Blow the media up by 3px on every side and let the block clip it,
   so that frame lands outside the visible area. */
.hub-grid .case-img-block img,
.hub-grid .case-img-block video {
  object-fit: contain;
  object-position: center;
  top: -3px; left: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
}
.case-stats.stats-5 { grid-template-columns: repeat(5, 1fr); }
.case-stats.stats-5 .stat-value { font-size: 18px; }

/* stats row */
.case-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
}
.stat-value {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}
.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.4;
  font-weight: 400;
}
.case-shift {
  font-size: 19px;
  line-height: 1.4;
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 20px;
  padding-top: 20px;
  padding-left: 16px;
  padding-right: 16px;
  border-top: 0.5px solid var(--border-light);
}

/* ─── Design decisions ───────────────────────────────────────── */
.case-decisions { margin-top: 28px; padding-top: 24px; border-top: 0.5px solid var(--border-light); }
.decisions-label { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 16px; }
.decisions-list { display: flex; flex-direction: column; gap: 12px; }
.decision {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.decision-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  min-width: 18px;
  margin-top: 1px;
}
.decision-text { font-size: 16px; color: var(--text-secondary); line-height: 1.6; }
.decision-text strong { color: var(--text-primary); font-weight: 500; }

/* ─── More work ──────────────────────────────────────────────── */
.more-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
#more {
  width: 80vw;
  margin: 0 auto;
  padding: 60px 20px;
}
#more .container {
  max-width: none;
  padding: 0;
}
.more-card {
  aspect-ratio: 800 / 450;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.more-card:hover { border-color: #c7c7cc; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.06); }
.more-card-label { font-size: 13px; color: var(--text-tertiary); text-align: center; line-height: 1.5; padding: 0 12px; }

.more-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.32) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  opacity: 0;
  transition: opacity 0.32s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  border-radius: var(--radius-md);
}
.more-card:hover .more-card-overlay { opacity: 1; }
.more-card-overlay-title {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.35px;
  margin-bottom: 5px;
  line-height: 1.25;
}
.more-card-overlay-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.68);
  line-height: 1.45;
  font-weight: 400;
}
.more-card:nth-child(1) { background: #f0ede8; }
.more-card:nth-child(2) { background: #eaf0e8; }
.more-card:nth-child(3) { background: #eaeaf0; }
.more-card:nth-child(4) { background: #f0eae8; }
.more-card:nth-child(5) { background: #eef0ea; }
.more-card:nth-child(6) { background: #eae8f0; }

/* ─── Contact ────────────────────────────────────────────────── */
.cv-bar {
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  background: var(--bg-secondary);
}
.cv-info {}
.cv-title { font-size: 17px; font-weight: 500; color: var(--text-primary); margin-bottom: 3px; }
.cv-sub { font-size: 13px; color: var(--text-tertiary); }
.cv-btn {
  font-size: 14px;
  font-weight: 500;
  background: var(--text-primary);
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  transition: background var(--transition), transform var(--transition);
}
.cv-btn:hover { background: #333; transform: translateY(-1px); }
.dark .cv-btn {
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.dark .cv-btn:hover { background: var(--bg-secondary); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.contact-card {
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.contact-card:hover { border-color: #c7c7cc; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
.contact-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.contact-label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 3px; }
.contact-value { font-size: 15px; font-weight: 500; color: var(--text-primary); }

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  padding: 28px var(--pad-x);
  border-top: 0.5px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-name { font-size: 13px; color: var(--text-tertiary); }
.footer-copy { font-size: 13px; color: var(--text-tertiary); }

/* ─── Let's work together ────────────────────────────────────── */
.work-together {
  margin-top: 48px;
  text-align: center;
}
.work-together-title {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.work-together-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.cv-bar { margin-top: 52px; }
.work-together-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color var(--transition), color var(--transition);
}
.work-together-link:hover { border-color: var(--text-primary); }

/* ─── Left scroll nav ────────────────────────────────────────── */
.scroll-nav {
  position: fixed;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  z-index: 90;
}
.scroll-nav-track {
  position: relative;
  display: flex;
  flex-direction: column;
}
/* vertical line */
.scroll-nav-track::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--border);
}
.scroll-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}
.scroll-nav-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
  position: relative;
  z-index: 1;
}
.scroll-nav-label {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-tertiary);
  white-space: nowrap;
  letter-spacing: 0.03em;
  transition: color 0.3s ease, font-size 0.3s ease, font-weight 0.3s ease, letter-spacing 0.3s ease;
  transform-origin: left center;
}
.scroll-nav-item.active .scroll-nav-dot {
  background: var(--text-primary);
  transform: scale(1.35);
}
.scroll-nav-item.active .scroll-nav-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
/* sub-items (cases) */
.scroll-nav-sub {
  padding: 4px 0 4px 14px;
}
.scroll-nav-sub .scroll-nav-dot {
  width: 4px; height: 4px;
  background: var(--border-light);
}
.scroll-nav-sub .scroll-nav-label {
  font-size: 9px;
  color: var(--border);
}
.scroll-nav-sub.active .scroll-nav-dot {
  background: var(--text-secondary);
  transform: scale(1.2);
}
.scroll-nav-sub.active .scroll-nav-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ─── Transitions / animations ───────────────────────────────── */
/* hidden only when JS runs, so content stays visible without it */
.js .fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --pad-x: 20px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(255,255,255,0.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 24px 20px;
    border-bottom: 0.5px solid var(--border-light);
    gap: 20px;
    z-index: 99;
  }
  .nav-links.open a { font-size: 16px; }
  .nav-toggle { display: flex; }
  .nav-cv { display: none; }
  .nav-theme-toggle { display: none; }
  .scroll-nav { display: none; }

  .preview-grid { grid-template-columns: 1fr; }
  .preview-thumb { height: 140px; }

  .case-hero { height: auto; aspect-ratio: 16 / 7; }
  .case-body { padding: 24px 20px 28px; }
  .case-imgs { grid-template-rows: 1fr 1fr; grid-template-columns: unset; grid-auto-flow: column; grid-auto-columns: calc(67vw - 27px); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .case-imgs::-webkit-scrollbar { display: none; }
  .case-img-block { width: calc(67vw - 27px); height: auto; aspect-ratio: 488 / 256; }
  .case-stats { grid-template-columns: 1fr 1fr; }
  .hub-grid { flex-direction: column; }
  .hub-col-left { flex: 1 1 auto; }
  .hub-row { flex-direction: column; }
  .hub-grid .case-img-block { width: 100%; flex: 1 1 auto; aspect-ratio: var(--ar); }
  .case-stats.stats-5 { grid-template-columns: 1fr 1fr; }
  .case-part-divider { margin: 32px 0; }

  .more-grid { grid-template-columns: repeat(2, 1fr); }
  #more { width: 100%; padding: 32px 0; }
  #more .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .contact-grid { grid-template-columns: 1fr; }

  .cv-bar { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 420px) {
  .hero-name { letter-spacing: -1.5px; }
}

/* ─── Modal/Lightbox ────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-content img,
.modal-content video {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}
.modal-caption {
  padding: 14px 20px 16px;
  border-top: 0.5px solid var(--border-light);
  background: var(--bg);
}
.modal-caption-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.modal-caption-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.45;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: rgba(0,0,0,0.7); }
.case-img-block img {
  cursor: pointer;
  transition: transform var(--transition);
}
.case-img-block img:hover { transform: scale(1.02); }

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 99px;
  transition: background 0.3s;
}
html.is-scrolling::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); }
.dark.is-scrolling::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); }
html { scrollbar-width: thin; scrollbar-color: transparent transparent; }
html.is-scrolling { scrollbar-color: rgba(0,0,0,0.18) transparent; }

/* ─── Language switch ──────────────────────────────────────── */
.nav-links a.nav-lang {
  font-size: 12px;
  letter-spacing: 0.4px;
  border: 0.5px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.nav-links a.nav-lang:hover { background: var(--bg-secondary); }
@media (max-width: 768px) {
  .nav-links.open a.nav-lang { align-self: flex-start; }
}

/* ─── Case pages ───────────────────────────────────────────── */
.case-permalink {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.case-permalink:hover { color: var(--text-primary); }
.case-page { padding-top: calc(var(--nav-h) + 48px); }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-secondary); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--text-primary); }
h1.case-title { font-size: 32px; letter-spacing: -0.9px; }
