/* Layout: one full-screen scene (Rishabh's studio) with glass UI floating on it —
   status + nav on top, a speech bubble pinned to the avatar's head, a chat dock at the bottom,
   and a conversation panel that docks right on desktop and rises as a sheet on phones. */
:root {
  --night: #100F1A;
  --glass: rgba(18, 16, 30, 0.56);
  --glass-strong: rgba(18, 16, 30, 0.86);
  --glass-line: rgba(255, 255, 255, 0.12);
  --glass-line-strong: rgba(255, 255, 255, 0.22);
  --text: #F4F2FA;
  --text-soft: #B8B4CC;
  --text-faint: #8A86A0;
  --accent: #FFB547;
  --accent-ink: #1C1305;
  --violet: #8E8CFF;
  --bubble: #FFFFFF;
  --bubble-ink: #15131F;

  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 2.6vw, 32px);
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --blur: blur(18px) saturate(140%);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Scene ---------- */
.app { position: fixed; inset: 0; overflow: hidden; }
.scene, .scene-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-fallback { object-fit: cover; object-position: 50% 38%; opacity: 0; transition: opacity .6s ease; }
.no-canvas .scene-fallback, .no-js .scene-fallback { opacity: 1; }
.shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10, 9, 18, 0.55), rgba(10, 9, 18, 0) 18%),
    linear-gradient(to top, rgba(10, 9, 18, 0.82), rgba(10, 9, 18, 0) 34%);
  transition: background-color .6s ease;
}
.app.is-chatting .shade { background-color: rgba(10, 9, 18, 0.06); }

/* ---------- Top bar ---------- */
.top {
  position: absolute; z-index: 10; left: 0; right: 0;
  top: env(safe-area-inset-top, 0px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: var(--gutter);
}
.status {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap; color: var(--text);
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--accent)); box-shadow: 0 0 0 0 rgba(255, 181, 71, .6); animation: pulse 2.4s ease-out infinite; flex: none; transition: background-color .4s ease; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 181, 71, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(255, 181, 71, 0); } }
.status-k { color: var(--text-soft); }
.status-sep { color: var(--text-faint); }
.status-v { color: var(--text); text-transform: none; letter-spacing: 0.01em; font-family: var(--f-body); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; }
.status-time { color: var(--text-soft); text-transform: none; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }

.top-nav {
  display: flex; align-items: center; gap: 4px;
  border-radius: 999px; background: rgba(16, 15, 26, .78);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.top-nav button, .top-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px; border: 1px solid transparent; background: none;
  font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  color: var(--text); white-space: nowrap; transition: background-color .2s ease, border-color .2s ease;
}
.top-nav button:hover, .top-nav a:hover { background: var(--glass); border-color: var(--glass-line); }
.top-nav svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.top-nav svg.ext { width: 11px; height: 11px; opacity: .6; }
.nav-toggle { display: none; }

/* ---------- Speech bubble ---------- */
.bubble {
  position: absolute; z-index: 8; left: 0; top: 0;
  max-width: min(340px, calc(100vw - 32px));
  padding: 14px 18px;
  background: var(--bubble); color: var(--bubble-ink);
  border-radius: 22px 22px 22px 6px;
  box-shadow: 0 18px 50px rgba(5, 4, 12, 0.35);
  font-family: var(--f-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.35;
  opacity: 0; scale: 0.85; transform-origin: 0% 100%;
  transition: opacity .3s ease, scale .45s var(--ease);
  pointer-events: none; will-change: transform;
}
.bubble.show { opacity: 1; scale: 1; }
.bubble.flip { border-radius: 22px 22px 6px 22px; transform-origin: 100% 100%; }
.bubble.up { border-radius: 22px; transform-origin: 50% 0%; }
.bubble.up::before {
  content: ""; position: absolute; left: 50%; top: -7px; width: 16px; height: 16px; margin-left: -8px;
  background: var(--bubble); border-radius: 3px; transform: rotate(45deg);
}
.bubble.muted { opacity: 0; }
.bubble-text { margin: 0; min-height: 1.35em; }
.bubble-text .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.12em; background: currentColor; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.typing { display: inline-flex; gap: 5px; align-items: center; height: 1.35em; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .35; animation: dot 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Dock ---------- */
.dock-wrap {
  position: absolute; z-index: 12; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  width: min(880px, calc(100% - 2 * var(--gutter)));
  display: grid; gap: 14px;
}
.dock {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 24px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 20px 60px rgba(5, 4, 12, 0.35);
  transition: border-color .2s ease, background-color .2s ease;
}
.dock:focus-within { border-color: rgba(255, 181, 71, 0.6); background: var(--glass-strong); }
.dock input {
  flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; outline: none;
  font-size: 1.0625rem; color: var(--text);
}
.dock input::placeholder { color: var(--text-soft); }
.send {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .25s var(--ease), filter .2s ease;
}
.send:hover { transform: scale(1.06); filter: brightness(1.05); }
.send:active { transform: scale(0.94); }
.send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  padding: 10px 18px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text); white-space: nowrap;
  opacity: 0; translate: 0 8px; animation: chip-in .5s var(--ease) forwards;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.chip:hover { background: var(--glass-strong); border-color: rgba(255, 181, 71, 0.55); color: var(--accent); }
@keyframes chip-in { to { opacity: 1; translate: 0 0; } }

/* ---------- Conversation ---------- */
.convo {
  position: absolute; z-index: 11;
  right: var(--gutter); top: calc(84px + env(safe-area-inset-top, 0px));
  bottom: calc(var(--gutter) + 150px + env(safe-area-inset-bottom, 0px));
  width: min(460px, calc(100% - 2 * var(--gutter)));
  display: flex; flex-direction: column;
  background: var(--glass-strong); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(5, 4, 12, 0.45);
  opacity: 0; translate: 24px 0; transition: opacity .35s ease, translate .5s var(--ease);
}
.convo.open { opacity: 1; translate: 0 0; }
.convo[hidden] { display: none; }
.convo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--glass-line); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; }
.who strong { display: block; font-size: 0.9375rem; }
.who span { display: block; font-size: 0.75rem; color: var(--text-soft); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--glass-line); background: transparent; transition: background-color .2s ease; flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.icon-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.convo-log { scrollbar-color: var(--accent) transparent; scrollbar-width: thin; scrollbar-gutter: stable; flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; overscroll-behavior: contain; }
.msg { max-width: 92%; animation: msg-in .45s var(--ease) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px); } }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 18px 18px 6px 18px; font-weight: 500; }
.msg.bot { align-self: flex-start; display: grid; gap: 12px; color: var(--text); }
.msg.bot p { margin: 0; }
.msg.bot .lead { font-family: var(--f-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.4; }
.msg .typing { color: var(--text-soft); padding: 6px 0; }

.a-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 1px solid var(--glass-line-strong); margin-left: 6px; }
.a-timeline li.has-logo { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; }
.a-timeline li.has-logo .logo { width: 38px; height: 38px; border-radius: 10px; font-size: 1rem; }
/* Centre each dot on the line and on its 38px logo tile */
.a-timeline li.has-logo::before { top: 14px; }
.a-timeline li { position: relative; padding: 0 0 14px 18px; }
.a-timeline li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--night); border: 2px solid var(--accent); }
.award { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 4px 10px 4px 7px; border-radius: 999px; background: rgba(255, 181, 71, 0.12); border: 1px solid rgba(255, 181, 71, 0.4); color: var(--accent); font-size: 0.75rem; font-weight: 600; }
.award svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.a-timeline .when { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.a-timeline strong { display: block; font-size: 0.9375rem; }
.a-timeline span.note { display: block; font-size: 0.875rem; color: var(--text-soft); }

.a-cards { display: grid; gap: 10px; }
.a-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-line); text-decoration: none; transition: border-color .2s ease, background-color .2s ease; }
.a-card:hover { border-color: rgba(255, 181, 71, 0.5); background: rgba(255, 255, 255, 0.08); }
.a-card img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: #26233a; }
.a-card strong { display: block; font-size: 0.9375rem; }
.a-card span { display: block; font-size: 0.8125rem; color: var(--text-soft); line-height: 1.45; }
.a-card .go { color: var(--accent); font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }

.a-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.a-shot { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.a-shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #26233a; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.a-shot:hover img, .a-shot:focus-visible img { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--accent), 0 12px 28px rgba(0, 0, 0, 0.35); }
.a-shot:focus-visible { outline: none; }
.a-shot-cap { display: block; font-size: 0.75rem; color: var(--text-soft); margin-top: 4px; }

/* Full-screen carousel for chat image grids */
.gal-open { overflow: hidden; }
.gal { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 16px clamp(12px, 3vw, 32px) 18px; border: 0; background: transparent; color: var(--text); display: none; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 10px; }
.gal[open] { display: grid; animation: galIn .3s var(--ease); }
.gal::backdrop { background: rgba(8, 7, 14, 0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@keyframes galIn { from { opacity: 0; transform: scale(0.98); } }
.gal-top { display: flex; align-items: center; justify-content: space-between; }
.gal-count { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.12em; color: var(--text-soft); }
.gal-close, .gal-nav { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--glass-line-strong); border-radius: 999px; background: var(--glass-strong); color: var(--text); cursor: pointer; transition: background-color .2s ease, opacity .2s ease; }
.gal-close:hover, .gal-nav:hover { background: rgba(255, 255, 255, 0.14); }
.gal-close svg, .gal-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gal-stage { position: relative; min-height: 0; overflow: hidden; touch-action: pan-y; cursor: grab; }
.gal-track { display: flex; height: 100%; transition: transform .45s var(--ease); }
.gal-track.drag, .gal-track.still { transition: none; }
.gal-slide { flex: 0 0 100%; height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0 clamp(0px, 5vw, 64px); box-sizing: border-box; }
.gal-slide img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); user-select: none; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.gal-nav.prev { left: 0; }
.gal-nav.next { right: 0; }
.gal-nav:disabled { opacity: 0; pointer-events: none; }
.gal-cap { text-align: center; font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; }
.gal-thumbs { display: flex; justify-content: center; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.gal-thumbs button { flex: none; width: 64px; height: 44px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #26233a; opacity: 0.5; cursor: pointer; transition: opacity .2s ease, box-shadow .2s ease; }
.gal-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-thumbs button:hover { opacity: 0.85; }
.gal-thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 600px) {
  .gal-nav { display: none; }
  .gal-slide { padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .gal[open] { animation: none; } }

.a-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.a-pills li { padding: 6px 12px; border-radius: 999px; font-size: 0.8125rem; border: 1px solid var(--glass-line-strong); }
.a-pills li.hot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.a-pills.tools li { background: rgba(142, 140, 255, 0.16); border-color: rgba(142, 140, 255, 0.4); }
.a-pills.tools li.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.a-label { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin: 2px 0 -4px; }

.a-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text); font-size: 0.9375rem; }
.a-list li::marker { color: var(--accent); }
.a-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: s; }
.a-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; font-size: 0.9375rem; counter-increment: s; }
.a-steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: 0.75rem; background: rgba(255, 255, 255, 0.08); color: var(--accent); }
.a-steps strong { display: block; }
.a-steps span { color: var(--text-soft); font-size: 0.875rem; }

.a-links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--glass-line-strong); background: rgba(255, 255, 255, 0.04);
  font-size: 0.875rem; font-weight: 500; text-decoration: none; color: var(--text);
  transition: background-color .2s ease, border-color .2s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent); filter: brightness(1.06); }

.followups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.followups button { padding: 7px 12px; border-radius: 999px; border: 1px dashed var(--glass-line-strong); background: transparent; font-size: 0.8125rem; color: var(--text-soft); transition: color .2s ease, border-color .2s ease; }
.followups button:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Classic sheet ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 40; overflow-y: auto;
  background: rgba(10, 9, 18, 0.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .35s ease;
  overscroll-behavior: contain;
}
.sheet.open { opacity: 1; }
.sheet[hidden] { display: none; }
.sheet-inner {
  width: min(880px, calc(100% - 2 * var(--gutter)));
  margin: calc(var(--gutter) + env(safe-area-inset-top, 0px)) auto calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  padding: clamp(20px, 4vw, 48px);
  background: #17152A; border: 1px solid var(--glass-line); border-radius: 28px;
  translate: 0 20px; transition: translate .5s var(--ease);
}
.sheet.open .sheet-inner { translate: 0 0; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.label { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); margin: 0; }
.cv-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; padding-bottom: 32px; border-bottom: 1px solid var(--glass-line); }
.cv-hero img { width: 120px; height: 120px; border-radius: 24px; object-fit: cover; object-position: 50% 30%; }
.cv-hero h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1; letter-spacing: -0.02em; }
.cv-role { margin: 8px 0 12px; color: var(--accent); font-weight: 500; }
.cv-lead { margin: 0; color: var(--text-soft); max-width: 58ch; }
.cv-block { padding-block: 28px; border-bottom: 1px solid var(--glass-line); }
.cv-block h3 { margin: 0 0 16px; font-family: var(--f-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-soft); }
.cv-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cv-timeline li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.cv-timeline .when { display: block; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.06em; color: var(--accent); font-variant-numeric: tabular-nums; }
.cv-timeline p { margin: 2px 0 0; color: var(--text-soft); font-size: 0.9375rem; }
.cv-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cv-card { display: grid; gap: 8px; text-decoration: none; padding: 10px; border-radius: 18px; border: 1px solid var(--glass-line); transition: border-color .2s ease; }
.cv-card:hover { border-color: rgba(255, 181, 71, 0.5); }
.cv-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: #26233a; }
.cv-card.wide { grid-column: 1 / -1; }
.cv-journey { margin: 14px 0 0; }
.cv-card.wide img { aspect-ratio: 1120 / 620; }
.cv-card strong { font-family: var(--f-display); font-size: 1.25rem; padding-inline: 4px; }
.cv-card span { color: var(--text-soft); font-size: 0.9375rem; padding: 0 4px 6px; }
.cv-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cv-pills li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--glass-line-strong); font-size: 0.9375rem; }
.cv-pills li.tool { background: rgba(142, 140, 255, 0.16); border-color: rgba(142, 140, 255, 0.4); }
.cv-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.cv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cv-list strong { display: block; font-size: 0.9375rem; }
.cv-list span { display: block; color: var(--text-soft); font-size: 0.875rem; }
.cv-links { display: flex; flex-wrap: wrap; gap: 10px; }
.cv-links .btn { padding: 12px 18px; font-size: 0.9375rem; }
.cv-foot { margin: 24px 0 0; color: var(--text-faint); font-family: var(--f-mono); font-size: 0.75rem; }

/* ---------- Responsive ---------- */
/* Mid widths: the nav is long, so the clock goes first and LinkedIn becomes an icon; the title never collapses */
@media (max-width: 1540px) {
  .status-time { display: none; }
}
@media (max-width: 1440px) {
  .top-nav .nav-in { font-size: 0; gap: 0; padding-inline: 10px; }
  .top-nav .nav-in svg { width: 16px; height: 16px; }
}
@media (min-width: 901px) and (max-width: 1270px) {
  .top-nav button[data-ask="projects"] { display: none; }
  .top-nav .nav-contact { font-size: 0; gap: 0; padding-inline: 10px; }
  .top-nav .nav-contact svg { width: 16px; height: 16px; }
}
@media (min-width: 901px) and (max-width: 1000px) {
  .top-nav .nav-cs { font-size: 0; gap: 0; padding-inline: 10px; }
  .top-nav .nav-cs svg { width: 16px; height: 16px; }
}
@media (max-width: 1320px) {
  .status-v { min-width: 12ch; }
}
@media (max-width: 1100px) {
  .status-at { display: none; }
  .status { padding-inline: 12px; gap: 8px; }
  .status-v { font-size: 0.8125rem; min-width: 0; }
  .top-nav .nav-in { font-size: 0; gap: 0; padding-inline: 10px; }
  .top-nav .nav-in svg { width: 16px; height: 16px; }
}
@media (max-width: 1000px) {
  .status-k, .status-sep { display: none; }
}
/* Phones and small tablets: the nav folds into a burger that opens a labelled menu */
@media (max-width: 900px) {
  .status-time { display: none; }
  .top { padding-bottom: 0; }
  .status { flex: 0 1 auto; }
  .nav-toggle {
    display: grid; place-content: center; gap: 4px; flex: none; width: 44px; height: 44px; padding: 0;
    border-radius: 999px; border: 1px solid var(--glass-line); background: rgba(16, 15, 26, .78); color: var(--text); cursor: pointer;
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  }
  .nav-toggle span { display: block; width: 18px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s ease; }
  .top.menu-open .nav-toggle span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
  .top.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .top.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }
  .top-nav {
    position: absolute; top: calc(100% + 10px); right: var(--gutter); width: min(280px, calc(100vw - 2 * var(--gutter)));
    display: grid; gap: 2px; padding: 8px; border-radius: 20px; background: var(--glass-strong);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    visibility: hidden; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right;
    transition: opacity .2s ease, transform .2s var(--ease), visibility 0s linear .2s;
  }
  .top.menu-open .top-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s var(--ease); }
  .top-nav button, .top-nav a,
  .top-nav .nav-in, .top-nav .nav-contact, .top-nav .nav-cs, .top-nav .nav-learn {
    display: flex; justify-content: flex-start; width: 100%; gap: 12px; padding: 13px 14px; border-radius: 12px;
    font-size: 0.8125rem; text-align: left;
  }
  .top-nav button[data-ask="projects"] { display: flex; }
  .top-nav svg, .top-nav .nav-in svg, .top-nav .nav-contact svg, .top-nav .nav-cs svg, .top-nav .nav-learn svg { width: 17px; height: 17px; }
}
@media (max-width: 720px) {
  .status { padding: 8px 12px; min-height: 44px; }
  .status-k, .status-sep { display: none; }
  .status-v { font-size: 0.8125rem; }
  .bubble { font-size: 1rem; padding: 12px 15px; }
  .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .dock { padding-left: 18px; }
  .dock input { height: 44px; font-size: 1rem; }
  .send { width: 44px; height: 44px; }
  /* Phones: the chat opens full height, from under the top bar down to the input */
  .convo { left: var(--gutter); right: var(--gutter); width: auto; top: calc(env(safe-area-inset-top, 0px) + var(--gutter) + 54px); bottom: calc(var(--gutter) + 124px + env(safe-area-inset-bottom, 0px)); translate: 0 24px; }
  .convo.open { translate: 0 0; }
  .cv-hero { grid-template-columns: minmax(0, 1fr); }
  .cv-cards, .cv-two { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* =========================================================
   Loader: Rishabh juggling a Figma logo and a game controller, on a solid background
   ========================================================= */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: #17152A;
  transition: opacity .4s ease, visibility .4s;
  animation: loader-failsafe .5s ease 10s forwards;
}
.loader.done { opacity: 0; visibility: hidden; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
.no-js .loader { display: none; }
/* Exit: a soft-edged hole opens in this (cheap, solid) layer from the avatar, revealing the studio underneath. */
@property --hole { syntax: '<length>'; inherits: false; initial-value: 0px; }
.loader.opening {
  --hole: var(--hole-end, 150vmax);
  -webkit-mask-image: radial-gradient(circle at var(--cx, 50%) var(--cy, 50%), transparent calc(var(--hole) - 60px), #000 var(--hole));
  mask-image: radial-gradient(circle at var(--cx, 50%) var(--cy, 50%), transparent calc(var(--hole) - 60px), #000 var(--hole));
  transition: --hole 1.05s cubic-bezier(.65, 0, .35, 1);
}
.loader.fading { opacity: 0; transition: opacity .6s ease; }
.jl.leaving canvas { opacity: 0; transform: scale(.88); transition: opacity .35s ease, transform .45s cubic-bezier(.5, 0, .75, 0); }
.jl.leaving .jl-bar { opacity: 0; transition: opacity .2s ease; }
.jl { position: relative; display: grid; place-items: center; }
/* 512×520 frame centred on the avatar, loader-sized: up to 240px, smaller on narrow or short screens. */
.jl canvas {
  display: block; aspect-ratio: 512 / 520; height: auto;
  width: min(240px, 58vw, calc(38vh * 512 / 520));
  width: min(240px, 58vw, calc(38svh * 512 / 520));
  opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .45s ease, transform .6s var(--ease);
}
.jl canvas.ready { opacity: 1; transform: none; }
.jl-bar { position: absolute; left: 50%; top: 80%; transform: translateX(-50%); width: 42%; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.jl-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--violet), var(--accent)); }

/* ---------- Look crossfade ---------- */
.scene-fade { position: absolute; z-index: 1; pointer-events: none; max-width: none; transition: opacity .8s ease, filter .8s ease; }
.scene-fade.out { opacity: 0; }

/* ---------- Nav YouTube ---------- */
.top-nav .nav-yt .fill { fill: currentColor; stroke: none; }

/* ---------- Company logos ---------- */
.logo {
  width: 44px; height: 44px; flex: none; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--glass-line);
  font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--bubble-ink);
}
.logo img { width: 62%; height: 62%; object-fit: contain; }
.logo.mono { background: linear-gradient(135deg, #2A2742, #1B1930); color: var(--accent); }

/* ---------- YouTube buttons ---------- */
.btn .yt { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }

/* ---------- Classic view: creator ---------- */
.cv-creator-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end; padding: 20px; border-radius: 20px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--glass-line); }
.cv-creator-card p { margin: 0 0 12px; color: var(--text-soft); }
.cv-creator-title { font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; color: var(--text) !important; }
.cv-creator-title span { display: block; font-family: var(--f-mono); font-size: 0.75rem; font-weight: 400; color: var(--text-faint); letter-spacing: 0.04em; }

@media (max-width: 720px) {
  .cv-creator-card { grid-template-columns: minmax(0, 1fr); }
  }

/* Consistent leading icons on contact actions. */
.contact-icon { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Role duration and location, secondary to the role title. */
.experience-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 6px; color: var(--text-soft); font-size: 0.75rem; line-height: 1.5; }
.experience-location { display: inline-flex; align-items: center; gap: 5px; }
.experience-location svg { width: 13px; height: 13px; flex: 0 0 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================
   Learning storyboard: numbered frames with self-drawing sketches,
   skills picked up in each scene, and certificate badges.
   ========================================================= */
.sb { display: grid; gap: 10px; min-width: 0; }
.sb-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 2px 10px; scrollbar-width: none; overscroll-behavior-x: contain; outline: none;
}
.sb-track::-webkit-scrollbar { display: none; }
.sb-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.sb-frame {
  position: relative; flex: 0 0 min(236px, 80%); scroll-snap-align: start;
  display: grid; gap: 10px; align-content: start;
  animation: sb-in .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms);
}
@keyframes sb-in { from { opacity: 0; transform: translateY(10px); } }
.sb-frame:not(:last-child)::after {
  content: ""; position: absolute; top: 54px; right: -13px; width: 12px;
  border-top: 1.5px dashed var(--glass-line-strong);
}
.sb-sketch {
  position: relative; aspect-ratio: 120 / 76; border-radius: 10px; overflow: hidden;
  background: #F2F0F8; box-shadow: inset 0 0 0 1px rgba(21, 19, 31, 0.08);
  display: grid; place-items: center;
}
.sb-sketch::before { content: ""; position: absolute; inset: 7px; border: 1px dashed rgba(21, 19, 31, 0.14); border-radius: 5px; pointer-events: none; }
.sb-sketch svg { width: 78%; height: auto; overflow: visible; }
.sb-sketch svg * {
  fill: none; stroke: #2A2742; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s cubic-bezier(.65, 0, .35, 1);
}
.sb-sketch svg .hl { stroke: #E0860B; transition-delay: .35s; }
.sb-frame.drawn .sb-sketch svg * { stroke-dashoffset: 0; }
.sb-sc { position: absolute; left: 12px; top: 10px; font-family: var(--f-mono); font-size: 0.5625rem; letter-spacing: 0.12em; color: rgba(21, 19, 31, 0.55); }
.sb-when { position: absolute; right: 10px; top: 9px; padding: 2px 7px; border-radius: 999px; background: #2A2742; color: #F4F2FA; font-family: var(--f-mono); font-size: 0.5625rem; letter-spacing: 0.08em; text-transform: uppercase; }
.sb-cap { display: grid; gap: 6px; }
.sb-cap strong { font-size: 0.9375rem; line-height: 1.3; }
.sb-cap p { margin: 0; font-size: 0.8125rem; line-height: 1.5; color: var(--text-soft); }
.sb-label { margin-top: 2px; font-family: var(--f-mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.sb-skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.sb-skills li { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--glass-line-strong); font-size: 0.71875rem; color: var(--text); }
.sb-skills.now li { background: rgba(255, 181, 71, 0.14); border-color: rgba(255, 181, 71, 0.5); color: var(--accent); }
.sb-certs { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 5px; }
.sb-certs li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 7px; align-items: center; font-size: 0.75rem; line-height: 1.35; color: var(--text); }
.sb-logo { width: 20px; height: 20px; border-radius: 5px; background: #fff; display: grid; place-items: center; overflow: hidden; font-size: 0.625rem; font-weight: 700; color: var(--bubble-ink); }
.sb-logo img { width: 72%; height: 72%; object-fit: contain; }
.sb-logo.mono { font-size: 0.5rem; letter-spacing: -0.02em; }
.sb-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sb-tools li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--glass-line-strong); background: rgba(255, 255, 255, 0.05); font-size: 0.75rem; color: var(--text); }
.sb-tools .sb-logo { width: 18px; height: 18px; border-radius: 50%; }
.sb-id { font-family: var(--f-mono); font-size: 0.625rem; color: var(--text-faint); overflow-wrap: anywhere; }
.sb-nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: -6px; }
.sb-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--glass-line-strong); background: transparent; color: var(--text); transition: background-color .2s ease, opacity .2s ease; }
.sb-btn:hover { background: rgba(255, 255, 255, 0.08); }
.sb-btn:disabled { opacity: .35; cursor: default; }
.sb-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sb-count { font-family: var(--f-mono); font-size: 0.75rem; color: var(--text-soft); font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; }
.sheet .sb-frame { flex-basis: min(260px, 82%); }
@media (prefers-reduced-motion: reduce) {
  .sb-frame { animation: none; }
  .sb-sketch svg * { stroke-dashoffset: 0; transition: none; }
}

/* With JavaScript the storyboard replaces the plain education/certification lists in classic view. */
.js .cv-learn-fallback { display: none; }

/* =========================================================
   3D learning storyboard: scenes on a curved stage, active one facing you.
   ========================================================= */
.sb3 { --card-w: clamp(250px, 24vw, 310px); --stage-h: clamp(500px, 64svh, 620px); display: grid; gap: 14px; }
.sb3-stage {
  position: relative; height: var(--stage-h); overflow: hidden;
  perspective: 1500px; perspective-origin: 50% 42%;
  display: grid; justify-items: center;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; outline: none;
}
.sb3-stage.dragging { cursor: grabbing; }
.sb3-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 18px; }
/* glowing floor the scenes stand on */
.sb3-stage::before {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 42%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(142, 140, 255, 0.2), rgba(255, 181, 71, 0.06) 45%, transparent 70%);
}
.sb3-ring { position: relative; width: var(--card-w); height: 100%; transform-style: preserve-3d; }
.sb3-card {
  position: absolute; left: 0; top: 18px; width: var(--card-w);
  padding: 12px; border-radius: 18px; background: #1D1A33; border: 1px solid var(--glass-line);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 50%; backface-visibility: hidden; will-change: transform, opacity;
  -webkit-box-reflect: below 10px linear-gradient(transparent 76%, rgba(255, 255, 255, 0.13));
  animation: none;
}
.sb3-card::after {
  content: ""; position: absolute; inset: 0; top: 0; right: 0; width: auto; border: 0; border-radius: inherit;
  background: rgba(12, 11, 20, var(--dim, 0)); pointer-events: none; transition: background-color .2s ease;
}
.sb3-card.is-active { border-color: rgba(255, 181, 71, 0.45); box-shadow: 0 0 0 1px rgba(255, 181, 71, 0.25), 0 40px 80px rgba(0, 0, 0, 0.55); }
.sb3-card .sb-cap strong { font-size: 1rem; }
.sb3-controls { display: flex; align-items: center; justify-content: center; gap: 14px; }
.sb3-dots { display: flex; gap: 6px; }
.sb3-dot { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.22); transition: width .3s var(--ease), background-color .3s ease; }
.sb3-dot[aria-current="true"] { width: 22px; background: var(--accent); }

.sheet .sb3 { --stage-h: 560px; --card-w: clamp(240px, 30vw, 290px); }
@media (max-width: 720px) {
  .sb3 { --card-w: min(76vw, 290px); --stage-h: min(600px, 74svh); }
}


