/* ============================================================
   Kishore Gupta Portfolio — Main stylesheet
   Builds on css/tokens.css. Phase 2/3.
   ============================================================ */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur-mid) var(--ease-out), color var(--dur-mid) var(--ease-out);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); font-weight: var(--weight-semibold); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }

.grad-text { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

.kicker { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--accent); }

/* ---- Skip link ---- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--accent); color: var(--text-on-accent); padding: 0.6em 1.1em; border-radius: 0 0 var(--radius-sm) 0; font-weight: var(--weight-semibold); }
.skip-link:focus { left: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: var(--step-0); display: inline-flex; align-items: center; gap: var(--space-xs); padding: 0.62em 1.15em; border-radius: var(--radius-pill); border: 1px solid transparent; cursor: pointer; transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast); }
.btn { transition: transform var(--dur-mid) var(--ease-spring), background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-mid); }
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: var(--dur-fast); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary { background: var(--accent); color: var(--text-on-accent); box-shadow: var(--edge-highlight); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: var(--glow-accent), var(--edge-highlight); }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); box-shadow: var(--shadow-md); }
.btn-ico { flex-shrink: 0; }
.btn-primary:hover .btn-ico { transform: translateX(2px); transition: transform var(--dur-fast) var(--ease-out); }
.btn-secondary:hover .btn-ico { transform: translateX(2px); transition: transform var(--dur-fast) var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .btn-ico { transition: none !important; transform: none !important; } }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid transparent; transition: border-color var(--dur-mid), background var(--dur-mid); }
.site-header.scrolled { border-bottom-color: var(--hairline); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.nav-inner { max-width: var(--container-max); margin: 0 auto; padding: 0.7rem clamp(1.1rem, 4vw, 2.5rem); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: var(--weight-semibold); }
.brand-logo { display: block; width: 40px; height: 40px; border-radius: 24%; box-shadow: var(--shadow-sm); transition: transform var(--dur-mid) var(--ease-spring), box-shadow var(--dur-mid); }
.brand:hover .brand-logo { transform: rotate(-4deg) scale(1.08); box-shadow: var(--shadow-md); }
.brand-name { font-size: var(--step-0); }

.nav-links { display: flex; gap: clamp(0.4rem, 1.5vw, 1.4rem); align-items: center; }
.nav-links a { font-size: var(--step--1); font-weight: var(--weight-medium); color: var(--text-muted); padding: 0.4em 0.2em; position: relative; transition: color var(--dur-fast); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--accent); transition: width var(--dur-mid) var(--ease-out); }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: var(--space-xs); }
.theme-toggle { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast); }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.theme-tip { position: absolute; top: calc(100% + 8px); left: 50%; background: #14181f; border: 1px solid rgba(46, 204, 143, 0.35); color: #2ecc8f; font-family: var(--font-body); font-size: 0.64rem; font-weight: var(--weight-normal); letter-spacing: 0.02em; white-space: nowrap; padding: 0.18em 0.5em; border-radius: var(--radius-xs); box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(-4px); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); z-index: 120; }
.theme-toggle:hover .theme-tip, .theme-toggle:focus-visible .theme-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .theme-tip { transition: opacity var(--dur-fast); transform: translateX(-50%); } }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Hamburger */
.menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface-2); cursor: pointer; padding: 0 10px; }
.menu-toggle span { height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform var(--dur-fast), opacity var(--dur-fast); }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu drawer */
.mobile-menu { position: fixed; top: 0; right: 0; height: 100dvh; width: min(86vw, 360px); background: color-mix(in srgb, var(--bg-elevated) 90%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-left: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); z-index: 110; transform: translateX(100%); visibility: hidden; transition: transform var(--dur-mid) var(--ease-spring), visibility var(--dur-mid) var(--ease-out); padding: 4.5rem var(--space-xl) var(--space-xl); display: flex; flex-direction: column; overflow: hidden; }
/* soft accent glow bleeding in from the top-right corner */
.mobile-menu::before { content: ""; position: absolute; top: -35%; right: -35%; width: 85%; height: 60%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 32%, transparent), transparent 70%); filter: blur(38px); opacity: 0.5; pointer-events: none; }
.mobile-menu.active { transform: translateX(0); visibility: visible; }

.mm-eyebrow { position: relative; font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-dim); margin-bottom: var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--hairline); }
.mobile-menu nav { position: relative; display: flex; flex-direction: column; gap: 2px; }
.mobile-menu nav a { display: flex; align-items: center; font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--step-2); color: var(--text-muted); padding: 0.45em 0.7em; margin: 0 -0.7em; border-radius: 12px; transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-spring), background var(--dur-fast) var(--ease-out), color var(--dur-fast); }
.mobile-menu nav a:hover, .mobile-menu nav a:focus-visible { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); outline: none; }
.mobile-menu nav a:active { background: color-mix(in srgb, var(--text) 12%, transparent); }

.mm-cta { margin-top: auto; padding-top: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.mm-journey { justify-content: center; }

/* staggered entrance when the drawer opens */
.mm-eyebrow, .mobile-menu nav a, .mm-cta { opacity: 0; transform: translateX(26px); }
.mobile-menu.active .mm-eyebrow, .mobile-menu.active nav a, .mobile-menu.active .mm-cta { opacity: 1; transform: none; }
.mm-eyebrow, .mm-cta { transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-spring); }
.mobile-menu.active nav a:nth-child(1) { transition-delay: 0.10s; }
.mobile-menu.active nav a:nth-child(2) { transition-delay: 0.16s; }
.mobile-menu.active nav a:nth-child(3) { transition-delay: 0.22s; }
.mobile-menu.active nav a:nth-child(4) { transition-delay: 0.28s; }
.mobile-menu.active nav a:nth-child(5) { transition-delay: 0.34s; }
.mobile-menu.active nav a:nth-child(6) { transition-delay: 0.40s; }
.mobile-menu.active .mm-cta { transition-delay: 0.46s; }
@media (prefers-reduced-motion: reduce) {
  .mm-eyebrow, .mobile-menu nav a, .mm-cta { opacity: 1; transform: none; transition: color var(--dur-fast); }
  .mobile-menu.active nav a { transition-delay: 0s; }
}
.menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 105; opacity: 0; visibility: hidden; transition: opacity var(--dur-mid); }
.menu-overlay.active { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding-block: var(--space-2xl); }
.section-alt { background: var(--bg-elevated); }
.section-head { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.section-ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: 10px; box-shadow: var(--edge-highlight); transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast) var(--ease-out); }
.section-ico svg { width: 16px; height: 16px; stroke-width: 2; }
.section-head:hover .section-ico { transform: rotate(-4deg) scale(1.07); box-shadow: var(--glow-accent), var(--edge-highlight); }
@media (prefers-reduced-motion: reduce) { .section-ico { transition: none; } .section-head:hover .section-ico { transform: none; } }
.section-title { font-size: var(--step-3); }
.section-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }
.section-lead { color: var(--text-muted); max-width: 60ch; margin-bottom: var(--space-lg); font-size: var(--step-0); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: calc(100svh - 64px); display: flex; align-items: center; padding-block: var(--space-2xl) var(--space-xl); overflow: hidden; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: var(--space-2xl); align-items: center; width: 100%; }
.hero-copy { max-width: 52rem; margin: 0 auto; text-align: center; }
.hero-desc { margin-left: auto; margin-right: auto; }
.hero-btns { justify-content: center; }
.hero-trust { justify-content: center; }

/* restrained layered glow + grid */
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% -10%, transparent 55%, color-mix(in srgb, var(--bg) 92%, #000) 100%); }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.32; }
.aurora-1 { width: 42vw; height: 42vw; max-width: 560px; max-height: 560px; top: -16%; left: -6%; background: radial-gradient(circle, var(--accent), transparent 70%); animation: drift1 22s var(--ease-in-out) infinite alternate; }
.aurora-2 { width: 38vw; height: 38vw; max-width: 500px; max-height: 500px; top: -12%; right: -4%; background: radial-gradient(circle, var(--accent-2), transparent 70%); opacity: 0.2; animation: drift2 26s var(--ease-in-out) infinite alternate; }
.aurora-3 { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; bottom: -22%; left: 34%; background: radial-gradient(circle, #22d3c9, transparent 70%); opacity: 0.16; animation: drift3 28s var(--ease-in-out) infinite alternate; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 52px 52px; mask-image: radial-gradient(78% 68% at 50% 38%, #000 26%, transparent 76%); -webkit-mask-image: radial-gradient(78% 68% at 50% 38%, #000 26%, transparent 76%); }
@keyframes drift1 { to { transform: translate(60px, 46px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-52px, 40px) scale(1.15); } }
@keyframes drift3 { to { transform: translate(40px, -40px) scale(1.1); } }

.hero-status { display: inline-flex; align-items: center; gap: 0.55em; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); border: 1px solid var(--glass-border); background: var(--glass-bg); backdrop-filter: blur(10px); box-shadow: var(--edge-highlight); border-radius: var(--radius-pill); padding: 0.45em 1em; margin-bottom: var(--space-md); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 70%, transparent); animation: pulseDot 2.4s ease-out infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero-title { font-size: var(--step-5); font-weight: var(--weight-bold); line-height: 1.0; letter-spacing: -0.03em; margin: 0 0 var(--space-sm); }
.hero-tagline { font-family: var(--font-display); font-size: var(--step-2); font-weight: var(--weight-semibold); line-height: 1.12; letter-spacing: -0.02em; margin-bottom: var(--space-md); color: var(--text-muted); }
.hero-tagline .grad-text { font-weight: var(--weight-bold); }
.hero-desc { color: var(--text-muted); font-size: var(--step-0); max-width: 48ch; margin-bottom: var(--space-md); }
.hero-btns { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.hero-trust { display: flex; gap: var(--space-lg); flex-wrap: wrap; margin-top: var(--space-md); font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-dim); }
.hero-trust li { display: inline-flex; align-items: center; gap: 0.45em; }
.hero-trust li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* test-runner visual */
.hero-visual { position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: -1px; border-radius: calc(var(--radius-lg) + 2px); padding: 1px; background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 55%, transparent), transparent 45%, color-mix(in srgb, var(--accent-2) 45%, transparent)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.runner { background: color-mix(in srgb, var(--bg-elevated) 82%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; font-family: var(--font-mono); }
.runner-bar { display: flex; align-items: center; gap: 7px; padding: 0.7em 1em; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.wdot { width: 11px; height: 11px; border-radius: 50%; }
.wdot.r { background: #ff5f57; } .wdot.y { background: #febc2e; } .wdot.g { background: #28c840; }
.runner-title { margin-left: 8px; font-size: var(--step--1); color: var(--text-dim); }
.runner-status { margin-left: auto; font-size: var(--step--1); color: var(--accent); display: inline-flex; align-items: center; gap: 0.4em; }
.runner-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.runner-body { padding: 0.9em 1.1em; display: flex; flex-direction: column; gap: 0.62em; font-size: var(--step--1); }
.runner-body li { display: flex; align-items: center; gap: 0.6em; color: var(--text-muted); opacity: 0; transform: translateX(-8px); animation: lineIn 0.5s var(--ease-out) forwards; }
.runner-body li:nth-child(1) { animation-delay: 0.5s; }
.runner-body li:nth-child(2) { animation-delay: 0.75s; }
.runner-body li:nth-child(3) { animation-delay: 1.0s; }
.runner-body li:nth-child(4) { animation-delay: 1.25s; }
.runner-body li:nth-child(5) { animation-delay: 1.5s; }
.runner-body li:nth-child(6) { animation-delay: 1.8s; }
.runner-body li:nth-child(7) { animation-delay: 2.05s; }
.chk { color: var(--accent); font-weight: var(--weight-bold); }
.ms { margin-left: auto; color: var(--text-dim); }
.run-summary { margin-top: 0.3em; padding-top: 0.7em; border-top: 1px solid var(--border); color: var(--text); }
.run-summary strong { color: var(--accent); }
@keyframes lineIn { to { opacity: 1; transform: none; } }

/* ============================================================
   METRICS BAND
   ============================================================ */
.metrics { border-block: 1px solid var(--border); background: var(--bg-elevated); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); padding-block: var(--space-lg); }
.metric { position: relative; text-align: center; padding: var(--space-md); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--edge-highlight); transition: transform var(--dur-mid) var(--ease-spring), border-color var(--dur-mid), box-shadow var(--dur-mid); }
.metric:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow-md), var(--edge-highlight); }
.metric-num { display: block; font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--step-4); line-height: 1; letter-spacing: -0.02em; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.metric-label { display: block; margin-top: var(--space-xs); color: var(--text-muted); font-size: var(--step--1); }

/* ============================================================
   SCROLL PROGRESS + BACK-TO-TOP
   ============================================================ */
.scroll-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 200; pointer-events: none; background: transparent; }
.scroll-progress-bar { display: block; height: 100%; width: 0%; background: var(--gradient-brand); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.to-top-fab { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(12px); transition: opacity var(--dur-mid), transform var(--dur-mid) var(--ease-spring), border-color var(--dur-fast), color var(--dur-fast); }
.to-top-fab.show { opacity: 1; transform: none; }
.to-top-fab:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.to-top-fab:focus-visible { outline: none; box-shadow: var(--ring); }
.fab-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; background: #14181f; border: 1px solid rgba(46, 204, 143, 0.35); color: #2ecc8f; font-family: var(--font-body); font-size: 0.64rem; font-weight: var(--weight-normal); letter-spacing: 0.02em; white-space: nowrap; padding: 0.18em 0.5em; border-radius: var(--radius-xs); box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(4px); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.to-top-fab:hover .fab-tip, .to-top-fab:focus-visible .fab-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .fab-tip { transition: opacity var(--dur-fast); transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .aurora, .status-dot { animation: none; }
  .runner-body li { opacity: 1; transform: none; animation: none; }
}

/* ============================================================
   ABOUT
   ============================================================ */
/* Two-column story */
.about-story { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }

/* Left rail (sticky) */
.about-rail { position: sticky; top: 88px; }
.about-nav { position: relative; list-style: none; padding: 0; margin: 0; }
.about-nav::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: 16px; width: 2px; border-radius: 2px; background: var(--border-strong); }
.about-nav li { position: relative; }
.about-nav-item { position: relative; display: flex; align-items: center; gap: var(--space-sm); width: 100%; padding: 0.6em 0 0.6em 2.1rem; background: none; border: 0; color: var(--text-dim); font: inherit; text-align: left; cursor: pointer; transition: color var(--dur-fast); }
.about-nav-item::before { content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast); }
.about-nav .an-num { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-dim); transition: color var(--dur-fast); }
.about-nav .an-title { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: var(--step-1); }
.about-nav-item:hover { color: var(--text-muted); }
.about-nav-item:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
.about-nav li.active .about-nav-item { color: var(--text); }
.about-nav li.active .an-num { color: var(--accent); }
.about-nav li.active .about-nav-item::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 12px -2px var(--accent); }

/* Right chapters */
.about-chapters { display: flex; flex-direction: column; gap: var(--space-3xl); }
.chapter { position: relative; }
.chapter-head { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: var(--space-md); width: 100%; background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: default; }
.chapter-num, .about-nav .an-num { display: none; }
.chapter-meta { display: flex; flex-direction: column; gap: 0.4em; min-width: 0; }
.chapter-eyebrow { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-dim); }
.chapter-sub { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.01em; color: var(--text); }
.chapter-chevron { display: none; }
.chapter-body > p { margin-top: var(--space-sm); color: var(--text-muted); font-size: var(--step-0); line-height: 1.65; max-width: 62ch; }

/* Role progression */
.about-progression { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-sm) var(--space-md); margin-top: var(--space-3xl); padding-top: var(--space-2xl); border-top: 1px solid var(--border); }
.prog-node { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 0.42em 1em; box-shadow: var(--edge-highlight); white-space: nowrap; }
.prog-node.prog-now { color: var(--text-on-accent); background: var(--accent); border-color: var(--accent); box-shadow: var(--glow-accent); font-weight: var(--weight-semibold); }
.prog-arrow { width: 20px; height: 1px; background: var(--border-strong); position: relative; flex-shrink: 0; }
.prog-arrow::after { content: ""; position: absolute; right: -1px; top: 50%; width: 5px; height: 5px; border-top: 1.5px solid var(--border-strong); border-right: 1.5px solid var(--border-strong); transform: translateY(-50%) rotate(45deg); }

/* Brand statement */
.about-statement { text-align: center; margin-top: var(--space-3xl); }
.stmt-main { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--step-4); line-height: 1.12; letter-spacing: -0.02em; }
.about-statement .stmt-sub { display: inline-block; padding-top: var(--space-lg); border-top: 1px solid var(--border); font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.01em; color: var(--text-muted); }

/* Mobile: sticky rail becomes a vertical timeline of expandable chapters */
@media (max-width: 900px) {
  .about-story { grid-template-columns: 1fr; gap: 0; }
  .about-rail { display: none; }
  .about-chapters { gap: 0; position: relative; }
  .about-chapters::before { content: ""; position: absolute; left: 9px; top: 14px; bottom: 14px; width: 2px; background: var(--border-strong); }
  .chapter { padding: var(--space-md) 0 var(--space-md) 2.3rem; border-bottom: 1px solid var(--hairline); }
  .chapter:last-child { border-bottom: 0; }
  .chapter::before { content: ""; position: absolute; left: 3px; top: calc(var(--space-md) + 0.55em); width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); z-index: 1; transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast); }
  .chapter.is-open::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .chapter-head { align-items: center; cursor: pointer; }
  .chapter-num { font-size: var(--step-1); }
  .chapter-sub { font-size: var(--step-0); }
  .chapter-chevron { display: block; position: relative; width: 20px; height: 20px; align-self: center; }
  .chapter-chevron::after { content: ""; position: absolute; left: 5px; top: 4px; width: 8px; height: 8px; border-right: 2px solid var(--text-dim); border-bottom: 2px solid var(--text-dim); transform: rotate(45deg); transition: transform var(--dur-fast); }
  .chapter.is-open .chapter-chevron::after { transform: rotate(-135deg); top: 8px; }
  .chapter-body { overflow: hidden; max-height: 0; transition: max-height var(--dur-mid) var(--ease-out); }
  .chapter.is-open .chapter-body { max-height: 520px; }
  .chapter-body > p { font-size: var(--step-0); max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .chapter-body { transition: none; } }

/* ============================================================
   EXPERIENCE — VERTICAL TIMELINE
   ============================================================ */
#experience .section-lead { max-width: none; text-align: justify; text-justify: inter-word; hyphens: auto; }
.vtimeline { position: relative; margin-top: var(--space-lg); list-style: none; padding: 0; max-width: 560px; }
/* the spine — its gradient encodes the two eras: UST (violet) up top, Infosys (green) below */
.vtimeline::before { content: ""; position: absolute; left: 9px; top: 11px; bottom: 11px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, #8a97ff 0%, #8a97ff 33%, #2ee88f 57%, #2ee88f 100%); opacity: 0.5; }
.vtl-item { position: relative; padding: 0 0 var(--space-sm) 2.3rem; --card-accent: var(--accent); }
.vtl-item:last-child { padding-bottom: 0; }
.vtl-item[data-company="Infosys"] { --card-accent: #2ee88f; }
.vtl-item[data-company="UST"] { --card-accent: #8a97ff; }
/* node sitting on the spine */
.vtl-node { position: absolute; left: 2px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--card-accent); z-index: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--card-accent) 14%, transparent); transition: transform var(--dur-fast) var(--ease-spring); }
.vtl-item:hover .vtl-node { transform: scale(1.18); }
/* "current role" live pulse on the most recent entry */
.vtl-item:first-child .vtl-node::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--card-accent); animation: ringPulse 2.6s var(--ease-out) infinite; }
@keyframes ringPulse { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(2.2); opacity: 0; } }
/* flip container + 3D faces (auto-height via grid stacking) */
.vtl-flip { perspective: 1400px; transition: transform var(--dur-mid) var(--ease-spring); }
.vtl-item:hover .vtl-flip { transform: translateY(-3px); }
.vtl-flip-inner { display: grid; transform-style: preserve-3d; transition: transform var(--dur-slow) var(--ease-spring); }
.vtl-item.flipped .vtl-flip-inner { transform: rotateY(180deg); }
/* card face — matches .project-card formatting (top accent bar, accent border) */
.vtl-card { grid-area: 1 / 1; position: relative; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-sm) 2.9rem var(--space-sm) var(--space-md); box-shadow: var(--shadow-sm), var(--edge-highlight); transition: border-color var(--dur-mid), box-shadow var(--dur-mid); }
.vtl-front { display: flex; flex-direction: column; justify-content: center; }
.vtl-back { transform: rotateY(180deg); }
/* only the face that is showing receives clicks (fixes flip hit-testing) */
.vtl-back { pointer-events: none; }
.vtl-item.flipped .vtl-front { pointer-events: none; }
.vtl-item.flipped .vtl-back { pointer-events: auto; }
.vtl-card::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 1; background: linear-gradient(90deg, var(--card-accent), transparent 85%); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-mid) var(--ease-out); }
.vtl-item:hover .vtl-card { border-color: color-mix(in srgb, var(--card-accent) 40%, var(--border)); box-shadow: var(--shadow-md), var(--edge-highlight); }
.vtl-item:hover .vtl-card::after { transform: scaleX(1); }
.vtl-card > * { position: relative; z-index: 1; }
.vtl-card-top { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 5px; }
.vtl-year { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-dim); }
.vtl-company { order: -1; display: inline-flex; align-items: center; gap: 0.45em; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); }
.vtl-company::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--card-accent); box-shadow: 0 0 8px -1px var(--card-accent); }
.vtl-role { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--step-0); color: var(--text); line-height: 1.25; letter-spacing: normal; }
/* flip button (icon on the right edge) */
.vtl-flip-btn { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--card-accent); cursor: pointer; z-index: 2; transition: border-color var(--dur-fast), background var(--dur-fast); }
.vtl-flip-btn:hover { border-color: var(--card-accent); background: color-mix(in srgb, var(--card-accent) 15%, transparent); }
.vtl-flip-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.vtl-flip-btn svg { width: 15px; height: 15px; }
/* back face content */
.vtl-back-label { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-xs); }
.vtl-achv { display: grid; gap: 2px; }
.vtl-achv li { position: relative; padding-left: 1.1em; color: var(--text-muted); font-size: var(--step--1); line-height: 1.45; }
.vtl-achv li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 5px; height: 5px; border-radius: 50%; background: var(--card-accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .vtl-item:first-child .vtl-node::after { animation: none; } .vtl-item:hover .vtl-flip { transform: none; } }

/* ============================================================
   PROJECTS
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; margin-bottom: var(--space-md); }
.filter-label { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-dim); text-transform: uppercase; letter-spacing: var(--tracking-wide); margin-right: var(--space-xs); min-width: 64px; }
.filter { font-family: var(--font-body); font-weight: var(--weight-medium); font-size: var(--step--1); border-radius: var(--radius-pill); padding: 0.42em 1em; border: 1px solid var(--border-strong); background: transparent; color: var(--text-muted); cursor: pointer; transition: all var(--dur-fast); }
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter:focus-visible { outline: none; box-shadow: var(--ring); }
.filter[aria-pressed="true"] { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.filter-empty { color: var(--text-muted); font-style: italic; padding: var(--space-lg) 0; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--space-md); margin-top: var(--space-md); }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); display: flex; flex-direction: column; box-shadow: var(--shadow-sm), var(--edge-highlight); transition: transform var(--dur-mid) var(--ease-spring), border-color var(--dur-mid), box-shadow var(--dur-mid); }
.project-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 40%, var(--border)); box-shadow: var(--shadow-lg), var(--edge-highlight); }
.section-alt .project-card { background: var(--bg); }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.project-domain { display: inline-flex; align-items: center; gap: 0.5em; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); background: transparent; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 0.16em 0.7em; }
.project-domain::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--card-accent, var(--accent)); box-shadow: 0 0 8px -1px var(--card-accent, var(--accent)); }
.project-year { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-dim); }
.project-card h3 { font-size: var(--step-1); line-height: 1.2; margin-bottom: 3px; }
.project-role { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-dim); margin-bottom: var(--space-xs); }
.project-card > p { color: var(--text-muted); font-size: var(--step--1); margin-bottom: var(--space-sm); }

.impact-toggle { align-self: flex-start; font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: var(--step--1); color: var(--accent); background: transparent; border: none; cursor: pointer; padding: 0; margin-bottom: var(--space-sm); display: inline-flex; align-items: center; gap: 4px; }
.impact-toggle::after { content: "↓"; transition: transform var(--dur-fast); }
.impact-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.project-impact { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-mid) var(--ease-out); }
.project-impact > ul { overflow: hidden; }
.project-impact.open { grid-template-rows: 1fr; }
.project-impact ul { padding-left: 1.1em; margin-bottom: var(--space-sm); }
.project-impact li { list-style: disc; color: var(--text-muted); font-size: var(--step--1); margin-bottom: 4px; }

.tech-stack { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: auto; padding-top: var(--space-sm); }
.tag { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.22em 0.65em; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-eyebrow { display: flex; align-items: center; gap: 0.6em; font-family: var(--font-mono); font-size: var(--step--1); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-dim); margin: 0 0 var(--space-md); }
.skills-eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--gradient-brand); }

.skills-bento { column-width: 270px; column-gap: var(--space-md); }
.skill-card { break-inside: avoid; margin: 0 0 var(--space-md); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-md); box-shadow: var(--shadow-sm), var(--edge-highlight); transition: border-color var(--dur-mid), transform var(--dur-mid) var(--ease-spring), box-shadow var(--dur-mid); }
.skill-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); transform: translateY(-3px); box-shadow: var(--shadow-md), var(--edge-highlight); }
.skill-card-head { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.skill-ico { flex-shrink: 0; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); box-shadow: var(--edge-highlight); }
.skill-ico svg { width: 16px; height: 16px; stroke-width: 2; }
.skill-card-head h3 { margin: 0; font-family: var(--font-display); font-size: var(--step-0); font-weight: var(--weight-semibold); color: var(--text); letter-spacing: normal; text-transform: none; line-height: 1.2; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

.soft-panel { margin-top: var(--space-lg); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: var(--space-lg); box-shadow: var(--shadow-sm); }
.soft-list { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.soft-item { display: flex; align-items: flex-start; gap: 0.7em; color: var(--text); line-height: 1.6; }
.soft-check { flex-shrink: 0; margin-top: 1px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.soft-check svg { width: 14px; height: 14px; stroke-width: 2.5; }
@media (prefers-reduced-motion: reduce) { .skill-card:hover { transform: none; } }

/* ============================================================
   ARTICLES
   ============================================================ */
/* Publications */
.pub-list { list-style: none; display: grid; gap: var(--space-md); }
.pub-card { display: flex; flex-direction: column; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-lg); box-shadow: var(--shadow-sm), var(--edge-highlight); transition: transform var(--dur-mid) var(--ease-spring), border-color var(--dur-mid), box-shadow var(--dur-mid); }
.pub-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow-lg), var(--edge-highlight); }
.pub-title { font-size: var(--step-1); line-height: 1.3; margin: 0; }
.pub-meta { margin: 0.4em 0 0; color: var(--text-muted); font-family: var(--font-mono); font-size: var(--step--1); }
.pub-venue { color: var(--accent); font-weight: var(--weight-semibold); }
.pub-abstract { margin: var(--space-sm) 0 var(--space-md); color: var(--text-muted); font-size: var(--step--1); width: 100%; line-height: 1.65; text-align: justify; text-justify: inter-word; hyphens: auto; }
.pub-btn { flex-shrink: 0; align-self: flex-start; }
.pub-btn-arrow { transition: transform var(--dur-fast) var(--ease-out); }
.pub-btn:hover .pub-btn-arrow { transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) { .pub-btn:hover .pub-btn-arrow { transform: none; } }

.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-lg); }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); transition: transform var(--dur-mid) var(--ease-spring), border-color var(--dur-mid), box-shadow var(--dur-mid); }
.article-card:hover { transform: translateY(-6px) scale(1.015); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.article-tag { display: inline-block; font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent); border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 0.1em 0.6em; margin-bottom: var(--space-sm); }
.article-card h3 { font-size: var(--step-1); margin-bottom: var(--space-xs); }
.article-card p { color: var(--text-muted); margin-bottom: var(--space-md); }
.article-soon { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-dim); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--space-xl); align-items: start; }
.contact-left { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; }
.contact-right { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-lg); box-shadow: var(--shadow-sm), var(--edge-highlight); }
.info-item { display: flex; align-items: center; gap: 0.65em; padding: 0.5em 0.85em; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--edge-highlight); font: inherit; text-align: left; transition: border-color var(--dur-fast), transform var(--dur-fast) var(--ease-spring); }
.info-item > svg { color: var(--accent); flex-shrink: 0; }
.info-item.static { cursor: default; }
.info-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.info-title { font-family: var(--font-body); font-weight: var(--weight-normal); color: var(--text); font-size: var(--step-0); line-height: 1.25; }
.info-value { font-family: var(--font-body); font-weight: var(--weight-normal); font-size: var(--step-0); color: var(--text); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-item:hover, .info-link:focus-visible { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-2px); }
.info-link { cursor: pointer; text-decoration: none; }
.info-link:focus-visible { outline: none; box-shadow: var(--ring); }

/* small action icon buttons (eye toggle + copy) */
.info-act, .copy-btn { position: relative; flex-shrink: 0; display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-dim); cursor: pointer; transition: color var(--dur-fast), background var(--dur-fast); }
.info-act:hover, .copy-btn:hover { color: var(--accent); background: var(--accent-soft); }
.info-act:focus-visible, .copy-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.info-act svg, .copy-btn svg { color: inherit; }
.eye-btn .ico-eye-off { display: none; }
.eye-btn.revealed .ico-eye { display: none; }
.eye-btn.revealed .ico-eye-off { display: block; }
.copy-btn .ico-check { display: none; }
.copy-btn.copied { color: var(--accent); }
.copy-btn.copied .ico-copy { display: none; }
.copy-btn.copied .ico-check { display: block; color: var(--accent); }
.copy-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) translateY(4px); background: #14181f; border: 1px solid rgba(46, 204, 143, 0.35); color: #2ecc8f; font-family: var(--font-body); font-size: 0.64rem; font-weight: var(--weight-normal); letter-spacing: 0.02em; white-space: nowrap; padding: 0.18em 0.5em; border-radius: var(--radius-xs); box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.info-act:hover .copy-tip, .info-act:focus-visible .copy-tip, .copy-btn:hover .copy-tip, .copy-btn:focus-visible .copy-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .copy-tip { transition: opacity var(--dur-fast); transform: translateX(-50%); } }

.field { position: relative; margin-bottom: var(--space-sm); }
.field input, .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); font: inherit; padding: 0.7em 0.85em; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.field textarea { resize: vertical; min-height: 84px; }
/* Keep the field background constant even when the browser autofills */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active,
.field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 100px var(--bg) inset;
  box-shadow: 0 0 0 100px var(--bg) inset;
  caret-color: var(--text);
  transition: background-color 100000s ease-out 0s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field label { position: absolute; left: 0.9em; color: var(--text-dim); pointer-events: none; background: transparent; padding: 0; transition: top var(--dur-fast) var(--ease-out), left var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), font-size var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.field input + label { top: 50%; transform: translateY(-50%); }
.field textarea + label { top: 0.9em; }
/* Floated: sits on the top border (notched), reduced size */
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: 0; left: 0.6em; transform: translateY(-50%);
  font-size: var(--step--1); color: var(--accent);
  background: var(--surface); padding: 0 0.35em;
}
.form-actions { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.form-status { font-size: var(--step--1); font-weight: var(--weight-semibold); display: inline-flex; align-items: center; }
.form-status.ok { color: var(--accent); }
:root[data-theme="dark"] .form-status.ok { color: #39ff9d; text-shadow: 0 0 6px rgba(57, 255, 157, 0.75), 0 0 16px rgba(57, 255, 157, 0.4); }
.form-status.err { color: #e5484d; }
.form-fallback { margin-top: var(--space-md); font-size: var(--step--1); color: var(--text-dim); }
.form-fallback a { color: var(--accent); text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-elevated); padding-top: var(--space-2xl); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: var(--space-2xl); padding-bottom: var(--space-xl); }
.footer-logo { display: block; width: 40px; height: 40px; border-radius: 24%; box-shadow: var(--shadow-sm); }
.footer-brand p { color: var(--text-muted); margin-top: var(--space-sm); max-width: 30ch; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.footer-col h4 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-dim); font-family: var(--font-mono); font-weight: var(--weight-medium); margin-bottom: var(--space-sm); }
.footer-col a, .footer-link { display: block; color: var(--text-muted); padding: 0.28em 0; font-size: var(--step-0); transition: color var(--dur-fast); }
.footer-col a:hover, .footer-link:hover { color: var(--accent); }
.footer-link { width: 100%; text-align: left; background: none; border: 0; margin: 0; font-family: inherit; cursor: pointer; }
.footer-link:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-xs); }
.footer-bottom { display: flex; justify-content: center; align-items: center; gap: var(--space-md); flex-wrap: wrap; text-align: center; border-top: 1px solid var(--border); padding-block: var(--space-lg); color: var(--text-dim); font-size: var(--step--1); }

/* ============================================================
   ARTICLE PAGE (prose)
   ============================================================ */
.article-hero { padding-block: var(--space-2xl) var(--space-lg); border-bottom: 1px solid var(--border); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); margin-bottom: var(--space-lg); transition: color var(--dur-fast); }
.back-link:hover { color: var(--accent); }
.article-hero h1 { font-size: var(--step-4); max-width: 20ch; margin-bottom: var(--space-sm); }
.article-byline { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-dim); }
.article-byline .article-tag { margin: 0; }
.prose { max-width: var(--content-max); margin: var(--space-2xl) auto var(--space-3xl); font-size: var(--step-1); }
.prose h2 { font-size: var(--step-2); margin: var(--space-xl) 0 var(--space-sm); }
.prose h3 { font-size: var(--step-1); margin: var(--space-lg) 0 var(--space-xs); color: var(--accent); }
.prose p { color: var(--text-muted); margin-bottom: var(--space-md); }
.prose ul { margin: 0 0 var(--space-md); padding-left: 1.3em; }
.prose li { list-style: disc; color: var(--text-muted); margin-bottom: var(--space-xs); }
.prose strong { color: var(--text); }
.prose blockquote { border-left: 3px solid var(--accent); padding: var(--space-xs) 0 var(--space-xs) var(--space-md); margin: var(--space-lg) 0; color: var(--text); font-style: italic; }
.prose code { font-family: var(--font-mono); font-size: 0.85em; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-xs); padding: 0.1em 0.4em; color: var(--accent); }
.article-foot { max-width: var(--content-max); margin: 0 auto var(--space-3xl); padding-top: var(--space-lg); border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md); }
.mini-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.article-link { display: inline-flex; align-items: center; gap: 4px; font-weight: var(--weight-semibold); font-size: var(--step--1); color: var(--accent); }
.article-link::after { content: "→"; transition: transform var(--dur-fast); }
.article-card:hover .article-link::after { transform: translateX(3px); }

/* ============================================================
   ELEVATION — PHASE B (projects / timeline / skills)
   ============================================================ */
/* Project cards: cursor spotlight + domain-accent top bar */
.project-card { position: relative; overflow: hidden; }
.project-card::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity var(--dur-mid); background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--card-accent, var(--accent)) 15%, transparent), transparent 60%); }
.project-card:hover::before { opacity: 1; }
.project-card::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 1; background: linear-gradient(90deg, var(--card-accent, var(--accent)), transparent 85%); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-mid) var(--ease-out); }
.project-card:hover::after { transform: scaleX(1); }
.project-card > * { position: relative; z-index: 1; }
.project-card[data-domain="Healthcare"] { --card-accent: #2ecc8f; }
.project-card[data-domain="Banking"] { --card-accent: #8a97ff; }
.project-card[data-domain="Insurance"] { --card-accent: #e0a63a; }
.project-card[data-domain="Manufacturing"] { --card-accent: #22d3c9; }
.tag { transition: color var(--dur-fast), border-color var(--dur-fast); }
.chips .tag:hover, .tech-stack .tag:hover { color: var(--accent); border-color: var(--accent); }

/* Skills: header glyph + tools marquee */
.skill-group h3::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--gradient-brand); margin-right: 0.55em; vertical-align: middle; }
.marquee { margin-top: var(--space-xl); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; gap: var(--space-sm); width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .tag { white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  transition:
    opacity var(--dur-reveal) var(--ease-spring),
    transform var(--dur-reveal) var(--ease-spring);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; transition-delay: 0ms; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-xl); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg) var(--space-md); }
  .metric:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .filter-label { min-width: 100%; margin-bottom: 2px; }
  .hero { min-height: auto; padding-top: var(--space-2xl); }
  .metric::after { display: none !important; }
}
/* Small mobile */
@media (max-width: 480px) {
  .hero-title { font-size: var(--step-4); }
  .section { padding-block: var(--space-xl); }
  .project-card, .pub-card, .skill-card, .contact-right { padding: var(--space-md); }
  .soft-panel { padding: var(--space-lg); }
  .pub-btn { align-self: stretch; justify-content: center; }
  .form-actions { gap: var(--space-sm); }
  /* keep the masked email/phone readable on small screens */
  .info-item { gap: 0.5em; padding: 0.5em 0.6em; }
  .info-value { font-size: 0.78rem; letter-spacing: 0; }
  .info-act, .copy-btn { width: 28px; height: 28px; }
}
/* Very small mobile */
@media (max-width: 360px) {
  .footer-nav { grid-template-columns: 1fr; }
  .hero-trust { gap: var(--space-sm) var(--space-md); }
}
