/* ---------- Design tokens ---------- */
:root {
  --bg: #0b0d12;
  --bg-elev: #12151d;
  --bg-elev-2: #171b25;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e7e9ee;
  --text-dim: #a4abbd;
  --text-mute: #6b7286;
  --accent: #7a5cff;
  --accent-2: #5b8def;
  --accent-3: #c471ed;
  --success: #3ecf8e;
  --warn: #f5a524;
  --danger: #ff5c7a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.22);
  --grad: linear-gradient(135deg, #5b8def 0%, #7a5cff 55%, #c471ed 100%);
  --grad-text: linear-gradient(120deg, #a7c0ff 0%, #c9b6ff 55%, #f0b5ff 100%);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-elev: #ffffff;
  --bg-elev-2: #f0f2f7;
  --surface: rgba(15, 20, 40, 0.03);
  --surface-hover: rgba(15, 20, 40, 0.06);
  --border: rgba(15, 20, 40, 0.09);
  --border-strong: rgba(15, 20, 40, 0.18);
  --text: #14171f;
  --text-dim: #4a5165;
  --text-mute: #8891a3;
  --shadow: 0 10px 30px rgba(30, 40, 90, 0.10);
  --shadow-soft: 0 4px 14px rgba(30, 40, 90, 0.08);
  --grad-text: linear-gradient(120deg, #4a67c9 0%, #6a3fd9 55%, #b23eb5 100%);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 300ms ease, color 300ms ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- Ambient background ---------- */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-ambient::before,
.bg-ambient::after {
  content: '';
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 22s ease-in-out infinite;
}
.bg-ambient::before {
  background: radial-gradient(circle at 30% 30%, #5b8def, transparent 60%);
  top: -20vmax;
  left: -20vmax;
}
.bg-ambient::after {
  background: radial-gradient(circle at 70% 70%, #c471ed, transparent 60%);
  bottom: -20vmax;
  right: -20vmax;
  animation-delay: -11s;
}
[data-theme="light"] .bg-ambient::before,
[data-theme="light"] .bg-ambient::after { opacity: 0.25; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(4vmax, -3vmax) scale(1.05); }
}

/* ---------- Layout ---------- */
.wrap { width: min(1120px, calc(100% - 2.5rem)); margin: 0 auto; }
section { padding: 5rem 0; scroll-margin-top: 5rem; }
section h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0 0 0.35em;
  letter-spacing: -0.01em;
}
section .section-lead {
  color: var(--text-dim);
  margin: 0 0 2.5rem;
  max-width: 60ch;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.85rem 0;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms ease, background 250ms ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-photo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 200ms ease;
}
.brand:hover .brand-photo { outline-color: var(--accent); }
.nav-links {
  display: flex;
  gap: 0.2rem;
  align-items: center;
}
.nav-links a {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.92rem;
  transition: color 150ms ease, background 150ms ease;
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; gap: 0.35rem; align-items: center; }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background 150ms, color 150ms, border-color 150ms, transform 150ms;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn svg { width: 18px; height: 18px; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 6rem;
  padding-bottom: 5rem;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
  width: 100%;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-portrait { order: -1; max-width: 320px; margin: 0 auto; }
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0.5rem 0 1rem;
  font-weight: 700;
}
.hero h1 .accent {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-role {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.98rem;
  min-height: 1.55em;
  margin: 0 0 1.5rem;
}
.hero-role .caret {
  display: inline-block;
  width: 0.6ch;
  background: var(--accent);
  color: transparent;
  animation: blink 1s steps(1) infinite;
  vertical-align: -2px;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-bio {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 55ch;
  margin: 0 0 2rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: transform 150ms, background 150ms, border-color 150ms, box-shadow 200ms;
}
.btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--grad);
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 22px rgba(122, 92, 255, 0.35);
}
.btn.primary:hover { box-shadow: 0 10px 28px rgba(122, 92, 255, 0.45); }
.btn svg { width: 16px; height: 16px; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 0.83rem;
}
.hero-facts span { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.25rem 0; }
.hero-facts .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }

/* Portrait */
.hero-portrait {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 6px;
  background: var(--grad);
  box-shadow: var(--shadow);
}
.hero-portrait::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 40%, rgba(122, 92, 255, 0.35) 55%, transparent 70%);
  filter: blur(18px);
  z-index: -1;
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-portrait img,
.hero-portrait .avatar-svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elev);
}
.hero-portrait .badge {
  position: absolute;
  bottom: 4%;
  right: 4%;
  background: var(--bg-elev);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.hero-portrait .badge .dot { width: 7px; height: 7px; background: var(--success); border-radius: 50%; box-shadow: 0 0 8px var(--success); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3rem;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.about p { color: var(--text-dim); font-size: 1.02rem; }
.about p + p { margin-top: 1rem; }
.about-side {
  display: grid;
  gap: 1rem;
}
.stat-card {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-card .stat-label { color: var(--text-dim); font-size: 0.9rem; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.skill-card {
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 200ms, transform 200ms, background 200ms;
}
.skill-card:hover { border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-2px); }
.skill-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  font-weight: 600;
}
.skill-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--grad);
  color: white;
  display: grid;
  place-items: center;
}
.skill-icon svg { width: 18px; height: 18px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: 0.82rem;
  transition: border-color 150ms, color 150ms;
}
.chip:hover { border-color: var(--accent); color: var(--text); }

/* ---------- Projects ---------- */
.projects-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.filter-bar button {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: background 150ms, color 150ms;
}
.filter-bar button:hover { color: var(--text); }
.filter-bar button.is-active {
  background: var(--grad);
  color: white;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.2rem;
}
.project-card {
  position: relative;
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
  transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(122, 92, 255, 0.14), transparent 40%);
  opacity: 0;
  transition: opacity 250ms ease;
  pointer-events: none;
}
.project-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.project-card:hover::before { opacity: 1; }
.project-card.is-hidden { display: none; }
.project-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.project-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.project-domain {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}
.project-lock {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(245, 165, 36, 0.12);
  color: var(--warn);
  border: 1px solid rgba(245, 165, 36, 0.3);
  font-size: 0.72rem;
  font-family: var(--mono);
  white-space: nowrap;
}
.project-lock svg { width: 12px; height: 12px; }
.project-desc { color: var(--text-dim); font-size: 0.96rem; margin: 0 0 0.9rem; }
.project-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.35rem;
}
.project-highlights li {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding-left: 1.1em;
  position: relative;
}
.project-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.project-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.8rem;
}
.tech-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tech {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
}
.project-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-mute);
}

/* ---------- Experience / Education ---------- */
.timeline {
  position: relative;
  padding-left: 1.75rem;
  margin: 0;
  list-style: none;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent-3));
  opacity: 0.4;
  border-radius: 2px;
}
.timeline li {
  position: relative;
  padding: 0.15rem 0 1.4rem;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline h3 { margin: 0; font-size: 1.05rem; }
.timeline .role {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0.1rem 0 0.35rem;
}
.timeline .when {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.05em;
}
.timeline p { color: var(--text-dim); font-size: 0.95rem; margin: 0.5rem 0 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-card {
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(700px circle at 100% 0%, rgba(122, 92, 255, 0.14), transparent 45%);
  pointer-events: none;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  position: relative;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card h2 { margin: 0 0 0.4rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.contact-card p { color: var(--text-dim); margin: 0; max-width: 45ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Footer ---------- */
.footer {
  padding: 2rem 0 3rem;
  color: var(--text-mute);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.footer .console-hint {
  font-family: var(--mono);
  font-size: 0.75rem;
}
.footer kbd {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-family: var(--mono);
  font-size: 0.72rem;
}

/* ---------- Marquee strip ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0.75rem 0;
  user-select: none;
}
.marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: marquee 42s linear infinite;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
}
.marquee-track span:nth-child(even) { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- About extras ---------- */
.quote {
  margin: 1.75rem 0 0;
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.quote p {
  margin: 0;
  font-style: italic;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.55;
}
.about-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow-soft);
}
.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}
.about-photo figcaption {
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-mute);
  font-family: var(--mono);
}
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .stat-row { grid-template-columns: 1fr; } }

/* ---------- Companies ---------- */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1rem;
}
.role-card {
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.role-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.role-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
}
.role-icon svg { width: 21px; height: 21px; }
.role-icon.brand {
  width: 56px;
  height: 56px;
  padding: 10px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.role-icon.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.role-card h3 { margin: 0 0 0.15rem; font-size: 1.02rem; letter-spacing: -0.01em; }
.role-meta { margin: 0; font-size: 0.84rem; color: var(--text-mute); }
.role-date {
  margin: 0.6rem 0 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--accent-2);
}

/* ---------- Project covers ---------- */
.project-card { padding: 0; display: flex; flex-direction: column; }
.project-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.project-cover {
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: #101320;
  overflow: hidden;
}
.project-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card:hover .project-cover img { transform: scale(1.04); }
.project-cover--light { background: #ffffff; }
.project-cover--light img { object-fit: contain; padding: 0.5rem; }
.project-footer { margin-top: auto; padding-top: 0.8rem; }

.project-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-family: var(--mono);
  white-space: nowrap;
}
.project-badge.accent {
  background: rgba(62, 207, 142, 0.12);
  border-color: rgba(62, 207, 142, 0.35);
  color: var(--success);
}

/* ---------- Column label ---------- */
.col-label {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-family: var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
}

/* ---------- Conferences ---------- */
.conference-figure {
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #101320;
}
.conference-figure img { width: 100%; display: block; }
.conference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.conf-card {
  position: relative;
  isolation: isolate;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.7rem;
  padding: 1.15rem 1.2rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #f4f6fb;
  transition: border-color 200ms ease;
}
.conf-card:hover { border-color: var(--border-strong); }
.conf-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 420ms ease;
}
.conf-card:hover .conf-bg { transform: scale(1.05); }
.conf-card[data-place="bali"] .conf-bg { object-position: left center; }
.conf-card[data-place="delhi"] .conf-bg { object-position: center 28%; }
.conf-card[data-place="singapore"] .conf-bg { object-position: center; }
.conf-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8,10,16,.22) 0%, rgba(8,10,16,.5) 48%, rgba(8,10,16,.9) 100%);
}
.conf-logo,
.conf-copy { position: relative; z-index: 2; }
.conf-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  padding: 7px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.conf-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.conf-card h3 {
  margin: 0 0 0.22rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: #fff;
}
.conf-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(231, 233, 238, 0.82);
}

/* ---------- Contact email ---------- */
.contact-email {
  margin-top: 1rem !important;
  font-family: var(--mono);
  font-size: 0.95rem;
}
.contact-email a {
  color: var(--accent-2);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}
.contact-email a:hover { border-bottom-color: currentColor; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.7rem 1.1rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  z-index: 100;
}
.toast.is-in { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Console modal ---------- */
.console {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 200;
  padding: 1rem;
  background: color-mix(in oklab, var(--bg) 55%, black);
  backdrop-filter: blur(6px);
}
.console.is-open { display: grid; }
.console-panel {
  width: min(680px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--mono);
}
.console-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.console-dot { width: 12px; height: 12px; border-radius: 50%; }
.console-dot.red { background: #ff5c5c; }
.console-dot.amber { background: #ffbd44; }
.console-dot.green { background: #00ca4e; }
.console-title { margin-left: 0.6rem; color: var(--text-dim); font-size: 0.85rem; }
.console-body {
  padding: 1rem 1rem 0.4rem;
  max-height: 60vh;
  overflow-y: auto;
  color: var(--text);
  font-size: 0.88rem;
}
.console-body .prompt { color: var(--accent-2); }
.console-body .out { color: var(--text-dim); white-space: pre-wrap; margin-bottom: 0.6rem; }
.console-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--border);
}
.console-input span { color: var(--accent-2); }
.console-input input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
}

/* ---------- Print ---------- */
@media print {
  .bg-ambient, .nav, .footer, .hero-cta, .filter-bar, .contact-actions, .console, .toast,
  .hero-portrait::before, .marquee, .project-cover, .about-photo, .conference-figure,
  .conf-bg, .conf-card::after { display: none !important; }
  body { background: white; color: #111; }
  section { padding: 1rem 0; page-break-inside: avoid; }
  .project-card, .stat-card, .skill-card, .contact-card, .role-card, .conf-card {
    border-color: #ddd; background: white; box-shadow: none; break-inside: avoid;
  }
  .conf-card { min-height: 0; color: #111; }
  .conf-card h3 { color: #111; }
  .conf-meta { color: #555; }
  .project-body { padding: 0.9rem 0; }
  .hero { min-height: auto; padding: 1rem 0; }
  .hero-grid { grid-template-columns: 1fr 200px; gap: 2rem; }
  .hero h1 .accent { color: #4a1c9c; -webkit-text-fill-color: #4a1c9c; }
  .stat-card .stat-number { color: #4a1c9c; -webkit-text-fill-color: #4a1c9c; }
  a { color: #4a1c9c; }
  .chip, .tech { background: #f5f5f5; color: #333; border-color: #ddd; }
  .projects-grid, .roles-grid, .skills-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
