:root {
  --bg: #07070f;
  --surface: #12122a;
  --elevated: #1a1a3d;
  --border: rgba(99, 102, 241, 0.16);
  --border-strong: rgba(99, 102, 241, 0.42);
  --fg: #f0f1ff;
  --muted: #9b9fc4;
  --primary: #6366f1;
  --accent: #818cf8;
  --accent2: #a5b4fc;
  --grad: linear-gradient(125deg, #67e8f9 0%, #6366f1 45%, #c084fc 100%);
  --radius: 22px;
  --max: 1280px;
  --nav-h: 70px;
  --card-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --elevated: #eef0f9;
  --border: rgba(79, 70, 229, 0.12);
  --border-strong: rgba(79, 70, 229, 0.32);
  --fg: #0e0e24;
  --muted: #5c6188;
  --primary: #4f46e5;
  --accent: #6366f1;
  --accent2: #4f46e5;
  --grad: linear-gradient(125deg, #22d3ee 0%, #4f46e5 45%, #a855f7 100%);
  --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: 16.5px;
  line-height: 1.72;
  letter-spacing: 0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
body.menu-open { overflow: hidden; }
h1, h2, h3, h4 {
  font-family: Syne, system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--fg);
}
p { margin: 0 0 1.05em; line-height: 1.78; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 18px; background: var(--primary); color: #fff;
  font-weight: 700; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.67rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.text-grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }
.fg { color: var(--fg); }
.bg-mesh {
  position: fixed; inset: 0; z-index: -3; pointer-events: none; opacity: 0.45;
  background:
    radial-gradient(50rem 36rem at 12% -8%, rgba(99, 102, 241, 0.45), transparent 60%),
    radial-gradient(40rem 32rem at 88% 8%, rgba(168, 85, 247, 0.22), transparent 60%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.04;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
}
.orb {
  position: fixed; border-radius: 9999px; filter: blur(80px); opacity: 0.22;
  z-index: -1; pointer-events: none; animation: float 24s ease-in-out infinite;
}
.orb-1 { width: 22rem; height: 22rem; top: -5rem; left: -6rem; background: var(--primary); }
.orb-2 { width: 18rem; height: 18rem; top: 55%; right: -5rem; background: #a855f7; animation-delay: -10s; }
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(1.5rem, -2rem, 0) scale(1.05); }
}
header {
  position: fixed; left: 0; right: 0; top: 0; z-index: 50; height: var(--nav-h);
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
header.scrolled {
  background: rgba(7, 7, 15, 0.82);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(99, 102, 241, 0.14);
}
[data-theme="light"] header.scrolled {
  background: rgba(245, 246, 251, 0.88);
  border-bottom-color: rgba(79, 70, 229, 0.12);
}
.navrow {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--nav-h); max-width: var(--max); margin: 0 auto; padding: 0 24px; gap: 12px;
}
.brand {
  font-family: Syne, system-ui, sans-serif; font-weight: 800; font-size: 1.22rem;
  letter-spacing: -0.03em; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent; justify-self: start;
}
nav.links {
  display: flex; align-items: center; justify-content: center; gap: 2px; justify-self: center;
}
nav.links a {
  padding: 8px 12px; border-radius: 10px; font-size: 0.86rem; font-weight: 500;
  color: var(--muted); transition: color 0.2s, background 0.2s, box-shadow 0.2s; white-space: nowrap;
}
nav.links a:hover { color: var(--fg); background: rgba(99, 102, 241, 0.1); }
nav.links a.active {
  color: var(--fg); background: rgba(99, 102, 241, 0.2);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.38);
}
.nav-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.22); background: rgba(18, 18, 42, 0.7);
  color: var(--fg); display: grid; place-items: center; transition: border-color 0.2s, background 0.2s;
}
.iconbtn:hover { border-color: rgba(99, 102, 241, 0.5); background: rgba(99, 102, 241, 0.16); }
.iconbtn:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
[data-theme="light"] .iconbtn {
  background: rgba(255, 255, 255, 0.85); border-color: rgba(79, 70, 229, 0.18);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 13px; font-weight: 700; font-size: 0.875rem;
  letter-spacing: 0.015em; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s; cursor: pointer;
}
.btn-primary {
  background: var(--grad); color: #fff; box-shadow: 0 12px 36px rgba(99, 102, 241, 0.38);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(99, 102, 241, 0.52); }
.btn-ghost {
  border-color: var(--border);
  background: color-mix(in oklab, var(--surface) 65%, transparent); color: var(--fg);
}
.btn-ghost:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.btn-nav-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; border-radius: 12px; font-size: 0.82rem; font-weight: 700;
  color: #fff; background: var(--grad); box-shadow: 0 8px 26px rgba(99, 102, 241, 0.38); white-space: nowrap;
}
.btn-nav-cta:hover { transform: translateY(-1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.menu-btn { display: none; }
.hamburger {
  display: none; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.22); background: rgba(18, 18, 42, 0.7);
  place-items: center; flex-direction: column; gap: 5px;
}
.hamburger span {
  display: block; width: 18px; height: 2px; background: var(--fg);
  border-radius: 2px; transition: transform 0.25s, opacity 0.25s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-panel,
#mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 45;
  background: rgba(7, 7, 15, 0.96); backdrop-filter: blur(16px);
  padding: 28px 24px; transform: translateX(100%);
  transition: transform 0.35s var(--ease); display: flex; flex-direction: column; gap: 8px;
}
.mobile-panel.open,
#mobile-menu.open { transform: translateX(0); }
[data-theme="light"] .mobile-panel,
[data-theme="light"] #mobile-menu { background: rgba(245, 246, 251, 0.97); }
.mobile-panel a,
#mobile-menu a {
  padding: 14px 16px; border-radius: 12px; font-size: 1.05rem; font-weight: 600; color: var(--fg);
}
.mobile-panel a:hover,
#mobile-menu a:hover { background: rgba(99, 102, 241, 0.12); }
#mobile-menu .menu-cta { margin-top: 12px; text-align: center; }
@media (max-width: 960px) {
  .navrow { grid-template-columns: auto 1fr; }
  nav.links { display: none; }
  .btn-nav-cta.desktop-only { display: none; }
  .hamburger, .menu-btn { display: grid; }
}
section { padding: 84px 0; }
.sec-head { margin-bottom: 38px; }
.sec-head .label { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sec-head .label .line { width: 34px; height: 1.5px; background: var(--grad); border-radius: 2px; }
.sec-head h2 { font-size: clamp(2.15rem, 4.9vw, 3.5rem); letter-spacing: -0.038em; }
.sec-head .desc {
  max-width: 28rem; color: var(--muted); font-size: 0.96rem; line-height: 1.72; margin-top: 10px;
}
@media (min-width: 768px) {
  .sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
  .sec-head .desc { margin-top: 0; text-align: right; }
}
.sec-rule {
  height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); margin-top: 24px;
}
.section-gap { margin-top: 28px; }
.bento { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .bento { grid-template-columns: repeat(12, 1fr); } }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color 0.35s, transform 0.4s var(--ease), box-shadow 0.35s;
}
.tile:hover {
  border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--card-shadow);
}
.tile-glow::before {
  content: ""; position: absolute; top: -5rem; right: -5rem; width: 14rem; height: 14rem;
  border-radius: 9999px; background: var(--primary); opacity: 0.18; filter: blur(60px); pointer-events: none;
}
.span-12, .span-8, .span-7, .span-6, .span-5, .span-4, .span-3 { grid-column: span 1; }
@media (min-width: 768px) {
  .span-12 { grid-column: span 12; }
  .span-8 { grid-column: span 8; }
  .span-7 { grid-column: span 7; }
  .span-6 { grid-column: span 6; }
  .span-5 { grid-column: span 5; }
  .span-4 { grid-column: span 4; }
  .span-3 { grid-column: span 3; }
}
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 0.74rem;
  font-weight: 500; letter-spacing: 0.025em; border: 1px solid var(--border);
  background: var(--bg); color: var(--muted);
}
.pill-accent {
  border-color: var(--border-strong); background: rgba(99, 102, 241, 0.16); color: var(--accent2);
}
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-box {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(99, 102, 241, 0.15); color: var(--accent2); flex-shrink: 0;
}
.icon-box svg { width: 20px; height: 20px; }
.hero { padding-top: calc(var(--nav-h) + 54px); }
.hero-intro { padding: 42px; display: flex; flex-direction: column; justify-content: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgba(99, 102, 241, 0.12);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent2);
}
.pulse {
  width: 8px; height: 8px; border-radius: 99px; background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  60% { box-shadow: 0 0 0 9px transparent; }
}
.accent-label { margin-top: 22px; color: var(--accent2); }
.hero h1 {
  font-size: clamp(3rem, 7.4vw, 5.4rem); margin: 18px 0 14px;
  line-height: 0.93; letter-spacing: -0.042em;
}
.hero-tagline { font-size: 1.18rem; font-weight: 500; margin: 12px 0 14px; letter-spacing: 0.012em; }
.hero-copy { max-width: 38rem; font-size: 1.02rem; line-height: 1.78; }
.typed { color: var(--accent2); font-weight: 700; }
.typed::after {
  content: "|"; margin-left: 1px; animation: blink 1s steps(1) infinite; color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }
.portrait { position: relative; min-height: 280px; padding: 0; }
@media (min-width: 768px) { .portrait { min-height: 100%; } }
.portrait img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.portrait-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 42%, var(--bg)); opacity: 0.92; pointer-events: none;
}
.portrait-cap { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 2; }
.portrait-title {
  font-family: Syne, sans-serif; font-weight: 800; font-size: 1.15rem;
  margin-top: 6px; letter-spacing: -0.025em;
}
.metric-label {
  font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.metric-val {
  font-family: Syne, sans-serif; font-size: 2.4rem; font-weight: 800;
  margin-top: 8px; letter-spacing: -0.035em;
}
.metric-sub {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-top: 4px;
}
.metric-link {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px; color: inherit; height: 100%;
}
.metric-elevated { background: var(--elevated); border-color: var(--border-strong); }
.marquee-tile { padding: 16px; }
.marquee-wrap {
  overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; gap: 2.6rem; width: max-content; animation: marquee 34s linear infinite;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-track span {
  font-family: Syne, sans-serif; font-size: 0.84rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; white-space: nowrap;
}
.marquee-track span:nth-child(odd) { color: var(--muted); }
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.feature-card, .skill-card, .principle, .exp-card, .about-copy, .about-side, .cert-card {
  padding: 28px; display: flex; flex-direction: column;
}
.card-title { font-size: 1.3rem; margin-top: 18px; letter-spacing: -0.025em; }
.card-body { font-size: 0.9rem; margin: 10px 0 16px; flex: 1; line-height: 1.72; }
.principle { padding: 26px; }
.principle h3 { font-size: 1.1rem; margin-top: 12px; letter-spacing: -0.02em; }
.principle p { font-size: 0.88rem; margin-top: 10px; line-height: 1.65; }
.skill-card h3 { font-size: 1.15rem; letter-spacing: -0.02em; }
.skill-card .pill-row { margin-top: 18px; }
.about-copy { padding: 34px; }
.body-text { font-size: 0.96rem; margin: 0 0 16px; line-height: 1.78; }
.body-text.last { margin: 0; }
.about-side { padding: 34px; }
.about-side .pill-row { margin-top: 14px; }
.roles-block { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 24px; }
.role-list { margin: 14px 0 0; }
.role-list li {
  display: flex; align-items: center; gap: 10px; font-size: 0.9rem; margin-bottom: 10px;
}
.role-list li:last-child { margin-bottom: 0; }
.dot {
  width: 6px; height: 6px; border-radius: 99px; background: var(--primary); flex-shrink: 0;
}
.contact-strip {
  padding: 24px 34px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px; background: var(--elevated); border-color: var(--border-strong);
}
.contact-email {
  font-family: Syne, sans-serif; font-weight: 800; font-size: 1.22rem;
  margin-top: 6px; letter-spacing: -0.025em;
}
.exp-logo {
  width: 48px; height: 48px; border-radius: 12px; object-fit: contain;
  background: #fff; padding: 5px; border: 1px solid var(--border); flex-shrink: 0;
}
.exp-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.exp-identity { display: flex; align-items: center; gap: 14px; }
.exp-identity h3 { font-size: 1.28rem; letter-spacing: -0.025em; }
.exp-identity h3.h3-sm { font-size: 1.2rem; }
.company { font-size: 0.9rem; margin: 4px 0 0; }
.exp-meta { text-align: right; }
.loc { font-size: 0.8rem; margin: 4px 0 0; }
.exp-bullets { display: grid; gap: 12px; margin-top: 20px; padding: 0; }
@media (min-width: 768px) { .exp-bullets.two { grid-template-columns: 1fr 1fr; } }
.exp-bullets li {
  display: flex; gap: 10px; font-size: 0.9rem; color: var(--muted);
  line-height: 1.68; list-style: none;
}
.exp-bullets li::before {
  content: ""; width: 6px; height: 6px; border-radius: 99px;
  background: var(--primary); margin-top: 9px; flex-shrink: 0;
}
.stack-row { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.projects-stack { display: grid; gap: 16px; }
.project-main {
  padding: 34px; display: flex; flex-direction: column; justify-content: space-between;
}
.project-title { font-size: 1.95rem; margin-top: 16px; letter-spacing: -0.03em; }
.date-line { margin-top: 16px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-feature { padding: 20px; }
.mini-feature h4 { font-size: 1rem; }
.mini-feature p { font-size: 0.85rem; margin-top: 8px; line-height: 1.65; }
a.tile-link { display: flex; flex-direction: column; color: inherit; }
.project-preview {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: #0a0a18; aspect-ratio: 16 / 9; padding: 0;
}
.project-preview img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform 0.55s var(--ease);
}
.tile:hover .project-preview img { transform: scale(1.03); }
.edu-main {
  padding: 34px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start;
}
.edu-logo {
  width: 56px; height: 56px; border-radius: 14px; object-fit: contain;
  background: #fff; padding: 6px; border: 1px solid var(--border);
}
.edu-main h3 { font-size: 1.25rem; letter-spacing: -0.025em; }
.edu-main .muted { font-size: 0.9rem; margin-top: 8px; }
.edu-main .loc { font-size: 0.85rem; margin-top: 4px; }
.edu-side {
  padding: 34px; background: var(--elevated); border-color: var(--border-strong);
  display: flex; flex-direction: column; justify-content: space-between;
}
.edu-dates { margin-top: 20px; }
.edu-range {
  font-family: Syne, sans-serif; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.025em;
}
.edu-dates .pill { margin-top: 12px; display: inline-block; }
.cert-badge {
  width: 64px; height: 64px; object-fit: contain; margin-bottom: 12px; border-radius: 8px;
}
.cert-card { padding: 24px; }
.cert-card h3 { font-size: 1.1rem; margin-top: 8px; }
.cert-card .flex-grow { font-size: 0.85rem; margin: 10px 0; flex: 1; }
.cert-card .mono:last-child { margin-top: 12px; }
.contact-section { padding-bottom: 100px; }
.cta-banner {
  padding: 34px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 20px; background: var(--primary);
  border-color: var(--primary); color: #fff;
}
.cta-banner h3 { font-size: 1.6rem; color: #fff; letter-spacing: -0.025em; }
.cta-banner p { margin: 6px 0 0; opacity: 0.9; font-size: 1.02rem; }
.btn-on-primary { background: #fff; color: var(--primary); }
.linkedin-badge-wrap {
  display: flex; align-items: center; justify-content: center; padding: 28px; min-height: 120px;
}
.contact-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(99, 102, 241, 0.15); color: var(--accent2); margin-bottom: 16px;
}
.contact-icon svg { width: 18px; height: 18px; }
.contact-tile {
  padding: 26px; display: flex; flex-direction: column; min-height: 140px;
}
.contact-value {
  font-family: Syne, sans-serif; font-weight: 700; font-size: 0.95rem; margin-top: 8px;
}
.contact-value.break { font-size: 0.9rem; word-break: break-all; }
.now-line { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }

/* Case studies */
.crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 18px; color: var(--muted);
}
.crumbs a:hover { color: var(--fg); }
.crumbs span { opacity: 0.5; }
.case-body { max-width: 46rem; margin-top: 36px; }
.case-body h2 {
  font-size: 1.55rem; margin: 36px 0 14px; letter-spacing: -0.03em;
}
.case-body h3 {
  font-size: 1.15rem; margin: 22px 0 10px; letter-spacing: -0.02em;
}
.case-body p { color: var(--muted); font-size: 0.98rem; }
.case-body ul {
  margin: 12px 0 20px; padding: 0; display: grid; gap: 10px;
}
.case-body ul li {
  display: flex; gap: 10px; color: var(--muted); font-size: 0.95rem; line-height: 1.7;
}
.case-body ul li::before {
  content: ""; width: 6px; height: 6px; border-radius: 99px;
  background: var(--primary); margin-top: 10px; flex-shrink: 0;
}
.case-body strong { color: var(--fg); font-weight: 600; }
.result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin: 28px 0;
}
.bar-row {
  display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 12px;
  align-items: center; margin-bottom: 12px; font-size: 0.88rem;
}
.bar-track {
  height: 8px; border-radius: 99px; background: var(--elevated); overflow: hidden;
}
.bar-fill {
  display: block; height: 100%; border-radius: 99px; background: var(--grad);
}

footer {
  border-top: 1px solid var(--border); padding: 38px 0; text-align: center;
  color: var(--muted); font-size: 0.875rem; letter-spacing: 0.025em;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb, .marquee-track, .pulse, .typed::after { animation: none !important; }
  html { scroll-behavior: auto; }
}
/* Scroll progress indicator */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: var(--grad); transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

/* Back to top */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 55;
  width: 44px; height: 44px; border-radius: 14px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg);
  display: grid; place-items: center; box-shadow: var(--card-shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--accent); background: rgba(99, 102, 241, 0.16); }

/* Denser primary nav so ten links stay on one line */
@media (max-width: 1180px) and (min-width: 961px) {
  nav.links a { padding: 8px 9px; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none !important; }
  .orb { animation: none !important; }
  .typed::after { animation: none; }
  .pulse { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* Hiring enquiry tile */
.hire-tile { padding: 34px; display: flex; flex-direction: column; gap: 22px; }
.hire-head h3 { font-size: 1.35rem; letter-spacing: -0.02em; margin: 10px 0 8px; }
.hire-head p { margin: 0; max-width: 62ch; }
.hire-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hire-item {
  border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  background: rgba(99, 102, 241, 0.06);
}
.hire-item .mono { display: block; margin-bottom: 8px; color: var(--accent2); }
.hire-item p { margin: 0; font-size: 0.92rem; }
@media (max-width: 900px) { .hire-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Polish layer, cursor spotlight, grain, counters, micro-detail
   Purely additive: no layout or palette changes.
   ============================================================ */

::selection { background: rgba(99, 102, 241, 0.32); color: var(--fg); }

html { scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), #a855f7);
  border-radius: 99px; border: 3px solid var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px; border-radius: 8px;
}

/* Fine film grain so the flat surfaces read as crafted, not default */
.bg-grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Cursor-tracked spotlight on every tile */
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity 0.4s ease;
  background: radial-gradient(
    22rem 22rem at var(--mx, 50%) var(--my, 0%),
    rgba(129, 140, 248, 0.13), transparent 62%
  );
}
.tile:hover::after { opacity: 1; }
.tile > * { position: relative; z-index: 2; }

/* Hero tile gets a slow-travelling gradient hairline */
.hero-intro { background-clip: padding-box; }
.hero-intro::after {
  background: radial-gradient(26rem 26rem at var(--mx, 70%) var(--my, 10%),
    rgba(103, 232, 249, 0.12), transparent 62%);
}

/* Metric numbers: gradient ink + a lift that feels mechanical, not bouncy */
.metric-val {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; font-variant-numeric: tabular-nums;
}
.metric-link { transition: transform 0.4s var(--ease); }
.metric-link:hover .metric-sub { color: var(--accent2); }
.metric-sub { transition: color 0.3s ease; }

/* Nav: underline sweeps in from the left instead of appearing */
#nav a { position: relative; }
#nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  border-radius: 2px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
#nav a:hover::after, #nav a.active::after { transform: scaleX(1); }

/* Icon tiles respond to the card, not only to themselves */
.tile:hover .icon-box {
  background: rgba(99, 102, 241, 0.26);
  transform: translateY(-2px) rotate(-3deg);
}
.icon-box { transition: background 0.35s ease, transform 0.35s var(--ease); }

/* Pills firm up on card hover */
.tile:hover .pill { border-color: var(--border-strong); }
.pill { transition: border-color 0.35s ease, background 0.35s ease, color 0.35s ease; }

/* Reveal: add a touch of depth to the existing fade */
.reveal { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  .tile::after { display: none; }
  .icon-box, .tile, .metric-link { transition: none !important; }
  .bg-grain { display: none; }
}

/* Skills: numbered header row so each card scans in one pass */
.skill-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.skill-num {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  background: var(--surface-2, transparent);
}
.skill-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, currentColor);
  opacity: 0.85;
}
.skill-desc {
  margin-top: 8px;
  font-size: 0.94rem;
  line-height: 1.6;
}
.skill-card:hover .skill-num { border-color: var(--border-strong); }

/* ---------------------------------------------------------------------------
   Techie detail layer: terminal cue in the hero, bracketed section markers,
   and a hairline corner frame on the hero tile. Purely additive.
--------------------------------------------------------------------------- */
.term-line {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px;
  text-transform: lowercase; letter-spacing: 0.13em;
  background: rgba(129, 140, 248, 0.06);
  width: fit-content;
}
.term-prompt { color: var(--accent); font-weight: 700; letter-spacing: 0; }
.term-line::after {
  content: ""; width: 7px; height: 13px; background: var(--accent);
  animation: blink 1.05s steps(1) infinite;
}

/* Section markers read like code annotations */
.sec-head .label .mono::before { content: "["; color: var(--accent); margin-right: 4px; }
.sec-head .label .mono::after { content: "]"; color: var(--accent); margin-left: 4px; }

/* Hero tile corner frame */
.hero-intro { position: relative; }
.hero-intro::before {
  content: ""; position: absolute; inset: 14px; pointer-events: none; z-index: 1;
  border: 1px solid transparent; border-radius: 14px;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 22px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 1px 22px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 22px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 1px 22px no-repeat;
  opacity: 0.32;
}

/* Skill numbers get a monospace chip feel */
.skill-num { font-variant-numeric: tabular-nums; }
.skill-card:hover .skill-kicker { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .term-line::after { animation: none; }
}
