/* ============================================================
   Animesh Sinha — Portfolio
   Modern, typography-forward dark theme
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-elev: #111113;
  --bg-card: #141417;
  --border: #1f1f24;
  --border-hover: #2d2d35;
  --text: #ededef;
  --text-dim: #a1a1a8;
  --text-faint: #6b6b73;
  --accent: #7dd3c0;
  --accent-dim: #4aa896;
  --accent-glow: rgba(125, 211, 192, 0.12);
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --max-w: 1080px;
  --ff-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --ff-display: 'Fraunces', Georgia, serif;
  --ff-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
*::selection { background: var(--accent); color: var(--bg); }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  overflow-x: hidden;
}

/* Subtle noise + gradient backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(125, 211, 192, 0.08), transparent 60%),
    radial-gradient(700px 400px at 110% 20%, rgba(125, 150, 211, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* ---------- Nav ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  background: rgba(10, 10, 11, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
nav.scrolled { border-bottom-color: var(--border); }
nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  animation: pulse 2.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.85); }
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 450;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  transition: all 0.2s var(--ease);
}
.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  pointer-events: none;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 211, 192, 0.18) 0%, rgba(125, 211, 192, 0.05) 35%, transparent 70%);
  transform: translate3d(-9999px, -9999px, 0);
  transition: opacity 0.4s var(--ease);
  z-index: 0;
  mix-blend-mode: screen;
  filter: blur(8px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
}
.hero-copy { min-width: 0; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

/* ---------- Terminal panel ---------- */
.terminal {
  background: linear-gradient(180deg, #0e0e10 0%, #0a0a0c 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 60px -30px rgba(0,0,0,0.6),
    0 8px 24px -8px rgba(125, 211, 192, 0.08);
  font-family: var(--ff-mono);
  font-size: 13px;
  line-height: 1.7;
  position: relative;
}
.terminal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 95%, rgba(125, 211, 192, 0.03) 100%);
  pointer-events: none;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.terminal-title {
  flex: 1;
  text-align: center;
  color: var(--text-faint);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  margin-right: 33px; /* offset dots width */
}
.terminal-body {
  padding: 18px 20px 20px;
  color: var(--text-dim);
}
.t-line { color: var(--text); margin-top: 10px; }
.t-line:first-child { margin-top: 0; }
.t-prompt { color: var(--accent); }
.t-cmd { color: #c4cad3; font-weight: 500; }
.t-out {
  color: var(--text-dim);
  padding-left: 16px;
  font-size: 12.5px;
}
.t-out + .t-line { margin-top: 14px; }
.t-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  margin-right: 6px;
  vertical-align: 1px;
}
.t-typed { color: #c4cad3; }
.t-cursor {
  display: inline-block;
  color: var(--accent);
  animation: t-blink 1s steps(2) infinite;
  margin-left: 1px;
}
@keyframes t-blink { 50% { opacity: 0; } }

/* ---------- Stats strip ---------- */
.stats-strip {
  padding: 24px 0 56px;
  position: relative;
  z-index: 1;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.stats-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(400px 120px at 80% 0%, var(--accent-glow), transparent 60%);
  pointer-events: none;
}
.stat { text-align: left; position: relative; }
.stat + .stat { border-left: 1px solid var(--border); padding-left: 24px; }
.stat-num {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 38px);
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero-badge .status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}
h1 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  color: var(--text);
}
h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
.hero-sub {
  font-size: clamp(14.5px, 1.45vw, 16.5px);
  color: var(--text-dim);
  max-width: 600px;
  line-height: 1.65;
  margin: 0 0 40px;
  text-wrap: pretty;
}
.hero-sub strong { color: var(--text); font-weight: 550; }
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: all 0.2s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: #8fe5d2;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--bg-elev);
}
.btn svg { width: 15px; height: 15px; }

/* ---------- Sections ---------- */
section {
  padding: 90px 0;
  position: relative;
}
.section-label {
  font-family: var(--ff-mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border) 0%, transparent 100%);
  max-width: 240px;
}
h2 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.025em;
  margin: 0 0 48px;
  line-height: 1.15;
}
h2 em { font-style: italic; color: var(--accent); font-weight: 300; }
h3 {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--text);
}

/* ---------- Timeline / Work ---------- */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline-date {
  font-family: var(--ff-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.timeline-title {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 4px;
}
.timeline-company {
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 12px;
}
.timeline-body { color: var(--text-dim); font-size: 15px; max-width: 720px; }
.timeline-body ul { padding-left: 18px; margin: 8px 0; }
.timeline-body li { margin-bottom: 6px; }

/* ---------- Status badges ---------- */
.badge {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid;
  vertical-align: 1px;
}
.badge-prod {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.08);
}
.badge-research {
  color: #c4a8ff;
  border-color: rgba(196, 168, 255, 0.3);
  background: rgba(196, 168, 255, 0.06);
}
.badge-personal {
  color: var(--accent);
  border-color: rgba(125, 211, 192, 0.3);
  background: var(--accent-glow);
}
.badge-flag {
  color: #ea7a3c;
  border-color: rgba(234, 122, 60, 0.4);
  background: rgba(234, 122, 60, 0.08);
}

/* ---------- Featured project ---------- */
.project-featured {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  margin-bottom: 22px;
  overflow: hidden;
  transition: all 0.35s var(--ease);
  position: relative;
}
.project-featured-rev { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.project-featured-rev .featured-art { order: 2; border-right: 0; border-left: 1px solid var(--border); }
.project-featured-rev .featured-body { order: 1; }
.featured-art-rf {
  background:
    radial-gradient(380px 220px at 50% 0%, rgba(234, 122, 60, 0.10), transparent 65%),
    linear-gradient(180deg, #100d0c 0%, #0a0a0c 100%);
}
.featured-art-rf .art-row i { color: #ea7a3c; }

@media (max-width: 760px) {
  .project-featured-rev { grid-template-columns: 1fr; }
  .project-featured-rev .featured-art {
    order: 1;
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }
  .project-featured-rev .featured-body { order: 2; }
}
.project-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 45%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.project-featured:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.project-featured:hover::before { opacity: 1; }
.project-featured:hover h3 { color: var(--accent); }

.featured-art {
  background:
    radial-gradient(380px 220px at 50% 0%, rgba(125, 211, 192, 0.12), transparent 65%),
    linear-gradient(180deg, #0e0f12 0%, #0a0b0d 100%);
  border-right: 1px solid var(--border);
  padding: 32px 28px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.featured-art-pulse {
  position: absolute;
  top: -40px;
  left: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 211, 192, 0.18), transparent 65%);
  filter: blur(20px);
  animation: pulse-soft 6s var(--ease) infinite;
}
@keyframes pulse-soft {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
.featured-art-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  font-family: var(--ff-mono);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.art-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
.art-row i { color: var(--accent); font-style: normal; }
.art-row-dim { opacity: 0.55; }
.art-meta {
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.art-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-faint);
  display: inline-block;
}
.art-dot-on   { background: #4ade80; box-shadow: 0 0 7px #4ade80; }
.art-dot-warn { background: #fbbf24; box-shadow: 0 0 7px #fbbf24; animation: pulse-soft 1.6s ease-in-out infinite; }

.featured-body {
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
}
.featured-body h3 {
  font-size: 26px;
  margin-bottom: 14px;
  transition: color 0.25s var(--ease);
}
.featured-lede {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 20px;
  flex: 1;
}

@media (max-width: 760px) {
  .project-featured { grid-template-columns: 1fr; }
  .featured-art { border-right: 0; border-bottom: 1px solid var(--border); padding: 24px; }
  .featured-body { padding: 24px; }
  .featured-body h3 { font-size: 22px; }
}

/* ---------- Projects Grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.project-card:hover::before { opacity: 1; }
.project-card:hover h3 { color: var(--accent); }
.project-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.project-card h3 { transition: color 0.25s var(--ease); }
.project-card p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 22px;
  flex: 1;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}
.tag {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 4px 9px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  letter-spacing: 0.01em;
}
.project-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 500;
  margin-top: auto;
}
.project-card:hover .project-arrow svg { transform: translateX(4px); }
.project-arrow svg { transition: transform 0.25s var(--ease); width: 14px; height: 14px; }

/* ---------- About / Skills ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about p {
  color: var(--text-dim);
  font-size: 16.5px;
  line-height: 1.75;
  margin: 0 0 18px;
}
.about p strong { color: var(--text); font-weight: 550; }
.skills-block { margin-bottom: 28px; }
.skills-label {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
  padding: 110px 0 100px;
}
.contact h2 { margin-bottom: 24px; max-width: 720px; margin-left: auto; margin-right: auto; }
.contact-sub {
  color: var(--text-dim);
  font-size: 17px;
  margin: 0 auto 36px;
  max-width: 520px;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
footer {
  padding: 44px 0 36px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
  background: linear-gradient(180deg, transparent 0%, rgba(125, 211, 192, 0.02) 100%);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-faint);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.footer-status { color: var(--text-dim); }
.footer-dim { color: var(--text-faint); }

.footer-links {
  align-items: flex-start;
  font-size: 13.5px;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-links a:hover { color: var(--accent); }

.footer-sig {
  text-align: right;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.6;
}
.footer-sig a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-sig a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; text-align: left; }
  .footer-sig { text-align: left; }
}

/* ---------- Project detail pages ---------- */
.project-page { padding: 60px 0 80px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 36px;
  transition: color 0.2s var(--ease);
}
.back-link:hover { color: var(--accent); }
.project-header { margin-bottom: 48px; border-bottom: 1px solid var(--border); padding-bottom: 36px; }
.project-header .project-meta { margin-bottom: 24px; }
.project-header h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin-bottom: 18px;
}
.project-header .lede {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 700px;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* Case-study header v2 — badge row, reading time, dividers */
.project-header-v2 .ph-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.ph-divider { color: var(--border-hover); }
.ph-readtime {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
}
@media (max-width: 540px) {
  .ph-readtime { margin-left: 0; }
}

/* Project prev/next nav at bottom of case study */
.proj-nav {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.proj-nav-link {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s var(--ease);
  position: relative;
}
.proj-nav-link:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.proj-nav-link.next { text-align: right; }
.proj-nav-dir {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.proj-nav-title {
  font-family: var(--ff-display);
  font-size: 17px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.25s var(--ease);
}
.proj-nav-link:hover .proj-nav-title { color: var(--accent); }
@media (max-width: 600px) {
  .proj-nav { grid-template-columns: 1fr; }
  .proj-nav-link.next { text-align: left; }
}

/* ---------- Command palette (Ctrl+K) ---------- */
.cmdk-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 14vh 20px 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: cmdk-fade 0.18s var(--ease);
}
.cmdk-root.open { display: flex; }
@keyframes cmdk-fade { from { opacity: 0; } to { opacity: 1; } }

.cmdk {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(180deg, #131316 0%, #0d0d0f 100%);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(125, 211, 192, 0.05);
  animation: cmdk-rise 0.22s var(--ease);
}
@keyframes cmdk-rise {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}
.cmdk-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 18px 20px;
  font-size: 15px;
  font-family: var(--ff-sans);
  outline: 0;
  border-bottom: 1px solid var(--border);
}
.cmdk-input::placeholder { color: var(--text-faint); }
.cmdk-list {
  max-height: 50vh;
  overflow-y: auto;
  padding: 6px;
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}
.cmdk-item.active,
.cmdk-item:hover { background: rgba(125, 211, 192, 0.08); }
.cmdk-item-icon {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--accent);
  width: 22px;
  text-align: center;
  letter-spacing: 0;
}
.cmdk-item-label { flex: 1; }
.cmdk-item-kind {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.cmdk-empty {
  padding: 24px 20px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}
.cmdk-foot {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-faint);
  background: rgba(255,255,255,0.015);
}
.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-family: var(--ff-mono);
  font-size: 10.5px;
  margin: 0 2px;
}

/* Tiny "press ⌘K" hint chip in nav (optional but signature) */
.nav-cmdk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-faint);
  font-family: var(--ff-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  margin-right: 4px;
}
.nav-cmdk:hover { color: var(--text); border-color: var(--border-hover); }
@media (max-width: 760px) {
  .nav-cmdk { display: none; }
}

.prose { max-width: 720px; font-size: 16.5px; line-height: 1.75; color: var(--text-dim); }
.prose h2 { font-size: 28px; margin: 48px 0 18px; color: var(--text); }
.prose h3 { font-size: 20px; margin: 32px 0 12px; color: var(--text); font-family: var(--ff-sans); font-weight: 600; }
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--text); font-weight: 550; }
.prose ul { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose code {
  font-family: var(--ff-mono);
  font-size: 13.5px;
  background: var(--bg-elev);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
  border: 1px solid var(--border);
}
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--border-hover); transition: border-color 0.2s; }
.prose a:hover { border-bottom-color: var(--accent); }
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 6px 20px;
  margin: 20px 0;
  color: var(--text);
  font-style: italic;
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 28px 0 8px;
}
.highlight {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
}
.highlight-num {
  font-family: var(--ff-display);
  font-size: 26px;
  color: var(--accent);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.highlight-label { font-size: 13px; color: var(--text-dim); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .terminal { max-width: 520px; }
}
@media (max-width: 760px) {
  nav .container { padding: 14px 20px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; padding: 6px 4px; }
  .nav-links a:not(.nav-cta) { color: var(--text); }
  .container { padding: 0 20px; }
  .hero { padding: 80px 0 50px; }
  section { padding: 64px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  h2 { margin-bottom: 32px; }
  footer .container { flex-direction: column; text-align: center; }
  .stats-row { grid-template-columns: repeat(2, 1fr); padding: 22px; gap: 22px; }
  .stat + .stat { border-left: 0; padding-left: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--border); padding-top: 18px; }
  .stats-strip { padding: 0 0 40px; }
}

/* Very narrow screens: collapse anchor links, keep Resume CTA */
@media (max-width: 420px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* Typography polish */
h1, h2, h3 { text-wrap: balance; }
.hero-sub, .prose p { text-wrap: pretty; }

/* Respect users who opted out of motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
