@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ── Reset ──────────────────────────────────────────────────────────────────── */

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

/* ── Theme tokens ───────────────────────────────────────────────────────────── */

:root {
  --bg:             #fcfcfc;
  --bg-card:        rgba(0, 0, 0, 0.035);
  --bg-card-hover:  rgba(0, 0, 0, 0.065);
  --nav-bg:         rgba(252, 252, 252, 0.6);
  --border:         rgba(0, 0, 0, 0.1);
  --text-primary:   #0a0a0a;
  --text-secondary: rgba(10, 10, 10, 0.55);
  --text-tertiary:  rgba(10, 10, 10, 0.32);
  --accent:            #3b82f6;
  --title-shadow-color: rgba(0, 0, 0, 0.22);
  --logo-filter:        none;
  --glow-blend:        multiply;
  --grain-opacity:     0.045;
}

[data-theme='dark'] {
  --bg:             #0a0a0a;
  --bg-card:        rgba(255, 255, 255, 0.04);
  --bg-card-hover:  rgba(255, 255, 255, 0.075);
  --nav-bg:         rgba(10, 10, 10, 0.6);
  --border:         rgba(255, 255, 255, 0.1);
  --text-primary:   #f9fafb;
  --text-secondary: rgba(249, 250, 251, 0.55);
  --text-tertiary:  rgba(249, 250, 251, 0.3);
  --accent:            #3b82f6;
  --title-shadow-color: #000000;
  --logo-filter:        invert(1);
  --glow-blend:        screen;
  --grain-opacity:     0.07;
}

/* ── Base ───────────────────────────────────────────────────────────────────── */

html {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg);
  color: var(--text-primary);
  cursor: none;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  transition: background-color 0.4s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* Prevent iOS WebKit from expanding document width when elements are transformed beyond viewport */

html { overflow-x: hidden; }

a,
button {
  cursor: none;
  font-family: inherit;
}

button {
  background: none;
  border: none;
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ── Page transition ──────────────────────────────────────────────────────── */

@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.page-enter {
  animation: page-fade-in 0.3s ease both;
}

/* Forces Safari to schedule RAF at the display's native refresh rate (120Hz on ProMotion).
   Safari only unlocks high-cadence compositing when a CSS animation is actively running.
   The 1ms duration + infinite loop keeps it permanently active at negligible cost. */

@keyframes fps-unlock {
  to { transform: translateZ(0); }
}

.fps-unlock {
  position: fixed;
  width: 1px;
  height: 1px;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  animation: fps-unlock 1ms linear infinite;
}

/* ── Touch: restore native cursor ───────────────────────────────────────────── */

@media (hover: none) {
  html,
  a,
  button {
    cursor: auto;
  }
}
/* =============================================================================
   GRAIN OVERLAY
   ============================================================================= */
.grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: var(--grain-opacity);
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.4s ease;
}

/* =============================================================================
   CUSTOM CURSOR
   ============================================================================= */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: difference;
  will-change: transform;
}

.cursor-dot {
  width: 0.5rem;   /* 8px */
  height: 0.5rem;
  background: #ffffff;
  z-index: 99999;
  transform: translate(-100px, -100px);
}

.cursor-ring {
  width: 2.5rem;   /* 40px */
  height: 2.5rem;
  border: 1.5px solid #ffffff;
  background: transparent;
  z-index: 99998;
  transform: translate(-100px, -100px);
  transition:
    width  0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cursor-ring.hovering {
  width: 3.75rem;
  height: 3.75rem;
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring { display: none; }
}

/* =============================================================================
   NAVIGATION
   ============================================================================= */
.nav {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid transparent;
  border-radius: 0;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition:
    background               0.45s cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter          0.45s cubic-bezier(0.16, 1, 0.3, 1),
    -webkit-backdrop-filter  0.45s cubic-bezier(0.16, 1, 0.3, 1),
    border-color             0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow               0.45s cubic-bezier(0.16, 1, 0.3, 1),
    left                     0.45s cubic-bezier(0.16, 1, 0.3, 1),
    right                    0.45s cubic-bezier(0.16, 1, 0.3, 1),
    top                      0.45s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius            0.45s cubic-bezier(0.16, 1, 0.3, 1),
    padding                  0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Undocked pill — activated once the user scrolls past 10 px */
.nav--scrolled {
  left: 25%;
  right: 25%;
  top: 1rem;
  border-radius: 9999px;
  background: var(--nav-bg);
  backdrop-filter: blur(48px) saturate(180%);
  -webkit-backdrop-filter: blur(48px) saturate(180%);
  border-color: var(--border);
  padding: 0.875rem 1.75rem;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.07),
    0 8px 24px -4px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme='dark'] .nav--scrolled {
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.35),
    0 8px 24px -4px rgba(0, 0, 0, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-brand {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  flex: 1;
}

.nav--scrolled .nav-brand {
  flex: 0 0 auto;
}

.nav-logo {
  height: 24px;
  width: auto;
  display: block;
  filter: var(--logo-filter);
}

.nav-brand-name {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-left: 0.625rem;
  transition: opacity 0.3s ease, max-width 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  max-width: 200px;
  opacity: 1;
}

.nav--scrolled .nav-brand-name {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  transition:
    background  0.2s,
    transform   0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  transform: scale(1.12) rotate(18deg);
}

/* ── Nav right group ───────────────────────────────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: flex-end;
}

.nav--scrolled .nav-right {
  flex: 0 0 auto;
}

/* ── Hamburger (mobile only) ─────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 2.125rem;
  height: 2.125rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  flex-shrink: 0;
  transition: background 0.2s;
}

.nav-hamburger:hover { background: var(--bg-card-hover); }

.nav-hamburger span {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   0.2s ease;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px)  rotate(45deg);  }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0);             }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile full-screen menu ────────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 195;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
  opacity: 0;
  transform: translateY(0.75rem);
  transition:
    opacity   0.35s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    color     0.2s;
}

.mobile-menu.open a:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.06s; }
.mobile-menu.open a:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.12s; }
.mobile-menu.open a:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.18s; }

.mobile-menu a:hover { color: var(--accent); }

/* =============================================================================
   HERO
   ============================================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 7rem 3rem 5rem;
}

/* Dot-grid texture */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 2rem 2rem;
  opacity: 0.55;
  z-index: 0;
}

/* Radial glow orb */
.glow-orb {
  position: absolute;
  width: 55rem;
  height: 55rem;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.9) 0%,
    rgba(59, 130, 246, 0.4) 40%,
    transparent 68%
  );
  mix-blend-mode: var(--glow-blend);
  pointer-events: none;
  filter: blur(4.5rem);
  opacity: 0.65;
  transform: translate(-50%, -50%);
  transition: none;
  will-change: transform;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 56rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

/* Title with black parallax shadow */
.title-wrap {
  position: relative;
  margin-bottom: 1.875rem;
}

.title-wrap h1,
.title-shadow {
  font-size: clamp(2.75rem, 7.5vw, 5.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.title-shadow {
  position: absolute;
  inset: 0;
  color: var(--title-shadow-color);
  pointer-events: none;
  user-select: none;
  will-change: transform;
  transition: transform 0.08s ease-out;
  filter: blur(3.5px);
}

.title-wrap h1 {
  position: relative;
  z-index: 1;
  color: var(--text-primary);
}

.title-gradient {
  background: linear-gradient(95deg, #60a5fa 0%, #3b82f6 40%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Inside the shadow layer, gradient words must match the shadow color */
.title-shadow .title-gradient {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: currentColor;
  color: inherit;
}

.hero-sub {
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--text-secondary);
  max-width: 36rem;
  margin-bottom: 2.75rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.875em 2.25em;
  background: var(--accent);
  color: #ffffff;
  border-radius: 3rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    opacity  0.2s,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-0.125rem) scale(1.03);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.875em 2.25em;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 3rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition:
    background  0.2s,
    transform   0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  transform: translateY(-0.125rem) scale(1.03);
}

/* =============================================================================
   TOOLS MARQUEE
   ============================================================================= */
.marquee-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* Edge fade-out using a mask */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}

.marquee-track {
  display: flex;
  width: max-content;
}

.marquee-inner {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  /* Scroll the full width of one copy (¼ of 4× items) */
  animation: marquee-scroll 28s linear infinite;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-25%); }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0 2.5rem;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  /* Divider dot between items */
  position: relative;
}

.marquee-item::after {
  content: '•';
  position: absolute;
  right: 0;
  transform: translateX(50%);
  color: var(--border);
  font-size: 0.5rem;
}

/* Logo pill container */
.tool-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.4375rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.tool-logo-wrap img {
  width: 1.125rem;
  height: 1.125rem;
  object-fit: contain;
  /* Dark mode: invert black logos to white */
  filter: var(--logo-filter);
  transition: filter 0.3s;
}

/* =============================================================================
   SECTIONS (shared)
   ============================================================================= */
.section {
  max-width: 82rem;
  margin: 0 auto;
  padding: 6rem 3rem;
}

.section-head {
  margin-bottom: 3rem;
}

.label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.875rem;
}

.section-head h2 {
  font-size: clamp(1.875rem, 3.5vw, 2.875rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
}

/* =============================================================================
   BENTO GRID  (12-column)
   ============================================================================= */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

/* Column spans */
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }

.card {
  display: block;        /* <Link> is inline by default */
  text-decoration: none;
  color: inherit;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  transition:
    transform     0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color  0.25s ease,
    box-shadow    0.35s ease;
}

.card:hover {
  transform: translateY(-0.375rem) scale(1.012);
  border-color: var(--accent);
  box-shadow: 0 1.5rem 3.5rem rgba(59, 130, 246, 0.14);
}

/* Card image area */
.card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.col-4 .card-img { aspect-ratio: 4 / 3; }

/* Top-edge gloss sheen */
.card-img::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.07), transparent);
  pointer-events: none;
}

/* Abstract UI wireframe mockup */
.card-img-inner {
  position: absolute;
  inset: 1.25rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.card-img-inner::before {
  content: '';
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  right: 0.875rem;
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
}

.card-img-inner::after {
  content: '';
  position: absolute;
  top: 2.25rem;
  left: 0.875rem;
  bottom: 0.875rem;
  width: 42%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
}

/* Hover overlay */
.card-hover-cta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
  letter-spacing: -0.01em;
}

.card:hover .card-hover-cta { opacity: 1; }

.card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.125rem 1.5rem 1.25rem;
  gap: 1rem;
}

.card-body h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.25em;
}

.card-tag {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
}

.card-year {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* =============================================================================
   ABOUT
   ============================================================================= */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-stats {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.about-stats .about-text {
  margin-bottom: 0.5rem;
}

.about-text .label { margin-bottom: 1rem; }

.about-text h2 {
  font-size: clamp(1.875rem, 3.5vw, 2.875rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.about-bio {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.skills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills li {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4em 1.1em;
  border: 1px solid var(--border);
  border-radius: 3rem;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}

.skills li:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  padding: 1.500rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.stat-num {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* =============================================================================
   CONTACT
   ============================================================================= */
.contact-section {
  text-align: center;
  padding-top: 8rem;
  padding-bottom: 8rem;
}

.contact-section .label {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.contact-heading {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 2.5rem;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.125rem, 2.5vw, 1.625rem);
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.01em;
  padding-bottom: 0.125em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, opacity 0.2s;
  margin-bottom: 3.5rem;
}

.contact-email:hover {
  border-color: var(--accent);
  opacity: 0.82;
}

.social-links {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-links a {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}

.social-links a:hover { color: var(--text-primary); }

/* =============================================================================
   FOOTER
   ============================================================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 1024px) {
  /* Collapse to 6-column bento */
  .bento { grid-template-columns: repeat(6, 1fr); }
  .col-8 { grid-column: span 6; }
  .col-4 { grid-column: span 3; }
  .col-6 { grid-column: span 3; }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav--scrolled {
    left: 1rem;
    right: 1rem;
    top: 0.75rem;
    padding: 0.75rem 1.25rem;
  }

  .nav-links    { display: none; }
  .nav-hamburger { display: flex; }
  .nav-brand-name { font-size: 0.6875rem; }
  .nav--scrolled .nav-brand-name { max-width: 200px; opacity: 1; margin-left: 0.625rem; }

  .hero { padding: 6rem 1.5rem 4rem; }
  .section { padding: 4.5rem 1.5rem; }
  .contact-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  /* Full-width single-column bento */
  .bento {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .col-8,
  .col-6,
  .col-4 { grid-column: span 1; }
  .col-4 .card-img { aspect-ratio: 16 / 9; }

  .about-layout { gap: 2.5rem; }

  .stat-card { padding: 1.1rem; }
  .stat-num  { font-size: 2rem; }

  /* More pronounced title shadow on mobile — direction driven by orb position in JS */
  .title-shadow { filter: blur(5px); }

  .footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1.5rem;
  }
}
/* =============================================================================
   TESTIMONIALS STACK
   ============================================================================= */

.ts-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  position: relative;
  z-index: 10;
}

.ts-wrapper {
  position: relative;
  width: 100%;
  height: clamp(400px, 55vh, 500px);
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.ts-card {
  position: absolute;
  width: 90%;
  max-width: 340px;
  height: 420px;
  background-image: linear-gradient(to bottom right, #1a1a1a, #111111);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  color: #f9fafb;
  padding: 1.75rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  transform-origin: center 104%;
  will-change: transform, opacity;
  cursor: grab;
  overflow: hidden;
  transition:
    transform     0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity       0.4s ease,
    border-color  0.8s ease;
}

.ts-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.ts-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #333;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.ts-easter-egg-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  background: #222;
  color: #f9fafb;
  animation: ts-bounce 2s infinite ease-in-out;
}

@keyframes ts-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-3px) rotate(5deg); }
}

.ts-card-info {
  position: relative;
  z-index: 2;
}

.ts-card-info h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #f9fafb;
  font-family: inherit;
}

.ts-card-info span {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ts-quote {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(249, 250, 251, 0.85);
  font-style: italic;
  flex: 1;
  display: flex;
  align-items: center;
  margin: 1rem 0;
  position: relative;
  z-index: 2;
}

/* CTA button inside easter-egg card */
.ts-action-btn {
  display: block;
  background: #ffffff;
  color: var(--accent);
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition:
    transform  0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s ease;
  position: relative;
  z-index: 5;
}

.ts-action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.ts-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  position: relative;
  z-index: 2;
}

.ts-stars { color: #ffffff; }

/* ── Click-zone navigation ─────────────────────────────────────── */
.ts-nav-zone {
  position: absolute;
  top: 0;
  height: 100%;
  /* flush to the card edge: wrapper is centred, card max-width = 340px, half = 170px */
  width: calc(50% - 170px);
  background: transparent;
  border: none;
  padding: 0;
  z-index: 50;
  display: flex;
  align-items: center;
}

.ts-nav-zone--left  { left: 0;  justify-content: flex-end;   }
.ts-nav-zone--right { right: 0; justify-content: flex-start; }

/* Arrow indicator — hidden by default, fades in on hover */
.ts-nav-zone::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-top: 1.5px solid var(--text-secondary);
  border-right: 1.5px solid var(--text-secondary);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.ts-nav-zone--right::after {
  transform: rotate(45deg) translateX(-4px);
  margin-left: 10px;
}

.ts-nav-zone--left::after {
  transform: rotate(-135deg) translateX(-4px);
  margin-right: 10px;
}

.ts-nav-zone:hover::after {
  opacity: 1;
}

.ts-nav-zone--right:hover::after { transform: rotate(45deg)   translateX(0); }
.ts-nav-zone--left:hover::after  { transform: rotate(-135deg) translateX(0); }

/* ── Dot indicators ─────────────────────────────────────────────────────── */
.ts-indicators {
  display: flex;
  gap: 8px;
  margin-top: 2rem;
  position: relative;
  z-index: 200;
}

@media (max-width: 768px) {
  .ts-card {
    transition:
      transform     0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity       0.55s ease,
      border-color  0.8s ease;
  }

  .ts-indicators { margin-top: 1rem; }
}

.ts-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.3s ease, border-radius 0.3s ease, background 0.3s ease;
}

.ts-dot.active {
  width: 18px;
  border-radius: 10px;
  background: var(--text-secondary);
}

/* ── Easter-egg card ────────────────────────────────────────────────────── */
.ts-easter-egg {
  background-image: none;
  background-color: #161616;
}

/* Blue gradient layer (revealed when active) */
.ts-easter-egg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 0;
  border-radius: inherit;
}

.ts-easter-egg.ts-active-mode { border-color: rgba(255, 255, 255, 0.3); }
.ts-easter-egg.ts-active-mode::before { opacity: 1; }

/* Shimmer sweep */
.ts-easter-egg::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 10%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.05) 90%,
    transparent 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

.ts-easter-egg.ts-active-mode::after {
  opacity: 1;
  animation: ts-shimmer 8s infinite ease-in-out alternate;
}

@keyframes ts-shimmer {
  0%   { left: -100%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 200%; opacity: 0; }
}

.ts-easter-egg.ts-active-mode .ts-card-info span {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ts-wrapper {
    height: 440px;
  }

  .ts-card {
    height: 380px;
    padding: 1.25rem;
    transform-origin: center 105%;
  }
}
/* ============================================================
   STACK CARDS � horizontal card list (normal page scroll)
   ============================================================ */

/* -- List wrapper ----------------------------------------------- */
.sc-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* -- Individual card ------------------------------------------- */
.sc-card {
  display: flex;
  flex-direction: row; /* content left | visual right */
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  color: inherit;
  cursor: none;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12);
  transform: scale(1.015);
}

[data-theme='dark'] .sc-card {
  background: #111111;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .sc-card:hover {
  box-shadow: 0 8px 40px rgba(59, 130, 246, 0.18);
}

/* -- Left: text content ---------------------------------------- */
.sc-card-content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.75rem 2.25rem;
}

.sc-card-content .label {
  margin-bottom: 1.25rem;
}

.sc-card-title {
  font-size: clamp(1.0625rem, 1.9vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 1.5rem;
}

.sc-card-desc {
  font-size: clamp(0.875rem, 1.1vw, 1.0625rem);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 2.25rem;
  max-width: 52ch;
}

.sc-card-footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* CTA button */
.sc-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.65em 1.75em;
  background: var(--accent);
  color: #ffffff;
  border-radius: 3rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    opacity  0.2s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sc-cta:hover {
  opacity: 0.85;
  transform: translateY(-2px) scale(1.04);
}

.sc-year {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

/* -- Right: gradient visual ------------------------------------ */
.sc-card-visual {
  width: 48%;
  flex-shrink: 0;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}

/* Image fill */
.sc-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Gloss sheen at top */
.sc-card-visual::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent);
  pointer-events: none;
}

/* Abstract mockup decorations */
.sc-card-mockup {
  position: absolute;
  inset: 1.5rem;
  border-radius: 0.625rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
}

.sc-mockup-bar {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  right: 0.875rem;
  height: 0.4375rem;
  background: rgba(255,255,255,0.22);
  border-radius: 0.25rem;
}

.sc-mockup-rect {
  position: absolute;
  top: 2rem;
  left: 0.875rem;
  right: 0.875rem;
  bottom: 0.875rem;
  background: rgba(255,255,255,0.09);
  border-radius: 0.3125rem;
}

.sc-mockup-rect--sm {
  right: auto;
  width: 40%;
  background: rgba(255,255,255,0.14);
}

/* ============================================================
   MOBILE (<= 768 px)
   ============================================================ */
@media (max-width: 768px) {
  .sc-card {
    flex-direction: column-reverse;
    height: auto;
    border-radius: 1.5rem;
  }

  .sc-card-visual {
    width: 100%;
    height: 280px;
    flex-shrink: 0;
  }

  .sc-card-content {
    padding: 1.5rem 1.5rem 1.25rem;
  }

  .sc-card-footer {
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
  }
}
/* ============================================================
   Shared stat-card overrides
   ============================================================ */

/* Text layers must sit above all BG animation layers */
.stat-card .stat-num,
.stat-card .stat-label {
  position: relative;
  z-index: 2;
}

/* ============================================================
   CALENDAR CARD
   ============================================================ */
.sc-calendar-bg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.9rem 1.1rem 0 0;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.8) translate(6px, -6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 1;
}

.sc-calendar-bg--visible {
  opacity: 1;
  transform: scale(1) translate(0, 0);
}

.sc-cal-header {
  width: 64px;
  height: 12px;
  background: var(--accent);
  border-radius: 5px 5px 0 0;
  display: flex;
  align-items: center;
  padding: 0 5px;
  gap: 3px;
}

.sc-cal-dots span {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
}

.sc-cal-body {
  width: 64px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 5px 5px;
  padding: 3px 5px 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}

.sc-cal-year {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sc-cal-year--flip {
  animation: cal-flip 0.28s ease;
}

@keyframes cal-flip {
  0%   { transform: rotateX(0deg);   opacity: 1; }
  40%  { transform: rotateX(90deg);  opacity: 0; }
  60%  { transform: rotateX(-90deg); opacity: 0; }
  100% { transform: rotateX(0deg);   opacity: 1; }
}

.sc-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.sc-cal-cell {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--border);
}

/* ============================================================
   REVENUE CARD
   ============================================================ */
.sc-revenue-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sc-revenue-canvas--visible {
  opacity: 1;
}

/* ============================================================
   GLOBE CARD
   ============================================================ */
.sc-globe-canvas {
  position: absolute;
  /* bottom-right quarter visible */
  bottom: -55px;
  right: -55px;
  width: 220px;
  height: 220px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transform: scale(0.6) translate(20px, 20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 50%;
}

.sc-globe-canvas--visible {
  opacity: 1;
  transform: scale(1) translate(0, 0);
}

/* ============================================================
   PIXELS CARD
   ============================================================ */
.stat-card--pixels {
  /* needs explicit height matching other cards */
}

/* Keep both labels above the pixel grid */
.stat-card--pixels .stat-num,
.stat-card--pixels .stat-label {
  z-index: 3;
}

.sc-pixels-grid {
  position: absolute;
  inset: 0;
  display: grid;
  /* columns set inline */
  z-index: 4;
  pointer-events: none;
  gap: 2px;
  padding: 2px;
}

.sc-pixel {
  width: 100%;
  transition: background 0.08s ease;
  border-radius: 2px;
}
/* =============================================================================
   CASE STUDY — shared with App.css variables, no duplication
   ============================================================================= */

/* ── Nav back button ─────────────────────────────────────────────────────────── */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
  width: 4.5rem;   /* mirror the right spacer so brand stays centred */
}

.nav-back:hover {
  color: var(--text-primary);
  gap: 0.75rem;
}

/* Nav sits over a dark hero image (transparent / undocked state) */
.nav--on-dark-bg .nav-back {
  color: rgba(255, 255, 255, 0.75);
}
.nav--on-dark-bg .nav-back:hover {
  color: rgba(255, 255, 255, 1);
}
.nav--on-dark-bg .theme-toggle {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}
.nav--on-dark-bg .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Nav sits over a light hero image */
.nav--on-light-bg .nav-back {
  color: rgba(0, 0, 0, 0.65);
}
.nav--on-light-bg .nav-back:hover {
  color: rgba(0, 0, 0, 0.9);
}
.nav--on-light-bg .theme-toggle {
  color: rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
}
.nav--on-light-bg .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
}

.nav-brand--cs {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary);
  max-width: 20rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav--scrolled .nav-brand--cs {
  opacity: 1;
  max-width: clamp(6rem, calc(50vw - 12rem), 14rem);
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.cs-hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 3rem 6rem;
}

.cs-hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.06;
  pointer-events: none;
}

.cs-hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 2rem 2rem;
  opacity: 0.45;
}

.cs-hero-content {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  text-align: center;
}

.cs-eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.cs-title {
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.07;
  color: #ffffff;
  margin: 1.5rem 0 1.25rem;
}

.cs-tagline {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.68);
  max-width: 38rem;
  margin: 0 auto;
}

/* ── Framed hero ─────────────────────────────────────────────────────────────── */
.cs-hero--framed {
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  padding-top: 10rem;
  padding-bottom: 0;
  gap: 3rem;
}

.cs-hero--framed .cs-hero-content {
  text-align: center;
}

.cs-hero-frame-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.cs-hero-frame {
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  box-shadow: 0 -4px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  /* enforce 3:2 at every viewport width */
  aspect-ratio: 3 / 2;
}

.cs-hero-frame .cs-hero-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* ── Hero frame placeholder ───────────────────────────────────────────────────────── */
.cs-hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cs-hp-chrome {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.cs-hp-dots {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.cs-hp-dots span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.cs-hp-urlbar {
  flex: 1;
  height: 1rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.07);
}

.cs-hp-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.cs-hp-sidebar {
  width: 13%;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cs-hp-sidebar-logo {
  height: 0.875rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.2);
  margin-bottom: 0.375rem;
}

.cs-hp-nav-item {
  height: 0.4375rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.09);
}

.cs-hp-nav-item--active {
  background: rgba(255, 255, 255, 0.28);
}

.cs-hp-main {
  flex: 1;
  padding: 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  overflow: hidden;
}

.cs-hp-heading {
  height: 0.875rem;
  width: 38%;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.22);
}

.cs-hp-subheading {
  height: 0.5rem;
  width: 25%;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  margin-top: -0.375rem;
}

.cs-hp-cards {
  display: flex;
  gap: 0.625rem;
}

.cs-hp-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.5rem;
  padding: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.cs-hp-card-icon {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.16);
}

.cs-hp-card-value {
  height: 0.6875rem;
  width: 55%;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.2);
}

.cs-hp-card-label {
  height: 0.375rem;
  width: 70%;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
}

.cs-hp-row {
  height: 0.4375rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.07);
}

.cs-hp-row--wide  { width: 85%; }
.cs-hp-row--med   { width: 65%; }
.cs-hp-row--short { width: 45%; }

@media (max-width: 768px) {
  .cs-hero.cs-hero--framed {
    padding-top: 8rem;
    padding-bottom: 0; /* beats the generic .cs-hero mobile rule below which sets 4rem */
    gap: 2rem;
    min-height: 0;
  }
  .cs-hero-frame-wrap {
    padding: 0; /* full-width image on mobile */
  }
  .cs-hero-frame {
    border-radius: 12px 12px 0 0;
  }
}

/* ── Meta section ────────────────────────────────────────────────────────────── */
.cs-meta-section {
  border-bottom: 1px solid var(--border);
}

.cs-meta-grid {
  max-width: 82rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  padding: 0;
}

.cs-meta-cell {
  padding: 2rem 2.5rem;
  border-right: 1px solid var(--border);
}

.cs-meta-cell:last-child {
  border-right: none;
}

.cs-meta-cell dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.cs-meta-cell dd {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ── Intro section ───────────────────────────────────────────────────────────── */
.cs-intro {
  border-bottom: 1px solid var(--border);
}

.cs-intro-inner {
  max-width: 82rem;
  margin: 0 auto;
  padding: 5rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.75rem 4rem;
}

.cs-intro-para {
  font-size: 1rem;
  line-height: 1.78;
  color: var(--text-secondary);
}


.cs-intro-label {
  grid-column: 1 / -1;
  margin-bottom: 0.25rem;
}

.cs-intro-toggle {
  display: none;
}

.cs-intro-expandable,
.cs-intro-expandable > div {
  display: contents;
}

/* ── Slide sections ──────────────────────────────────────────────────────────── */
.cs-slides {
  width: 100%;
}

.cs-slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
  border-bottom: 1px solid var(--border);
  background: color-mix(in sRGB, var(--slide-accent) 35%, var(--bg) 65%);
}

/* Flipped: visual left, text right */
.cs-slide--flip {
  direction: rtl;
}

.cs-slide--flip > * {
  direction: ltr;
}

/* Text column */
.cs-slide-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 4.5rem 5rem 5rem;
}

.cs-slide--flip .cs-slide-text {
  padding: 5rem 5rem 5rem 4.5rem;
}

.cs-slide-index {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: block;
}

.cs-slide-heading {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 0.625rem;
}

.cs-slide-subheading {
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.cs-slide-body {
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--text-secondary);
  max-width: 36rem;
}

.cs-slide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1.25rem;
  max-width: 36rem;
  padding: 0;
}

.cs-slide-list-item {
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--text-secondary);
  padding-left: 1.5rem;
  position: relative;
}

.cs-slide-list-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cs-slide-list-item::before {
  content: counter(list-item) '.';
  counter-increment: list-item;
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
  font-weight: 600;
}

.cs-slide-list {
  counter-reset: list-item;
}

/* Visual column */
.cs-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 40vh;
}

/* Vertical divider between text and visual */
.cs-slide .cs-visual {
  border-left: 1px solid rgba(255,255,255,0.08);
}
.cs-slide--flip .cs-visual {
  border-left: none;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.cs-visual-inner {
  position: relative;
  width: 78%;
  max-width: 28rem;
  z-index: 1;
}

/* Abstract wireframe mock */
.cs-visual-frame {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.75rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 1.25rem;
}

.cs-vf-bar {
  height: 0.5rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.22);
}

.cs-vf-bar--top { margin-bottom: 1rem; }
.cs-vf-bar--bottom { margin-top: 1rem; width: 55%; }

.cs-vf-columns {
  display: flex;
  gap: 0.75rem;
  height: 7rem;
}

.cs-vf-col {
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.1);
}

.cs-vf-col--wide   { flex: 3; }
.cs-vf-col--narrow { flex: 1; }

.cs-visual-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  line-height: 1.5;
  font-style: italic;
}

/* ── Next project bar ────────────────────────────────────────────────────────── */
.cs-next {
  padding: 5rem 3rem;
  max-width: 82rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cs-next-link {
  display: inline-flex;
  align-items: baseline;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-primary);
}

.cs-next-title {
  font-size: clamp(1.875rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.cs-next-link:hover .cs-next-title {
  border-color: var(--accent);
}

.cs-next-arrow {
  font-size: 2rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cs-next-link:hover .cs-next-arrow {
  transform: translateX(0.375rem);
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cs-meta-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .cs-hero {
    padding: 7rem 1.5rem 4rem;
  }

  .cs-intro-inner {
    padding: 3rem 1.5rem;
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .cs-intro-expandable {
    display: block;
    overflow: hidden;
    position: relative;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .cs-intro-expandable > div {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .cs-intro-expandable::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 30%, var(--bg) 92%);
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .cs-intro-expandable--open::after {
    opacity: 0;
  }

  .cs-intro-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 0.125rem;
  }

  .cs-intro-toggle:hover {
    opacity: 0.7;
  }

  .cs-intro-toggle-arrow {
    transition: transform 0.2s;
    position: relative;
    top: 1px;
  }

  .cs-intro-toggle-arrow--up {
    transform: rotate(180deg);
  }

  .cs-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cs-meta-cell {
    padding: 1.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .cs-meta-cell:last-child {
    border-bottom: none;
  }

  /* Stack slides vertically on mobile */
  .cs-slide {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .cs-slide--flip {
    direction: ltr;
  }

  .cs-slide-text,
  .cs-slide--flip .cs-slide-text {
    padding: 3.5rem 1.5rem;
  }

  .cs-slide .cs-visual,
  .cs-slide--flip .cs-visual {
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    min-height: 16rem;
    padding: 2rem;
  }

  .cs-next {
    padding: 3.5rem 1.5rem;
  }
}
