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

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #0f1623;
  --bg-card: #141c2e;
  --bg-card-hover: #1a2540;
  --text-primary: #e2e8f0;
  --text-secondary: #8892a8;
  --accent: #00f0ff;
  --accent-green: #00ff88;
  --accent-purple: #a855f7;
  --gradient: linear-gradient(135deg, #00f0ff, #00ff88);
  --gradient-purple: linear-gradient(135deg, #a855f7, #00f0ff);
  --glow: 0 0 20px rgba(0, 240, 255, 0.3);
  --glow-strong: 0 0 40px rgba(0, 240, 255, 0.4), 0 0 80px rgba(0, 240, 255, 0.1);
  --radius: 12px;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

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

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

/* ===== Canvas Background ===== */
#matrix-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Navigation ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
  padding: 0.7rem 2rem;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

/* ===== Hero ===== */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-content { max-width: 800px; }

.hero-avatar {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3), 0 0 60px rgba(0, 240, 255, 0.1);
  animation: fadeInDown 0.8s ease;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease;
}

h1.glitch {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  position: relative;
  animation: fadeInUp 0.8s ease 0.2s both;
}

h1.glitch:hover {
  animation: glitch 0.4s linear;
}

@keyframes glitch {
  0% { text-shadow: 2px 0 #ff0040, -2px 0 #00f0ff; }
  25% { text-shadow: -2px 0 #ff0040, 2px 0 #00f0ff; }
  50% { text-shadow: 2px -1px #ff0040, -2px 1px #00f0ff; }
  75% { text-shadow: -1px 2px #ff0040, 1px -2px #00f0ff; }
  100% { text-shadow: 0 0 transparent, 0 0 transparent; }
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-green);
  margin-bottom: 2.5rem;
  min-height: 2rem;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.typed-prefix { color: var(--accent); }

.cursor {
  animation: blink 0.8s infinite;
  color: var(--accent);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s both;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: var(--bg-primary);
}

.btn-primary:hover {
  box-shadow: var(--glow-strong);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--accent);
}

.btn-outline:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--accent);
}

.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; }

/* ===== Scroll Indicator ===== */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  animation: fadeInUp 1s ease 1s both;
}

.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
}

.section-alt { background: var(--bg-secondary); }

.container { max-width: 1000px; margin: 0 auto; }

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  font-family: var(--font-mono);
}

.accent { color: var(--accent); }
.highlight {
  color: var(--accent);
  font-weight: 700;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.about-certs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.cert-card:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateX(4px);
}

.cert-icon { font-size: 2rem; }

.cert-card h4 {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
}

.cert-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.skill-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.08);
  border-radius: var(--radius);
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(20px);
}

.skill-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-card:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}

.skill-card .skill-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.skill-icon {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 240, 255, 0.08);
  border-radius: 10px;
  font-size: 1.2rem;
}

.skill-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.skill-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.skill-card.visible .skill-bar-fill {
  width: var(--level);
}

/* ===== Timeline / Experience ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-purple), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  left: -2.45rem; top: 0.3rem;
  width: 14px; height: 14px;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.timeline-item h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.3rem 0 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.timeline-role { color: var(--accent); }
.timeline-period { color: var(--text-secondary); }
.timeline-location { color: var(--accent-green); }

.timeline-bullets {
  list-style: none;
  padding: 0;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.timeline-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===== Education ===== */
.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.edu-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.08);
  border-radius: var(--radius);
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(20px);
}

.edu-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.edu-card:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.edu-card .edu-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.edu-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.edu-card .edu-institution {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.edu-card .edu-gpa {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ===== Contact ===== */
.contact-section { text-align: center; }

.contact-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.contact-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.contact-icon svg { width: 22px; height: 22px; }

.contact-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}

/* ===== Footer ===== */
footer {
  position: relative;
  z-index: 1;
  padding: 2rem;
  border-top: 1px solid rgba(0, 240, 255, 0.08);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  background: var(--bg-primary);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
  }

  .about-grid { grid-template-columns: 1fr; }
  .education-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }

  h1.glitch { font-size: 2.5rem; }
  .section { padding: 4rem 1.5rem; }
}

@media (max-width: 480px) {
  h1.glitch { font-size: 2rem; }
  .hero-tagline { font-size: 0.9rem; }
  .hero-cta { flex-direction: column; align-items: center; }
}
