:root{
  --bg:#070b14;
  --bg-alt:#0c1220;
  --surface:#111a2b;
  --surface-2:#161f33;
  --border:#22304a;
  --text:#e7ecf6;
  --text-dim:#93a1bd;
  --text-dimmer:#67759a;
  --accent:#22d3ee;
  --accent-2:#818cf8;
  --accent-grad:linear-gradient(135deg,#22d3ee,#818cf8);
  --radius:14px;
  --radius-sm:9px;
  --shadow:0 10px 30px -12px rgba(0,0,0,.55);
  --maxw:1140px;
  --font-body:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
}

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

html{scroll-behavior:smooth;}

body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

.container{
  max-width:var(--maxw);
  margin:0 auto;
  padding:0 24px;
}

a{color:inherit;text-decoration:none;}
ul{list-style:none;}
img{max-width:100%;display:block;}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:13px 24px;
  border-radius:999px;
  font-weight:600;
  font-size:.95rem;
  border:1px solid transparent;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space:nowrap;
}
.btn:hover{transform:translateY(-2px);}
.btn-primary{
  background:var(--accent-grad);
  color:#04121a;
  box-shadow:0 8px 24px -8px rgba(34,211,238,.45);
}
.btn-primary:hover{box-shadow:0 12px 28px -8px rgba(34,211,238,.6);}
.btn-outline{
  background:transparent;
  border-color:var(--border);
  color:var(--text);
}
.btn-outline:hover{border-color:var(--accent);color:var(--accent);}
.btn-small{padding:9px 18px;font-size:.85rem;}

/* ---------- Header ---------- */
.site-header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(7,11,20,.75);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:72px;
}
.logo{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:1.25rem;
  letter-spacing:.5px;
}
.logo span{color:var(--accent);}
.nav{
  display:flex;
  align-items:center;
  gap:28px;
}
.nav-link{
  font-size:.92rem;
  font-weight:500;
  color:var(--text-dim);
  transition:color .15s ease;
  position:relative;
}
.nav-link:hover, .nav-link.active{color:var(--text);}
.nav-link.active::after{
  content:'';
  position:absolute;
  left:0;right:0;
  bottom:-22px;
  height:2px;
  background:var(--accent-grad);
}
.nav-toggle{
  display:none;
  flex-direction:column;
  gap:5px;
  background:none;
  border:none;
  cursor:pointer;
  padding:6px;
}
.nav-toggle span{
  width:22px;height:2px;background:var(--text);border-radius:2px;transition:.2s;
}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  padding:100px 0 90px;
  overflow:hidden;
}
.hero-bg{
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(circle at 15% 20%, rgba(34,211,238,.14), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(129,140,248,.16), transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero-inner{
  display:grid;
  grid-template-columns:1.3fr .7fr;
  align-items:center;
  gap:48px;
}
.eyebrow{
  font-family:var(--font-mono);
  color:var(--accent);
  font-size:.9rem;
  margin-bottom:10px;
}
.hero-text h1{
  font-size:clamp(2.4rem,5vw,3.6rem);
  font-weight:800;
  line-height:1.1;
  letter-spacing:-1px;
}
.tagline{
  margin-top:14px;
  font-size:1.05rem;
  color:var(--text-dim);
  font-weight:500;
}
.hero-bio{
  margin-top:20px;
  max-width:56ch;
  color:var(--text-dim);
  font-size:1rem;
}
.hero-actions{
  display:flex;
  gap:14px;
  margin-top:32px;
  flex-wrap:wrap;
}
.hero-meta{
  margin-top:28px;
  display:flex;
  gap:20px;
  flex-wrap:wrap;
}
.meta-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--text-dimmer);
  font-size:.88rem;
}
.meta-item svg{color:var(--accent);flex-shrink:0;}

.social-row{
  display:flex;
  gap:12px;
  margin-top:24px;
}
.social-btn{
  width:38px;height:38px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--border);
  border-radius:50%;
  color:var(--text-dim);
  transition:.15s;
}
.social-btn:hover{
  color:var(--accent);
  border-color:var(--accent);
  transform:translateY(-2px);
}

.hero-photo{display:flex;justify-content:center;}
.avatar-ring{
  width:260px;height:260px;
  border-radius:50%;
  padding:6px;
  background:var(--accent-grad);
  box-shadow:0 0 60px -10px rgba(34,211,238,.35);
}
.avatar{
  width:100%;height:100%;
  border-radius:50%;
  overflow:hidden;
  background:var(--surface);
  border:4px solid var(--bg);
  position:relative;
}
.avatar img{width:100%;height:100%;object-fit:cover;}
.avatar-fallback{
  display:none;
  width:100%;height:100%;
  align-items:center;justify-content:center;
  font-family:var(--font-mono);
  font-size:3.5rem;
  font-weight:700;
  color:var(--accent);
  background:var(--surface-2);
}

/* ---------- Section shared ---------- */
.section{padding:90px 0;}
.section-alt{background:var(--bg-alt);}
.section-eyebrow{
  font-family:var(--font-mono);
  color:var(--accent);
  font-size:.85rem;
  text-transform:uppercase;
  letter-spacing:1.5px;
  margin-bottom:10px;
}
.section-title{
  font-size:clamp(1.6rem,3vw,2.2rem);
  font-weight:800;
  margin-bottom:44px;
  letter-spacing:-.5px;
}

/* ---------- About ---------- */
.about-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:48px;
  align-items:start;
}
.about-text{color:var(--text-dim);font-size:1.02rem;max-width:60ch;}
.fact-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.fact-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.fact-label{
  font-family:var(--font-mono);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:1px;
  color:var(--text-dimmer);
}
.fact-value{font-size:.92rem;font-weight:600;}
.fact-value a{color:var(--accent);word-break:break-all;}

/* ---------- Skills ---------- */
.skills-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:20px;
}
.skill-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  transition:border-color .15s ease, transform .15s ease;
}
.skill-card:hover{border-color:var(--accent);transform:translateY(-3px);}
.skill-card h3{
  font-size:1rem;
  margin-bottom:14px;
  color:var(--text);
}
.chip-row{display:flex;flex-wrap:wrap;gap:8px;}
.chip{
  font-family:var(--font-mono);
  font-size:.78rem;
  background:var(--surface-2);
  border:1px solid var(--border);
  color:var(--text-dim);
  padding:6px 12px;
  border-radius:999px;
}
.chip-row.small .chip{font-size:.72rem;padding:5px 10px;}

/* ---------- Projects ---------- */
.projects-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
  gap:26px;
}
.project-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.project-card:hover{
  transform:translateY(-4px);
  border-color:var(--accent);
  box-shadow:var(--shadow);
}
.project-thumb{
  position:relative;
  aspect-ratio:16/9;
  background:var(--surface-2);
}
.project-thumb img{width:100%;height:100%;object-fit:cover;}
.thumb-fallback{
  display:none;
  position:absolute;inset:0;
  align-items:center;justify-content:center;
  font-family:var(--font-mono);
  font-size:.85rem;
  color:var(--text-dimmer);
  background:
    repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--surface) 10px, var(--surface) 20px);
  border:1px dashed var(--border);
}
.thumb-fallback.small{position:static;aspect-ratio:auto;height:100%;border-radius:var(--radius-sm);}
.project-body{padding:22px;display:flex;flex-direction:column;gap:12px;flex:1;}
.project-body h3{font-size:1.08rem;line-height:1.3;}
.project-body p{color:var(--text-dim);font-size:.92rem;flex:1;}
.project-links{margin-top:4px;}
.link-pending{
  font-family:var(--font-mono);
  font-size:.78rem;
  color:var(--text-dimmer);
  border:1px dashed var(--border);
  padding:6px 12px;
  border-radius:999px;
  display:inline-block;
}
.project-link{
  font-family:var(--font-mono);
  font-size:.8rem;
  font-weight:700;
  color:#04121a;
  background:var(--accent-grad);
  border:1px solid transparent;
  padding:9px 16px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:transform .2s ease, box-shadow .2s ease;
  animation:project-link-glow 2.6s ease-in-out infinite;
}
.project-link:hover{
  transform:translateY(-2px) scale(1.03);
  box-shadow:0 10px 32px -4px rgba(34,211,238,.85);
}
@keyframes project-link-glow{
  0%,100%{box-shadow:0 0 0 0 rgba(34,211,238,.35), 0 8px 20px -8px rgba(34,211,238,.5);}
  50%{box-shadow:0 0 0 6px rgba(34,211,238,0), 0 8px 26px -4px rgba(34,211,238,.85);}
}

/* ---------- Certifications ---------- */
.cert-row{display:flex;flex-wrap:wrap;gap:20px;}
.cert-card{
  display:flex;
  gap:18px;
  align-items:center;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  flex:1 1 320px;
  max-width:440px;
}
.cert-thumb{width:110px;height:80px;flex-shrink:0;position:relative;border-radius:var(--radius-sm);overflow:hidden;background:var(--surface-2);}
.cert-thumb img{width:100%;height:100%;object-fit:cover;}
.cert-card h3{font-size:1rem;margin-bottom:4px;}
.cert-issuer{color:var(--text-dimmer);font-size:.85rem;}

/* ---------- Experience Timeline ---------- */
.timeline{
  position:relative;
  padding-left:28px;
  border-left:2px solid var(--border);
}
.timeline-item{
  position:relative;
  padding-bottom:44px;
}
.timeline-item:last-child{padding-bottom:0;}
.timeline-dot{
  position:absolute;
  left:-35px;
  top:4px;
  width:12px;height:12px;
  border-radius:50%;
  background:var(--accent-grad);
  box-shadow:0 0 0 4px var(--bg), 0 0 0 5px var(--border);
}
.timeline-content h3{
  font-size:1.08rem;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.remote-tag{
  font-family:var(--font-mono);
  font-size:.68rem;
  color:var(--accent);
  border:1px solid var(--border);
  padding:2px 8px;
  border-radius:999px;
  font-weight:500;
}
.timeline-meta{
  font-family:var(--font-mono);
  font-size:.82rem;
  color:var(--text-dimmer);
  margin:6px 0 14px;
}
.timeline-content ul{display:flex;flex-direction:column;gap:8px;}
.timeline-content li{
  color:var(--text-dim);
  font-size:.92rem;
  position:relative;
  padding-left:18px;
}
.timeline-content li::before{
  content:'';
  position:absolute;
  left:0;top:9px;
  width:5px;height:5px;
  border-radius:50%;
  background:var(--accent);
}

/* ---------- Education ---------- */
.education-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:20px;
}
.edu-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
}
.edu-card h3{font-size:1rem;line-height:1.4;margin-bottom:8px;}
.edu-school{color:var(--text-dim);font-size:.9rem;margin-bottom:14px;}
.edu-status{
  font-family:var(--font-mono);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.5px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--text-dimmer);
}
.edu-status.current{color:var(--accent);border-color:var(--accent);}

/* ---------- Contact ---------- */
.contact-intro{color:var(--text-dim);max-width:52ch;margin-bottom:36px;margin-top:-24px;}
.contact-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}
.contact-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:6px;
  transition:.15s;
}
.contact-card svg{color:var(--accent);margin-bottom:8px;}
.contact-card span{font-weight:700;font-size:.98rem;}
.contact-card small{color:var(--text-dimmer);font-size:.82rem;word-break:break-word;}
.contact-card:hover{border-color:var(--accent);transform:translateY(-3px);}

/* ---------- Sub-page hero ---------- */
.page-hero{
  padding:70px 0 40px;
  position:relative;
}
.page-hero .hero-bg{
  background:
    radial-gradient(circle at 15% 20%, rgba(34,211,238,.14), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(129,140,248,.16), transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.page-hero h1{
  font-size:clamp(2rem,4vw,2.8rem);
  font-weight:800;
  letter-spacing:-1px;
}
.page-hero p{
  margin-top:14px;
  color:var(--text-dim);
  max-width:60ch;
  font-size:1rem;
}
.back-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--font-mono);
  font-size:.85rem;
  color:var(--text-dimmer);
  margin-bottom:18px;
}
.back-link:hover{color:var(--accent);}

/* ---------- Certifications page ---------- */
.cert-filter{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:40px;
}
.filter-btn{
  font-family:var(--font-mono);
  font-size:.82rem;
  padding:8px 18px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text-dim);
  cursor:pointer;
  transition:.15s;
}
.filter-btn:hover{border-color:var(--accent);color:var(--text);}
.filter-btn.active{
  background:var(--accent-grad);
  color:#04121a;
  border-color:transparent;
  font-weight:600;
}
.cert-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:22px;
}
.cert-card-full{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.cert-card-full:hover{transform:translateY(-3px);border-color:var(--accent);box-shadow:var(--shadow);}
.cert-card-full.hidden{display:none;}
.cert-thumb-full{
  position:relative;
  aspect-ratio:4/3;
  background:var(--surface-2);
  border-bottom:1px solid var(--border);
}
.cert-thumb-full img{width:100%;height:100%;object-fit:cover;object-position:top center;}
.cert-thumb-full.thumb-multi{
  aspect-ratio:auto;
  height:380px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:22px;
  background:#f6f3ee;
}
.cert-thumb-full.thumb-multi img{
  max-width:100%;
  width:auto;
  height:auto;
  border-radius:8px;
  box-shadow:0 4px 18px -6px rgba(0,0,0,.35);
}
.cert-thumb-full.thumb-multi .thumb-img-compact{max-height:24%;}
.cert-thumb-full.thumb-multi .thumb-img-detail{max-height:72%;}
.cert-body{padding:20px;display:flex;flex-direction:column;gap:8px;}
.cert-card-full h3{font-size:.98rem;line-height:1.35;}
.cert-issuer-tag{
  font-family:var(--font-mono);
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--text-dimmer);
  margin-top:4px;
  display:block;
}
.cert-dates{
  font-family:var(--font-mono);
  font-size:.78rem;
  color:var(--text-dimmer);
}
.cert-id{
  font-family:var(--font-mono);
  font-size:.72rem;
  color:var(--text-dimmer);
  background:var(--surface-2);
  border:1px solid var(--border);
  padding:6px 10px;
  border-radius:var(--radius-sm);
  word-break:break-all;
}
.cert-card-full .chip-row .chip{font-size:.7rem;padding:5px 10px;}

/* ---------- Footer ---------- */
.site-footer{
  border-top:1px solid var(--border);
  padding:32px 0;
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:16px;
}
.footer-inner p{color:var(--text-dimmer);font-size:.85rem;}

/* ---------- Reveal animation ---------- */
.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .6s ease, transform .6s ease;
}
.reveal.in-view{opacity:1;transform:translateY(0);}

/* ---------- Responsive ---------- */
@media (max-width:860px){
  .hero-inner{grid-template-columns:1fr;text-align:center;}
  .hero-bio{margin-left:auto;margin-right:auto;}
  .hero-meta, .hero-actions, .social-row{justify-content:center;}
  .hero-photo{order:-1;}
  .about-grid{grid-template-columns:1fr;}
  .nav{
    position:fixed;
    top:72px;left:0;right:0;
    background:var(--bg);
    border-bottom:1px solid var(--border);
    flex-direction:column;
    align-items:flex-start;
    padding:20px 24px 28px;
    gap:18px;
    transform:translateY(-130%);
    transition:transform .25s ease;
  }
  .nav.open{transform:translateY(0);}
  .nav-toggle{display:flex;}
}

@media (max-width:520px){
  .fact-grid{grid-template-columns:1fr;}
  .avatar-ring{width:200px;height:200px;}
}
