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

/* ============================================
   TOKENS
   ============================================ */
:root {
  --paper:     #FAFAF7;
  --ink:       #111110;
  --ink-mid:   #555550;
  --ink-faint: #CCCCC5;
  --yellow:    #FFD02F;
  --yellow-bg: #FFFAE8;
  --rule:      rgba(17,17,16,0.10);

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-mono:    'DM Mono', 'Courier New', monospace;
  --ff-body:    'DM Sans', system-ui, sans-serif;

  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   BASE
   ============================================ */
html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent, transparent 27px,
    rgba(17,17,16,0.028) 27px, rgba(17,17,16,0.028) 28px
  );
}

a { text-decoration: none; color: inherit; }

/* ============================================
   NAV
   ============================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  transition: background 0.4s, border-color 0.4s;
}

#nav.pinned {
  background: rgba(250,250,247,0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav-left { display: flex; align-items: center; gap: 16px; }

.nav-logo {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--ink);
  background: var(--yellow);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-status {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-mid);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3ECF8E;
  animation: blink 2.4s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--ink-mid);
  letter-spacing: 0.2px;
  transition: color 0.2s;
}

.nav-links a:not(.nav-cta):hover { color: var(--ink); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--yellow) !important;
  color: var(--ink) !important;
  transform: scale(0.97);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.burger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile menu */
.mob-menu {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 190;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 48px;
  gap: 20px;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
}

.mob-menu.open { transform: translateX(0); }

.mob-link {
  font-family: var(--ff-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--ink);
  transition: color 0.2s;
}

.mob-link:hover { color: var(--ink-mid); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 120px 48px 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

#sketchCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.hero-annotation {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-mid);
  letter-spacing: 1.5px;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s var(--ease) 0.1s forwards;
}

.hero-headline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 48px;
}

.h-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  opacity: 0;
  transform: translateY(20px);
}

.h-row:nth-child(1) { animation: fadeUp 0.7s var(--ease) 0.2s  forwards; }
.h-row:nth-child(2) { animation: fadeUp 0.7s var(--ease) 0.35s forwards; }
.h-row:nth-child(3) { animation: fadeUp 0.7s var(--ease) 0.5s  forwards; }

.h-italic {
  font-family: var(--ff-display);
  font-size: clamp(52px, 9vw, 108px);
  font-weight: 400;
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -3px;
  color: var(--ink);
}

.h-rule {
  flex: 1;
  height: 2px;
  background: var(--ink);
  align-self: center;
  max-width: 180px;
}

.h-normal {
  font-family: var(--ff-display);
  font-size: clamp(52px, 9vw, 108px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -3px;
  color: var(--ink-mid);
}

.h-bold {
  font-family: var(--ff-display);
  font-size: clamp(52px, 9vw, 108px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -3px;
  color: var(--ink);
}

.indent { padding-left: 80px; }

.h-outline {
  font-family: var(--ff-display);
  font-size: clamp(52px, 9vw, 108px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -3px;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.65s forwards;
}

.hero-sub {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.75;
  max-width: 420px;
}

.hero-btns { display: flex; gap: 14px; align-items: center; flex-shrink: 0; }

.hero-side {
  position: absolute;
  right: 48px; bottom: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 2;
}

.side-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 2px;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.side-line {
  width: 1px; height: 60px;
  background: var(--ink-faint);
  position: relative; overflow: hidden;
}

.side-line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--ink);
  animation: scanDown 2s infinite var(--ease);
}

@keyframes scanDown {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-ink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--paper);
  background: var(--ink);
  padding: 13px 28px;
  border-radius: 100px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn-ink:hover {
  background: var(--yellow);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn-bare {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--ink-mid);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.btn-bare:hover { color: var(--ink); }

/* ============================================
   TICKER
   ============================================ */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  background: var(--yellow-bg);
}

.ticker-inner {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: tick 38s linear infinite;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.8px;
  align-items: center;
}

.bull { font-size: 8px; color: var(--ink-faint); }

@keyframes tick {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================
   SECTION BASE
   ============================================ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 48px;
}

.sec-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-mid);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.sec-head { margin-bottom: 64px; }

.sec-title {
  font-family: var(--ff-display);
  font-size: clamp(30px, 4.5vw, 50px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--ink);
}

.sec-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-mid);
}

/* ============================================
   WORK GRID
   ============================================ */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border: 1px solid var(--rule);
  margin-bottom: 40px;
}

.w-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
  transition: background 0.3s;
}

.w-card:hover { background: #F3F3EE; }

.w-card.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
.w-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }

.w-card::before {
  content: attr(data-num);
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 1px;
  z-index: 3;
}

/* thumbnail */
.w-thumb {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.featured .w-thumb,
.wide .w-thumb { height: auto; min-height: 240px; }

.t-green      { background: linear-gradient(135deg, #D4EDDA 0%, #A8D5B5 100%); }
.t-blue       { background: linear-gradient(135deg, #D4E5F7 0%, #A8C8EC 100%); }
.t-purple     { background: linear-gradient(135deg, #E8D4F7 0%, #CBA8EC 100%); }
.t-warm       { background: linear-gradient(135deg, #F7ECD4 0%, #ECD0A8 100%); }
.t-slate      { background: linear-gradient(135deg, #DDE3E9 0%, #BCC5CF 100%); }
.t-yellow-soft{ background: linear-gradient(135deg, #FEF9D4 0%, #FAE8A8 100%); }
.t-teal       { background: linear-gradient(135deg, #D4F0EE 0%, #A8DED9 100%); }

.thumb-label {
  position: absolute;
  top: 16px; left: 16px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 1px;
  background: var(--yellow);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
  z-index: 2;
}

/* sketch-style UI mockups */
.sketch-ui {
  border: 1.5px solid rgba(17,17,16,0.18);
  border-radius: 10px;
  background: rgba(255,255,255,0.85);
  box-shadow: 3px 4px 0px rgba(17,17,16,0.10);
  transition: transform 0.4s var(--ease-spring);
}

.w-card:hover .sketch-ui { transform: translateY(-5px) rotate(-0.5deg); }

/* phone */
.sketch-ui.phone {
  width: 120px;
  padding: 14px 10px;
}

.su-topbar {
  height: 6px;
  border-radius: 3px;
  background: rgba(17,17,16,0.12);
  margin-bottom: 12px;
}

.su-cards { display: flex; flex-direction: column; gap: 7px; }
.su-card  { height: 34px; border-radius: 6px; background: rgba(17,17,16,0.07); }
.su-card.c-warm1 { background: rgba(255,208,47,0.45); }
.su-card.c-warm2 { background: rgba(17,17,16,0.1); }
.su-card.c-warm3 { background: rgba(17,17,16,0.05); }

.su-nav-dots {
  display: flex; gap: 5px; justify-content: center; margin-top: 12px;
}

.nd {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(17,17,16,0.12);
}

.nd.active { background: var(--ink); width: 14px; border-radius: 3px; }

/* browser */
.sketch-ui.browser {
  width: 200px;
  padding: 10px;
}

.sketch-ui.browser.sm { width: 180px; }

.su-browser-bar { display: flex; gap: 5px; margin-bottom: 10px; }
.bb-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(17,17,16,0.12); }

.su-hero-block { height: 40px; border-radius: 5px; background: rgba(17,17,16,0.07); margin-bottom: 10px; }
.green-block  { background: rgba(40,167,69,0.2); }
.blue-block   { background: rgba(0,123,255,0.18); }
.purple-block { background: rgba(111,66,193,0.18); }

.su-product-row { display: flex; gap: 6px; }
.su-prod { flex: 1; height: 48px; border-radius: 5px; background: rgba(17,17,16,0.05); border: 1px solid rgba(17,17,16,0.08); }
.p-green  { background: rgba(40,167,69,0.15); }
.p-blue   { background: rgba(0,123,255,0.12); }
.p-purple { background: rgba(111,66,193,0.12); }

/* feed (SLUGRAM) */
.su-feed { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.feed-item { height: 30px; border-radius: 4px; background: rgba(17,17,16,0.07); }
.feed-item.short { width: 70%; }

/* game grid */
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 0;
}

.gg-cell {
  height: 32px;
  border-radius: 4px;
  background: rgba(17,17,16,0.08);
  border: 1px solid rgba(17,17,16,0.1);
}

.gg-cell.y { background: rgba(255,208,47,0.5); border-color: rgba(255,208,47,0.8); }

.gg-word {
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(17,17,16,0.4);
  margin-top: 8px;
}

/* dashboard */
.sketch-ui.dash {
  width: 240px;
  padding: 12px;
  display: flex;
  gap: 10px;
}

.dash-left {
  width: 30px;
  display: flex; flex-direction: column; gap: 8px; padding-top: 4px;
}

.dl-item { height: 8px; border-radius: 3px; background: rgba(17,17,16,0.1); }
.dl-item.active { background: var(--ink); }

.dash-right { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.dr-row { display: flex; gap: 6px; }
.dr-stat { flex: 1; height: 28px; border-radius: 5px; }
.s-teal { background: rgba(0,188,172,0.35); }
.s2     { background: rgba(17,17,16,0.07); }
.s3     { background: rgba(17,17,16,0.05); }
.dr-chart { flex: 1; height: 60px; border-radius: 5px; }
.teal-chart {
  background: linear-gradient(180deg, rgba(0,188,172,0.25) 0%, rgba(0,188,172,0.04) 100%);
  border-bottom: 2px solid rgba(0,188,172,0.7);
}

/* card body */
.w-body { padding: 24px 28px 28px; }

.w-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.w-tool-group { display: flex; gap: 6px; }

.w-type {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-mid);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.w-tool {
  font-family: var(--ff-mono);
  font-size: 11px;
  background: var(--yellow);
  color: var(--ink);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 500;
  white-space: nowrap;
}

.w-tool.alt {
  background: transparent;
  border: 1px solid rgba(17,17,16,0.2);
  color: var(--ink-mid);
}

.w-title {
  font-family: var(--ff-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.w-desc {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.75;
  margin-bottom: 16px;
}

.w-tags {
  display: flex; flex-wrap: wrap; gap: 7px; list-style: none;
  margin-bottom: 14px;
}

.w-tags li {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-mid);
  border: 1px solid var(--rule);
  padding: 4px 11px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  transition: border-color 0.2s, color 0.2s;
}

.w-card:hover .w-tags li {
  border-color: rgba(17,17,16,0.2);
  color: var(--ink);
}

.w-pub-link {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink);
  border-bottom: 1.5px solid var(--yellow);
  padding-bottom: 1px;
  transition: color 0.2s;
  display: inline-block;
}

.w-pub-link:hover { color: var(--ink-mid); }

/* ============================================
   PROJECT CAROUSEL — "the card catalog"
   A library index-tab rail sits beside one full
   card. Switching projects tears the card in two
   along its existing visual/body seam: the photo
   half is pulled up off the top, the body half is
   pulled down off the bottom, like yanking a card
   out of a drawer — and the next card slides in
   from the opposite edges to fill the gap.
   ============================================ */

/* Wrapper */
.cs-outer {
  margin-bottom: 40px;
  display: flex;
  gap: 22px;
  align-items: stretch;
}

/* ── Index rail ── */
.cs-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  width: 132px;
  padding-top: 4px;
}

.cs-tab {
  display: flex;
  align-items: baseline;
  gap: 9px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-right-width: 3px;
  border-radius: 3px 8px 8px 3px;
  padding: 11px 10px 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.35s var(--ease-spring), border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: 0 1px 0 rgba(17,17,16,0.04);
}

.cst-num {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.5px;
  transition: color 0.25s var(--ease);
}

.cst-name {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--ink-mid);
  letter-spacing: 0.2px;
  line-height: 1.25;
  transition: color 0.25s var(--ease);
}

.cs-tab:hover {
  border-color: var(--ink-faint);
  transform: translateX(2px);
}

/* active tab is pulled toward the viewer, like the
   tab currently held between two fingers */
.cs-tab.active {
  background: var(--yellow-bg);
  border-color: var(--ink);
  transform: translateX(10px);
  box-shadow: -3px 0 0 var(--yellow), 0 4px 14px -6px rgba(17,17,16,0.18);
}
.cs-tab.active .cst-num  { color: var(--ink); }
.cs-tab.active .cst-name { color: var(--ink); font-weight: 500; }

/* ── Stage ── */
.cs-track {
  position: relative;
  flex: 1;
  min-height: 460px;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
}

.cs-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(17,17,16,0.22), 0 2px 6px rgba(17,17,16,0.06);
  pointer-events: none;
}

.cs-slide.is-active {
  pointer-events: auto;
  z-index: 3;
}

/* the two panels are the "halves" that get torn
   apart on exit and pulled in on entry */
.cs-slide .cs-visual,
.cs-slide .cs-body {
  transition: transform 0.55s var(--ease), opacity 0.4s var(--ease), clip-path 0.55s var(--ease);
}

/* default resting state for any non-active slide:
   parked off-stage, invisible, ready to be pulled in */
.cs-slide:not(.is-active) .cs-visual { transform: translateY(-26px); opacity: 0; }
.cs-slide:not(.is-active) .cs-body   { transform: translateY(26px);  opacity: 0; }
.cs-slide:not(.is-active) { z-index: 1; }

.cs-slide.is-active .cs-visual,
.cs-slide.is-active .cs-body {
  transform: translateY(0);
  opacity: 1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* torn-pull exit: photo half rips upward past the
   frame, body half rips downward, both along a
   jagged diagonal edge instead of a straight cut */
.cs-slide.is-leaving {
  z-index: 4;
  pointer-events: none;
}
.cs-slide.is-leaving .cs-visual {
  transform: translateY(-130%) rotate(-2.5deg);
  opacity: 0;
  clip-path: polygon(0 0, 100% 0, 96% 78%, 88% 84%, 80% 76%, 70% 88%, 58% 80%, 46% 90%, 32% 82%, 18% 92%, 6% 84%, 0 90%);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), clip-path 0.5s var(--ease);
}
.cs-slide.is-leaving .cs-body {
  transform: translateY(130%) rotate(2deg);
  opacity: 0;
  clip-path: polygon(0 16%, 6% 10%, 18% 18%, 32% 8%, 46% 20%, 58% 10%, 70% 22%, 80% 14%, 88% 24%, 96% 12%, 100% 18%, 100% 100%, 0 100%);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), clip-path 0.5s var(--ease);
}

/* ── Visual (left) panel ── */
.cs-visual {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 13px 0 0 13px;
}

/* Badge (e.g. "★ Published Research") */
.cs-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.8px;
  background: var(--yellow);
  color: var(--ink);
  padding: 4px 12px;
  border-radius: 100px;
}

/* Placeholder mock when no photo */
.cs-mock {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: opacity 0.3s;
}

/* Real photo — hidden until src is set by JS.
   "contain" keeps the whole screenshot visible and
   undistorted; "cover" was zooming into a tiny sliver
   of wide/tall screenshots and cropping out the content. */
.cs-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--paper);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s;
}

/* When photo loads, show it and hide mock */
.cs-photo.loaded {
  opacity: 1;
}
.cs-photo.loaded ~ .cs-mock {
  opacity: 0;
  pointer-events: none;
}

/* ── Info (right) panel ── */
.cs-body {
  position: relative;
  padding: 40px 40px 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--rule);
}

.cs-body .w-title  { font-size: 22px; margin-bottom: 12px; margin-top: 6px; }
.cs-body .w-desc   { margin-bottom: 18px; }
.cs-body .w-tags   { margin-bottom: 16px; }
.cs-body .w-meta   { margin-bottom: 14px; }

/* ── Controls bar ── */
.cs-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 0 2px;
}

.cs-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.3s var(--ease-spring);
  flex-shrink: 0;
}

.cs-arrow:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: scale(0.95) rotate(-8deg);
}
.cs-next:hover { transform: scale(0.95) rotate(8deg); }

.cs-arrow:active { transform: scale(0.88); }

/* Counter — replaces the old dot row; tells you
   exactly where you are in the catalog */
.cs-counter {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--ink-mid);
  min-width: 48px;
  text-align: center;
}
.cs-counter span { color: var(--ink); font-weight: 500; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .cs-outer { flex-direction: column; gap: 14px; }
  .cs-rail  {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    padding: 2px 2px 6px;
    gap: 8px;
  }
  .cs-tab {
    flex-shrink: 0;
    border-right-width: 1px;
    border-bottom-width: 3px;
    border-radius: 8px 8px 3px 3px;
  }
  .cs-tab.active { transform: translateY(-4px); box-shadow: 0 -3px 0 var(--yellow), 0 4px 14px -6px rgba(17,17,16,0.18); }
  .cs-tab:hover { transform: translateY(-2px); }
}

@media (max-width: 760px) {
  .cs-track          { min-height: 560px; }
  .cs-slide          { grid-template-columns: 1fr; }
  .cs-visual         { min-height: 220px; border-radius: 13px 13px 0 0; }
  .cs-body           { border-left: none; border-top: 1px solid var(--rule); padding: 30px 20px 24px; }
  .cs-body .w-title  { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-slide .cs-visual, .cs-slide .cs-body { transition: opacity 0.3s linear !important; transform: none !important; clip-path: none !important; }
  .cs-slide:not(.is-active) .cs-visual, .cs-slide:not(.is-active) .cs-body { opacity: 0 !important; }
}


/* More projects strip */
.more-projects {
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}

.more-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-mid);
  padding: 16px 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--yellow-bg);
}

.more-list { display: flex; flex-direction: column; }

.more-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s;
}

.more-item:last-child { border-bottom: none; }
.more-item:hover { background: #F3F3EE; }

.mi-num {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 1px;
  flex-shrink: 0;
  margin-top: 2px;
}

.mi-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 3px;
}

.mi-sub {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-mid);
  letter-spacing: 0.3px;
}

/* ============================================
   EXPERIENCE
   ============================================ */
.exp-section { border-top: 1px solid var(--rule); }

.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

.exp-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: border-color 0.3s, transform 0.3s var(--ease-spring);
}

.exp-card:hover {
  border-color: rgba(17,17,16,0.2);
  transform: translateY(-2px);
}

.exp-card.highlight {
  border-color: var(--yellow);
  background: var(--yellow-bg);
}

.exp-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.exp-meta {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-mid);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.exp-title {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.exp-desc {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-bottom: 10px;
}

.exp-link {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink);
  border-bottom: 1.5px solid var(--yellow);
  padding-bottom: 1px;
  display: inline-block;
  transition: color 0.2s;
}

.exp-link:hover { color: var(--ink-mid); }

/* Certificates */
.certs-row { border-top: 1px solid var(--rule); padding-top: 40px; }

.certs-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-mid);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.certs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-chip {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-mid);
  border: 1px solid var(--rule);
  padding: 7px 16px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  transition: border-color 0.2s;
}

.cert-chip:hover { border-color: rgba(17,17,16,0.2); color: var(--ink); }

.cert-chip.highlight-chip {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
  font-weight: 500;
}

/* ============================================
   ABOUT
   ============================================ */
.about-section { border-top: 1px solid var(--rule); }

.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 80px;
  align-items: start;
}

.portrait-frame {
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.portrait-fill {
  background: var(--yellow-bg);
  height: 400px;
  position: relative;
  overflow: hidden;
}

.portrait-fill::before {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px dashed rgba(17,17,16,0.15);
  border-radius: 6px;
  z-index: 2;
  pointer-events: none;
}

.portrait-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.portrait-caption {
  display: flex;
  justify-content: space-between;
  padding: 13px 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-mid);
  letter-spacing: 0.5px;
  background: var(--paper);
}

.tools-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tools-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }

.tl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  transition: border-color 0.2s, background 0.2s;
}

.tl-item:hover {
  border-color: var(--ink);
  background: var(--yellow-bg);
}

.tl-icon {
  width: 30px; height: 30px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--yellow);
  color: var(--ink);
  flex-shrink: 0;
}

.tl-icon.xd { background: #FFE0EC; color: #C50E5E; font-size: 11px; }
.tl-icon.sk { background: #F5E6FF; color: #7B2FBE; }
.tl-icon.cv { background: #E3F5FF; color: #0057C2; }

.dev-tags {
  display: flex; flex-wrap: wrap; gap: 7px;
}

.dev-tags span {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-mid);
  border: 1px solid var(--rule);
  padding: 4px 11px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  transition: border-color 0.2s, color 0.2s;
}

.dev-tags span:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.about-text .sec-title { margin-bottom: 24px; }

.about-para {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-para em { font-style: italic; color: var(--ink); }
.about-text .btn-ink { margin-top: 12px; }

/* ============================================
   CONTACT
   ============================================ */
.contact-section {
  border-top: 1px solid var(--rule);
  max-width: 100%;
  padding: 0;
}

.contact-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 48px;
}

.contact-head {
  font-family: var(--ff-display);
  font-size: clamp(44px, 7.5vw, 92px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -px;
  color: var(--ink);
  margin: 20px 0 64px;
}

.contact-head em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-mid);
}

.ch-yellow {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  position: relative;
  display: inline-block;
}

.ch-yellow::after {
  content: 'with code.';
  position: absolute;
  left: 5px; top: 5px;
  color: var(--yellow);
  -webkit-text-stroke: 0;
  z-index: -4;
  white-space: nowrap;
}

.contact-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  border-top: 1px solid var(--rule);
  padding-top: 40px;
}

.contact-left p {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 20px;
}

.contact-email {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 3px;
  display: inline-block;
  transition: color 0.2s;
}

.contact-email:hover { color: var(--ink-mid); }

.contact-right { display: flex; flex-direction: column; }

.c-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.3px;
  transition: padding-left 0.3s var(--ease), color 0.2s;
}

.c-link:hover { padding-left: 12px; color: var(--ink-mid); }

.c-link span {
  font-size: 14px;
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.2s;
}

.c-link:hover span { opacity: 1; transform: translate(3px, -3px); }

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid var(--rule);
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.5px;
}

.footer-mid { color: var(--ink-mid); }

/* ============================================
   REVEAL
   ============================================ */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  #nav { padding: 18px 24px; }
  .nav-links { display: none; }
  .burger { display: flex; }

  .hero { padding: 100px 24px 56px; }
  .hero-side { right: 24px; }
  .indent { padding-left: 32px; }

  .section { padding: 72px 24px; }
  .contact-wrap { padding: 72px 24px; }

  .work-grid { grid-template-columns: 1fr; }
  .w-card.wide,
  .w-card.featured { grid-template-columns: 1fr; }

  .exp-grid { grid-template-columns: 1fr; }

  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 320px; }

  .contact-body { grid-template-columns: 1fr; gap: 40px; }

  footer { flex-direction: column; gap: 8px; padding: 20px 24px; text-align: center; }
  .footer-mid { display: none; }
}

@media (max-width: 480px) {
  .h-outline { -webkit-text-stroke-width: 1.5px; }
  .ch-yellow  { -webkit-text-stroke-width: 1.5px; }
  .mob-menu   { padding: 0 24px; }
  .mob-link   { font-size: 36px; }
}

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