/* ================================================================
   Pragati Gupta — Portfolio · sidebar + content layout
   Inspired by shraman-gupta.com: modern tech sans, deep-navy dark
   mode with cyan/purple gradient accent, compact dense typography.
   ================================================================ */

:root {
  /* ─── Type (warm editorial: Fraunces serif display + Hanken Grotesk body) ─── */
  --ff-display:  "Fraunces", Georgia, serif;
  --ff-heading:  "Fraunces", Georgia, serif;
  --ff-body:     "Hanken Grotesk", system-ui, sans-serif;
  --ff-nav:      "Hanken Grotesk", system-ui, sans-serif;
  --ff-mono:     "JetBrains Mono", ui-monospace, monospace;
  --ff-sans:     var(--ff-body);

  /* ─── Sizes (compact) ─── */
  --fs-hero:    clamp(1.75rem, 3.6vw, 2.65rem);
  --fs-display: 1.5rem;
  --fs-h2:      1.35rem;
  --fs-heading: 1.0625rem;
  --fs-body:    0.875rem;
  --fs-sm:      0.8125rem;
  --fs-xs:      0.75rem;
  --fs-2xs:     0.6875rem;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;

  /* ─── Spacing scale (4px base) ─── */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 9999px;

  /* ─── Layout ─── */
  --sidebar-w: 280px;
  --content-max: 1200px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ THEME — warm Anthropic light (single, no toggle) ============ */

:root {
  --bg-0:        #E7E1D3;   /* deeper paper — page edge / sunken */
  --bg-1:        #F0EDE4;   /* main background — Anthropic paper */
  --bg-2:        #E8E2D5;   /* sunken surfaces / chips */
  --bg-3:        #DCD4C4;   /* elevated / dividers */
  --bg-card:     #FAF8F2;   /* card surface (sits above the paper) */
  --bg-glass:    rgba(240, 237, 228, 0.85);
  --bg-sidebar:  rgba(245, 242, 234, 0.96);
  --bg-hover:    rgba(193, 95, 60, 0.07);

  --text-0:      #181613;   /* near-black ink */
  --text-1:      #4A453D;   /* muted body — darkened for contrast */
  --text-2:      #6E665B;   /* labels / eyebrows — darkened for contrast */
  --text-3:      rgba(24, 22, 19, 0.55);

  --border:        rgba(24, 20, 14, 0.12);
  --border-h:      rgba(24, 20, 14, 0.20);
  --border-active: rgba(193, 95, 60, 0.45);

  --accent:        #C15F3C;   /* clay / terracotta */
  --accent-2:      #A2492A;   /* deeper clay (hover) */
  --accent-bg:     rgba(193, 95, 60, 0.10);
  --accent-glow:   rgba(193, 95, 60, 0.20);

  --gradient:         linear-gradient(135deg, #C15F3C 0%, #D98E5A 100%);
  --gradient-subtle:  linear-gradient(135deg, rgba(193,95,60,.08), rgba(217,142,90,.07));

  --shadow-card:  0 1px 3px rgba(80,50,20,.06), 0 0 0 1px rgba(26,22,16,.03);
  --shadow-hover: 0 18px 44px -26px rgba(80,50,20,.40);

  --cat-ai:           #C15F3C;   /* clay — Spectra */
  --cat-automation:   #3F7D5B;   /* muted green — Self-Healing */
  --cat-orchestration:#B8762E;   /* amber — Qalibur */
  --cat-vision:       #B23A36;   /* oxblood — DriftGate */
  --cat-security:     #5C5448;   /* warm charcoal — TerraGuard */

  color-scheme: light;
}

/* ============ RESET + BASE ============ */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-1);
  color: var(--text-0);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* ─── Atmospheric gradient mesh + grain (animated) ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(193, 95, 60, 0.10), transparent 60%),
    radial-gradient(800px 500px at 88% 8%,  rgba(184, 118, 46, 0.09), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(193, 95, 60, 0.07), transparent 65%);
  opacity: 0.7;
  animation: meshDrift 48s ease-in-out infinite alternate;
}

@keyframes meshDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2%, 1%, 0) scale(1.03); }
  100% { transform: translate3d(2%, -1%, 0) scale(1); }
}

/* Subtle grid texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(26, 22, 16, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 22, 16, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 80%);
}

.app-layout, .mobile-header, .mobile-menu-overlay {
  position: relative;
  z-index: 1;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-2); }

::selection { background: var(--accent); color: var(--bg-0); }

button { font-family: inherit; }

/* ============ APP LAYOUT ============ */

.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-1);
}

/* ============ SIDEBAR ============ */

.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--sp-6) var(--sp-4) var(--sp-4);
  flex-shrink: 0;
  overflow-y: auto;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

/* ─── Sidebar profile ─── */

.sidebar-profile {
  text-align: center;
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-4);
}

.sidebar-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg-1);
  isolation: isolate;
}

.avatar-img {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
  z-index: 1;
}

.sidebar-avatar::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent) 0%,
    var(--accent-2) 25%,
    var(--accent) 50%,
    var(--accent-2) 75%,
    var(--accent) 100%
  );
  z-index: -2;
  animation: spin 8s linear infinite;
  filter: blur(0.3px);
}

.sidebar-avatar::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gradient);
  z-index: -1;
  box-shadow: 0 0 24px var(--accent-glow);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.avatar-mark {
  font-family: var(--ff-heading);
  font-weight: var(--fw-black);
  font-size: 1.65rem;
  color: #fff;
  letter-spacing: -0.04em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

.sidebar-name {
  font-family: var(--ff-heading);
  font-size: var(--fs-heading);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-1);
  color: var(--text-0);
}

.sidebar-title {
  font-family: var(--ff-nav);
  font-size: var(--fs-xs);
  color: var(--text-1);
  line-height: 1.4;
  margin-bottom: var(--sp-2);
}

.sidebar-company {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--ff-nav);
  font-size: var(--fs-2xs);
  color: var(--accent);
  font-weight: var(--fw-semibold);
}

.sidebar-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--ff-nav);
  font-size: var(--fs-2xs);
  color: var(--text-2);
  margin-top: var(--sp-2);
}

.status-dot {
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ─── Sidebar bio ─── */

.sidebar-bio {
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-4);
}

.sidebar-bio-text {
  font-family: var(--ff-body);
  font-size: 11px;
  color: var(--text-1);
  line-height: 1.6;
  margin: 0;
}

/* ─── Sidebar "Top Skills" chip section ─── */

.sidebar-highlights {
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-4);
}

.sidebar-section-label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-2);
  margin-bottom: var(--sp-2);
}

.sidebar-highlights .sidebar-section-label + .sidebar-chips {
  margin-bottom: var(--sp-4);
}

.sidebar-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sidebar-chips li {
  font-family: var(--ff-nav);
  font-size: 10px;
  font-weight: var(--fw-medium);
  color: var(--text-1);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 3px 7px;
  border-radius: var(--r-sm);
  letter-spacing: 0.02em;
  transition: all 0.2s var(--ease);
  cursor: default;
}

.sidebar-chips li:hover {
  color: var(--accent);
  border-color: var(--border-active);
  background: var(--accent-bg);
}

/* ─── Sidebar nav ─── */

.sidebar-nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--sp-4);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--ff-nav);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-1);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: left;
  width: 100%;
  text-decoration: none;
}

.sidebar-nav-item:hover {
  color: var(--text-0);
  background: var(--bg-hover);
  border-color: var(--border);
}

.sidebar-nav-item.is-active {
  color: var(--accent);
  background: var(--accent-bg);
  border-color: var(--border-active);
  font-weight: var(--fw-semibold);
}

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  color: var(--accent);
}

.nav-badge {
  margin-left: auto;
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  padding: 1px 7px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: var(--r-full);
  font-weight: var(--fw-semibold);
}

/* ─── Sidebar footer ─── */

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-4);
  margin-top: auto;
}

.sidebar-socials {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: var(--sp-3);
}

.social-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: all 0.25s var(--ease);
}

.social-btn:hover {
  color: var(--accent);
  border-color: var(--border-active);
  background: var(--accent-bg);
  transform: translateY(-1px);
}

.sidebar-controls {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: center;
}

/* ─── Theme toggle (two explicit buttons) ─── */

.theme-toggle {
  display: inline-flex;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 3px;
  gap: 2px;
}

.theme-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  background: transparent;
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  font-family: var(--ff-nav);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  letter-spacing: 0.04em;
  transition: all 0.3s var(--ease);
}

.theme-btn:hover {
  color: var(--text-0);
  background: var(--bg-hover);
}

.theme-btn.is-active {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.theme-btn-icon { font-size: 13px; line-height: 1; }
.theme-btn-label { letter-spacing: 0.05em; }

/* ============ CONTENT AREA ============ */

.content-area {
  flex: 1;
  min-height: 100vh;
  padding: var(--sp-8) var(--sp-12);
  scroll-behavior: smooth;
}

.fade-in {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Calm section header spacing */
.page-section .page-eyebrow {
  margin-bottom: var(--sp-3);
}

.page-section .page-title,
.page-section .section-title {
  margin-bottom: var(--sp-6);
}

/* ─── Page sections (all visible, single-scroll page) ─── */

.page-section {
  padding: var(--sp-10) 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: var(--sp-6);
}

.page-section:first-child { padding-top: var(--sp-6); }
.page-section:last-child  { border-bottom: none; }

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: var(--sp-4);
  padding: 5px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}

.eyebrow-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ─── Page hero title ─── */

/* ─── "Now Testing" cycling widget ─── */

.now-testing {
  display: inline-flex;
  align-items: stretch;
  margin: 0 0 var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
  font-family: var(--ff-nav);
  font-size: var(--fs-xs);
  transition: border-color 0.25s var(--ease);
}

.now-testing:hover {
  border-color: var(--border-active);
}

.nt-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--gradient);
  color: #fff;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  position: relative;
}

.nt-pulse {
  width: 7px; height: 7px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8);
  animation: ntPulse 1.4s ease-out infinite;
}

@keyframes ntPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.nt-target {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  color: var(--text-0);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  min-width: 220px;
}

.nt-emoji {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
  animation: ntBob 2.2s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

@keyframes ntBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(-6deg); }
}

.nt-text {
  font-family: var(--ff-nav);
  font-size: var(--fs-xs);
  color: var(--text-0);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.nt-emoji.is-changing,
.nt-text.is-changing {
  opacity: 0;
  transform: translateY(-4px);
}

/* ─── Hero title ─── */

.page-title {
  font-family: var(--ff-heading);
  font-weight: var(--fw-black);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 var(--sp-6);
  color: var(--text-0);
}

.gradient-text {
  background: var(--gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 8s ease-in-out infinite;
  display: inline-block;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.page-lede {
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-1);
  max-width: none;
  margin: 0 0 var(--sp-8);
}

.cta-row {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-10);
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-family: var(--ff-nav);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  background-size: 200% 200%;
  color: #fff;
  position: relative;
  box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 6px 22px var(--accent-glow);
  animation: gradientShift 6s ease-in-out infinite;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 12px 30px var(--accent-glow);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-2);
  color: var(--text-0);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-active);
  color: var(--accent);
}

.btn-arrow { font-family: var(--ff-mono); }

/* ─── Stats row ─── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-subtle);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.stat:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.stat:hover::before { opacity: 1; }

.stat-value {
  font-family: var(--ff-display);
  font-weight: var(--fw-bold);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 6px;
  font-feature-settings: 'tnum';
}

.stat-plus {
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: var(--fw-semibold);
  -webkit-text-fill-color: var(--accent);
}

.stat-label {
  font-family: var(--ff-nav);
  font-size: var(--fs-2xs);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Section title ─── */

.section-title {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: -0.022em;
  line-height: 1.25;
  margin: 0 0 var(--sp-6);
  color: var(--text-0);
  position: relative;
  padding-left: var(--sp-4);
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4em;
  bottom: 0.4em;
  width: 3px;
  background: var(--gradient);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ─── Project cards ─── */

.pj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.pj-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  transition: all 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.pj-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-subtle);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
  z-index: -1;
}

/* Animated gradient border on hover */
.pj-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--r-lg);
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: -1;
}

.pj-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.pj-card:hover::before { opacity: 0.7; }
.pj-card:hover::after { opacity: 0.35; }

.pj-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
}

.pj-cat {
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-full);
  border: 1px solid currentColor;
}

.pj-cat-ai            { color: var(--cat-ai); }
.pj-cat-automation    { color: var(--cat-automation); }
.pj-cat-orchestration { color: var(--cat-orchestration); }
.pj-cat-vision        { color: var(--cat-vision); }
.pj-cat-security      { color: var(--cat-security); }

.pj-num {
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  color: var(--text-2);
  letter-spacing: 0.1em;
}

.pj-name {
  font-family: var(--ff-heading);
  font-weight: var(--fw-black);
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  color: var(--text-0);
  line-height: 1.05;
  transition: background 0.3s var(--ease);
}

.pj-card:hover .pj-name {
  color: var(--accent);
}

.pj-sub {
  font-family: var(--ff-nav);
  font-size: var(--fs-sm);
  color: var(--text-1);
  margin: 0 0 var(--sp-3);
}

.pj-desc {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-1);
  margin: 0 0 var(--sp-4);
  flex: 1;
}

/* ── Narrative card: Why / Built / Learned blocks ── */
.pj-story {
  margin: 0 0 var(--sp-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.pj-beat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pj-beat-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: var(--fw-medium);
}

.pj-beat-text {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-1);
  margin: 0;
}

.pj-beat-text em {
  font-style: italic;
  color: var(--text-0);
}

/* ── Collapse: show only the first beat + fade ── */
.pj-card.is-collapsed .pj-story {
  max-height: 9.5em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  transition: max-height 0.4s var(--ease);
}

.pj-card:not(.is-collapsed) .pj-story {
  max-height: 200em;
  -webkit-mask-image: none;
          mask-image: none;
}

/* ── Read more button ── */
.pj-readmore {
  align-self: flex-start;
  margin: 0 0 var(--sp-4);
  padding: 6px 0;
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color 0.2s var(--ease);
}

.pj-readmore:hover {
  color: var(--accent-2);
}

.pj-readmore-arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.pj-card.is-collapsed .pj-readmore-less   { display: none; }
.pj-card:not(.is-collapsed) .pj-readmore-more { display: none; }
.pj-card:not(.is-collapsed) .pj-readmore-arrow { transform: rotate(180deg); }

.pj-stack {
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pj-stack li {
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  color: var(--text-1);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--r-sm);
}

.pj-actions {
  display: flex;
  gap: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

.pj-link {
  font-family: var(--ff-nav);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.pj-link span { font-family: var(--ff-mono); transition: transform 0.2s; }
.pj-link:hover span { transform: translateX(2px); }

.pj-link-muted {
  color: var(--text-2);
  cursor: default;
}
.pj-link-muted:hover { color: var(--text-2); }
.pj-link-muted:hover span { transform: none; }

/* ─── Experience list ─── */

.exp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.exp-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: var(--sp-6);
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--border);
  align-items: start;
}

.exp-item:first-child {
  border-top: 1px solid var(--border-h);
}

.exp-period {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.3;
  position: sticky;
  top: var(--sp-6);
}

.exp-start { color: var(--accent); font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.exp-sep   { color: var(--text-2); }
.exp-end   { color: var(--text-1); }

.exp-duration {
  display: inline-block;
  margin-top: var(--sp-2);
  padding: 2px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.04em;
  width: fit-content;
}

.exp-role {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
  color: var(--text-0);
  line-height: 1.25;
}

.exp-org {
  font-family: var(--ff-nav);
  font-size: var(--fs-xs);
  color: var(--accent);
  font-weight: var(--fw-semibold);
  margin: 0 0 var(--sp-4);
  letter-spacing: 0.02em;
}

.exp-highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exp-highlights li {
  position: relative;
  padding-left: 18px;
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-1);
}

.exp-highlights li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  background: var(--gradient);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-glow);
}

/* ============ Horizontal timeline (Background) ============ */

.timeline-h {
  list-style: none;
  margin: 0;
  padding: var(--sp-8) 0 var(--sp-4);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  position: relative;
}

.timeline-h::before {
  content: '';
  position: absolute;
  top: 56px;
  left: 4%;
  right: 4%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent-glow) 6%,
    var(--accent) 50%,
    var(--accent-glow) 94%,
    transparent 100%);
  opacity: 0.45;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.4s var(--ease) 0.15s;
  z-index: 0;
  border-radius: 2px;
}

.timeline-h.is-visible::before {
  transform: scaleX(1);
}

.th-item {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 var(--sp-2);
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.timeline-h.is-visible .th-item              { opacity: 1; transform: translateX(0); }
.timeline-h.is-visible .th-item:nth-child(1) { transition-delay: 0.25s; }
.timeline-h.is-visible .th-item:nth-child(2) { transition-delay: 0.55s; }
.timeline-h.is-visible .th-item:nth-child(3) { transition-delay: 0.85s; }
.timeline-h.is-visible .th-item:nth-child(4) { transition-delay: 1.15s; }

.th-year {
  display: block;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}

.th-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 0 4px var(--bg-1), 0 0 14px var(--accent-glow);
  margin: 0 auto var(--sp-4);
  position: relative;
  z-index: 2;
}

.th-current .th-dot {
  box-shadow: 0 0 0 4px var(--bg-1), 0 0 20px var(--accent), 0 0 0 7px var(--accent-glow);
}

.th-role {
  font-family: var(--ff-heading);
  font-size: 1.02rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text-0);
  line-height: 1.25;
}

.th-org {
  font-family: var(--ff-nav);
  font-size: var(--fs-xs);
  color: var(--accent);
  font-weight: var(--fw-semibold);
  margin: 0 0 var(--sp-3);
  letter-spacing: 0.02em;
}

.th-note {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-1);
  margin: 0;
}


/* ─── Stack grid ─── */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}

.stack-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  transition: border-color 0.25s var(--ease);
}
.stack-cat:hover { border-color: var(--border-active); }

.stack-cat-name {
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--sp-3);
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chips li {
  font-family: var(--ff-nav);
  font-size: var(--fs-xs);
  color: var(--text-0);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-weight: var(--fw-medium);
  transition: all 0.2s var(--ease);
}
.chips li:hover {
  border-color: var(--border-active);
  color: var(--accent);
}

/* ─── Education timeline + Certifications ─── */

.edu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: start;
}

.edu-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  position: relative;
}

/* Vertical line behind the dots */
.edu-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--accent) 0%,
    var(--accent-2) 50%,
    transparent 100%
  );
  opacity: 0.5;
}

.edu-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.edu-dot {
  position: absolute;
  left: calc(-1 * var(--sp-5) + 1px);
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-1);
  box-shadow: 0 0 0 2px var(--accent), 0 0 12px var(--accent-glow);
  z-index: 2;
  transition: transform 0.25s var(--ease);
}

.edu-item:hover .edu-dot {
  transform: scale(1.15);
  background: var(--accent-2);
  box-shadow: 0 0 0 2px var(--accent-2), 0 0 18px var(--accent-glow);
}

.edu-degree {
  font-family: var(--ff-heading);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-heading);
  color: var(--text-0);
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.edu-school {
  font-family: var(--ff-nav);
  font-size: var(--fs-xs);
  color: var(--accent);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
}

.edu-meta {
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  color: var(--text-2);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ─── Certifications card group ─── */

.cert-tier-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cert-tier-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-2);
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

.cert-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.25s var(--ease);
}

.cert-card:hover {
  border-color: var(--border-active);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.cert-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--ff-nav);
  font-weight: var(--fw-bold);
  font-size: 11px;
  flex-shrink: 0;
  letter-spacing: 0.03em;
  box-shadow: 0 0 16px var(--accent-glow);
}

.cert-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cert-name {
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
  color: var(--text-0);
}

.cert-issuer {
  font-family: var(--ff-nav);
  font-size: var(--fs-xs);
  color: var(--text-2);
}

.cert-status {
  display: inline-block;
  font-family: var(--ff-nav);
  font-size: 9px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--r-full);
  margin-top: 3px;
  width: fit-content;
}

.cert-status--active {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

/* ─── Contact ─── */

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}

.contact-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.contact-key {
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-list a, .contact-list span:last-child {
  font-family: var(--ff-nav);
  font-size: var(--fs-sm);
  color: var(--text-0);
}

.contact-list a:hover { color: var(--accent); }

.content-footer {
  text-align: center;
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  color: var(--text-2);
  letter-spacing: 0.06em;
  margin: var(--sp-12) 0 0;
}

/* ============ MOBILE HEADER ============ */

.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 56px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-4);
  align-items: center;
  justify-content: space-between;
}

.mobile-header-name {
  font-family: var(--ff-heading);
  font-weight: var(--fw-black);
  font-size: var(--fs-heading);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-0);
}

.logo-mark {
  width: 28px; height: 28px;
  background: var(--gradient);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: var(--fs-2xs);
  color: #fff;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
}

.hamburger span {
  width: 18px; height: 2px;
  background: var(--text-0);
  border-radius: 1px;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 56px 0 0;
  z-index: 999;
  background: var(--bg-glass);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  padding: var(--sp-4);
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease);
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-overlay a {
  font-family: var(--ff-nav);
  font-size: 1.1rem;
  font-weight: var(--fw-semibold);
  color: var(--text-0);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mobile-menu-overlay a:hover { color: var(--accent); }

/* ============ REVEAL ANIMATIONS ============ */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .status-dot { animation: none; }
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .pj-grid   { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .exp-item {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .exp-tags {
    grid-column: 1 / -1;
    position: static;
  }
  .edu-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  .timeline-h {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6);
  }
  .timeline-h::before { display: none; }
}

@media (max-width: 720px) {
  .sidebar { display: none; }
  .mobile-header { display: flex; }
  .app-layout { flex-direction: column; }

  .content-area {
    padding: 72px var(--sp-4) var(--sp-8);
  }

  .page-title { font-size: 1.65rem; }
  .section-title { font-size: 1.15rem; }
  .now-testing { font-size: var(--fs-2xs); }
  .nt-target { min-width: 0; padding-right: 12px; }
  .nt-text { font-size: var(--fs-2xs); }
  .exp-item {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
  .exp-period { position: static; flex-direction: row; gap: var(--sp-2); align-items: baseline; }
  .exp-tags { position: static; }
  .timeline-h { grid-template-columns: 1fr; }
  .contact-list li {
    grid-template-columns: 80px 1fr;
    gap: var(--sp-2);
    font-size: var(--fs-xs);
  }
  .cta-row .btn { flex: 1; justify-content: center; }
}
