/* ── Scroll progress ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #8458B3, #D0BDF4, #A0D2EB);
  z-index: 200;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Cursor glow ── */
#cursor-glow {
  pointer-events: none;
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160,210,235,0.10) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s;
  opacity: 0;
}

/* ── Aurora canvas ── */
#aurora {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #494D5F;
  --bg-card: #3f4354;
  --bg-dark: #383b4a;
  --border: #5a5f78;
  --accent: #8458B3;
  --accent-2: #D0BDF4;
  --accent-glow: rgba(132, 88, 179, 0.28);
  --text: #E5EAF5;
  --text-muted: #A0D2EB;
  --text-faint: #7a8099;
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 32px rgba(30,25,50,0.5);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

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

a { text-decoration: none; color: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Typography helpers ── */
.accent { color: var(--accent-2); }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

/* ── Layout ── */
.section { padding: 6rem 1.5rem; }
.section-dark { background: var(--bg-dark); }
.container { max-width: 1080px; margin: 0 auto; }

/* ── NAV ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 1.5rem;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#navbar.scrolled {
  background: rgba(73, 77, 95, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
#navbar.hidden {
  transform: translateY(-100%);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-2);
  letter-spacing: 0.05em;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.btn-nav {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition) !important;
}
.btn-nav:hover { opacity: 0.85; }
.nav-links a.active { color: var(--text); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 6rem 1.5rem 4rem;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}
.hero-tag {
  font-family: var(--mono);
  color: var(--accent-2);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 480px;
  margin-bottom: 2rem;
  white-space: normal;
  word-break: break-word;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity var(--transition), transform var(--transition);
  display: inline-block;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary.btn-large { padding: 0.85rem 2rem; font-size: 1rem; }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color var(--transition), background var(--transition);
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-glow); }

.hero-links {
  display: flex;
  gap: 1rem;
}
.hero-links a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.hero-links a:hover { color: var(--accent-2); }

/* Code card */
.code-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 60px var(--accent-glow);
}
.code-dots {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.code-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-faint);
}
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-card pre {
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-muted);
}
.code-card .kw { color: #c792ea; }
.code-card .key { color: #82aaff; }
.code-card .str { color: #c3e88d; }

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.7rem;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.02rem;
}
.about-text strong { color: var(--text); }
.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-2);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.about-edu h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 1.5rem;
}
.edu-card {
  display: flex;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color var(--transition);
}
.edu-card:hover { border-color: var(--accent); }
.edu-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.edu-card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.edu-degree { font-size: 0.85rem; color: var(--accent-2); margin-bottom: 3px; }
.edu-meta { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 6px; }
.edu-courses { font-size: 0.78rem; color: var(--text-muted); }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 1.4rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-dark);
  box-shadow: 0 0 12px var(--accent-glow);
}
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.timeline-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}
.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.tl-header h3 { font-size: 1.05rem; font-weight: 600; }
.tl-company { font-size: 0.9rem; color: var(--accent-2); margin-top: 2px; }
.tl-faded { color: var(--text-faint); }
.tl-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  white-space: nowrap;
  background: rgba(255,255,255,0.04);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.tl-location { font-size: 0.82rem; color: var(--text-faint); margin-bottom: 1rem; }
.tl-bullets { list-style: none; padding: 0; }
.tl-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  padding-left: 1.1rem;
  position: relative;
}
.tl-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 2px;
}
.tl-bullets strong { color: var(--text); }
.tl-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.tl-tags span {
  font-size: 0.72rem;
  font-family: var(--mono);
  background: rgba(124, 106, 247, 0.12);
  color: var(--accent-2);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(124, 106, 247, 0.25);
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--accent-glow);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.project-icon { font-size: 1.8rem; }
.project-links { display: flex; gap: 0.75rem; }
.project-links a { color: var(--text-faint); transition: color var(--transition); }
.project-links a:hover { color: var(--accent-2); }
.project-card h3 { font-size: 1.05rem; font-weight: 600; }
.project-sub { font-size: 0.82rem; color: var(--accent-2); }
.project-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.project-desc strong { color: var(--text); }
.project-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.5rem; }
.project-tags span {
  font-size: 0.7rem;
  font-family: var(--mono);
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.project-date {
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--text-faint);
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.skill-group h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 1rem;
}
.skill-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-pills span {
  font-size: 0.82rem;
  font-family: var(--mono);
  background: rgba(124, 106, 247, 0.1);
  color: var(--accent-2);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(124, 106, 247, 0.2);
  transition: background var(--transition), border-color var(--transition);
}
.skill-pills span:hover {
  background: rgba(124, 106, 247, 0.25);
  border-color: var(--accent);
}
.certs-section h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 1.5rem;
}
.certs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.cert-card {
  display: flex;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition);
}
.cert-card:hover { border-color: var(--accent); }
.cert-icon { font-size: 1.5rem; flex-shrink: 0; }
.cert-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.cert-card p { font-size: 0.82rem; color: var(--text-muted); }
.cert-card strong { color: var(--text); }
.cert-date {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--text-faint);
}

/* ── CONTACT ── */
.contact-container { text-align: center; }
.contact-sub { color: var(--text-muted); font-size: 1rem; max-width: 480px; margin: 0 auto 2.5rem; }
.contact-cards {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  transition: border-color var(--transition), color var(--transition);
}
.contact-card:not(.no-link):hover {
  border-color: var(--accent);
  color: var(--accent-2);
}
.contact-icon { font-size: 1rem; }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Status chip ── */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
  animation: pulse-green 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* ── Typing cursor ── */
.cursor-blink {
  color: var(--accent-2);
  animation: blink 0.9s step-end infinite;
  font-weight: 300;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── 3D tilt cards ── */
.tilt-card { transform-style: preserve-3d; will-change: transform; }

/* ── Skill pills with icons ── */
.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-family: var(--mono);
  background: rgba(124, 106, 247, 0.1);
  color: var(--accent-2);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(124, 106, 247, 0.2);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  cursor: default;
}
.skill-pill:hover {
  background: rgba(124, 106, 247, 0.25);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.skill-pill img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* ── Now card ── */
.now-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow), 0 0 60px var(--accent-glow);
}
.now-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.now-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.now-row:last-of-type { border-bottom: none; }
.now-key {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.now-val {
  font-size: 0.85rem;
  color: var(--text);
  text-align: right;
}
.now-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--text-faint);
  font-family: var(--mono);
}
.now-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-green 2s ease-in-out infinite;
}

/* ── Project hook line ── */
.project-hook {
  font-size: 0.82rem;
  color: var(--accent-2);
  font-style: italic;
  margin-bottom: 0.4rem;
}

/* ── Project badge ── */
.project-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(132, 88, 179, 0.2);
  color: var(--accent-2);
  border: 1px solid rgba(132, 88, 179, 0.4);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

/* ── Featured project card ── */
.featured-project {
  border-color: rgba(132, 88, 179, 0.5);
  background: linear-gradient(135deg, var(--bg-card) 80%, rgba(132,88,179,0.08));
}

/* ── Marquee ── */
.marquee-section {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-dark);
  padding: 1rem 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-right: 1.5rem;
  white-space: nowrap;
}
.marquee-content span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  transition: color var(--transition);
}
.marquee-content span:hover { color: var(--accent-2); }
.marquee-content .dot {
  color: var(--accent);
  font-size: 0.6rem;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  #hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 8rem;
  }
  .hero-sub { margin: 0 auto 2rem; }
  .hero-cta { justify-content: center; }
  .hero-links { justify-content: center; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .certs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(73, 77, 95, 0.98);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open a { font-size: 1.1rem; }
  .burger { display: flex; }
  .tl-header { flex-direction: column; gap: 0.5rem; }
  .about-stats { flex-wrap: wrap; gap: 1.5rem; }
  .scroll-hint { display: none; }
}
