:root {
  --bg: #0b0f19;
  --text: #e8ecf4;
  --muted: #9aa3b2;
  --brand: #7c5cff;
  --brand-600: #684dff;
  --surface: #0f1524;
  --surface-2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.14);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

:root.light {
  --bg: #ffffff;
  --text: #0b1020;
  --muted: #5b6578;
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --surface: #f7f8fc;
  --surface-2: rgba(15, 21, 36, 0.06);
  --border: #e5e7eb;
  --shadow: 0 10px 28px rgba(2,6,23,0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 10% -10%, rgba(124,92,255,0.18), transparent 55%),
              radial-gradient(1200px 700px at 100% 10%, rgba(56,189,248,0.12), transparent 45%),
              var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

/* Accessible focus styles */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible,
.theme-toggle:focus-visible,
.site-nav a:focus-visible,
.intro-skip:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.25);
  border-radius: 10px;
}

.container { width: min(1100px, 92%); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(14px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 10px; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .2px; }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--text); }

.nav-toggle, .theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 16px;
}
.nav-toggle { display: none; }

/* Progress bar */
#scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--brand), #38bdf8); z-index: 200; box-shadow: var(--shadow); }

/* Hero */
.section { padding: 90px 0; }
.section.alt { background: linear-gradient(180deg, rgba(124,92,255,0.06), rgba(56,189,248,0.06)); }

/* Hero Layout */
.hero-content { 
  display: grid; 
  grid-template-columns: 2fr 1fr; 
  gap: 40px; 
  align-items: center; 
}

.hero-text {
  max-width: none;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-photo {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border);
  box-shadow: var(--shadow);
  object-position: 30% 40%;
  transition: transform .3s ease, box-shadow .3s ease;
}

.profile-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(124,92,255,.25);
}

.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); font-weight: 800; margin: 0 0 8px; }
.headline { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; margin: 0 0 12px; }
.headline .accent { background: linear-gradient(90deg, var(--brand), #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 18px; max-width: 900px; }
.hero-cta { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 18px; border-radius: 12px; text-decoration: none; font-weight: 700; border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease; }
.btn.primary { background: linear-gradient(90deg, var(--brand), #38bdf8); color: #fff; box-shadow: 0 8px 24px rgba(124,92,255,.25); }
.btn.primary:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: transparent; box-shadow: inset 0 0 0 1px var(--text); }

/* Social Links */
.social-links { display: flex; gap: 12px; margin-top: 0; align-items: center; }
.social-link { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  width: 46px; 
  height: 46px; 
  border-radius: 12px; 
  background: var(--surface-2); 
  border: 1px solid var(--border); 
  color: var(--muted); 
  transition: all .2s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.social-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-link:hover { 
  color: var(--brand); 
  border-color: var(--brand); 
  background: rgba(124, 92, 255, 0.1); 
  transform: translateY(-1px); 
}

/* Sections */
.section-title { font-size: 28px; margin: 0 0 18px; }
.item { border-top: 1px solid var(--border); padding: 18px 0; }
.item:first-of-type { border-top: 0; }
.item-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.item .meta { color: var(--muted); font-size: 14px; }
.item ul { margin: 10px 0 0 20px; }

/* Cards & grids */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px) saturate(140%);
  transform: translate3d(0,0,0);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.card h3 { margin-top: 0; }
.card .links { display: flex; gap: 12px; margin-top: 10px; }
.card .links a { color: #9dbaff; text-decoration: none; font-weight: 700; }
.card .links a:hover { text-decoration: underline; }

.cert-list { padding-left: 18px; }
.cert-list li { margin: 6px 0; }

.more-projects { margin-top: 18px; }
.more-projects a { color: #9dbaff; text-decoration: none; font-weight: 700; }
.more-projects a:hover { text-decoration: underline; }

/* CTA */
.section.cta { text-align: center; }
.section.cta p { color: var(--muted); }
.section.cta .hero-cta { justify-content: center; }

/* Footer */
.site-footer { 
  border-top: 1px solid var(--border); 
  background: var(--surface); 
  backdrop-filter: blur(10px); 
}
.footer-inner { height: 70px; display: flex; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 12px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 920px) { 
  .grid-3 { grid-template-columns: 1fr 1fr; } 
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-image { order: -1; margin-bottom: 24px; }
  .profile-photo { width: 260px; height: 260px; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .item-header { flex-direction: column; align-items: flex-start; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: fixed; inset: 64px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; padding: 12px 4%; transform: translateY(-120%); transition: transform .25s ease; }
  .site-nav.open { transform: translateY(0); }
  .hero-content { gap: 20px; }
  .profile-photo { width: 200px; height: 200px; }
  .social-links { justify-content: center; }
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes spinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Hero decor */
.hero { position: relative; overflow: hidden; }
.hero-decor { position: absolute; inset: 0; pointer-events: none; }
.hero-decor .blob {
  position: absolute;
  width: 520px; height: 520px;
  left: -120px; top: -140px;
  background: radial-gradient(closest-side, rgba(124,92,255,0.35), rgba(124,92,255,0.05), transparent 70%);
  filter: blur(2px);
  animation: float 8s ease-in-out infinite;
}
.hero-decor .blob.b2 {
  width: 420px; height: 420px; right: -140px; top: 20px; left: auto;
  background: radial-gradient(closest-side, rgba(56,189,248,0.32), rgba(56,189,248,0.05), transparent 70%);
  animation-duration: 10s;
}
.hero-decor .ring { display: none; }

/* Marquee */
.marquee { margin-top: 22px; overflow: hidden; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-track { white-space: nowrap; display: flex; }
.marquee-content { display: inline-flex; gap: 12px; padding: 8px 0; }
.badge { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); }

/* Marquee marker reset */
.marquee-content, .marquee-content li { list-style: none; margin: 0; }
.marquee-content li::marker { content: ''; }

/* 3D tilt */
.card { transform-style: preserve-3d; }
.card:hover { transform: translateY(-3px) rotateX(2deg) rotateY(-2deg); }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(600px 200px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.12), transparent 40%);
  opacity: 0; transition: opacity .25s ease;
}
.card:hover::after { opacity: 1; }

/* Shimmer heading */
.headline .accent { background: linear-gradient(90deg, var(--brand), #38bdf8, var(--brand)); background-size: 200% 100%; animation: shimmer 3.5s ease-in-out infinite; }

/* Accent text visibility + gradient fallback */
.headline .accent { color: var(--brand); }

@supports (-webkit-background-clip: text) {
  .headline .accent {
    background: linear-gradient(90deg, var(--brand), #38bdf8, var(--brand));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-size: 200% 100%;
    animation: shimmer 3.5s ease-in-out infinite;
  }
}

@supports (background-clip: text) {
  .headline .accent {
    background: linear-gradient(90deg, var(--brand), #38bdf8, var(--brand));
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: shimmer 3.5s ease-in-out infinite;
  }
}


/* Remove modal styles (no longer used) */
.modal, .modal-backdrop, .modal-content, .modal.open, .modal-close { display: none !important; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rocket { animation: none; }
  .intro-overlay { transition: none; }
}

/* Stagger utility (used via JS add order) */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.visible { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
