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

:root {
  --bg:        #080c14;
  --bg2:       #0d1321;
  --bg3:       #111827;
  --border:    rgba(99,130,200,0.12);
  --accent:    #6ee7f7;
  --accent2:   #a78bfa;
  --accent3:   #34d399;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --card:      rgba(15,23,42,0.8);
  --glow:      rgba(110,231,247,0.15);
  --font:      'Space Grotesk', sans-serif;
  --mono:      'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

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

/* ── CANVAS BG ─────────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

/* ── CURSOR GLOW ───────────────────────────────────────────── */
#cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110,231,247,0.08) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 0.1s, top 0.1s;
  z-index: 1;
}

/* ── NAVBAR ───────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 2rem;
  transition: background 0.3s, border-color 0.3s;
}
#navbar.scrolled {
  background: rgba(8,12,20,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.logo-bracket { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-cta {
  background: var(--accent);
  color: var(--bg);
  padding: 0.45rem 1.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ── HERO ─────────────────────────────────────────────────── */
#hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}
.hero-content { flex: 1; max-width: 600px; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  color: var(--accent3);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}
.tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent3);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero-name {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 1rem;
  animation: fadeUp 0.6s 0.1s ease both;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-typed-wrapper {
  font-family: var(--mono);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--accent);
  min-height: 2rem;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.2s ease both;
}
.typed-cursor { animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-bio {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s 0.3s ease both;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeUp 0.6s 0.4s ease both;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: var(--bg);
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(110,231,247,0.2);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(110,231,247,0.35);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text);
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.full-width { width: 100%; justify-content: center; }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fadeUp 0.6s 0.5s ease both;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* HERO VISUAL */
.hero-visual {
  position: relative;
  flex-shrink: 0;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.8s 0.3s ease both;
}
.profile-ring { position: relative; }
.profile-img-wrapper {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 2;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-placeholder {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  display: none;
}
.profile-img-wrapper.no-img .profile-placeholder { display: block; }
.profile-img-wrapper.no-img .profile-img { display: none; }
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.ring-1 { width: 220px; height: 220px; border-color: rgba(110,231,247,0.3); animation: spin 20s linear infinite; }
.ring-2 { width: 260px; height: 260px; border-color: rgba(167,139,250,0.2); animation: spin 30s linear infinite reverse; }
.ring-3 { width: 300px; height: 300px; border-color: rgba(110,231,247,0.1); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.badge-icon { width: 14px; height: 14px; color: var(--accent); }
.badge-1 { top: 10px; right: -20px; animation: float 3s ease-in-out infinite; }
.badge-2 { bottom: 30px; right: -30px; animation: float 3s 1s ease-in-out infinite; }
.badge-3 { bottom: 10px; left: -20px; animation: float 3s 2s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── SECTIONS ─────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 3rem;
}

/* ── ABOUT ────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}
.about-text strong { color: var(--text); }
.about-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s;
}
.about-link:hover { color: var(--accent); border-color: var(--accent); }
.about-link i { width: 15px; height: 15px; }

/* TIMELINE */
.education-timeline { display: flex; flex-direction: column; gap: 1.5rem; }
.timeline-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 8px var(--accent);
}
.timeline-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.timeline-content p { font-size: 0.85rem; color: var(--muted); }
.timeline-year {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

/* ── SKILLS ───────────────────────────────────────────────── */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.skill-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.3s;
}
.skill-group:hover { border-color: rgba(110,231,247,0.3); }
.skill-group-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}
.mono { font-family: var(--mono); color: var(--accent); }
.skill-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid;
  transition: transform 0.2s;
  cursor: default;
}
.chip:hover { transform: translateY(-2px); }
.chip-ml  { color: #6ee7f7; border-color: rgba(110,231,247,0.3); background: rgba(110,231,247,0.06); }
.chip-dev { color: #a78bfa; border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.06); }
.chip-db  { color: #34d399; border-color: rgba(52,211,153,0.3);  background: rgba(52,211,153,0.06); }
.chip-cs  { color: #fb923c; border-color: rgba(251,146,60,0.3);  background: rgba(251,146,60,0.06); }

/* ── PROJECTS ─────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.project-card:hover { border-color: rgba(110,231,247,0.3); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.project-card:hover::before { transform: scaleX(1); }
.featured-card {
  grid-column: span 3;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-rows: auto auto auto;
  align-items: start;
}
.featured-card .project-title { grid-column: 1 / 3; }
.featured-card .project-desc  { grid-column: 1 / 3; }
.featured-card .project-tags  { grid-column: 1 / 4; }
.featured-card .project-footer{ grid-column: 4; grid-row: 1; }
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.project-number {
  font-size: 0.75rem;
  color: var(--muted);
}
.project-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
}
.project-links a:hover { color: var(--accent); }
.project-links i { width: 18px; height: 18px; }
.project-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.project-desc { font-size: 0.875rem; color: var(--muted); flex: 1; }
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.project-tags span {
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}
.project-footer { display: flex; align-items: center; gap: 0.5rem; }
.project-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(110,231,247,0.1);
  border: 1px solid rgba(110,231,247,0.25);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
}

/* ── CERTS ────────────────────────────────────────────────── */
.certs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.cert-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.3s, transform 0.2s;
}
.cert-card:hover { border-color: rgba(110,231,247,0.3); transform: translateX(4px); }
.cert-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(110,231,247,0.08);
  border: 1px solid rgba(110,231,247,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.cert-icon i { width: 20px; height: 20px; }
.cert-info { flex: 1; }
.cert-info h4 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.cert-issuer { font-size: 0.8rem; color: var(--muted); }
.cert-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent3);
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── CONTACT ──────────────────────────────────────────────── */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}
.contact-left p { color: var(--muted); font-size: 1.05rem; margin-bottom: 2rem; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-link:hover { color: var(--accent); }
.contact-link i { width: 18px; height: 18px; flex-shrink: 0; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }
.form-note { font-size: 0.85rem; color: var(--accent3); text-align: center; min-height: 1.2em; }

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

/* ── SCROLL REVEAL ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  #hero { flex-direction: column; text-align: center; padding-top: 6rem; }
  .hero-content { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .skills-categories { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .featured-card {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
  }
  .certs-grid { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { width: 220px; height: 220px; }
  .profile-img-wrapper { width: 150px; height: 150px; }
  .ring-1 { width: 170px; height: 170px; }
  .ring-2 { width: 200px; height: 200px; }
  .ring-3 { width: 220px; height: 220px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: rgba(8,12,20,0.97); padding: 1.5rem 2rem; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
}
