/* ============================================================
   Ritik Bansod · portfolio
   Color-system edition: the theme shifts as you scroll
   (amber hero -> violet about -> cyan expertise ->
    emerald projects -> blue contact) on a neutral dark base.
   ============================================================ */

:root {
  /* neutral cool base, set per section by script.js */
  --accent: #F0B27A;
  --accent-soft: rgba(240, 178, 122, 0.13);
  --bg: #0A0C12;
  --bg-soft: #0D1017;
  --panel: #12161F;
  --border: #1E2531;
  --bone: #C3CBD9;
  --bone-dim: #8A93A5;
  --text: #E7EBF3;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  transition: background 0.9s ease;
}

/* ---------- film grain ---------- */
#grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 40;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- cursor spotlight ---------- */
#cursor-glow {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s, background 0.8s ease;
}

/* ---------- boot overlay ---------- */
#boot {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(420px, 80vw); font-family: var(--mono); }
.boot-line { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.08em; margin-bottom: 10px; transition: color 0.8s; }
.boot-line.dim { color: var(--bone-dim); margin-top: 14px; }
#boot-pct { color: var(--bone); float: right; }
.boot-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin: 6px 0 4px;
}
#boot-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s linear, background 0.8s;
}
.boot-skip { color: var(--bone-dim); font-size: 0.68rem; text-align: center; margin-top: 26px; opacity: 0.6; }

/* ---------- nav ---------- */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 22px);
  padding: 10px 4vw;
  background: rgba(7, 9, 15, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  width: 100%;
  max-width: 100vw;
  transition: background 0.9s ease, border-color 0.9s ease;
}
.logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.logo .dot { color: var(--accent); transition: color 0.8s; }
nav ul { display: flex; gap: clamp(14px, 1.8vw, 24px); list-style: none; }
nav ul a { color: var(--bone-dim); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; white-space: nowrap; }
nav ul a:hover { color: var(--accent); }
.hire-pill {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #07090F;
  background: var(--accent);
  border-radius: 999px;
  padding: 7px 18px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s, background 0.8s;
}
.hire-pill:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--accent-soft); }
.nav-burger { display: none; color: var(--accent); font-size: 1.25rem; cursor: pointer; margin-left: auto; }
#nav-toggle { display: none; }

/* ---------- hero: scroll-scrubbed 3D photo environment ---------- */
header#home {
  height: 320vh;
  position: relative;
}
.hero-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 110px 5vw 40px;
  overflow: hidden;
}
/* full environment around the photo: spotlight cone, floor fog, side fog */
.hero-pin::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: linear-gradient(to bottom, rgba(7, 9, 15, 0.95), transparent);
  pointer-events: none;
  z-index: 4;
}
.hero-fog {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 34% at 50% 30%, var(--accent-soft), transparent 68%),
    radial-gradient(ellipse 80% 30% at 50% 78%, rgba(7, 9, 15, 0.92), transparent 74%),
    radial-gradient(ellipse 30% 60% at 8% 50%, rgba(7, 9, 15, 0.85), transparent 70%),
    radial-gradient(ellipse 30% 60% at 92% 50%, rgba(7, 9, 15, 0.85), transparent 70%);
  transition: background 0.9s ease;
}
.hero-glow-ring {
  position: absolute;
  width: clamp(250px, min(30vw, 42vh), 380px);
  height: clamp(250px, min(30vw, 42vh), 380px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  filter: blur(26px);
  pointer-events: none;
  transition: background 0.9s ease;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  color: var(--bone-dim);
  margin-bottom: 22px;
  position: relative;
  z-index: 3;
}
.eyebrow .under {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.8s, border-color 0.8s;
}
#hero-word-wrap {
  perspective: 800px;
  position: relative;
  z-index: 3;
}
#hero-word {
  font-size: clamp(2.8rem, min(10vw, 13vh), 7.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  min-height: 2.1em;
  display: flex;
  align-items: center;
  justify-content: center;
}
#hero-word-inner.fill {
  color: var(--text);
  text-shadow:
    1px 1px 0 #6b4a2e, 2px 2px 0 #63452c, 3px 3px 0 #5b402a,
    4px 4px 0 #533b28, 5px 5px 0 #4b3626, 6px 6px 0 #433124,
    7px 7px 0 #3b2c22, 8px 8px 0 #332720,
    0 0 46px rgba(232, 168, 124, 0.35);
  transition: opacity 0.25s, color 0.8s, text-shadow 0.45s ease;
}
#hero-word-inner.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  text-shadow: 0 0 42px var(--accent-soft);
  transition: opacity 0.25s, -webkit-text-stroke-color 0.8s, text-shadow 0.45s ease;
}
#hero-word.swap-out { opacity: 0; transform: translateY(14px); }
.hero-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  margin: 26px 0 34px;
  position: relative;
  z-index: 3;
}
.hero-avatar-wrap { text-align: center; position: relative; perspective: 1100px; }
.hero-avatar {
  width: clamp(190px, min(22vw, 32vh), 280px);
  aspect-ratio: 1 / 1;
  border-radius: 40px;
  border: 1px solid var(--border);
  box-shadow: 0 0 110px var(--accent-soft), 0 30px 70px rgba(0, 0, 0, 0.65);
  will-change: transform;
  position: relative;
  z-index: 2;
  transition: box-shadow 0.9s ease;
}
.status {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-top: 16px;
  transition: color 0.8s;
}
.dot-live {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 6px;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }
.hero-side { max-width: 250px; text-align: left; }
.hero-side.right { text-align: right; }
.hero-side.right .mono-label { justify-content: flex-end; }
.side-text { font-size: 0.85rem; color: var(--bone-dim); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 3; }
.btn {
  font-family: var(--mono);
  font-size: 0.88rem;
  padding: 12px 26px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s, color 0.8s, border-color 0.8s;
}
.btn:hover { transform: translateY(-2px); background: var(--accent-soft); }
.btn.solid {
  background: var(--accent);
  border-color: transparent;
  color: #07090F;
  font-weight: 600;
}
.btn.solid:hover { box-shadow: 0 8px 30px var(--accent-soft); }
.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--bone-dim);
  z-index: 3;
}

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 16px 0;
  background: var(--bg-soft);
  transition: background 0.9s ease, border-color 0.9s ease;
}
.marquee-track {
  display: flex;
  gap: 34px;
  width: max-content;
  animation: scroll-x 30s linear infinite;
}
.marquee-track span {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--bone-dim);
  white-space: nowrap;
}
.marquee-track i { color: var(--accent); font-style: normal; transition: color 0.8s; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
main { max-width: 1100px; width: 100%; margin: 0 auto; padding: 0 5vw; }
section { padding: 90px 0 40px; }
.mono-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  transition: color 0.8s;
}
.mono-label.center { justify-content: center; }
.mono-label.dim, .dim { color: var(--bone-dim); }
.big-title {
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
  margin-bottom: 46px;
}
.stack-sub { text-align: center; }

/* ---------- bento about ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(120px, auto);
  gap: 16px;
}
.bento-card {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  background: linear-gradient(160deg, var(--bg-soft), var(--panel));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.25s, border-color 0.4s, background 0.9s;
}
.bento-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.bento-card p { font-size: 0.92rem; color: var(--bone); margin-bottom: 6px; }
.bento-card b { color: var(--accent); transition: color 0.8s; }
.bio { grid-column: span 2; grid-row: span 2; }
.bio h3 { font-size: 1.4rem; color: var(--text); margin-bottom: 12px; }
.bio p { margin-bottom: 12px; }
.metric { display: flex; flex-direction: column; justify-content: center; }
.metric-num {
  font-size: 2.6rem;
  font-weight: 900;
  font-family: var(--mono);
  color: var(--accent);
  line-height: 1.1;
  transition: color 0.8s;
}
.metric p { color: var(--bone-dim); font-size: 0.85rem; }
.avatar-tile { display: flex; align-items: center; justify-content: center; padding: 14px; }
.avatar-tile img {
  width: 100%;
  max-width: 140px;
  border-radius: 24px;
  transform: rotate(3deg);
  box-shadow: 0 0 60px var(--accent-soft);
}


/* ---------- scroll-filled skill orbit ---------- */
#stack { height: 200vh; position: relative; }
.stack-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: 76px;
}
.orbit-count-line {
  font-family: var(--mono);
  text-align: center;
  margin-bottom: 10px;
  position: relative;
  z-index: 3;
}
#orbit-count {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--accent);
  transition: color 0.8s;
}
.orbit-of { color: var(--bone-dim); font-size: 0.82rem; }
.orbit-stage {
  position: relative;
  width: min(96vw, 1150px);
  height: min(88svh, 780px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}
.orb-skill {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(72px, 15vw, 112px);
  padding: 12px 6px 10px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  transition: opacity 0.35s ease, border-color 0.25s;
  will-change: transform, opacity;
}
.orb-skill.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.orb-skill:hover { border-color: var(--accent); }
.orb-skill img { width: 56px; height: 56px; border-radius: 10px; }
.orb-skill .abbr {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}
.orb-skill .oname {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--bone-dim);
  text-align: center;
  line-height: 1.25;
}
.orbit-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--bone-dim);
}

/* ---------- expertise ---------- *//* ---------- expertise ---------- *//* ---------- expertise ---------- */
.root-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.root-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.4s;
}
.root-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}
.root-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.root-card:hover::before { opacity: 1; }
.root-card h3 { font-size: 1.08rem; color: var(--text); margin: 6px 0 10px; }
.root-card p { font-size: 0.9rem; color: var(--bone-dim); margin-bottom: 16px; }
.tagline-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 13px;
  transition: color 0.8s;
}

/* ---------- projects ---------- */
/* ---------- flagship project showcase (Kview) ---------- */
.flagship-card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.45);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.flagship-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.8;
}
.flagship-card:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 50px -12px rgba(110, 231, 183, 0.15);
}

.flagship-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.flagship-pill {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}
.flagship-pill.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  font-weight: 600;
}
.flagship-pill.tag {
  color: var(--bone);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.flagship-header {
  margin-bottom: 24px;
}
.flagship-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.25;
}
.flagship-title .dim-title {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 400;
  color: var(--bone-dim);
  display: inline-block;
  margin-left: 6px;
}
.flagship-desc {
  font-size: 0.98rem;
  color: var(--bone);
  line-height: 1.65;
}

/* Screen mockup container */
.kview-screen-mockup {
  background: #0B0E14;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin: 24px 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.mockup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #11151D;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.mockup-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.mockup-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mockup-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--bone-dim);
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mockup-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.mockup-tab.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 600;
}
.mockup-status {
  font-size: 0.7rem;
  color: var(--bone-dim);
}

.mockup-viewport {
  position: relative;
  background: #06080C;
}
.mockup-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.mockup-slide.active {
  display: block;
  opacity: 1;
}
.mockup-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-bottom: 1px solid var(--border);
}
.slide-caption {
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--bone);
  background: #0B0E14;
  line-height: 1.5;
}
.slide-caption .caption-title {
  color: var(--accent);
  font-weight: 600;
  margin-right: 6px;
  font-family: var(--mono);
  font-size: 0.82rem;
}

/* Pillars grid: balanced 4 columns on desktop, 2 on tablet, 1 on mobile */
.flagship-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.pillar-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
  transition: transform 0.2s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}
.pillar-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.pillar-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.pillar-card h4 {
  font-size: 0.96rem;
  color: var(--text);
  margin-bottom: 8px;
}
.pillar-card p {
  font-size: 0.82rem;
  color: var(--bone-dim);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}
.pillar-card .tagline-tag {
  align-self: flex-start;
}

/* Bottom footer row: Quickstart + Actions aligned side-by-side */
.flagship-footer-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 24px;
}
.flagship-quickstart {
  background: #080A0F;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.quickstart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.quickstart-hint {
  font-size: 0.74rem;
  color: var(--bone-dim);
}
.quickstart-cmd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #11151D;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}
.quickstart-cmd code {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}
.quickstart-cmd code .prompt {
  color: var(--bone-dim);
  user-select: none;
}
.copy-btn {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.copy-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.flagship-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.flagship-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  padding: 11px 18px;
  font-size: 0.82rem;
}

.secondary-projects-header {
  margin: 36px 0 18px;
}


.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 18px;
}
.project {
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  transition: transform 0.25s;
}
.project:hover { transform: translateY(-5px); }
.project h3 { font-size: 1.2rem; color: var(--text); margin-bottom: 10px; }
.project > p { font-size: 0.92rem; color: var(--bone-dim); flex: 1; }
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.proj-tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--accent);
  letter-spacing: 0.12em;
}
ul.tech { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0; }
ul.tech li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 12px;
  transition: color 0.8s, background 0.8s;
}
.proj-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
}
.proj-link:hover { text-decoration: underline; }


/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  max-width: 920px;
  margin: 0 auto;
}
.code-block, .transmission {
  min-width: 0;
  max-width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  overflow: hidden;
}
.code-block pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--bone);
  overflow-x: auto;
  max-width: 100%;
  margin: 8px 0 20px;
}
.code-block b { color: var(--accent); }
.code-block .str { color: var(--accent); opacity: 0.85; }
.transmission { display: flex; flex-direction: column; gap: 14px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-width: 0; }
input, textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
  padding: 12px 14px;
  resize: vertical;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
.transmission .btn { align-self: flex-start; border: none; cursor: pointer; }
.ok { color: #4ade80; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 5vw 30px;
  text-align: center;
  overflow: hidden;
}
.watermark {
  font-size: clamp(4rem, 16vw, 13rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 0.9;
  text-align: center;
  background: linear-gradient(115deg, var(--accent) 0%, var(--accent-soft) 55%, transparent 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
  user-select: none;
}
.footer-line {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--bone-dim);
  margin-top: -10px;
}
.footer-line a { color: var(--accent); text-decoration: none; }
.footer-line a:hover { text-decoration: underline; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; }
.reveal.visible {
  opacity: 1;
  animation: blockIn 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}
@keyframes blockIn {
  from { opacity: 0; transform: perspective(900px) rotateX(12deg) translateY(28px); }
  to { opacity: 1; transform: perspective(900px) rotateX(0deg) translateY(0); }
}

/* ---------- moving cards: float + 3D tilt ---------- */
.id-card img { animation: floating 5.5s ease-in-out infinite; }
@keyframes floating {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}
.tilt {
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out, border-color 0.4s;
  will-change: transform;
}
.tilt:hover { border-color: var(--accent); }

/* ---------- responsive breakpoints ---------- */
@media (max-width: 880px) {
  .nav-burger { display: block; order: 2; margin-left: auto; }
  .hire-pill { order: 3; padding: 7px 14px; font-size: 0.76rem; }
  .logo { order: 1; margin-right: 0; }
  nav { gap: 12px; padding: 10px 4vw; }
  nav ul {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 12, 18, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: none;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.7);
  }
  nav ul li { border-top: 1px solid var(--border); }
  nav ul a { display: block; padding: 13px 6vw; font-size: 0.9rem; }
  #nav-toggle:checked ~ ul { display: flex; }

  /* compact hero */
  .hero-pin {
    justify-content: flex-start;
    padding-top: 78px;
  }
  .hero-row { grid-template-columns: 1fr; gap: 12px; margin: 12px 0 16px; }
  .hero-side { display: none; }
  #hero-word { font-size: clamp(1.35rem, 6vw, 1.9rem); min-height: 0; }
  #hero-word-wrap { transform: none !important; }
  .hero-avatar {
    width: min(150px, 42vw);
    border-radius: 20px;
  }
  .hero-glow-ring { width: 190px; height: 190px; }
  .hero-actions { margin-bottom: 6px; gap: 10px; }
  .btn { font-size: 0.78rem; padding: 10px 20px; }

  /* grids */
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bio { grid-column: 1 / -1; }
  .flagship-card { padding: 22px; }
  .flagship-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flagship-footer-row { grid-template-columns: minmax(0, 1fr); }
  .flagship-actions { flex-direction: row; flex-wrap: wrap; }
  .flagship-actions .btn { flex: 1 1 200px; text-align: center; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 580px) {
  .bento { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bento-card { padding: 18px; }
  .metric-num { font-size: 2.2rem; }

  .flagship-card { padding: 18px 14px; }
  .flagship-pillars { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .flagship-actions { flex-direction: column; }
  .flagship-actions .btn { width: 100%; }

  .mockup-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .mockup-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .mockup-tab { white-space: nowrap; font-size: 0.72rem; padding: 4px 8px; }
  .mockup-status { display: none; }

  .quickstart-cmd { flex-direction: column; align-items: flex-start; gap: 8px; }
  .copy-btn { align-self: flex-end; }

  .projects-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .project { padding: 18px; }

  .code-block, .transmission { padding: 18px; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .code-block pre { font-size: 0.78rem; line-height: 1.6; }
}

@media (max-width: 414px) {
  .hero-pin { padding-top: 70px; }
  .eyebrow { font-size: 0.75rem; letter-spacing: 0.2em; margin-bottom: 12px; }
  #hero-word { font-size: clamp(1.15rem, 5.5vw, 1.55rem); }
  .hero-avatar { width: min(130px, 38vw); }
  .hero-glow-ring { width: 160px; height: 160px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { font-size: 0.74rem; padding: 8px 14px; }
  .big-title { font-size: 1.45rem; margin-bottom: 28px; }
  .flagship-title-row h3 { font-size: 1.25rem; }
  .flagship-badge { font-size: 0.64rem; padding: 3px 8px; }
  .quickstart-cmd code { font-size: 0.75rem; }
  .copy-btn { font-size: 0.68rem; padding: 4px 10px; }
  .footer-line { font-size: 0.74rem; }
}


/* ---------- accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #grain, .marquee-track, .id-card img, .dot-live { animation: none !important; }
  .reveal { opacity: 1; }
  .reveal.visible { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- continuous 3D rotation ---------- */
#hero-word {
  transform-style: preserve-3d;
  animation: heroWord3d 9s ease-in-out infinite;
}
@keyframes heroWord3d {
  0%, 100% { transform: rotateY(-14deg) rotateX(7deg); }
  50% { transform: rotateY(14deg) rotateX(-5deg); }
}
footer { perspective: 1200px; }
.watermark {
  transform-style: preserve-3d;
  animation: watermarkSpin3d 16s linear infinite;
}
@keyframes watermarkSpin3d {
  from { transform: rotateY(0deg) rotateX(6deg); }
  to { transform: rotateY(360deg) rotateX(6deg); }
}
.logo {
  display: inline-block;
  transform-style: preserve-3d;
  animation: logoSway3d 7s ease-in-out infinite;
}
@keyframes logoSway3d {
  0%, 100% { transform: rotateY(-16deg) rotateX(6deg); }
  50% { transform: rotateY(16deg) rotateX(-4deg); }
}
nav { perspective: 800px; }
.big-title {
  transform-style: preserve-3d;
  animation: titleSway3d 11s ease-in-out infinite;
}
@keyframes titleSway3d {
  0%, 100% { transform: rotateY(-7deg) rotateX(4deg); }
  50% { transform: rotateY(7deg) rotateX(-3deg); }
}

/* ---------- reduced motion: stop the continuous spins ---------- */
@media (prefers-reduced-motion: reduce) {
  #hero-word, .watermark, .logo, .big-title { animation: none !important; }
}

/* ---------- laptop / short screens: compact desktop hero ---------- */
@media (min-width: 761px) and (max-height: 900px) {
  .hero-pin { padding-top: 84px; }
  .eyebrow { margin-bottom: 12px; }
  .hero-row { margin: 12px 0 20px; gap: 28px; }
  .hero-actions { margin-bottom: 8px; }
  .scroll-hint { bottom: 14px; }
}

/* ---------- reduced motion: orbit fully filled, no scroll scene ---------- */
@media (prefers-reduced-motion: reduce) {
  #stack { height: auto; }
  .stack-pin { position: static; height: auto; padding-bottom: 40px; }
  .orb-skill { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
