/* ═══════════════════════════════════════════════════════════════
   designbydin · style.css
═══════════════════════════════════════════════════════════════ */

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

/* ─── TOKENS ─── */
:root {
  --bg:           #0e0e0d;
  --fg:           #e8e4dc;
  --fg-dim:       #919191;
  --fg-mid:       #9a9590;
  --border:       #222120;
  --border-lt:    #2e2c2a;

  --serif:        'EB Garamond', Georgia, serif;
  --mono:         'Geist Mono', 'Courier New', monospace;

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);

  --header-h:     5.5rem;
  --gap:          3.5rem;         /* gap between cards in track */

  /* Card dimensions — 3:2 ratio, all cards same size */
  --card-w:       1182px;         /* all cards uniform width (50% bigger than 788px for >1200px screens) */
  /* Heights derived from aspect-ratio in CSS, no hardcoded heights */
}

/* ─── BASE ─── */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  min-height: 100vh;
  overflow: hidden;   /* page-level scroll is off; track is the scroll surface */
  cursor: none;
}

/* Re-enable scroll on detail / about pages (toggled by JS) */
body.scrollable { overflow-y: auto; overflow-x: hidden; }

a        { color: inherit; cursor: none; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ─── SKIP LINK ─── */
.skip-link { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus {
  position: fixed; top: 1rem; left: 1rem; width: auto; height: auto;
  background: var(--fg); color: var(--bg); padding: .5rem 1rem; z-index: 9999;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .05em;
}

/* ─── SCROLL PROGRESS ─── */
.scroll-line {
  position: fixed; top: 0; left: 0; height: 1px; width: 0%;
  background: var(--fg-dim); z-index: 8999; pointer-events: none;
}

/* ─── CURSOR ─── */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9000;
  pointer-events: none; will-change: transform;
}
.cursor-dot {
  position: absolute; width: 6px; height: 6px;
  background: var(--fg); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .15s, height .15s, opacity .15s;
}
.cursor-ring {
  position: absolute; width: 34px; height: 34px;
  border: 1px solid rgba(232,228,220,.38); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease-out), height .35s var(--ease-out),
              border-color .3s, background .3s;
}
body.cursor-hover .cursor-dot  { width: 0; height: 0; opacity: 0; }
body.cursor-hover .cursor-ring { width: 60px; height: 60px; background: rgba(232,228,220,.05); border-color: rgba(232,228,220,.55); }
body.cursor-drag  .cursor-ring { width: 76px; height: 76px; border-color: rgba(232,228,220,.28); }
body.cursor-drag  .cursor-dot  { width: 3px; height: 3px; }

@media (hover: none) { .cursor { display: none; } body { cursor: auto; } a { cursor: pointer; } }

/* ─── HEADER ─── */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.8rem 2.5rem;
  background: linear-gradient(to bottom, rgba(14,14,13,.95) 0%, transparent 100%);
  transition: background .4s var(--ease-out), backdrop-filter .4s var(--ease-out), box-shadow .4s var(--ease-out);
}

/* Glass blur effect when scrolled (added by JS) */
#site-header.scrolled {
  background: rgba(14, 14, 13, 0.75);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  width: fit-content;
}
.logo-img { display: block; height: auto; }
.logo-img--full { width: 140px; display: block; }
.logo-img--mobile { width: 40px; display: none; }
.logo-tagline {
  display: inline-block;
  margin-top: .42rem;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  white-space: normal;
  max-width: min(56vw, 340px);
  line-height: 1.25;
}

@media (max-width: 900px) {
  .logo-img--full { display: none; }
  .logo-img--mobile { display: block; }
  .logo-tagline {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: .45rem;
    font-size: .76rem;
    letter-spacing: .04em;
    line-height: 1.3;
    max-width: none;
    white-space: nowrap !important;
  }
}

@media (max-width: 480px) {
  .logo-tagline {
    font-size: .63rem;
    letter-spacing: .03em;
    line-height: 1.2;
    max-width: none;
    white-space: nowrap !important;
  }
}

nav { display: flex; flex-direction: column; align-items: flex-end; gap: .25em; margin-left: auto; }
.nav-link { font-family: var(--mono); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); transition: color .2s; }
.nav-link:hover, .nav-link.active { color: var(--fg); }

/* ─── PAGE SYSTEM ─── */
.page         { display: none; opacity: 0; will-change: opacity; }
.page.active  { display: block; }
.page.visible { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   INDEX — FULL-VIEWPORT HORIZONTAL TRACK
   The track-outer fills the full viewport height (minus footer area).
   overflow is hidden; JS translates .projects-track on the X axis.
   Vertical scroll on the page body is disabled (overflow:hidden on body)
   and wheel/touchmove events are captured and converted to horizontal.
═══════════════════════════════════════════════════════════════ */
.projects-section {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-top: var(--header-h);
  background:
    radial-gradient(1200px 520px at 72% 18%, rgba(58, 58, 58, 0.34) 0%, rgba(25, 25, 25, 0.22) 38%, rgba(11, 11, 11, 0) 70%),
    linear-gradient(180deg, #0b0b0b 0%, #161616 62%, #242424 100%);
}

.projects-track-outer {
  flex: 1;
  overflow: hidden;
  position: relative;
  /* Edge fade — purely visual, doesn't affect hit-testing */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}

/* The scrolling strip — width: max-content so it's as wide as all cards */
.projects-track {
  display: flex;
  align-items: center;      /* vertically centre cards within track height */
  gap: var(--gap);
  height: 100%;
  padding: 0 calc(50vw - var(--card-w) / 2); /* initial padding so first card centres */
  width: max-content;
  will-change: transform;
  cursor: none;
  /* No CSS transition — JS handles lerp via rAF */
}

/* ── CARD WRAPPER ─────────────────────────────────────────────
   .project-card        — outer, sets width, provides the perspective
                          context for the 3D tilt on .card-tilt-inner
   .card-perspective    — the perspective stage (perspective here, not
                          on .card-tilt-inner, so the 3D field is stable)
   .card-tilt-inner     — the element that actually rotates (rotateX/Y).
                          NO overflow:hidden — that would clip the 3D.
                          Clipping done by a sibling clip-box instead.
   .card-clip           — invisible same-size box with overflow:hidden
                          that masks .card-tilt-inner visually via clip-path.
                          Actually: we avoid clip entirely and just let the
                          image/bg handle the visual containment naturally.
─────────────────────────────────────────────────────────────── */
.project-card {
  flex-shrink: 0;
  width: var(--card-w);
  opacity: 0;
  transform: translateY(20px);
  /* Perspective lives here so it encloses card-tilt-inner */
  perspective: 900px;
  perspective-origin: 50% 50%;
  cursor: none;
}

/* All cards now same size — no featured variant needed */

/* The actual rotating element */
.card-tilt-inner {
  width: 100%;
  aspect-ratio: 3 / 2;
  position: relative;
  transform-style: preserve-3d;
  border-radius: 4px;
  /* IMPORTANT: No overflow:hidden here — overflow:hidden kills preserve-3d
     in most browsers and clips the 3D effect. The image+overlay handle
     visual containment. We use border-radius on children instead. */
  will-change: transform;
  /* Subtle shadow that moves with the tilt, making depth feel real */
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.55));
  transition: filter .5s;
}
.project-card:hover .card-tilt-inner {
  filter: drop-shadow(0 32px 56px rgba(0,0,0,.7));
}

/* Image — fills card, rounded to match card visual boundary */
/* Image */
.card-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #1a1917;
  border-radius: 4px;
  overflow: hidden;

  transform: translateZ(0px);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
  transition: transform .7s var(--ease-out);
  will-change: transform;
}

.project-card:hover .card-img-wrap img {
  transform: scale(1.0);
}

/* Overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;

  transform: translateZ(10px);

  background: linear-gradient(
    to top,
    rgba(6,6,5,.92) 0%,
    rgba(6,6,5,.35) 48%,
    rgba(6,6,5,.04) 100%
  );
}

/* Noise */
.card-noise {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: 4px;

  transform: translateZ(12px);

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: .6;
}

/* Shine */
.card-shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: 4px;

  transform: translateZ(20px);

  opacity: 0;
  transition: opacity .2s;
}

.project-card:hover .card-shine {
  opacity: 1;
}

/* Content */
.card-content {
  position: absolute;
  inset: 0;
  z-index: 4;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  padding: 1.6rem 1.8rem;

  transform: translateZ(30px);
}


.card-category {
  display: block; font-family: var(--mono);
  font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(232,228,220,.75); margin-bottom: .6rem;
  transition: color .25s;
}
.project-card:hover .card-category { color: rgba(232,228,220,.8); }

.card-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -.02em; line-height: 1.05; color: var(--fg);
}


.card-meta { display: flex; gap: 1.2rem; margin-top: .7rem; }
.card-meta span {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(232,228,220,.75);
}



/* Track UI (progress bar + hint) */
.track-ui { padding: 1.2rem 2.5rem; }
.track-progress { height: 1px; background: var(--border); position: relative; }
.track-progress-bar {
  position: absolute; top: 0; left: 0; height: 100%; width: 0%;
  background: var(--fg-dim);
}
.track-hint {
  margin-top: .8rem; font-family: var(--mono);
  font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim);
}

/* ═══════════════════════════════════════════════════════════════
   PROJECT DETAIL (REFINED)
═══════════════════════════════════════════════════════════════ */
.project-detail-header {
  padding: 8rem 2.5rem 2rem;
  border-bottom: none;
}

.detail-category {
  display: block; font-family: var(--mono);
  font-size: .65rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg-dim); margin-bottom: 1.2rem;
}

.detail-title {
  font-family: var(--serif); font-size: clamp(3rem,8vw,6.5rem);
  font-weight: 400; letter-spacing: -.025em; line-height: .95; margin-bottom: 0;
}

/* Hero Image */
.cs-hero-img {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
  background: #191917; border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}
.cs-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* Overview Grid (Meta + Brief) */
.project-overview {
  display: grid; grid-template-columns: 1fr 2fr; gap: 4rem;
  padding: 0 2.5rem 5rem; border-bottom: 1px solid var(--border);
}

.overview-meta {
  display: flex; flex-direction: column; gap: 2rem;
  position: sticky; top: calc(var(--header-h) + 2rem); align-self: start;
}

.meta-item { display: flex; flex-direction: column; gap: .3em; }
.meta-label { font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); }
.meta-value { font-size: .95rem; color: var(--fg); }

.overview-brief { display: flex; flex-direction: column; gap: 1.5rem; }

.detail-brief-title {
  margin-top: 0; font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 400;
  letter-spacing: -0.01em; line-height: 1.1;
}

.detail-brief {
  font-size: 1.05rem; line-height: 1.75; color: var(--fg-mid);
  max-width: 65ch;
}

/* Case Study Body */
.case-study-body { display: flex; flex-direction: column; padding-top: 2rem; }

.cs-block {
  padding: 4rem 2.5rem; border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; align-items: start;
}

.cs-block__label {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg-dim); padding-top: .3em; position: sticky; top: calc(var(--header-h) + 1rem);
}

.cs-block__body { display: flex; flex-direction: column; gap: 1.4rem; }
.cs-block__heading { font-family: var(--serif); font-size: clamp(1.8rem,3.5vw,2.8rem); font-weight: 400; letter-spacing: -.02em; line-height: 1.1; }
.cs-block__text { font-size: 1.02rem; line-height: 1.75; color: var(--fg-mid); max-width: 60ch; }
.cs-block__text strong { color: var(--fg); font-weight: 500; }

.cs-tag-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; }
.cs-tag { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-mid); border: 1px solid var(--border-lt); padding: .4em .9em; border-radius: 2px; }

.cs-block--split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; }
.cs-block--split.cs-block--flip { direction: rtl; }
.cs-block--split.cs-block--flip > * { direction: ltr; }
.cs-block__text-col { padding: 5rem 3rem 5rem 2.5rem; display: flex; flex-direction: column; gap: 1.4rem; justify-content: center; border-right: 1px solid var(--border); }
.cs-block--flip .cs-block__text-col { border-right: none; border-left: 1px solid var(--border); padding: 5rem 2.5rem 5rem 3rem; }
.cs-block__media-col { position: relative; overflow: hidden; background: #191917; min-height: 400px; height: 100%; }
.cs-block__media-col img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform .8s var(--ease-out); }
.cs-block__media-col:hover img { transform: scale(1.0); }

/* Solution Highlight Block */
.cs-block--solution {
  background: #161615;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Solution + Stats Unified Group */
.cs-solution-group {
  display: flex;
  flex-direction: column;
}
.cs-block--stats-attached {
  border-top: none;
  background: #161615; /* Matches solution block background for seamless flow */
}

.cs-block--gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; padding: 0; border-bottom: 1px solid var(--border); }
.cs-gallery-item { aspect-ratio: 3/2; overflow: hidden; background: #191917; border-right: 1px solid var(--border); }
.cs-gallery-item:last-child { border-right: none; }
.cs-gallery-item img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform .7s var(--ease-out); }
.cs-gallery-item:hover img { transform: scale(1.0); }

.cs-block--stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; padding: 0; border-bottom: 1px solid var(--border); }
.cs-stat { padding: 3.5rem 2.5rem; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: .5rem; }
.cs-stat:last-child { border-right: none; }
.cs-stat__number { font-family: var(--serif); font-size: clamp(2.5rem,5vw,4rem); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.cs-stat__label  { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); }

.project-nav {
  padding: 5rem 2.5rem; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem;
}
.prev-project-link, .next-project-link {
  display: flex; flex-direction: column; gap: .7rem; color: var(--fg); transition: opacity .3s;
}
.prev-project-link:hover, .next-project-link:hover { opacity: .8; }
.nav-label { font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); }
.nav-title { font-family: var(--serif); font-size: clamp(1.8rem,4vw,3.2rem); font-weight: 400; letter-spacing: -.02em; line-height: 1.1; }

/* Responsive Adjustments */
@media (max-width: 900px) {
  .project-detail-header { padding: 7rem 1.5rem 1.5rem; }
  .project-overview { grid-template-columns: 1fr; gap: 2.5rem; padding: 0 1.5rem 3rem; }
  .overview-meta { position: static; flex-direction: row; flex-wrap: wrap; gap: 1.5rem; }
  .meta-item { flex: 1 1 40%; }
  .cs-block { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 1.5rem; }
  .cs-block__label { position: static; }
  .cs-block--split, .cs-block--split.cs-block--flip { grid-template-columns: 1fr; direction: ltr; }
  .cs-block__text-col, .cs-block--flip .cs-block__text-col { border: none; border-bottom: 1px solid var(--border); padding: 2.5rem 1.5rem; }
  .cs-block__media-col { min-height: 260px; }
  .cs-block--gallery { grid-template-columns: 1fr; }
  .cs-gallery-item { border-right: none; border-bottom: 1px solid var(--border); }
  .cs-block--stats { grid-template-columns: 1fr 1fr; }
  .project-nav { padding: 3.5rem 1.5rem; flex-direction: column; gap: 3rem; }
}



/* ═══════════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════════ */

/* FIX: Added padding-top to push content below fixed header */
#page-about { 
  padding: 0 2.5rem; 
  padding-top: 140px !important; /* Forces space below header on Desktop */
}

/* --- MOBILE FIX: Reduce spacing on small screens --- */
@media (max-width: 900px) {
  #page-about {
    padding-top: 100px !important; /* Smaller gap for Tablets */
  }
}

@media (max-width: 480px) {
  #page-about {
    padding-top: 70px !important; /* Much smaller gap for Mobile */
    padding-left: 1.5rem;         /* Adjust side padding for mobile too */
    padding-right: 1.5rem;
  }
  
  /* Optional: Stack the grid columns on mobile so it's not squished */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-left, .about-right {
    padding: 0;
    border: none;
  }
}

.about-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  min-height: 0vh; 
  border-bottom: 1px solid var(--border); 
}

.about-left { padding-right: 5rem; padding-bottom: 5rem; border-right: 1px solid var(--border); }
.about-right { padding-left: 5rem; padding-bottom: 5rem; }
.about-heading { font-family: var(--serif); font-size: clamp(2.8rem,5.5vw,5rem); font-weight: 400; letter-spacing: -.025em; line-height: 1.05; margin-bottom: 2.5rem; }
.about-heading em { font-style: italic; color: var(--fg-dim); }
.about-body { margin-bottom: 3rem; }
.about-body p { font-size: 1.05rem; line-height: 1.7; color: var(--fg); margin-bottom: .8em; }
.about-body a { text-decoration: underline; text-underline-offset: 3px; }
.about-section { margin-bottom: 3rem; }
.about-section-label { display: block; font-family: var(--mono); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 1rem; }
.about-section p { font-size: .92rem; line-height: 1.75; color: var(--fg-mid); }
.about-section strong { color: var(--fg); font-weight: 500; }
.about-photo { width: 100%; aspect-ratio: 3/4; background: #191917; border: 1px solid var(--border); overflow: hidden; margin-bottom: 3rem; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(12%); }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: .8rem; }
.contact-list a { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-dim); transition: color .2s; }
.contact-list a:hover { color: var(--fg); }

/* ─── FOOTER ─── */
.site-footer { display: flex; justify-content: space-between; align-items: center; padding: 1.8rem 2.5rem; border-top: 1px solid var(--border); }
.site-footer span { font-family: var(--mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-dim); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  :root { --card-w: 630px; /* Revert to original size for <= 1200px */ }
}

@media (max-width: 900px) {
  :root { --card-w: 563px; /* all cards same size (50% bigger) */ }
  :root { --gap: 2.5rem; }
  #site-header { padding: 1.5rem; }
  .track-ui { padding: 1rem 1.5rem; }
  .about-grid { grid-template-columns: 1fr; padding-top: 9rem; }
  .about-left { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 3rem; margin-bottom: 3rem; }
  .about-right { padding-left: 0; }
  #page-about { padding: 0 1.5rem; }
  .project-detail-header { padding: 9rem 2.5rem 4rem; }
  .project-meta-grid { gap: 2rem; }
  .project-nav { padding: 3.5rem 1.5rem; flex-direction: column; gap: 3rem; }
  .site-footer { padding: 1.5rem; }
  .cs-block { grid-template-columns: 1fr; gap: 2rem; padding: 3.5rem 1.5rem; }
  .cs-block__label { position: static; }
  .cs-block--split, .cs-block--split.cs-block--flip { grid-template-columns: 1fr; direction: ltr; }
  .cs-block__text-col, .cs-block--flip .cs-block__text-col { border: none; border-bottom: 1px solid var(--border); padding: 3rem 1.5rem; }
  .cs-block__media-col { min-height: 260px; }
  .cs-block--gallery { grid-template-columns: 1fr; }
  .cs-gallery-item { border-right: none; border-bottom: 1px solid var(--border); }
  .cs-block--stats { grid-template-columns: 1fr 1fr; }
  .cs-block--fullimg { aspect-ratio: 4/3; }
}

@media (max-width: 480px) {
  :root { --card-w: 488px; /* all cards same size (50% bigger) */ }
  :root { --gap: 2rem; }
  .detail-title { font-size: 2.6rem; }
  .about-heading { font-size: 2.4rem; }
  .project-meta-grid { flex-direction: column; gap: 1.5rem; }
  .cs-block--stats { grid-template-columns: 1fr; }
  .cs-stat { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
  .projects-section {
    height: auto;
    min-height: 100vh;
    padding-top: calc(var(--header-h) + 1.25rem);
  }

  .projects-track-outer {
    overflow: visible;
    -webkit-mask-image: none;
            mask-image: none;
  }

  .projects-track {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 0 1rem 2rem;
    transform: none !important;
  }

  .project-card {
    width: 100%;
    max-width: 100%;
    transform: none !important;
  }

  .card-tilt-inner {
    transform: none !important;
  }

  body {
    -webkit-overflow-scrolling: touch;
  }
}

@media (hover: none) {
  /* Touch: restore native body scroll for detail/about; track uses touch events */
  body { cursor: auto; }
  a    { cursor: pointer; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
