:root {
  --canvas: #1c1624;
  --surface: #2d2734;
  --surface-raised: #3a3340;
  --text: #f1f0ec;
  --text-soft: #d0c9c4;
  --text-muted: #a5a2a5;
  --edge: rgba(229, 231, 235, .13);
  --edge-strong: rgba(229, 231, 235, .23);
  --lavender: #b997ff;
  --green: #00f575;
  --violet: #6b13f5;
  --orange: #ff5632;
  --pink: #ff9efa;
  --max-width: 1200px;
  --radius-card: 20px;
  --radius-small: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--canvas);
  font-family: Inter, Geist, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
.container { width: min(calc(100% - 64px), var(--max-width)); margin-inline: auto; }
.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; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200; padding: 10px 16px; color: #000; background: var(--green); border-radius: 12px; font-weight: 500; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }

/* Glass navigation */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; color: var(--text); background: rgba(28, 22, 36, .82); border-bottom: 1px solid var(--edge); backdrop-filter: blur(18px); }
.nav { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; color: var(--text); font-size: .95rem; font-weight: 500; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--lavender); border: 1px solid var(--edge-strong); border-radius: var(--radius-small); font-weight: 700; }
.nav-menu { grid-column: 2; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nav-menu a { display: block; padding: 9px 12px; color: var(--text-soft); border-radius: var(--radius-small); font-size: .875rem; font-weight: 450; text-decoration: none; transition: color .2s ease, background .2s ease; }
.nav-menu a:hover, .nav-menu a.active { color: var(--text); background: rgba(255,255,255,.055); }
.nav-toggle { display: none; justify-self: end; width: 44px; height: 44px; padding: 10px; color: inherit; background: transparent; border: 1px solid var(--edge); border-radius: 12px; }
.nav-toggle > span:not(.sr-only) { display: block; height: 2px; margin: 5px 0; background: currentColor; transition: .2s ease; }

/* Hero */
.hero { position: relative; min-height: 760px; display: grid; align-items: center; overflow: hidden; color: var(--text); border-bottom: 1px solid var(--edge); }
.hero::before { position: absolute; inset: 0; background: radial-gradient(circle at 76% 44%, rgba(107, 19, 245, .24), rgba(255, 158, 250, .07) 22%, transparent 48%); content: ""; pointer-events: none; }
.hero::after { position: absolute; inset: 0; background-image: linear-gradient(rgba(229,231,235,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(229,231,235,.025) 1px, transparent 1px); background-size: 64px 64px; content: ""; mask-image: linear-gradient(to bottom, #000, transparent 80%); pointer-events: none; }
.hero-decoration { position: absolute; top: 16%; right: 4%; width: min(46vw, 590px); aspect-ratio: 1; border: 1px solid rgba(185,151,255,.18); border-radius: 50%; box-shadow: 0 0 0 70px rgba(185,151,255,.025), 0 0 0 140px rgba(185,151,255,.018); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 64px; padding-block: 136px 72px; }
.eyebrow { margin-bottom: 16px; color: var(--lavender); font-size: .75rem; font-weight: 500; line-height: 1.5; letter-spacing: .03em; text-transform: uppercase; }
h1 { margin-bottom: 24px; font-size: clamp(4rem, 7.2vw, 6rem); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.gradient-text { color: transparent; background: linear-gradient(91deg, #855aff 5%, var(--pink) 52%, var(--orange)); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-role { display: block; margin-top: 18px; color: var(--text); font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 450; line-height: 1.15; letter-spacing: -.01em; -webkit-text-fill-color: initial; }
.hero-lead { max-width: 610px; margin-bottom: 24px; color: var(--text-soft); font-size: 1.125rem; line-height: 1.5; }
.availability-note { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text-muted); font-size: .75rem; letter-spacing: .03em; }
.availability-note span { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 5px rgba(0,245,117,.08); }
.hero-card { padding: 32px; background: rgba(45, 39, 52, .88); border: 1px solid var(--edge); border-radius: var(--radius-card); box-shadow: 0 0 60px rgba(185,151,255,.12); backdrop-filter: blur(12px); }
.code-dots { display: flex; gap: 8px; padding-bottom: 24px; border-bottom: 1px solid var(--edge); }
.code-dots span { width: 8px; height: 8px; background: var(--surface-raised); border: 1px solid var(--edge-strong); border-radius: 50%; }
.code-dots span:first-child { background: var(--lavender); border-color: var(--lavender); }
.code-comment { margin: 24px 0 12px; color: var(--text-muted); font-size: .75rem; letter-spacing: .03em; }
.profile-facts { margin: 0; }
.profile-facts div { display: grid; grid-template-columns: 104px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--edge); }
.profile-facts dt { color: var(--lavender); font-size: .75rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }
.profile-facts dd { margin: 0; color: var(--text-soft); font-size: .875rem; }
.tech-line { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; }
.tech-line span { padding: 6px 10px; color: var(--text-soft); background: rgba(255,255,255,.035); border: 1px solid var(--edge); border-radius: var(--radius-small); font-size: .75rem; letter-spacing: .03em; }

/* Shared sections */
.section { padding-block: clamp(80px, 9vw, 112px); border-bottom: 1px solid var(--edge); }
.section-tinted { background: rgba(45,39,52,.25); }
.split-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: start; }
.section-heading h2 { max-width: 720px; margin-bottom: 0; font-size: clamp(2.5rem, 4.5vw, 3rem); font-weight: 500; line-height: 1.05; letter-spacing: -.02em; }
.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 48px; margin-bottom: 48px; }
.heading-row > p { max-width: 400px; margin: 0; color: var(--text-muted); font-size: .875rem; }
.large-copy { color: var(--text); font-size: 1.5rem; font-weight: 450; line-height: 1.4; letter-spacing: -.01em; }
.about-copy > p:not(.large-copy) { color: var(--text-soft); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.skill-card { position: relative; min-height: 288px; display: flex; flex-direction: column; padding: 32px; overflow: hidden; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius-card); transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.skill-card:hover { background: var(--surface-raised); border-color: var(--edge-strong); transform: translateY(-2px); }
.skill-number { position: absolute; top: 28px; right: 30px; color: var(--lavender); font-size: .75rem; font-weight: 500; letter-spacing: .03em; }
.skill-card h3 { margin: 52px 0 12px; font-size: 1.5rem; font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
.skill-card p { margin-bottom: 0; color: var(--text-soft); font-size: .875rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding: 28px 0 0; list-style: none; }
.tags li { padding: 6px 10px; color: var(--text-soft); background: rgba(255,255,255,.035); border: 1px solid var(--edge); border-radius: var(--radius-small); font-size: .75rem; font-weight: 450; letter-spacing: .03em; }

/* Experience */
#experience .section-heading { text-align: center; }
#experience .section-heading h2 { margin-inline: auto; }
.timeline { max-width: 980px; display: grid; gap: 16px; margin: 48px auto 0; }
.timeline-item { display: grid; grid-template-columns: 180px 1fr; gap: 32px; padding: 32px; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius-card); transition: border-color .2s ease; }
.timeline-item:hover { border-color: var(--edge-strong); }
.timeline-date { color: var(--lavender); font-size: .75rem; font-weight: 500; letter-spacing: .03em; }
.timeline-content { max-width: 680px; }
.timeline-content h3 { margin: 4px 0 8px; font-size: 1.5rem; font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
.timeline-content > p:last-child { margin-bottom: 0; color: var(--text-soft); font-size: .875rem; }
.company { margin-bottom: 16px; color: var(--text-muted); font-size: .875rem; font-weight: 450; }
.placeholder-label { margin-bottom: 8px; color: var(--lavender); font-size: .75rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }

/* Education and certification */
.credential-list { overflow: hidden; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius-card); }
.credential-list article { display: grid; grid-template-columns: 52px 1fr; gap: 20px; padding: 28px 32px; border-bottom: 1px solid var(--edge); }
.credential-list article:last-child { border-bottom: 0; }
.credential-icon { display: grid; place-items: center; width: 44px; height: 44px; color: var(--lavender); background: rgba(185,151,255,.06); border: 1px solid rgba(185,151,255,.22); border-radius: 50%; font-weight: 500; }
.credential-list article:last-child .credential-icon { color: var(--green); background: rgba(0,245,117,.05); border-color: rgba(0,245,117,.2); }
.credential-list h3 { margin: 3px 0 8px; font-size: 1.125rem; font-weight: 500; line-height: 1.4; letter-spacing: -.01em; }
.credential-list article p:last-child { margin: 0; color: var(--text-muted); font-size: .875rem; }
.credential-description { margin-bottom: 0; color: var(--text-muted); font-size: .875rem; }
.credential-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--text); font-size: .875rem; font-weight: 500; text-decoration: none; }
.credential-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Footer */
.site-footer { padding-top: 56px; color: var(--text); background: #17121e; }
.footer-grid { display: grid; grid-template-columns: 1fr 48px; align-items: center; gap: 40px; padding-bottom: 48px; }
.footer-brand { margin-bottom: 10px; }
.footer-grid p { margin: 0; color: var(--text-muted); font-size: .875rem; }
.back-to-top { display: grid; place-items: center; width: 46px; height: 46px; color: var(--text); border: 1px solid var(--edge-strong); border-radius: 12px; text-decoration: none; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.back-to-top:hover { color: #000; background: var(--green); border-color: var(--green); }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; padding-block: 20px; border-top: 1px solid var(--edge); }
.footer-bottom p { margin: 0; color: var(--text-muted); font-size: .75rem; letter-spacing: .03em; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .container { width: min(calc(100% - 40px), var(--max-width)); }
  .nav { display: flex; }
  .nav-toggle { display: block; }
  .nav-menu { position: absolute; top: 72px; right: 0; left: 0; display: grid; gap: 4px; padding: 12px 20px 20px; background: rgba(28,22,36,.97); border-bottom: 1px solid var(--edge); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: .2s ease; }
  .nav-menu.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav-menu a { padding: 12px; }
  .nav-toggle[aria-expanded="true"] > span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] > span:nth-child(3) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] > span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; padding-block: 128px 72px; }
  .hero-content { text-align: center; }
  .hero-lead { margin-inline: auto; }
  .availability-note { justify-content: center; }
  .hero-card { width: min(100%, 640px); margin-inline: auto; }
  .hero-decoration { top: 45%; right: 10%; width: 80vw; }
  .split-layout { grid-template-columns: 1fr; gap: 40px; }
  .heading-row { align-items: flex-start; flex-direction: column; gap: 20px; margin-bottom: 40px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--max-width)); }
  .brand { font-size: .875rem; }
  .hero-grid { padding: 112px 0 56px; }
  h1 { font-size: clamp(3.25rem, 16vw, 4.5rem); }
  .hero-role { font-size: 1.35rem; }
  .hero-lead { font-size: 1rem; }
  .hero-card, .skill-card { padding: 24px; }
  .section { padding-block: 72px; }
  .section-heading h2 { font-size: 2.25rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: 270px; }
  .timeline { gap: 12px; margin-top: 36px; }
  .timeline-item { grid-template-columns: 1fr; gap: 12px; padding: 24px; }
  .credential-list article { grid-template-columns: 44px 1fr; gap: 16px; padding: 24px 20px; }
  .credential-icon { width: 40px; height: 40px; }
  .footer-grid { grid-template-columns: 1fr 46px; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
