/* ── Reset & Tokens ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
#neural-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
:root {
  --bg:       #0d1117;
  --bg2:      #161b22;
  --bg3:      #21262d;
  --border:   #30363d;
  --text:     #e6edf3;
  --muted:    #8b949e;
  --primary:  #3b82f6;
  --accent:   #7c6cf7;
  --cyan:     #06b6d4;
  --green:    #238636;
  --grad:     linear-gradient(135deg, #3b82f6, #7c6cf7);
  --shadow:   0 8px 32px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 5%,  rgba(59,130,246,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 5%,  rgba(124,108,247,.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 95%, rgba(6,182,212,.08)  0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* ── Animations ── */
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: .7; }
}

@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes blink { 50% { opacity: 0; } }

/* ── Nav ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

.logo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(124,108,247,.6);
  animation: pulse 2.5s ease-in-out infinite;
}

nav { display: flex; gap: 4px; }

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all .2s;
}

nav a:hover, nav a.active {
  color: var(--text);
  background: var(--bg3);
  border-color: var(--border);
}

nav a.active { color: #a78bfa; }

/* ── Sections ── */
section {
  position: relative;
  z-index: 1;
  padding: 90px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

section + section { border-top: 1px solid var(--border); }

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  color: #7c6cf7;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--border);
}

/* ── Section headings ── */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 14px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 44px; height: 3px;
  background: var(--grad);
  border-radius: 3px;
}

.section-title .glow {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero ── */
#hero { padding-top: 100px; padding-bottom: 100px; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124,108,247,.12);
  border: 1px solid rgba(124,108,247,.25);
  border-radius: 99px;
  padding: 5px 14px;
  font-size: .82rem;
  color: #a78bfa;
  margin-bottom: 28px;
  font-family: 'JetBrains Mono', monospace;
  animation: float 4s ease-in-out infinite;
}

.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #7c6cf7;
  display: inline-block;
  animation: pulse 2s infinite;
}

h1.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}

.hero-title .name {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
}

.hero-intro {
  max-width: 600px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: #7c6cf7;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg3);
  cursor: pointer;
  transition: all .22s;
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(124,108,247,.5);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.btn.primary {
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(59,130,246,.35);
}

.btn.primary:hover {
  box-shadow: 0 10px 28px rgba(59,130,246,.5);
  border-color: transparent;
}

/* ── About ── */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.02rem;
}

/* ── Cert Grid ── */
.cert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cert-header-label {
  font-size: .9rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cert-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: #7c6cf7;
  background: rgba(124,108,247,.1);
  border: 1px solid rgba(124,108,247,.2);
  padding: 2px 10px;
  border-radius: 99px;
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all .2s;
  cursor: default;
}

.cert-item:hover {
  border-color: rgba(124,108,247,.35);
  transform: translateY(-2px);
}

.cert-logo {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
  letter-spacing: -.02em;
}

.cert-logo.nvidia { background: rgba(118,185,0,.15); color: #76b900; border: 1px solid rgba(118,185,0,.25); }
.cert-logo.kaggle { background: rgba(32,126,206,.15); color: #207ece; border: 1px solid rgba(32,126,206,.25); }
.cert-logo.generic { background: rgba(124,108,247,.1); color: #a78bfa; border: 1px solid rgba(124,108,247,.2); }

.cert-info { min-width: 0; }
.cert-name { font-size: .8rem; font-weight: 600; color: var(--text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cert-issuer { font-size: .72rem; color: var(--muted); margin-top: 2px; }

/* ── Universal Show More / Show Less toggle ── */
.collapsible-hidden { display: none !important; }

.show-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: 8px;
  width: 100%;
  padding: 9px 14px;
  color: var(--muted);
  font-size: .82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}

.show-toggle:hover { border-color: rgba(124,108,247,.4); color: #a78bfa; }

.show-toggle-arrow {
  transition: transform .25s;
  font-size: .7rem;
  margin-left: auto;
}

.show-toggle.open .show-toggle-arrow { transform: rotate(180deg); }

/* ── Skills ── */
#skills .skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: all .25s;
}

.skill-card:hover {
  border-color: rgba(59,130,246,.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.skill-card h3 {
  font-size: .95rem;
  font-weight: 600;
  color: #a78bfa;
  margin-bottom: 14px;
}

.skill-card ul { list-style: none; }

.skill-card li {
  color: var(--muted);
  font-size: .9rem;
  padding: 5px 0 5px 18px;
  position: relative;
  border-bottom: 1px solid rgba(48,54,61,.5);
}

.skill-card li:last-child { border-bottom: none; }

.skill-card li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: .8rem;
}

/* ── Experience / Timeline ── */
#experience .timeline {
  border-left: 2px solid var(--border);
  padding-left: 28px;
  margin-left: 8px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  transition: all .22s;
}

.timeline-item:hover {
  border-color: rgba(59,130,246,.4);
  transform: translateX(4px);
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 22px; left: -37px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 8px rgba(124,108,247,.5);
}

.timeline-item h3 { font-size: 1.05rem; margin-bottom: 4px; }

.timeline-date {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  color: #7c6cf7;
  background: rgba(124,108,247,.1);
  border: 1px solid rgba(124,108,247,.2);
  padding: 2px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.timeline-item p { color: var(--muted); font-size: .93rem; }

/* The toggle sits outside the timeline border, so wrap it */
.timeline-wrapper { display: flex; flex-direction: column; }

/* ── Box list (achievements) ── */
.box-list { display: flex; flex-direction: column; gap: 12px; }

.box-item {
  padding: 14px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all .2s;
}

.box-item:hover { border-color: rgba(124,108,247,.4); transform: translateX(4px); }
.box-item strong { color: var(--text); font-size: .95rem; display: block; margin-bottom: 3px; }
.box-item span   { color: var(--muted); font-size: .85rem; }

/* ── Projects ── */
#projects .project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all .28s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: rgba(59,130,246,.5);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
}

.project-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--bg3);
}

.project-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.project-card p  { color: var(--muted); font-size: .9rem; line-height: 1.65; flex: 1; margin-bottom: 14px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }

.tag {
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  color: #93c5fd;
  font-family: 'JetBrains Mono', monospace;
}

.project-card .btn { font-size: .82rem; padding: 8px 16px; }

/* ── Contact ── */
#contact .contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

.contact-links { display: flex; flex-direction: column; gap: 12px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  transition: all .2s;
}

.contact-link:hover {
  border-color: rgba(124,108,247,.4);
  transform: translateX(5px);
  color: var(--text);
}

.contact-link strong { color: var(--text); min-width: 80px; font-size: .88rem; }

.contact-link .cl-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.cl-icon svg { width: 16px; height: 16px; fill: var(--muted); }
.contact-link:hover .cl-icon svg { fill: #a78bfa; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
label { font-size: .88rem; font-weight: 600; color: var(--text); }

input, textarea {
  padding: 12px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: .93rem;
  outline: none;
  transition: all .2s;
  resize: vertical;
}

input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}

textarea { min-height: 130px; }

.form-success {
  color: #34d399;
  background: rgba(52,211,153,.1);
  border: 1px solid rgba(52,211,153,.25);
  padding: 12px 16px;
  border-radius: 10px;
  display: none;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
  background: var(--bg2);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 10px;
}

.footer-brand p {
  color: var(--muted);
  font-size: .88rem;
  max-width: 240px;
  line-height: 1.6;
}

.footer-nav-group h4 {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-nav-group ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.footer-nav-group li a {
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  transition: color .2s;
}

.footer-nav-group li a:hover { color: var(--text); }

.footer-social { display: flex; gap: 10px; }

.footer-social-link {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: all .2s;
}

.footer-social-link svg { width: 15px; height: 15px; fill: currentColor; }

.footer-social-link:hover {
  border-color: rgba(124,108,247,.4);
  color: #a78bfa;
  transform: translateY(-2px);
}

.footer-social-heading {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom-left {
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  color: var(--muted);
}

.footer-bottom-left span { color: #a78bfa; }

.footer-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: var(--muted);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
  animation: pulse 2.5s ease-in-out infinite;
}

/* ── Scroll-reveal ── */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0; transform: translateX(-32px);
  transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0; transform: translateX(32px);
  transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.stagger.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: .05s; }
.stagger.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: .12s; }
.stagger.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: .19s; }
.stagger.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: .26s; }
.stagger.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: .33s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  #about .about-grid, #contact .contact-grid { grid-template-columns: 1fr; }
  #projects .project-grid { grid-template-columns: 1fr; }
  nav a { padding: 7px 12px; font-size: .82rem; }
  .footer-top { flex-direction: column; gap: 28px; }
}

@media (max-width: 480px) {
  section { padding: 60px 16px; }
  .cta-row { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .cert-grid { grid-template-columns: 1fr; }
}
/* ── Certs Scroll ── */
.certs-wrap {
  overflow: hidden;
  position: relative;
  padding: 4px 0;
}

.certs-wrap::before, .certs-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.certs-wrap::before { left: 0;  background: linear-gradient(to right, var(--bg2), transparent); }
.certs-wrap::after  { right: 0; background: linear-gradient(to left,  var(--bg2), transparent); }

.certs-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: scroll-left 30s linear infinite;
}

.certs-track:hover { animation-play-state: paused; }

@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Cert Modal ── */
.cert-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.cert-modal-overlay.open { opacity: 1; pointer-events: all; }

.cert-modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  max-width: 380px;
  width: 90%;
  position: relative;
  transform: scale(.88);
  transition: transform .22s cubic-bezier(.16,1,.3,1);
}

.cert-modal-overlay.open .cert-modal-box { transform: scale(1); }

.cert-modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  transition: color .15s;
}

.cert-modal-close:hover { color: var(--text); }

.cert-modal-logo {
  width: 52px; height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 14px;
}

.cert-modal-title  { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.cert-modal-issuer { font-size: .85rem; color: #7c6cf7; margin-bottom: 14px; font-family: 'JetBrains Mono', monospace; }
.cert-modal-desc   { font-size: .88rem; color: var(--muted); line-height: 1.75; border-top: 1px solid var(--border); padding-top: 12px; }

.cert-modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.cert-modal-tag {
  font-size: .72rem;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.2);
  color: #93c5fd;
  font-family: 'JetBrains Mono', monospace;
}