/* =========================================================
   Rounak Lenka — portfolio. White theme.
   Aesthetic: monospace terminal + serif display, numbered
   sections, project cards, live status bar, animated ASCII pet.
   ========================================================= */

:root {
  /* white theme palette */
  --bg:        #ffffff;
  --bg-soft:   #fafafa;
  --bg-card:   #ffffff;
  --line:      #ececec;
  --line-2:    #e2e2e2;
  --ink:       #141414;
  --ink-mid:   #4d4d4d;
  --ink-dim:   #8c8c8c;
  --ink-faint: #b8b8b8;
  --accent:    #141414;      /* keep it monochrome/white */
  --green:     #2f9e54;

  --font-mono: "Source Code Pro", ui-monospace, "SF Mono", Menlo, monospace;
  --font-disp: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease-soft: cubic-bezier(.22, 1, .36, 1);
  --ease:      cubic-bezier(.4, 0, .2, 1);

  --maxw: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* hide native cursor on pointer devices */
@media (hover: hover) and (pointer: fine) {
  body, a, button { cursor: none; }
}

/* ===================== CUSTOM CURSOR ===================== */
.cursor, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  mix-blend-mode: difference; /* stays visible on white */
}
.cursor {
  width: 30px; height: 30px;
  border: 1px solid #fff;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease-soft), height .25s var(--ease-soft),
              background .25s var(--ease-soft), opacity .25s;
}
.cursor-dot {
  width: 5px; height: 5px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.cursor.is-hover {
  width: 54px; height: 54px;
  background: #fff;
}
.cursor.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

/* ===================== ENTRANCE VEIL ===================== */
.veil {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  transform-origin: top;
  animation: veil-peel 1s var(--ease-soft) .15s forwards;
}
@keyframes veil-peel {
  to { transform: scaleY(0); }
}

/* ===================== LAYOUT SHELL ===================== */
.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  max-width: 1320px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 44px 34px 34px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow-y: auto;
  animation: slide-in .9s var(--ease-soft) .4s both;
}
.sidebar::-webkit-scrollbar { width: 0; }
@keyframes slide-in {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* identity */
.brand {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  margin-bottom: 22px;
  transition: transform .3s var(--ease-soft);
}
.brand:hover { transform: scale(1.08); }
.brand-mark { font-size: 15px; animation: spin-star 9s linear infinite; }
@keyframes spin-star { to { transform: rotate(360deg); } }

.ident-name {
  font-family: var(--font-disp);
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}
.ident-role {
  font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 16px;
}
.ident-role a { border-bottom: 1px solid var(--line-2); }
.ident-bio { font-size: 13px; color: var(--ink-dim); line-height: 1.55; margin-bottom: 10px; }
.ident-bio .ink { color: var(--ink); }
.ident-bio a { border-bottom: 1px solid var(--line-2); }

/* section nav with wavy connectors */
.side-nav { display: flex; flex-direction: column; }
.side-link {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px;
  color: var(--ink);
  padding: 7px 6px;
  border-radius: 8px;
  transition: padding .25s var(--ease-soft), background .25s var(--ease), color .2s var(--ease);
}
.side-link:hover { padding-left: 14px; background: var(--bg-soft); }
.side-arr { color: var(--ink-faint); transition: transform .25s var(--ease-soft), color .2s; }
.side-link:hover .side-arr { transform: translateX(4px); color: var(--ink); }

/* resume CTA under the section nav */
.side-resume { align-self: flex-start; margin-top: -6px; }
.side-resume .arr { font-size: 12px; }
.side-resume:hover .arr { transform: translateY(3px); }

/* wavy dashed connector between nav items */
.wavy {
  display: block;
  height: 6px;
  margin: 2px 8px;
  background-repeat: repeat-x;
  background-size: 18px 6px;
  opacity: .6;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='6' viewBox='0 0 18 6'><path d='M0,3 C3,1 6,1 9,3 S15,5 18,3' stroke='%23c9c9cc' stroke-width='1' fill='none'/></svg>");
}

/* status terminal */
.status {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  background: var(--bg-soft);
}
.status-row { display: flex; align-items: center; gap: 8px; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(47,158,84,.45);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47,158,84,.45); }
  70%  { box-shadow: 0 0 0 6px rgba(47,158,84,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,158,84,0); }
}
.status-label { color: var(--ink-mid); }
.status-clock {
  margin: 8px 0 12px;
  color: var(--ink-dim);
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.tz { color: var(--ink-faint); }

/* ===================== MAIN ===================== */
.main {
  padding: 80px clamp(28px, 6vw, 88px) 60px;
  max-width: var(--maxw);
}

/* hero */
.hero { padding: 40px 0 90px; border-bottom: 1px solid var(--line); }
.eyebrow {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 22px;
}
.hero-name {
  font-family: var(--font-disp);
  font-weight: 500;
  font-size: clamp(48px, 9vw, 104px);
  line-height: .98;
  letter-spacing: -.01em;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: 15px; color: var(--ink-mid);
  margin-bottom: 26px;
}
.hero-sub a { border-bottom: 1px solid var(--line-2); }
.hero-intro {
  max-width: 56ch;
  color: var(--ink-mid);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--ink);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px; letter-spacing: .03em;
  background: var(--ink);
  color: #fff;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease-soft);
}
.btn:hover { transform: translateY(-2px); background: #fff; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn .arr { transition: transform .25s var(--ease-soft); }
.btn:hover .arr { transform: translateX(4px); }

/* rise-in entrance for hero items */
.rise {
  opacity: 0;
  transform: translateY(26px);
  animation: rise .9s var(--ease-soft) forwards;
  animation-delay: calc(.55s + var(--d) * .11s);
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== SECTIONS ===================== */
.section { padding: 80px 0; border-bottom: 1px solid var(--line); }
.section--first { padding-top: 8px; }
.section-head {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 48px;
}
.section-no { color: var(--ink-faint); font-size: 14px; }
.section-title {
  font-family: var(--font-disp);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
}
.section-arrow {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 20px;
  transition: transform .3s var(--ease-soft);
}
.section:hover .section-arrow { transform: translateX(6px); color: var(--ink); }

/* ---- staggered two-column masonry of index cards ---- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.cards-col { display: flex; flex-direction: column; gap: 32px; }
.cards-col--offset { padding-top: 56px; }   /* the masonry offset */

.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 16px 20px;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .4s var(--ease-soft), box-shadow .4s var(--ease), border-color .4s var(--ease);
  box-shadow: 0 2px 0 rgba(0,0,0,.015);
}
.card:hover {
  transform: rotate(0deg) translateY(-6px);
  border-color: var(--line-2);
  box-shadow: 0 26px 50px -28px rgba(0,0,0,.28);
}

/* compact "coming soon" card: no image, smaller, not clickable */
.card--soon { padding-bottom: 16px; opacity: .85; cursor: default; }
.card--soon:hover { transform: rotate(var(--tilt, 0deg)); border-color: var(--line); box-shadow: 0 2px 0 rgba(0,0,0,.015); }
.card--soon .card-body { padding: 0 4px; }
.card--soon .card-title { font-size: 19px; margin-bottom: 12px; }
.soon-badge {
  display: inline-block;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-dim); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
}

/* "coming soon" card that still reserves the image area */
.card--upcoming { cursor: default; }
.card--upcoming:hover {
  transform: rotate(var(--tilt, 0deg));
  border-color: var(--line);
  box-shadow: 0 2px 0 rgba(0,0,0,.015);
}
.card--upcoming .card-frame {
  display: flex; align-items: center; justify-content: center;
  border-style: dashed; border-color: var(--line-2);
  background-color: var(--bg-soft);
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.014) 0 12px, transparent 12px 24px);
}
.card--upcoming .card-headline,
.card--upcoming .card-desc { opacity: .68; }
/* an upcoming card that's actually a link to an older case study: make it feel clickable again */
.card--upcoming-link { cursor: pointer; }
.card--upcoming-link .card-headline,
.card--upcoming-link .card-desc { opacity: 1; }
.card--upcoming-link:hover {
  transform: rotate(0deg) translateY(-6px);
  border-color: var(--line-2);
  box-shadow: 0 26px 50px -28px rgba(0,0,0,.28);
}
/* when the upcoming card carries a real image, show it normally and float the badge */
.card--upcoming .card-frame--media {
  display: block;
  border-style: solid; border-color: var(--line);
  background-image: none;
}
.frame-soon {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-dim); background: var(--bg-card);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 15px;
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.35);
}
.frame-soon--overlay {
  position: absolute; top: 12px; left: 12px;
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.frame-soon-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--ink-faint);
  animation: soonpulse 2s var(--ease) infinite;
}
@keyframes soonpulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* index-card header: punch hole + No. */
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 4px 12px;
}
.punch {
  width: 22px; height: 8px; border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
}
.card-no {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 13px; letter-spacing: .06em;
}

/* media frame */
.card-frame {
  position: relative;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.card-media {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--ease-soft);
}
.card:hover .card-media { transform: scale(1.04); }

/* body */
.card-body { padding: 16px 4px 0; }
.card-headline {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.card-title { font-family: var(--font-disp); font-weight: 500; font-size: 26px; line-height: 1.05; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 12px; line-height: 1;
  letter-spacing: .02em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  white-space: nowrap;
}
.card-desc {
  color: var(--ink-mid);
  font-size: 13.5px; line-height: 1.6;
  margin: 12px 0 0;
}

/* details with hairline rule */
.card-details { margin-top: 16px; }
.rule { display: block; height: 1px; background: var(--line); margin-bottom: 14px; }
.meta { display: flex; gap: 26px; flex-wrap: wrap; }
.meta dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.meta dd { font-size: 13px; color: var(--ink); margin-top: 3px; }

/* about */
.about { max-width: 60ch; }
.about-hi { font-family: var(--font-disp); font-size: 30px; font-weight: 500; margin-bottom: 18px; }
.about p { color: var(--ink-mid); margin-bottom: 16px; line-height: 1.8; }

/* playground */
.play { display: flex; flex-direction: column; gap: 22px; }
.play-note { font-size: 13px; color: var(--ink-mid); }
.muted { color: var(--ink-faint); }

/* tabs — segmented control */
.tabs {
  position: relative;
  display: inline-flex; gap: 2px;
  padding: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content; max-width: 100%;
}
.tab {
  position: relative; z-index: 1;
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: .02em;
  color: var(--ink-dim);
  background: none; border: none;
  padding: 9px 18px; border-radius: 999px;
  white-space: nowrap;
  transition: color .25s var(--ease);
}
.tab:hover { color: var(--ink-mid); }
.tab.is-active { color: var(--ink); }
.tab-ink {
  position: absolute; top: 4px; bottom: 4px; left: 0;
  z-index: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 2px 8px -4px rgba(0,0,0,.18);
  width: 0; transform: translateX(0);
  transition: width .38s var(--ease-soft), transform .38s var(--ease-soft);
}

/* panels */
.panel {
  display: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-soft));
  box-shadow: 0 18px 40px -34px rgba(0,0,0,.28);
  animation: panel-in .45s var(--ease-soft);
}
.panel.is-active { display: block; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.panel-lead { font-size: 13.5px; color: var(--ink-mid); margin-bottom: 16px; }

/* textarea + character counter */
.field-wrap { position: relative; }
.field {
  width: 100%;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--ink);
  background: var(--bg-card);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 13px 15px 26px;
  resize: vertical;
  line-height: 1.55;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,20,20,.06); }
.field-count {
  position: absolute; right: 12px; bottom: 9px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint);
  pointer-events: none;
}

.panel-controls {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 16px;
}
.ctrl-spacer { flex: 1 1 0; min-width: 0; }
.select-wrap, .range-wrap {
  display: inline-flex; align-items: center; gap: 10px;
}
.ctrl-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-faint);
}
.select {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--ink); background: var(--bg-card);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 30px 8px 12px; max-width: 220px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%238a8a8a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center;
  transition: border-color .2s var(--ease);
}
.select:hover { border-color: var(--ink-dim); }
.select:focus { outline: none; border-color: var(--ink); }
.select:disabled { color: var(--ink-faint); cursor: default; }

/* custom range slider */
.range-wrap input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 120px; height: 4px; border-radius: 999px;
  background: var(--line-2); cursor: pointer; margin: 0;
}
.range-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--bg-card);
  box-shadow: 0 1px 4px rgba(0,0,0,.28);
}
.range-wrap input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--bg-card);
}
.range-val {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-mid);
  min-width: 30px;
}

/* buttons: disabled state */
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; background: var(--ink); color: #fff; }

.rec-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #d9d9dd; margin-right: 2px; vertical-align: middle;
  transition: background .2s;
}
.btn.recording { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn.recording .rec-dot { background: #fff; animation: pulse 1.2s ease-out infinite; }

/* status pill */
.pg-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .02em;
  color: var(--ink-mid);
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 13px;
}
.pg-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-faint);
}

/* live transcript */
.transcript {
  margin-top: 18px;
  min-height: 110px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 16px 18px;
  font-size: 14px; line-height: 1.7;
  color: var(--ink);
}
.transcript .interim { color: var(--ink-faint); }
.transcript { overflow-y: auto; max-height: 260px; }
.s2s-line { margin-bottom: 10px; }
.s2s-line:last-child { margin-bottom: 0; }
.s2s-who {
  display: inline-block; margin-right: 8px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint);
}
.s2s-who--assistant { color: var(--accent, var(--ink-mid)); }

/* TTS speaking wave */
.wave {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 40px; margin-top: 20px;
}
.wave span {
  width: 4px; height: 32px; border-radius: 999px;
  background: var(--line-2);
  transform: scaleY(.2); transform-origin: center;
  transition: background .25s, transform .25s var(--ease-soft);
}
.wave.on span { background: var(--ink); animation: bars 1s var(--ease-soft) infinite; }
.wave.on span:nth-child(1){ animation-delay:0s }   .wave.on span:nth-child(2){ animation-delay:.07s }
.wave.on span:nth-child(3){ animation-delay:.14s }  .wave.on span:nth-child(4){ animation-delay:.21s }
.wave.on span:nth-child(5){ animation-delay:.28s }  .wave.on span:nth-child(6){ animation-delay:.35s }
.wave.on span:nth-child(7){ animation-delay:.42s }  .wave.on span:nth-child(8){ animation-delay:.35s }
.wave.on span:nth-child(9){ animation-delay:.28s }  .wave.on span:nth-child(10){ animation-delay:.21s }
.wave.on span:nth-child(11){ animation-delay:.14s }
@keyframes bars { 0%,100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }

/* ===================== QUOTE ===================== */
.quote-wrap { padding: 110px 0 70px; }
.quote {
  font-family: var(--font-disp);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(28px, 4.4vw, 50px);
  line-height: 1.25;
  max-width: 20ch;
  color: var(--ink);
}
.quote .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease-soft), transform .5s var(--ease-soft);
}
.quote.in .word { opacity: 1; transform: translateY(0); }

/* ===================== SCROLL REVEAL ===================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===================== FOOTER ===================== */
.footer {
  border-top: 1px solid var(--line);
  padding: 26px clamp(28px, 6vw, 88px);
  animation: rise .9s var(--ease-soft) 1s both;
}
.foot-inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  font-size: 12.5px;
}
.foot-label { color: var(--ink-faint); letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.foot-links { display: flex; gap: 20px; }
.foot-links a {
  color: var(--ink-mid);
  position: relative;
  transition: color .2s var(--ease);
}
.foot-links a::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-soft);
}
.foot-links a:hover { color: var(--ink); }
.foot-links a:hover::after { transform: scaleX(1); }
.foot-copy { margin-left: auto; color: var(--ink-faint); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto; flex-direction: row;
    flex-wrap: wrap; align-items: center; gap: 20px;
    border-right: none; border-bottom: 1px solid var(--line);
  }
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .status { margin: 0; width: 100%; }
  .cards-grid { grid-template-columns: 1fr; gap: 24px; }
  .cards-col { gap: 24px; }
  .cards-col--offset { padding-top: 0; }
  .card { transform: none; }
  .main { padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .reveal, .quote .word, .veil { opacity: 1 !important; transform: none !important; }
}

/* ===================== AGENT-DRIVEN CASE-STUDY OVERLAY ===================== */
.agent-stage {
  position: fixed; inset: 0; z-index: 120;
  display: flex; padding: clamp(12px, 3vw, 40px);
  background: rgba(20,20,20,.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.agent-stage.open { opacity: 1; }
.agent-stage[hidden] { display: none; }
.agent-stage-inner {
  margin: auto; width: 100%; max-width: 1100px; height: 100%;
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.55);
  transform: translateY(14px); transition: transform .3s var(--ease-soft);
}
.agent-stage.open .agent-stage-inner { transform: none; }
.agent-stage-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.agent-stage-title { font-family: var(--font-disp); font-size: 19px; color: var(--ink); }
.agent-stage-hint {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint);
}
.agent-stage-close {
  margin-left: auto; width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-card);
  font-size: 20px; line-height: 1; color: var(--ink-mid);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.agent-stage-close:hover { background: var(--ink); color: #fff; }
.agent-stage-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }

/* ===================== CUSTOM VOICE DROPDOWN ===================== */
/* replaces the native <select> popup; shows ~7 rows, then scrolls */
.cdd { position: relative; display: inline-block; }
.cdd-native {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  opacity: 0; pointer-events: none;
}
.cdd-trigger {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  min-width: 170px; max-width: 230px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink);
  background: var(--bg-card); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 12px; cursor: pointer; transition: border-color .2s var(--ease);
}
.cdd-trigger:hover { border-color: var(--ink-dim); }
.cdd--compact .cdd-trigger { min-width: 120px; max-width: 160px; }
.cdd.open .cdd-trigger { border-color: var(--ink); }
.cdd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdd-caret { color: var(--ink-dim); font-size: 10px; transition: transform .2s var(--ease-soft); }
.cdd.open .cdd-caret { transform: rotate(180deg); }
.cdd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 100%; width: max-content; max-width: 280px;
  background: var(--bg-card); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 20px 44px -22px rgba(0,0,0,.34);
  padding: 5px; overflow-y: auto; display: none;
}
.cdd.open .cdd-panel { display: block; }
.cdd-opt {
  display: block; width: 100%; text-align: left;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-mid);
  background: none; border: 0; border-radius: 7px;
  padding: 9px 10px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.cdd-opt:hover { background: var(--bg-soft); color: var(--ink); }
.cdd-opt.is-sel { background: var(--ink); color: #fff; }
.cdd-panel::-webkit-scrollbar { width: 8px; }
.cdd-panel::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

/* ===================== Claude the crab mascot ===================== */
.crab {
  position: absolute;
  top: 0; left: 0;
  width: 56px; height: 39px;
  z-index: 880;
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
  will-change: transform;
  opacity: 0;
  transition: opacity .6s ease;
}
.crab.on-stage { opacity: 1; }
.crab-svg { display: block; overflow: visible; }
.crab.walking .crab-legs-l { animation: crab-step .16s linear infinite alternate; }
.crab.walking .crab-legs-r { animation: crab-step .16s linear infinite alternate-reverse; }
@keyframes crab-step { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.crab-svg { transform-origin: 50% 100%; }
.crab.startled .crab-inner { animation: crab-spin .65s var(--ease-soft); transform-origin: 32px 28px; }
@keyframes crab-spin { to { transform: rotate(360deg); } }
.crab:hover .crab-claw { animation: crab-pinch .35s ease-in-out infinite alternate; }
@keyframes crab-pinch { to { transform: translateY(-2px); } }
.crab-bubble {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px) scale(.85);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(31, 27, 22, .10);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s var(--ease-soft);
}
.crab-bubble.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.crab-bubble::after {
  content: "";
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}
@media (max-width: 760px) { .crab { display: none; } }
