/* =========================================================
   Sim Purba — Portfolio Styles (clean, consolidated)
   ========================================================= */

/* ---------- Theme Variables ---------- */
:root{
  --bg:#f6f7fb; --text:#0b1220; --muted:#475569; --border:rgba(15,23,42,.08);
  --accent-start:#60a5fa; --accent-end:#a78bfa; --accent-plain:#6366f1;
  --glass-bg:rgba(255,255,255,.6); --glass-border:rgba(255,255,255,.35);
  --glass-shadow:0 8px 24px rgba(15,23,42,.12);
  --radius:16px; --maxw:1120px;

  /* sticky header offset set by JS (fallback below) */
  --sticky-offset: 80px;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box }
html,body{ margin:0; padding:0 }

/* Native smooth scrolling; JS handles precise offset */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){ html { scroll-behavior: auto; } }

/* Any anchor target should stop below the sticky header */
[id]{ scroll-margin-top: calc(var(--sticky-offset) + 8px); }

body{
  font-family:'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, Inter, sans-serif;
  color:var(--text); line-height:1.6;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,.08), transparent 60%),
    radial-gradient(900px 500px at 90% 0%,   rgba(96,165,250,.08), transparent 60%),
    var(--bg);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
img{ max-width:100%; height:auto; border-radius:14px }
a{ color:var(--accent-plain); text-decoration:none; font-weight:700 }
a:hover{ text-decoration:underline }
a:focus-visible{ outline:2px dashed var(--accent-plain); outline-offset:4px }
h1,h2,h3{ margin:0; color:var(--text) }
p{ margin:0 0 1rem; color:var(--muted) }
.container{ width:min(var(--maxw), 92vw); margin:0 auto; padding:0 20px }
.section{ padding:clamp(40px,6vw,80px) 0 }
.skip{ position:absolute; left:-9999px; top:auto }
.skip:focus{ left:10px; top:10px; background:#fff; padding:8px 12px; border-radius:10px; z-index:999; border:1px solid var(--border) }

/* ---------- Nav ---------- */
.nav.nav--glass{
  background:rgba(255,255,255,.55);
  backdrop-filter:saturate(160%) blur(12px);
  -webkit-backdrop-filter:saturate(160%) blur(12px);
  border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:80;
}
.nav.nav--glass::after{
  content:""; position:absolute; inset:auto 0 0 0; height:1px;
  background:linear-gradient(90deg,var(--accent-start),var(--accent-end)); opacity:.35;
}
.nav-inner{ display:flex; align-items:center; justify-content:space-between; padding:12px 20px }

.brand--sig{ display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none }
.brand__logo{
  display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; border-radius:10px; color:#fff; font-weight:900; font-size:.9rem; letter-spacing:.02em;
  background:linear-gradient(135deg,var(--accent-start),var(--accent-end));
  box-shadow:0 6px 18px rgba(99,102,241,.35);
}
.brand__name{ font-weight:800 }

.links{ display:flex; gap:22px; align-items:center }
.links a{
  position:relative; color:var(--text); text-decoration:none; font-weight:700; opacity:.9; padding:6px 0;
}
.links a:hover{ opacity:1 }
.links a::after{
  content:""; position:absolute; left:0; bottom:-4px; height:2px; width:0%;
  background:linear-gradient(90deg,var(--accent-start),var(--accent-end));
  transition:width .28s ease; border-radius:2px;
}
.links a:hover::after{ width:100% }
.links a[aria-current="page"]{ opacity:1 }
.links a[aria-current="page"]::after{ width:100% }

/* Mobile menu */
.nav-toggle{ display:none; background:none; border:0; padding:8px; margin-left:8px }
.nav-toggle__bar{ display:block; width:22px; height:2px; background:var(--text); position:relative; border-radius:2px }
.nav-toggle__bar::before, .nav-toggle__bar::after{
  content:""; position:absolute; left:0; width:22px; height:2px; background:var(--text); border-radius:2px
}
.nav-toggle__bar::before{ top:-6px } .nav-toggle__bar::after{ top:6px }

.nav-menu{
  display:flex; flex-direction:column; gap:8px; padding:10px 20px 16px;
  background:rgba(255,255,255,.65);
  backdrop-filter:saturate(160%) blur(12px); -webkit-backdrop-filter:saturate(160%) blur(12px);
  border-bottom:1px solid var(--border); z-index:70;
}
.nav-menu[hidden]{ display:none !important; }
.nav-menu a{ color:var(--text); text-decoration:none; font-weight:700; padding:8px 0 }

@media (max-width:760px){
  .links{ display:none }
  .nav-toggle{ display:inline-block }
}

/* ---------- Hero ---------- */
.hero{
  position:relative; overflow:hidden; color:#fff;
  padding:clamp(40px,6vw,84px) 0 44px;
  background:
    radial-gradient(1200px 600px at 80% -10%, hsl(220 15% 20% / .35), transparent),
    linear-gradient(to bottom, hsl(220 15% 10%), hsl(220 15% 8%));
  border-bottom:1px solid hsl(220 10% 20% / .4);
}
.hero__inner{ display:grid; grid-template-columns:1.1fr .9fr; gap:clamp(16px,3vw,32px); align-items:center }
@media (max-width:880px){ .hero__inner{ grid-template-columns:1fr } }

.eyebrow{ letter-spacing:.12em; text-transform:uppercase; font-size:.8rem; opacity:.8; margin:0 0 12px; color:#859dfc; font-weight:800 }
.hero__title{ font-size:clamp(28px,3.6vw,46px); line-height:1.18; margin:0 0 12px; color:#fff }
.accent{ background:linear-gradient(90deg,#b3e5ff,#e3ccff); -webkit-background-clip:text; background-clip:text; color:transparent }
.hero__sub{ color:hsl(220 15% 88%); max-width:56ch; margin:0 0 14px; line-height:1.55 }
.hero__badges{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 16px; padding:0; list-style:none }
.hero__badges li{
  border:1px solid hsl(220 10% 30%); background:hsl(220 15% 12% / .6);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  padding:5px 9px; border-radius:999px; font-size:.82rem; color:#e5e7eb; opacity:.95; line-height:1.4;
}

/* CTAs */
.hero__cta{ display:flex; gap:14px }
.btn{
  display:inline-flex; align-items:center; justify-content:center; height:48px; padding:0 22px;
  border-radius:12px; border:1px solid transparent; color:#fff; font-weight:700; letter-spacing:.01em;
}
.btn--primary{
  background:linear-gradient(135deg,var(--accent-start),var(--accent-end));
  box-shadow:0 6px 20px rgba(99,102,241,.35);
  transition:transform .15s ease, box-shadow .15s ease, background-position .4s ease;
  background-size:200% 200%;
}
.btn--primary:hover{ transform:translateY(-2px); box-shadow:0 8px 28px rgba(99,102,241,.45); background-position:100% 0% }
.btn--ghost{ background:transparent; border:2px solid rgba(255,255,255,.4); transition:background-color .25s ease, border-color .25s ease }
.btn--ghost:hover{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.7) }

/* Right tiles */
.hero__right{ display:grid; gap:14px; align-content:start; perspective:1000px }
.tile{
  --rx:0deg; --ry:0deg; --tz:0px;
  border:1px solid hsl(220 10% 30%);
  background:linear-gradient(180deg, hsl(220 15% 14% / .55), hsl(220 15% 12% / .55));
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  border-radius:14px; overflow:hidden; box-shadow:0 10px 40px hsl(220 50% 5% / .45);
  transform:translateZ(var(--tz)) rotateX(var(--rx)) rotateY(var(--ry));
  transition:transform 160ms ease, box-shadow 160ms ease; will-change:transform;
  animation:floaty 7s ease-in-out infinite;
}
.tile:nth-child(2){ animation-delay:.6s } .tile:nth-child(3){ animation-delay:1.2s }
@keyframes floaty{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.tile:hover{ --tz:2px; box-shadow:0 14px 40px hsl(220 50% 5% / .55) }
.tile__img{
  height:128px;
  background:
    radial-gradient(400px 160px at 70% -40%, #7ad1ff55, transparent),
    linear-gradient(135deg,#2a2f3a,#1b1f27);
  transition:transform 400ms ease; will-change:transform;
}
.tile__img--alt{
  background:
    radial-gradient(400px 160px at -20% 0%, #c8a6ff55, transparent),
    linear-gradient(135deg,#2a2f3a,#1b1f27);
}
.tile__img--alt2{
  background:
    radial-gradient(400px 160px at 120% 20%, #9bf6c855, transparent),
    linear-gradient(135deg,#2a2f3a,#1b1f27);
}
.tile:hover .tile__img{ transform:scale(1.06) }
.tile::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(600px 240px at 20% -20%, rgba(255,255,255,.08), transparent 60%);
  transform:translateZ(1px); transition:opacity 160ms ease; opacity:.7;
}
.tile:hover::after{ opacity:.95 }
.tile__meta{ padding:12px 13px 13px; line-height:1.4 }
.tile .tag{
  display:inline-block; font-size:.72rem; opacity:.85; color:#e5e7eb;
  border:1px solid hsl(220 10% 30%); padding:3px 8px; border-radius:999px; margin-bottom:6px;
}
.tile__title{ font-weight:700; margin:0 0 4px; font-size:.98rem; color:#fff }
.tile__blurb{ opacity:.9; font-size:.92rem; margin:0; color:#dbeafe }

/* ---------- Profile Info Strip ---------- */
.profile-info{
  padding:20px 0; background:rgba(255,255,255,.4);
  backdrop-filter:saturate(160%) blur(8px); -webkit-backdrop-filter:saturate(160%) blur(8px);
  border-bottom:1px solid var(--border);
}
.profile-info__inner{ display:flex; flex-wrap:wrap; gap:18px 32px; align-items:center }
.info-item{ display:inline-flex; align-items:center; gap:8px; font-size:.95rem; color:var(--muted) }
.info-icon{ font-size:1.1rem; opacity:.85 }
.info-item strong{ color:var(--text); font-weight:700 }
@media (max-width:600px){ .profile-info__inner{ gap:12px 20px } }

/* ---------- Tools & Skills Reel (CSS-only) ---------- */
.tools{
  padding:28px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); overflow:hidden;
  background:rgba(255,255,255,.4);
  -webkit-mask-image:linear-gradient(90deg, transparent 0, rgba(0,0,0,.9) 8%, rgba(0,0,0,.9) 92%, transparent 100%);
          mask-image:linear-gradient(90deg, transparent 0, rgba(0,0,0,.9) 8%, rgba(0,0,0,.9) 92%, transparent 100%);
}
.tools-marquee{ overflow:hidden; width:100% }
.tools-track{
  display:inline-flex; align-items:center; gap:84px;
  white-space:nowrap;
  animation:tools-scroll 45s linear infinite;
}
.tools-track img{
  height:40px; width:40px; object-fit:contain; display:block;
  opacity:.85; transition:opacity .3s ease, transform .2s ease;
}
.tools-track img:hover{ opacity:1; transform:translateY(-2px) }
@keyframes tools-scroll{
  from{ transform:translateX(0) }
  to{   transform:translateX(-50%) }
}

/* ---------- Featured Work ---------- */
.grid{ display:grid; gap:18px }
.cards{ grid-template-columns:repeat(auto-fit, minmax(280px,1fr)) }
.card{
  background:var(--glass-bg);
  backdrop-filter:saturate(160%) blur(10px); -webkit-backdrop-filter:saturate(160%) blur(10px);
  border:1px solid var(--glass-border); box-shadow:var(--glass-shadow);
  border-radius:var(--radius); padding:16px; transition:transform .15s ease, box-shadow .15s ease;
}
.card:hover{ transform:translateY(-2px); box-shadow:0 12px 28px rgba(15,23,42,.16) }
.kicker{
  font-size:13px; font-weight:800; letter-spacing:.04em; text-transform:uppercase;
  background:linear-gradient(135deg,var(--accent-start),var(--accent-end));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.card h3{ margin:6px 0 8px; font-size:20px; color:var(--text) }
.tags{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px }
.tag{ font-size:12px; padding:6px 10px; border-radius:999px; background:rgba(255,255,255,.7); border:1px solid var(--border); color:var(--text); font-weight:600 }
.card .more{ display:inline-block; margin-top:10px }

/* ---------- Bread & Butter ---------- */
.section-sub{ color:var(--muted); margin:6px 0 18px; max-width:720px }
.bread{ position:relative; border-top:1px solid var(--border); border-bottom:1px solid var(--border) }

.bread__grid{
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:20px;
}
@media (max-width: 720px){ .bread__grid{ grid-template-columns: 1fr } }

.bread__card{
  display:flex; flex-direction:column; gap:8px;
  background:var(--glass-bg);
  backdrop-filter:saturate(160%) blur(10px); -webkit-backdrop-filter:saturate(160%) blur(10px);
  border:1px solid var(--glass-border);
  box-shadow:var(--glass-shadow);
  padding:18px; border-radius:var(--radius);
  transition:transform .15s ease, box-shadow .15s ease;
}
.bread__card:hover{ transform:translateY(-3px); box-shadow:0 14px 32px rgba(15,23,42,.18) }

.bread__icon{
  width:42px; height:42px; display:grid; place-items:center; border-radius:12px; font-size:20px; line-height:1;
  background:linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color:#fff; box-shadow:0 10px 26px rgba(99,102,241,.30);
}

.bread__tags{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px }
.pill{
  border:0; background:linear-gradient(135deg,rgba(96,165,250,.15),rgba(167,139,250,.15));
  color:var(--text); font-weight:600; padding:4px 12px; border-radius:999px; font-size:13px;
}
.pill:hover{
  background:linear-gradient(135deg,var(--accent-start),var(--accent-end));
  color:#fff; box-shadow:0 6px 18px rgba(99,102,241,.25);
}

.bread__desc{ margin:6px 0 8px; color:var(--muted); font-size:14px; line-height:1.5 }

/* ---------- Tools 3-column ---------- */
.bread__tools{ padding:24px 0; margin-top:18px } /* no borders to avoid double divider */
.bread__tools h4{ margin:0 0 20px; font-size:20px; font-weight:800 }

.toolgrid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:32px }
@media (max-width: 820px){ .toolgrid{ grid-template-columns: repeat(2, 1fr); gap:24px } }
@media (max-width: 540px){ .toolgrid{ grid-template-columns: 1fr; gap:20px } }

.toolcol{
  text-align:center;
  background:var(--glass-bg);
  backdrop-filter:saturate(160%) blur(10px);
  -webkit-backdrop-filter:saturate(160%) blur(10px);
  border:1px solid var(--glass-border);
  border-radius:var(--radius);
  padding:24px 18px;
  box-shadow:var(--glass-shadow);
  transition:transform .15s ease, box-shadow .15s ease;
}
.toolcol:hover{ transform:translateY(-3px); box-shadow:0 12px 28px rgba(15,23,42,.16) }
.toolcol__icon{ height:48px; width:48px; margin:0 auto 10px }
.toolcol__icon img{ width:100%; height:100%; object-fit:contain; filter:invert(15%) sepia(10%) saturate(250%) hue-rotate(200deg) brightness(95%) }
.toolcol__title{ margin:0 0 6px; font-size:16px; font-weight:800 }
.toolcol__desc{ margin:0; color:var(--muted); font-size:14px; line-height:1.5 }

/* ---------- CTA & Footer ---------- */
.cta-box{
  background:linear-gradient(180deg, rgba(99,102,241,.08), rgba(96,165,250,.08));
  border-top:1px solid var(--border); border-bottom:1px solid var(--border);
}
.footer{ border-top:1px solid var(--border); padding:28px 0; color:var(--muted); text-align:center }
.footer a{ color:var(--text) }

/* ---------- Case Study Pages (kept) ---------- */
.cs-hero{
  padding:clamp(40px,6vw,72px) 0;
  background:
    radial-gradient(600px 300px at 10% -10%, rgba(167,139,250,.20), transparent 60%),
    radial-gradient(500px 260px at 90% 0%,  rgba(96,165,250,.18), transparent 60%),
    var(--bg);
  border-bottom:1px solid var(--border);
}
.cs-hero-inner{ display:grid; grid-template-columns:1fr; gap:16px }
.cs-hero h1{ font-size:clamp(28px,5vw,40px) }
.cs-sub{ color:var(--muted); max-width:720px }
.cs-meta{
  background:var(--glass-bg);
  backdrop-filter:saturate(160%) blur(10px); -webkit-backdrop-filter:saturate(160%) blur(10px);
  border:1px solid var(--glass-border); box-shadow:var(--glass-shadow);
  border-radius:12px; padding:16px; display:grid; gap:12px; grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
}
.meta-label{ font-size:12px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); font-weight:800 }
.meta-value{ font-weight:700 }
.cs-figure{ max-width:var(--maxw); margin:24px auto; padding:0 20px }
.cs-figure figcaption{ margin-top:8px; color:var(--muted); font-size:14px }
.cs-body{ display:grid; grid-template-columns:1fr; gap:28px; padding-bottom:72px }
.cs-aside{ display:grid; gap:12px; align-content:start }
.cs-stat{
  background:var(--glass-bg);
  backdrop-filter:saturate(160%) blur(10px); -webkit-backdrop-filter:saturate(160%) blur(10px);
  border:1px solid var(--glass-border); box-shadow:var(--glass-shadow);
  border-radius:12px; padding:14px;
}
.cs-stat-label{ color:var(--muted); font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase }
.cs-stat-value{
  font-size:20px; font-weight:900;
  background:linear-gradient(135deg,var(--accent-start),var(--accent-end));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.cs-content{ min-width:0 }
.cs-section{ margin:24px 0 }
.cs-section h2{ font-size:20px; margin-bottom:8px }
.cs-quote{
  margin:24px 0; padding:18px; background:var(--glass-bg);
  backdrop-filter:saturate(160%) blur(10px); -webkit-backdrop-filter:saturate(160%) blur(10px);
  border:1px solid var(--glass-border); box-shadow:var(--glass-shadow);
  border-radius:12px; font-weight:600;
}
.cs-quote-meta{ display:block; margin-top:6px; color:var(--muted); font-weight:600; font-size:14px }
.cs-nav{ display:flex; justify-content:space-between; align-items:center; margin-top:24px }
.cs-link{ font-weight:800 }

@media (min-width:960px){
  .cs-hero-inner{ grid-template-columns:2fr 1fr; align-items:start }
  .cs-body{ grid-template-columns:260px 1fr }
  .cs-aside{ position:sticky; top:96px }
}

/* ---------- Compact Hero Modifier ---------- */
.hero--compact{ padding:clamp(28px,5vw,64px) 0 32px }
.hero--compact .hero__title{ font-size:clamp(26px,3.2vw,40px) }
.hero--compact .hero__sub{ max-width:50ch }
.hero--compact .hero__inner{ gap:clamp(14px,2.5vw,24px) }
.hero--compact .tile__img{ height:112px }

/* ---------- Responsive tweaks ---------- */
@media (max-width:640px){
  .hero__badges{ display:none }
  .hero__right{ gap:10px }
  .tile__img{ height:96px }
  .tile:nth-child(3){ display:none }
  .hero__title{ line-height:1.25 }
  .hero__sub{ line-height:1.6 }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important }
}

/* ===== Hero background linework ===== */
.hero { position: relative }
.hero-flow{
  position:absolute; inset:0; pointer-events:none; z-index:0; opacity:.85;
}
.hero-flow__svg{ width:100%; height:100%; filter: drop-shadow(0 10px 24px rgba(147,197,253,.12)); }
.hf-line{ fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray: 220 820; animation: hf-move 14s linear infinite; }
.hf-line--2{ stroke-width:2.5; stroke-dasharray: 180 780; animation-duration: 16s; animation-delay: .4s; }
.hf-line--3{ stroke-width:1.5; opacity:.8; stroke-dasharray: 300 700; animation-duration: 18s; animation-delay: .8s; }
@keyframes hf-move{ from{ stroke-dashoffset: 0 } to{ stroke-dashoffset: -1040 } }

/* place hero content above the background */
.hero__inner{ position:relative; z-index:1 }

/* ===== Hero right: flat device + flashy UI ===== */
.hero .device-scene{
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 1;
}

/* Device: upright, no tilt */
.hero .device.compact{
  position: relative;
  width: clamp(200px, 24vw, 300px);
  height: calc(clamp(200px, 24vw, 300px) * 1.9);
  border-radius: 20px;
  background: hsl(220 15% 6%);
  box-shadow:
    0 16px 32px rgba(15,23,42,.28),
    inset 0 0 0 1px hsl(220 16% 18% / .7);
  animation: deviceFloat 7s ease-in-out infinite;
}
.hero .device-screen{
  position: absolute;
  left: 3%; right: 3%;
  top: 4%; bottom: 4%;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent-start) 0%, var(--accent-end) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.hero .device-notch{
  position: absolute; top: 2.5%; left: 50%; width: 48px; height: 6px;
  transform: translateX(-50%); border-radius: 4px; background: rgba(0,0,0,.75);
}

/* Floating UI */
.hero .ui-float{
  position: absolute;
  border-radius: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 28px rgba(15,23,42,.18), 0 0 20px rgba(99,102,241,.3);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform: translateZ(0) scale(1);
  will-change: transform, filter;
  animation: bob 6s ease-in-out infinite;
}
.hero .ui-left{ width: 240px; height: 120px; left: 0%; top: 18%; padding: 14px; }
.hero .ui-right-mid{ width: 160px; height: 110px; right: -8%; top: 36%; padding: 12px; display: flex; align-items: flex-end; justify-content: space-around; }
.hero .ui-right-bottom{ width: 240px; height: 120px; right: -4%; bottom: 8%; padding: 14px; }
.hero .ui-card .ui-row{ height: 10px; border-radius: 6px; background: rgba(15,23,42,.16); margin: 8px 0; }
.hero .ui-card .ui-row--short{ width: 60% }
.hero .ui-card .ui-row:not(.ui-row--short){ width: 86% }
.hero .ui-card .ui-row--accent{ height: 12px; width: 44%; background: linear-gradient(90deg, var(--accent-start), var(--accent-end)); box-shadow: 0 0 10px rgba(147,197,253,.5); }
.hero .ui-widget .bar{ width: 20px; border-radius: 6px 6px 0 0; background: rgba(15,23,42,.18); box-shadow: 0 0 8px rgba(147,197,253,.25); }
.hero .ui-widget .bar.b1{ height: 46px }
.hero .ui-widget .bar.b2{ height: 76px; background: linear-gradient(180deg, var(--accent-end), var(--accent-plain)); box-shadow: 0 0 12px rgba(167,139,250,.4); }
.hero .ui-widget .bar.b3{ height: 32px }

@keyframes deviceFloat{ 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-4px) } }
@keyframes bob{ 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-12px) } }

/* --- Mobile hero layout: hide right-side scene and center left --- */
@media (max-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding-block: 56px 24px;
  }
  .hero .device-scene,
  .hero .hero-right { display: none !important; }
  .hero__left { max-width: 680px; margin-inline: auto; text-align: center; }
  .hero__cta, .hero__badges { justify-content: center; }
}

/* ---------- Featured Work responsive sizing ---------- */
@media (max-width: 900px){
  .cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .card{ padding: 14px; border-radius: 14px; }
  .card h3{ font-size: 18px; }
  .tag{ font-size: 11px; padding: 5px 8px; }
}
@media (max-width: 600px){
  .cards{ grid-template-columns: 1fr; gap: 14px; }
  .card{ padding: 12px; border-radius: 12px; }
  .card h3{ font-size: 17px; }
  .card p{ font-size: .95rem; }
  .tag{ font-size: 11px; padding: 4px 8px; }
  .section{ padding: 36px 0; }
}

/* Project thumbnails: keep tidy aspect */
.project-thumb{ width:100%; height:auto; border-radius:12px; box-shadow:0 4px 16px rgba(0,0,0,0.08); margin-bottom:1rem; object-fit:cover; aspect-ratio:16/9; }

/* ===== Contact CTA (footer) refresh ===== */
.cta-inner{
  text-align:center;
  max-width: 960px;
  margin: 0 auto;
}

.cta-title{
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.35;
  font-weight: 800;
  margin: 0 auto 14px;
  color: var(--text);
}

.accent-text{
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.accent-text::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg,
    transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  transform: skewX(-20deg);
}

.accent-text:hover::after {
  animation: sheen 1.2s forwards;
}

@keyframes sheen {
  0%   { left: -100%; }
  100% { left: 120%; }
}

.cta-actions{
  display: inline-flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* Keep your existing gradient; just make sure spacing feels balanced */
.cta-box{
  padding: clamp(36px, 6vw, 72px) 0;
}

/* Tighter mobile rhythm */
@media (max-width: 600px){
  .cta-title{ line-height: 1.4; }
  .cta-actions{ gap: 10px; }
}

.btn--ghost {
  border: 2px solid var(--accent-plain);
  color: var(--accent-plain);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(6px);
  font-weight: 600;
  transition: all .25s ease;
}

.btn--ghost:hover {
  background: var(--accent-plain);
  color: #fff;
}

/* Hero secondary CTA: high-contrast on dark hero */
.hero .btn--ghost,
.hero .btn--ghost:visited {
  color: #e6e9f2;                    /* readable text */
  border: 2px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.10); /* subtle glass */
  backdrop-filter: blur(6px);
}
.hero .btn--ghost:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.18);
}

/* =========================================================
   Case Study Rail — clean timeline in the left gutter
   - No overlap with text
   - Connectors stop before each section divider
   - Hides on mobile
   ========================================================= */

.cs-rail{
  /* Where the rail sits (gutter). Tune the clamp if you want it tighter/looser. */
  --rail-x: clamp(14px, 6vw, 60px);
  --rail-color-a: rgba(96,165,250,.40);
  --rail-color-b: rgba(167,139,250,.40);
  --rail-node: 10px;      /* dot size */
  --rail-gap-top: 18px;   /* start of connector below dot */
  --rail-gap-bot: 18px;   /* end of connector above divider */
  position: relative;
}

/* Our slabs already exist. We’ll add the dot + connector with pseudo elements. */
.cs-rail .cs-slab{
  position: relative;
  padding: clamp(32px, 5vw, 60px) 0;   /* a touch more air */
  border-bottom: 1px solid var(--border);
}

/* The dot (node) that marks each section */
.cs-rail .cs-slab::before{
  content:"";
  position:absolute;
  top: var(--rail-gap-top);
  left: var(--rail-x);
  width: var(--rail-node);
  height: var(--rail-node);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  box-shadow: 0 4px 12px rgba(99,102,241,.28);
  transform: translateX(-50%);
}

/* The vertical connector that runs within the section ONLY
   (so it never crosses the slab’s bottom divider) */
.cs-rail .cs-slab::after{
  content:"";
  position:absolute;
  left: var(--rail-x);
  top: calc(var(--rail-gap-top) + var(--rail-node));
  bottom: var(--rail-gap-bot);
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--rail-color-a), var(--rail-color-b));
  opacity: .55;
}

/* Don’t draw the connector on the last slab */
.cs-rail .cs-slab:last-of-type::after{ display:none }

/* Make sure left column text never collides with the rail by adding soft padding */
.cs-rail .cs-left{
  padding-left: calc(var(--rail-x) + 16px);
}

/* Keep headings crisp and aligned */
.cs-rail .cs-left h2{
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 6px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Slightly wider gap between left/right columns for more breathing room */
.cs-rail .cs-slab__grid{
  gap: clamp(22px, 4.5vw, 40px);
}

/* Figures stay tidy */
.cs-rail .cs-figure img{ border-radius: 14px }

/* Mobile: hide the rail & let content breathe */
@media (max-width: 920px){
  .cs-rail{ --rail-x: 0 }                 /* not used, but keep defined */
  .cs-rail .cs-slab::before,
  .cs-rail .cs-slab::after{ display:none }
  .cs-rail .cs-left{ padding-left: 0 }
  .cs-rail .cs-slab__grid{ gap: 18px }
}

/* =========================================================
   North Star — Hero Mobile Improvements (scoped + non-breaking)
   ========================================================= */
@media (max-width: 960px){
  /* Swap order so the visual appears before the text on small screens */
  .cs-hero-inner > .hero-figure { order: 1; }
  .cs-hero-inner > :first-child { order: 2; }

  /* Center the mockup and tighten spacing */
  .hero-figure{
    justify-items: center;
    text-align: center;
    gap: 8px;
  }

  /* Keep the mockup from feeling huge on phones */
  .hero-figure .cs-figure img{
    max-width: 300px; /* adjust to taste: 260–320px */
  }

  /* Compact the hero padding */
  .cs-hero{
    padding-block: 32px 20px;
  }

  /* Compact stats and keep them single-column for readability */
.hero-stats{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 20px;  /* adjust to taste */
}
  .hero-stats .cs-stat{
    padding: 16px;
  }

  /* Option: hide the caption on very small screens for brevity */
  .hero-figure figcaption{
    display: none;
  }
}

/* Centering also helpful for small phones */
@media (max-width: 640px){
  .hero-figure .cs-figure img{ max-width: 280px; }
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, Inter, sans-serif;
  line-height: 1.6;
  word-spacing: 0.08em; /* try between 0.01em – 0.05em */
}

/* Project Facts (cs-meta) — subtle modern polish, no HTML changes */
.cs-meta{
  background: linear-gradient(135deg, rgba(96,165,250,.08), rgba(167,139,250,.08));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  gap: 14px;                            /* tidier rhythm */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cs-meta > div{
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(99,102,241,.14);  /* soft divider */
}
.cs-meta > div:last-child{ border-bottom: 0; }

.cs-meta .meta-label{
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
  display: block;
}

/* Softer, glassy project facts pills */
.cs-meta .meta-value{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  font-weight:700;
  font-size:.9rem;
  color:var(--text);
  background:var(--glass-bg);
  border:1px solid var(--glass-border);
  box-shadow:none;             /* remove heavy glow */
}

.cs-meta .meta-value + .meta-value{ margin-left:6px; } /* if multiple values inline */

/* Optional: hover adds just a hint of color */
.cs-meta .meta-value:hover{
  background:linear-gradient(135deg,rgba(96,165,250,.12),rgba(167,139,250,.12));
  border-color:rgba(96,165,250,.3);
}

/* Compact on small screens */
@media (max-width: 640px){
  .cs-meta{ padding: 16px; gap: 12px; }
  .cs-meta > div{ padding-bottom: 10px; }
}

/* === north-star-visual-utils:start === */
/* Reusable visual utilities for case studies */
.chip::before { content:"●"; font-size:10px; transform:translateY(-1px); opacity:.6; }
.cs-note { margin-top:10px; color: var(--muted, #9aa0a6); }

.defgrid { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px,1fr)); gap:10px 14px; margin-top:8px; }
.defgrid dt { font-weight:800; font-size:.9rem; color: var(--text, #e8eaed); }
.defgrid dd { margin:2px 0 0; color: var(--muted, #9aa0a6); }
.defgrid > div { padding:10px 12px; border:1px solid var(--border, rgba(255,255,255,.12)); border-radius:12px; background: rgba(0,0,0,.03); }

.stepper { list-style:none; counter-reset: s; display:grid; gap:12px; padding:0; }
.stepper li {
  position:relative; padding:12px 12px 12px 44px;
  border:1px solid var(--border, rgba(255,255,255,.12)); border-radius:14px; background: rgba(255,255,255,0.02);
}
.stepper li::before {
  counter-increment:s; content:counter(s);
  position:absolute; left:12px; top:12px;
  width:24px; height:24px; display:grid; place-items:center;
  border-radius:999px; font-weight:800; font-size:.9rem;
  background: linear-gradient(90deg, var(--accent-start, #a8e063), var(--accent-end, #56ab2f)); color:#000;
}
.stepper h4 { margin:0 0 4px; font-size:1rem; }
.stepper p { margin:0; color: var(--muted, #9aa0a6); }

@media (prefers-reduced-motion: no-preference){
  .stepper li::before { transition: transform .2s ease; }
  .stepper li:hover::before { transform: scale(1.06); }
}
/* === north-star-visual-utils:end === */

/* === north-star-visual-utils:start === */
/* Separation between left column and right content */
.cs-slab--separated .cs-slab__grid {
  column-gap: 32px;
  position: relative;
}
.cs-slab--separated .cs-slab__grid::before {
  content:"";
  position:absolute; top:0; bottom:0;
  left: min(42%, 420px);           /* places a subtle divider between columns */
  width:1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.18), transparent);
  pointer-events:none;
}
@media (max-width: 860px){
  .cs-slab--separated .cs-slab__grid::before { display:none; }
}

/* Three-up, tidy tiles */
.defgrid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 10px 14px; margin-top: 8px; }
.defgrid--three { grid-template-columns: repeat(3, minmax(220px,1fr)); }
@media (max-width: 960px){ .defgrid--three { grid-template-columns: repeat(2, minmax(200px,1fr)); } }
@media (max-width: 600px){ .defgrid--three { grid-template-columns: 1fr; } }

/* Accent cards */
/* Side-accent cards */
.defcard {
  position: relative;
  padding: 14px 16px 12px 18px;  /* a bit more left padding for the bar */
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface, #0b0c0f) 92%, #fff);
  border: 1px solid color-mix(in oklab, var(--border, rgba(255,255,255,.16)) 80%, #fff);
  box-shadow: 0 1px 0 rgba(0,0,0,.35) inset;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.defcard::before {
  content: "";
  position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--accent-start, #a8e063), var(--accent-end, #56ab2f));
  opacity: .8;  /* dial down if too loud */
}
.defcard:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 1px 0 rgba(0,0,0,.35) inset;
  border-color: color-mix(in oklab, var(--border, rgba(255,255,255,.16)) 60%, #fff);
}
.defcard dt { font-weight: 800; font-size: .95rem; margin: 0 0 4px; }
.defcard dd { margin: 0; color: var(--muted, #9aa0a6); }

/* Type styles inside tiles */
.defcard dt { font-weight: 800; font-size: .92rem; margin-bottom: 4px; }
.defcard dd { margin: 0; color: var(--muted, #9aa0a6); }
/* === north-star-visual-utils:end === */

/* ===== Slab System: rhythm, grid, rail ===== */
.cs-slab {
  --slab-pad-y: clamp(28px, 5vw, 56px);
  --slab-gap: clamp(18px, 4vw, 36px);
  padding: var(--slab-pad-y) 0;
  border-bottom: 1px solid var(--border);
}
.cs-slab__grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr; /* lock left rail width */
  gap: var(--slab-gap);
  align-items: start;
}
@media (max-width: 920px){
  .cs-slab__grid { grid-template-columns: 1fr; }
}

/* Accent rail: lighter + aligns with left column top/bottom */
.cs-slab::before{
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent-start) 25%, transparent), color-mix(in oklab, var(--accent-end) 25%, transparent));
  opacity: .28;
}

/* ===== Left column: labels, counters, line length ===== */
.cs-left{ position: relative; padding-left: max(0px, calc(min(8vw, 80px) - 6px)); }
.cs-left p{ max-width: 34ch; } /* tighter line length = faster scan */

.cs-left .eyebrow,
.cs-left .kicker{
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Section heading style */
.cs-left h2{
  font-size: 1.25rem;
  letter-spacing: .02em;
  margin: 0 0 8px;
  font-weight: 800;
  background: none;            /* remove gradient text */
  color: var(--text);          /* use solid text for legibility */
}

/* Optional: numbered sections for quick orientation */
:root{ counter-reset: cs-section; }
.cs-slab .cs-left h2::before{
  counter-increment: cs-section;
  content: counter(cs-section, decimal-leading-zero) " ";
  font-weight: 800;
  margin-right: .4rem;
  color: var(--accent-start);
}

/* ===== Card Kit: single source of truth ===== */
.card{
  --card-pad: 16px;
  --card-radius: 14px;
  --card-border: 1px solid var(--border);
  padding: var(--card-pad);
  border-radius: var(--card-radius);
  border: var(--card-border);
  background: color-mix(in oklab, var(--surface) 92%, white 8%);
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.card h3{ margin: 6px 0 6px; font-size: 1rem; line-height: 1.25; }
.card .kicker{ font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-bottom:4px; }

/* Variants */
.card--note{ background: color-mix(in oklab, var(--surface) 88%, white 12%); }
.card--emph{ border-color: color-mix(in oklab, var(--accent-start) 30%, var(--border)); background: color-mix(in oklab, var(--accent-start) 7%, var(--surface)); }
.card--stat{ text-align:left; }

/* Reuse Card Kit: stats, defgrid, chips */
.cs-stat,
.defcard{ composes: card; } /* if your build supports; otherwise apply .card class in HTML */
.cs-stat{ padding: 14px; }
.cs-stat-label{ font-size:.82rem; color:var(--muted); margin-bottom:4px; }
.cs-stat-value{ font-size:1.4rem; font-weight:800; letter-spacing:-0.01em; }

.defgrid{ display:grid; gap:12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.defcard dt{ font-weight:700; margin-bottom:4px; }
.defcard dd{ margin:0; color:var(--muted); }

/* Chips aligned to grid rhythm */
.cs-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  display:inline-block; padding:8px 10px; border-radius:999px;
  border:1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 92%, white 8%);
  line-height:1;
}

/* ===== Lists & steppers unified ===== */
.stepper{ counter-reset: step; list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.stepper li{
  position:relative; padding-left:34px;
  border-left:2px solid color-mix(in oklab, var(--accent-start) 30%, var(--border));
}
.stepper li::before{
  counter-increment: step; content: counter(step);
  position:absolute; left:-14px; top:0;
  width:24px; height:24px; border-radius:50%;
  display:grid; place-items:center; font-weight:700; font-size:.8rem;
  background: color-mix(in oklab, var(--accent-start) 20%, white);
  border:1px solid var(--border);
}

/* Timeline style for the Approach stepper (matches Key Findings) */
#approach .stepper{
  display: grid;
  gap: 24px;
  position: relative;
  counter-reset: step;
  padding-left: 40px;         /* room for rail + markers */
  list-style: none;
  margin: 0;
}

/* remove the old left border from li */
#approach .stepper li{
  position: relative;
  padding-left: 0;
  border-left: none;
}

/* gradient rail like Key Findings */
#approach .stepper::before{
  content: "";
  position: absolute;
  left: 14px;                 /* center of the number circles */
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--accent-start), var(--accent-end));
  opacity: .4;
  border-radius: 2px;
}

/* numbered markers with white ring */
#approach .stepper li::before{
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -40px;
  top: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: .85rem;
  background: var(--accent-start); color: white;
  box-shadow: 0 0 0 3px var(--bg);
}

/* Make each step a soft tile to match the next section */
#approach .stepper{
  display: grid;
  gap: 24px;
  position: relative;
  counter-reset: step;
  padding-left: 40px; /* space for rail + markers */
  list-style: none;
  margin: 0;
}

/* Gradient rail */
#approach .stepper::before{
  content: "";
  position: absolute;
  left: 14px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(var(--accent-start), var(--accent-end));
  opacity: .4;
  border-radius: 2px;
}

/* Tile look (mirrors .card tokens) */
#approach .stepper li{
  position: relative;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in oklab, var(--bg) 96%, white 4%);
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  /* kill any legacy border-left from earlier stepper style */
  border-left: 1px solid var(--border);
}

/* Number markers (centered on tile) */
#approach .stepper li::before{
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: .85rem;
  background: var(--accent-start); color: #fff;
  box-shadow: 0 0 0 3px var(--bg); /* white ring */
}

/* Tighten text rhythm inside the tile */
#approach .stepper li h4{ margin: 0 0 4px; }
#approach .stepper li p{ margin: 0; color: var(--muted); }

/* ===== Figures unified ===== */
.cs-figure{ margin: 0 0 12px; }
.cs-figure img{ border-radius: 14px; display:block; width:100%; }
.cs-figure + .cs-figure{ margin-top: 12px; }
.cs-figure figcaption{
  margin-top:6px; font-size:.9rem; color:var(--muted);
}

/* ===== Results grid: consistent height & rhythm ===== */
.cs-results{ display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap:12px; }
.cs-results .cs-stat{ display:flex; flex-direction:column; justify-content:center; min-height:84px; }

/* ===== Section nav links: compact & consistent ===== */
.cs-toc{ list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.cs-toc a{ font-weight:700; text-decoration:none; color:var(--text); }
.cs-toc a:hover{ text-decoration:underline; }

/* Feature Highlights layout */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.feature-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-video {
  width: 100%;
  max-width: 280px;   /* phone-like width cap */
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  display: block;
  margin: 0 auto;     /* centers inside column */
  height: auto;       /* keeps proper aspect ratio */
}

/* Let them stretch slightly wider on big screens */
@media (min-width: 1200px) {
  .feature-video {
    max-width: 320px;
  }
}

/* On smaller screens, keep them comfortable */
@media (max-width: 600px) {
  .feature-video {
    max-width: 220px;
  }
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Case study hero screenshot */
.hero-screenshot {
  display: block;          /* ensures it respects margin auto */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 12px;

  width: 100%;
  max-width: 280px;        /* or 320px on larger screens */
}

@media (min-width: 1200px) {
  .hero-screenshot { max-width: 320px; }  /* desktop */
}

@media (max-width: 600px) {
  .hero-screenshot { max-width: 240px; }  /* small phones */
}

.screenshot-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 360px;
  margin: 0 auto;
}

/* Make the facts row stretch across both hero columns */
.cs-hero .cs-meta {
  grid-column: 1 / -1;
  margin-top: 12px; /* small breathing room under screenshot */
}

/* Case study hero intro paragraphs */
.cs-hero .cs-sub,
.cs-hero .cs-intro p {
  line-height: 1.8;   /* increase spacing */
}

/* Compact meta row inside case study hero */
.cs-meta--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  background: transparent;   /* remove card background */
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 16px;
}

.cs-meta--compact > div {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.cs-meta--compact .meta-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 2px;
}

.cs-meta--compact .meta-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* Compact meta row inside case study hero */
.cs-meta--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 28px;
  padding-top: 0px;
}

/* Add space above facts row only on larger screens */
@media (min-width: 960px) {
  .cs-meta--compact {
    padding-top: 28px;
  }
}

.cs-meta--compact > div {
  display: flex;
  flex-direction: column;
  min-width: 120px;
  border: 0;          /* ✅ remove bottom borders */
  box-shadow: none;   /* ✅ remove glassy shadows */
}

.cs-meta--compact .meta-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 2px;
}

.cs-meta--compact .meta-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* 🔹 Responsive stacking for mobile */
@media (max-width: 640px) {
  .cs-meta--compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
  }
  .cs-meta--compact > div {
    min-width: unset; /* allow natural sizing */
  }
}

/* Ensure space between Featured Work heading and tiles */
#work h2 {
  display: block;
  margin-bottom: 28px !important;  /* tweak the px to your taste */
}

/* Ensure space between "Tools I Rely On" heading and its grid */
.bread__tools h2 {
  display: block;
  margin-bottom: 28px !important;  /* adjust 24–32px for your taste */
}

/* Tighten space between Featured Work tiles and My Skills on mobile */
@media (max-width: 640px) {
  #work.section {
    padding-bottom: 24px !important;   /* was 36–64px from .section */
  }
  #skills.section {
    padding-top: 20px !important;      /* shave some off the top */
  }
}

/* Tighten space between "My Skills" grid and "Tools I Rely On" heading on mobile */
@media (max-width: 640px) {
  #skills.section {
    padding-bottom: 24px !important;   /* less space after the skills tiles */
  }
  .bread__tools {
    padding-top: 20px !important;      /* less space before the Tools heading */
  }
}

/* Tighter vertical spacing between sections on desktop only */
@media (min-width: 768px) {
  .section {
    padding-top: 40px !important;     /* was up to 64px */
    padding-bottom: 40px !important;  /* adjust to taste */
  }

  /* Optional: tighten headings vs. content */
  .section > .container > h2 {
    margin-bottom: 20px !important;   /* default 28px if you want more */
  }
}