/* =============================================================
   Vaibhav Kaushal — Portfolio
   Dark Minimal · blue hues
   Design tokens + base + components
   ============================================================= */

/* ---- Design tokens ---------------------------------------- */
:root {
  /* Canvas & surfaces (near-black, cool-tinted) */
  --bg:            #0a0b0d;
  --surface-1:     #101216;
  --surface-2:     #16191e;
  --surface-3:     #1d2127;

  /* Borders (low-alpha hairlines) */
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text-primary:   #eef1f5;
  --text-secondary: #a4abb6;
  --text-muted:     #7d8794; /* ≥4.5:1 on --bg, AA at caption sizes */

  /* Blue accent scale */
  --accent-050: #eaf2ff;
  --accent-200: #b6d3ff;
  --accent-400: #6ea8fe;
  --accent-500: #4d8fe8;   /* primary */
  --accent-600: #3d7fd4;
  --accent-glow: rgba(77, 143, 232, 0.16);
  --accent-tint: rgba(77, 143, 232, 0.10);

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  /* Layout */
  --maxw: 1320px;
  --gutter: clamp(16px, 3.2vw, 44px);
  --radius: 14px;
  --radius-sm: 8px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;
}

/* ---- Reset / base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::selection { background: var(--accent-glow); color: var(--text-primary); }

/* Ambient animated background canvas (js/background.js) */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Neon cursor trail + click burst (js/cursor.js).
   Sits above everything since it tracks the pointer; pointer-events
   must stay none or it would swallow every click on the site. */
#cursor-fx {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

/* Subtle cool radial glow behind hero (base layer / no-JS fallback) */
body::before {
  content: "";
  position: fixed;
  top: -20vh; left: 50%;
  width: 120vw; height: 90vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--accent-tint) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Layout primitives ------------------------------------ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.section { padding-block: clamp(72px, 12vh, 140px); }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-400);
  font-weight: 500;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent-500);
}

/* ---- Typography scale ------------------------------------- */
h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 62ch;
  font-weight: 400;
}
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: 0; }
.text-accent { color: var(--accent-400); }
.muted { color: var(--text-muted); }

/* ---- Skip link (keyboard users) --------------------------- */
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 100;
  background: var(--surface-3); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 14px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---- Navigation ------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 11, 13, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
  position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px; background: var(--accent-400);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 8px 18px !important;
  color: var(--text-primary) !important;
}
.nav-cta:hover { background: var(--surface-2); border-color: var(--accent-500); }
.nav-cta::after { display: none; }

.nav-toggle {
  display: none;
  background: none; border: none; color: var(--text-primary);
  font-size: 22px; cursor: pointer; padding: 4px;
}

/* ---- Wordmark / logo -------------------------------------- */
.wordmark { display: flex; align-items: center; }
.logo-svg {
  height: 24px; width: auto; display: block;
  color: var(--text-primary);
  transition: color 0.25s var(--ease);
}
.wordmark:hover .logo-svg { color: var(--accent-400); }

/* ---- Hero (split: type + featured visual) ----------------- */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 96px; padding-bottom: 48px; }
.hero-split { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; width: 100%; }
@media (min-width: 900px) { .hero-split { grid-template-columns: 1.08fr 0.92fr; gap: 64px; } }
.hero-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 28px; }
.hero-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 6px 14px; margin-bottom: 28px;
}
.hero-badges .hero-status { margin-bottom: 0; }

/* Award credential chip — same accent family as .badge / .tag, so the
   recognition reads as part of the system rather than a sticker. */
.hero-award {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 6px 14px; border-radius: 100px;
  color: var(--accent-200);
  background: var(--accent-tint);
  border: 1px solid rgba(77, 143, 232, 0.3);
}
.hero-award i { color: var(--accent-400); font-size: 15px; }
.hero-status .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-400);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); max-width: 15ch; margin-bottom: 26px; }
.hero h1 .grad { color: var(--accent-400); }
.hero-sub { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px; }
.hero-sub .item .k { font-size: 13px; color: var(--text-muted); margin: 0 0 3px; }
.hero-sub .item .v { font-size: 15px; color: var(--text-primary); margin: 0; }
.scroll-cue {
  margin-top: 44px; display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-muted);
}
.scroll-cue i { animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Featured visual card in hero */
.hero-featured {
  display: block; position: relative; border-radius: var(--radius);
  overflow: visible; border: 1px solid var(--border); background: var(--surface-2);
  aspect-ratio: 4 / 5; max-height: 78vh;
}
@media (max-width: 900px) { .hero-featured { aspect-ratio: 16 / 10; max-height: 380px; } }
.hero-featured .img { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-muted); }
.hero-featured img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
/* Zoom only a true cover image. .featured-img is excluded because it centres
   itself with a transform, which a bare scale() here would overwrite. */
.hero-featured:hover img:not(.featured-img) { transform: scale(1.04); }
.hero-featured .badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent-tint); color: var(--accent-400);
  border: 1px solid rgba(77, 143, 232, 0.3); border-radius: 100px; padding: 4px 12px;
}
.hero-featured .overlay {
  position: absolute; inset: auto 0 0 0; padding: 22px; z-index: 2;
  background: linear-gradient(to top, rgba(10, 11, 13, 0.94), rgba(10,11,13,0.4) 55%, transparent);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.hero-featured .overlay .fl { font-size: 12px; color: var(--accent-400); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 5px; }
.hero-featured .overlay .ft { font-size: 20px; font-weight: 500; color: var(--text-primary); margin: 0; letter-spacing: -0.02em; }
.hero-featured .overlay i { color: var(--text-secondary); transition: color 0.25s var(--ease), transform 0.25s var(--ease); }
.hero-featured:hover .overlay i { color: var(--accent-400); transform: translate(3px, -3px); }

/* The featured mockup. Overflows the card frame on purpose (transparent PNG),
   and is centred by transform — so nothing else may set transform on it. */
.hero-featured .featured-img {
  position: absolute; z-index: 1;
  top: 48%; left: 50%; transform: translate(-50%, -50%);
  width: 134%; height: auto; max-width: none;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.45));
}
@media (max-width: 900px) {
  .hero-featured .featured-img { width: 118%; top: 46%; }
}
.hero-featured .badge, .hero-featured .overlay { z-index: 2; }
a.overlay { text-decoration: none; }
.hero-featured .drag-hint {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-size: 11px; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 5px;
  pointer-events: none;
}

/* ---- Client strip ----------------------------------------- */
.clients { border-block: 1px solid var(--border); }
.clients .inner { display: flex; align-items: center; gap: 20px 40px; flex-wrap: wrap; padding-block: 26px; }
.clients .lbl { font-size: 12px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.clients .logos { display: flex; align-items: center; gap: 16px 40px; flex-wrap: wrap; }
.clients .logos span {
  font-size: 16px; font-weight: 500; color: var(--text-secondary);
  letter-spacing: -0.01em; opacity: 0.72;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}
.clients .logos span:hover { opacity: 1; color: var(--text-primary); }

/* ---- About / tools ---------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1.4fr 1fr; gap: 72px; } }
.about-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 32px; font-size: 15px; font-weight: 500;
  color: var(--accent-400);
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}
.about-cta i { font-size: 18px; }
.about-cta:hover { color: var(--accent-500); gap: 12px; }
.tools-list { display: flex; flex-direction: column; gap: 14px; }
.tools-list .row {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.tools-list .row span:last-child { color: var(--text-muted); font-size: 13px; }

/* ---- Work grid -------------------------------------------- */
.work-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 48px; flex-wrap: wrap;
}
/* Index list of projects */
.work-list { border-top: 1px solid var(--border); margin-top: 8px; }
.work-row {
  display: flex; align-items: center; gap: 20px;
  padding-block: clamp(20px, 3vw, 34px);
  border-bottom: 1px solid var(--border);
  position: relative; transition: padding-left 0.35s var(--ease);
}
.work-row .idx { font-size: 13px; color: var(--text-muted); width: 30px; flex-shrink: 0; font-variant-numeric: tabular-nums; transition: color 0.3s var(--ease); }
.work-row .title { font-size: clamp(1.45rem, 3.8vw, 2.5rem); font-weight: 500; letter-spacing: -0.03em; color: var(--text-primary); line-height: 1.1; transition: color 0.3s var(--ease); }
.work-row .spacer { flex: 1; }
.work-row .tag { font-size: 12px; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 100px; padding: 4px 12px; white-space: nowrap; }
.work-row .go { color: var(--text-muted); font-size: 22px; flex-shrink: 0; transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.work-row .thumb { display: none; }
.work-row.is-featured .tag { background: var(--accent-tint); color: var(--accent-400); border-color: rgba(77, 143, 232, 0.3); }
@media (hover: hover) {
  .work-row:hover { padding-left: 16px; }
  .work-row:hover .title,
  .work-row:hover .idx { color: var(--accent-400); }
  .work-row:hover .go { color: var(--accent-400); transform: translateX(4px); }
}

/* Floating preview (desktop hover) */
.work-preview {
  position: fixed; top: 0; left: 0; z-index: 45;
  width: 340px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--surface-3);
  pointer-events: none; opacity: 0;
  transform: translateY(-50%) scale(0.94); transform-origin: left center;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.work-preview.show { opacity: 1; transform: translateY(-50%) scale(1); }
.work-preview .pimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-secondary); font-size: 14px; text-align: center; padding: 12px; }
.work-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Mobile: inline thumbs, no floating preview */
@media (hover: none), (max-width: 720px) {
  .work-preview { display: none !important; }
  .work-row { gap: 10px 14px; flex-wrap: wrap; padding-left: 0 !important; }
  .work-row .idx { width: auto; }
  .work-row .spacer { display: none; }
  .work-row .thumb { display: block; width: 56px; height: 40px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); flex-shrink: 0; overflow: hidden; }
  .work-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .work-row .title { flex: 1 1 auto; min-width: 0; font-size: clamp(1.25rem, 5.6vw, 1.6rem); }
  .work-row .tag { font-size: 11px; }
  .work-row .go { margin-left: auto; }
}

/* ---- Experience timeline (lean) --------------------------- */
.tl { margin-top: 8px; border-top: 1px solid var(--border); }
.tl-item {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  padding-block: 24px; border-bottom: 1px solid var(--border);
}
@media (min-width: 720px) { .tl-item { grid-template-columns: 150px 1fr auto; gap: 32px; align-items: baseline; } }
.tl-item .yr { font-size: 14px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tl-item .role { font-size: 17px; font-weight: 500; color: var(--text-primary); }
.tl-item .role .org { color: var(--text-secondary); font-weight: 400; }
.tl-item .place { font-size: 13px; color: var(--text-muted); }

/* ---- Contact / footer ------------------------------------- */
.contact { text-align: center; }
.contact h2 { max-width: 18ch; margin-inline: auto; margin-bottom: 24px; }
.contact-email {
  display: inline-block; font-size: clamp(1.4rem, 4vw, 2.4rem);
  color: var(--text-primary); font-weight: 500; letter-spacing: -0.03em;
  border-bottom: 1px solid var(--border-strong); padding-bottom: 4px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact-email:hover { color: var(--accent-400); border-color: var(--accent-500); }
.social-row { display: flex; gap: 14px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.social-row a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 100px; padding: 9px 18px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.social-row a:hover { color: var(--text-primary); border-color: var(--accent-500); }

.footer {
  border-top: 1px solid var(--border);
  padding: 32px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  color: var(--text-muted); font-size: 13px;
}

/* ---- Scroll progress bar ---------------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent-600), var(--accent-400));
  z-index: 60; transition: width 0.1s linear;
}

/* ---- Scroll reveal ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* =============================================================
   Case study page
   ============================================================= */
.cs-hero { padding-top: 140px; padding-bottom: 40px; }
.cs-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-secondary); margin-bottom: 40px;
  transition: gap 0.25s var(--ease), color 0.25s var(--ease);
}
.cs-back:hover { color: var(--accent-400); gap: 12px; }
.cs-hero h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); max-width: 18ch; margin-bottom: 24px; }
.cs-metabar {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 40px;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border);
}
@media (min-width: 720px) { .cs-metabar { grid-template-columns: repeat(4, 1fr); } }
.cs-metabar .k { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 6px; }
.cs-metabar .v { font-size: 15px; color: var(--text-primary); margin: 0; }

.cs-cover {
  aspect-ratio: 16 / 9; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text-muted);
  overflow: hidden; margin-block: 8px 96px;
}
.cs-cover img { width: 100%; height: 100%; object-fit: cover; }

.cs-block { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 80px; }
@media (min-width: 860px) { .cs-block { grid-template-columns: 300px 1fr; gap: 56px; } }
.cs-block .cs-label { position: sticky; top: 110px; align-self: start; }
.cs-block .cs-label .eyebrow { margin-bottom: 10px; }
.cs-block .cs-label p { font-size: 14px; color: var(--text-muted); margin: 0; }
.cs-block .cs-body p { color: var(--text-secondary); margin: 0 0 20px; max-width: 68ch; }
.cs-block .cs-body p strong { color: var(--text-primary); font-weight: 500; }

.cs-figure {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2);
  margin: 12px 0 8px;
}
.cs-figure .ph {
  aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--text-muted); font-size: 14px;
}
.cs-figure img { display: block; width: 100%; height: auto; }
.cs-figure figcaption { font-size: 13px; color: var(--text-muted); padding: 12px 16px; border-top: 1px solid var(--border); }

.cs-figgrid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .cs-figgrid-2 { grid-template-columns: 1fr 1fr; } }

.cs-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 8px 0 20px; }
.cs-metric { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 22px; }
.cs-metric .num { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 500; letter-spacing: -0.03em; color: var(--accent-400); }
.cs-metric .lbl { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.cs-next {
  border-top: 1px solid var(--border); margin-top: 40px;
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 40px; gap: 20px; flex-wrap: wrap;
}
.cs-next .lbl { font-size: 13px; color: var(--text-muted); }
.cs-next .title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; letter-spacing: -0.03em; }
.cs-next a:hover .title { color: var(--accent-400); }

/* ---- Case study: reusable content components -------------- */
.cs-cards { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 8px 0 24px; }
@media (min-width: 640px) {
  .cs-cards-2 { grid-template-columns: 1fr 1fr; }
  .cs-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.cs-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; }
.cs-card h4 { font-size: 15px; font-weight: 500; margin: 0 0 8px; color: var(--text-primary); }
.cs-card h4 .n { color: var(--accent-400); margin-right: 8px; }
.cs-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.55; }
.cs-card p + p { margin-top: 10px; }

.cs-quote { border-left: 2px solid var(--accent-500); border-radius: 0; padding: 4px 0 4px 22px; margin: 20px 0; }
.cs-quote p { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.2rem, 2.5vw, 1.55rem); color: var(--text-primary); margin: 0 0 10px; line-height: 1.4; }
.cs-quote cite { font-style: normal; font-size: 13px; color: var(--text-muted); }

.cs-table-wrap { overflow-x: auto; margin: 8px 0 24px; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.cs-table th { text-align: left; font-weight: 500; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 16px; border-bottom: 1px solid var(--border-strong); }
.cs-table td { padding: 14px 16px; color: var(--text-secondary); border-bottom: 1px solid var(--border); vertical-align: top; }
.cs-table td:first-child { color: var(--text-primary); }

.cs-tierlist { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 20px; }
.cs-tier { display: flex; align-items: center; gap: 14px; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; }
.cs-tier .num { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--accent-tint); color: var(--accent-400); display: grid; place-items: center; font-size: 13px; font-weight: 500; }
.cs-tier .lbl { font-size: 15px; color: var(--text-primary); font-weight: 500; }
.cs-tier .lbl span { color: var(--text-muted); font-weight: 400; font-size: 14px; }

.cs-insight { text-align: center; padding: clamp(48px, 9vw, 96px) 0; }
.cs-insight .eyebrow { justify-content: center; }
.cs-insight h2 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 22px; }
.cs-insight p { color: var(--text-secondary); max-width: 58ch; margin: 0 auto; font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.6; }

/* Persona card */
.persona { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.persona .phead { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; border-bottom: 1px solid var(--border); }
.persona .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-400); display: grid; place-items: center; font-weight: 500; flex-shrink: 0; }
.persona .who .nm { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.persona .who .rl { font-size: 13px; color: var(--text-muted); }
.persona .ptag { margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-400); background: var(--accent-tint); padding: 3px 9px; border-radius: 100px; }
.persona .pbody { padding: 8px 18px 18px; }
.persona .pbody .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 14px 0 4px; }
.persona .pbody p { font-size: 13.5px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.persona .pbody .win { color: var(--text-primary); }

/* Palette chips (design system section) */
.cs-palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 10px; margin: 8px 0 20px; }
.cs-swatch { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.cs-swatch .chip { height: 44px; }
.cs-swatch .meta { padding: 8px 10px; }
.cs-swatch .nm { font-size: 12px; color: var(--text-primary); }
.cs-swatch .hex { font-size: 11px; color: var(--text-muted); font-family: monospace; }

/* Full-width case-study section heading (non-sticky) */
.cs-wide .lead { margin-bottom: 8px; }

/* ---- Mobile nav / responsive ------------------------------ */
@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0 0 auto 0;
    top: 0; padding: 88px var(--gutter) 32px;
    flex-direction: column; align-items: flex-start; gap: 20px;
    background: rgba(10, 11, 13, 0.96);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%); transition: transform 0.4s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 20px; }
  .hero-sub { gap: 20px 32px; }
  .logo-svg { height: 21px; }
}

/* ---- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .am-portrait { transform: none !important; }
}

/* ============================================================
   About-me page (about-me.html) — 3D tilt hero + hobby sections
   ============================================================ */

/* --- Hero: intro + tilt portrait --- */
.am-hero { padding: clamp(28px, 7vh, 72px) 0 clamp(40px, 7vh, 88px); }
.am-hero-grid { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; margin-top: 12px; }
@media (min-width: 900px) { .am-hero-grid { grid-template-columns: 1.02fr 0.98fr; gap: 64px; } }
.am-hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.4rem); line-height: 1.03; letter-spacing: -0.04em; margin: 16px 0 22px; }
.am-hero .lead { max-width: 48ch; }
.am-hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* chips (reused across the page) */
.am-chip {
  font-size: 13px; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 7px 15px; background: var(--surface-1);
}
.am-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Tilt portrait (JS drives rotateX/rotateY + sheen; see js/about-me.js) --- */
.am-portrait-stage { perspective: 1100px; }
.am-portrait {
  position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden;
  aspect-ratio: 4 / 5; background: var(--surface-2);
  border: 1px solid var(--border-strong);
  transform-style: preserve-3d; will-change: transform;
  box-shadow: 0 34px 90px -34px rgba(0, 0, 0, 0.75);
  transition: box-shadow 0.4s var(--ease);
}
.am-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-portrait .am-sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 30%), rgba(110, 168, 254, 0.30), transparent 46%);
}
.am-portrait .am-frame {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.am-portrait-cap {
  position: absolute; left: 16px; bottom: 16px; transform: translateZ(40px);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-primary);
  background: rgba(10, 11, 13, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong); border-radius: 100px; padding: 7px 14px;
}
.am-portrait-hint { margin-top: 16px; font-size: 12px; color: var(--text-muted); text-align: center; }
.am-portrait-hint i { font-size: 14px; vertical-align: -2px; }
@media (hover: none) { .am-portrait-hint { display: none; } }

/* --- Feature sections (numbered, alternating) --- */
.am-feature { padding: clamp(40px, 7vh, 80px) 0; border-top: 1px solid var(--border); }
.am-feature-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 860px) {
  .am-feature-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .am-feature.is-reversed .am-feature-media { order: 2; }
}
.am-num { font-size: 13px; letter-spacing: 0.12em; color: var(--accent-400); font-variant-numeric: tabular-nums; }
.am-feature h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -0.03em; margin: 12px 0 18px; }
.am-feature p { color: var(--text-secondary); max-width: 46ch; }
.am-feature .am-chips { margin-top: 22px; }

/* image slot / placeholder */
.am-media {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); background: var(--surface-1);
}
.am-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-media.is-placeholder {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(77, 143, 232, 0.12), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--surface-1));
}
.am-media.is-placeholder .ph-num {
  position: absolute; right: 20px; top: 4px; line-height: 1;
  font-size: clamp(72px, 13vw, 150px); font-weight: 700; letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.035);
}
.am-media.is-placeholder .ph-label {
  position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px;
  align-items: center; text-align: center; padding: 20px;
  font-size: 13px; color: var(--text-muted); text-transform: none;
}
.am-media.is-placeholder .ph-label b { color: var(--text-secondary); font-weight: 500; font-size: 15px; }

/* --- Other hobbies grid --- */
.am-interests { border-top: 1px solid var(--border); padding: clamp(40px, 7vh, 80px) 0; }
.am-interests h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); letter-spacing: -0.03em; margin-top: 14px; max-width: 26ch; }
.am-interest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 36px; }
.am-interest {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: var(--surface-1);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.am-interest:hover { border-color: var(--border-strong); transform: translateY(-3px); background: var(--surface-2); }
.am-interest .k { font-size: 13px; color: var(--accent-400); font-variant-numeric: tabular-nums; }
.am-interest h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.02em; margin: 10px 0 8px; }
.am-interest p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }

/* --- Closing CTA --- */
.am-closing { border-top: 1px solid var(--border); padding: clamp(48px, 9vh, 110px) 0; text-align: center; }
.am-closing h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); letter-spacing: -0.03em; max-width: 20ch; margin: 0 auto 26px; }
.am-closing .about-cta { margin-top: 0; }

/* ============================================================
   Gate UI (unlock.html / admin.html) — password + share links
   ============================================================ */
.gate-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px var(--gutter); }
.gate-card {
  width: 100%; max-width: 440px; text-align: center;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); padding: 40px 34px;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.7);
}
.gate-card-wide { max-width: 520px; text-align: left; }
.gate-logo { display: inline-flex; margin-bottom: 24px; color: var(--text-primary); }
.gate-logo .logo-svg { height: 22px; }
.gate-lockicon {
  width: 52px; height: 52px; margin: 0 auto 20px; border-radius: 14px;
  display: grid; place-items: center; color: var(--accent-400);
  background: var(--accent-tint); border: 1px solid rgba(77, 143, 232, 0.3);
}
.gate-title { font-size: 1.6rem; letter-spacing: -0.03em; margin-bottom: 12px; }
.gate-sub { color: var(--text-secondary); font-size: 15px; line-height: 1.55; margin-bottom: 26px; }
.gate-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.gate-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; margin-top: 8px; }
.gate-opt { color: var(--text-muted); font-weight: 400; }
.gate-input {
  width: 100%; font: inherit; font-size: 15px; color: var(--text-primary);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 12px 14px; outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.gate-input::placeholder { color: var(--text-muted); }
.gate-input:focus { border-color: var(--accent-500); box-shadow: 0 0 0 3px rgba(77, 143, 232, 0.18); }
.gate-select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.gate-btn {
  margin-top: 10px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  color: #fff; background: var(--accent-500); border: 1px solid var(--accent-500);
  border-radius: 10px; padding: 12px 16px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.gate-btn:hover { background: var(--accent-400); border-color: var(--accent-400); }
.gate-btn:disabled { opacity: 0.6; cursor: default; }
.gate-msg { font-size: 13.5px; color: var(--text-muted); min-height: 1.2em; margin: 4px 2px 0; }
.gate-msg.is-error { color: #ff6b6b; }
.gate-foot { margin-top: 26px; font-size: 13px; text-align: center; }
.gate-foot a { color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px; }
.gate-foot a:hover { color: var(--accent-400); }
.gate-result { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.gate-linkrow { display: flex; gap: 8px; margin-top: 8px; }
.gate-linkinput { flex: 1; font-size: 13px; }
.gate-copy { margin-top: 0; white-space: nowrap; }

/* Lock cue on the protected work rows (home) */
.work-row .wr-lock { display: inline-flex; align-items: center; color: var(--text-muted); margin-left: 2px; }
.work-row:hover .wr-lock { color: var(--accent-400); }
