/* =========================================
   ROOT VARIABLES
========================================= */
:root {
  --bg: #060714;
  --bg-alt: #0a0c1e;
  --card-bg: #10122a;
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f5f6fb;
  --text-muted: #9ea3c0;
  --text-dim: #6b7094;
  --accent-blue: #3b82f6;
  --accent-purple: #a855f7;
  --accent-cyan: #22d3ee;
  --gradient: linear-gradient(90deg, #3b82f6, #a855f7);
  --gradient-diag: linear-gradient(135deg, #3b82f6, #8b5cf6, #d946ef);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* Light theme override */
body.light-theme {
  --bg: #f4f5fb;
  --bg-alt: #ffffff;
  --card-bg: #ffffff;
  --card-border: rgba(20, 20, 40, 0.08);
  --text-main: #101226;
  --text-muted: #4a4e6b;
  --text-dim: #767aa0;
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.gradient-text {
  background: var(--gradient-diag);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================
   NAVBAR
========================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 7, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

body.light-theme .navbar { background: rgba(255, 255, 255, 0.85); }

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); }

.logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  background: var(--gradient);
  color: #fff;
}

.logo-text { font-weight: 600; font-size: 16px; color: var(--text-main); }

.nav-links { display: flex; gap: 32px; }

.nav-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active { color: var(--accent-blue); }

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover { transform: translateY(-2px); border-color: var(--accent-blue); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
}
.hamburger span { width: 20px; height: 2px; background: var(--text-main); border-radius: 2px; }

/* =========================================
   HERO
========================================= */
.hero { padding: 64px 40px 40px; max-width: 1400px; margin: 0 auto; }

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: 19px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.hero-desc {
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 28px;
}

.contact-pills { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 10px 16px;
  border-radius: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.pill:hover { border-color: var(--accent-blue); transform: translateY(-2px); }
.pill svg { flex-shrink: 0; color: var(--accent-cyan); }

.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity .2s ease;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(99, 102, 241, 0.45); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-main);
}
.btn-outline:hover { border-color: var(--accent-blue); transform: translateY(-2px); }

.btn.full { width: 100%; justify-content: center; }

/* ---------- hero right / photo ---------- */
.hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.photo-ring {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 180deg, #3b82f6, #a855f7, #22d3ee, #3b82f6);
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.35);
  position: relative;
  z-index: 2;
  animation: spin 10s linear infinite;
}

.photo-ring::before {
  content: '';
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 50%;
  animation: spin 16s linear infinite reverse;
}

@keyframes spin { to { transform: rotate(360deg); } }

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg);
  animation: counter-spin 10s linear infinite;
}
@keyframes counter-spin { to { transform: rotate(-360deg); } }

.orbit-icon {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  z-index: 3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  animation: float 4s ease-in-out infinite;
}

.icon-aws { top: 8%; left: 4%; color: #f59e0b; animation-delay: 0s; }
.icon-docker { top: 8%; right: 2%; color: #38bdf8; animation-delay: .6s; }
.icon-k8s { bottom: 10%; left: 6%; color: #60a5fa; animation-delay: 1.2s; }
.icon-terraform { bottom: 8%; right: 4%; color: #a855f7; animation-delay: 1.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* =========================================
   INFO CARDS (Skills / Experience / Summary)
========================================= */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 22px;
  color: var(--text-main);
}

.card-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-blue);
  font-size: 13px;
}

.skill-list { display: flex; flex-direction: column; gap: 18px; }
.skill-list li { display: flex; align-items: flex-start; gap: 12px; }
.skill-emoji { font-size: 20px; line-height: 1.4; }
.skill-list strong { display: block; font-size: 14.5px; margin-bottom: 2px; }
.skill-list p, .skill-list li p { font-size: 13px; color: var(--text-dim); }

.exp-item { margin-bottom: 24px; }
.exp-item:last-child { margin-bottom: 0; }

.exp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.exp-head h4 { font-size: 15.5px; font-weight: 600; }

.badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.exp-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }

.exp-item ul { display: flex; flex-direction: column; gap: 6px; padding-left: 4px; border-left: 2px solid var(--card-border); }
.exp-item ul li { font-size: 13.5px; color: var(--text-muted); padding-left: 14px; position: relative; }
.exp-item ul li::before {
  content: '';
  position: absolute;
  left: -5px; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.summary-text { font-size: 14px; color: var(--text-muted); margin-bottom: 22px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.stat-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
body.light-theme .stat-box { background: rgba(0,0,0,0.02); }

.stat-emoji { font-size: 20px; }
.stat-box strong { display: block; font-size: 17px; font-weight: 700; }
.stat-box p { font-size: 11px; color: var(--text-dim); }

/* =========================================
   GENERIC SECTIONS
========================================= */
.section { padding: 90px 40px; }
.section-alt { background: var(--bg-alt); }
.section-container { max-width: 1200px; margin: 0 auto; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
}

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-text p { color: var(--text-muted); margin-bottom: 16px; font-size: 15.5px; }
.edu-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
}
.edu-card h4 { margin-bottom: 14px; font-family: var(--font-display); }
.edu-degree { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.edu-school { color: var(--text-muted); font-size: 14px; margin-bottom: 6px; }
.edu-meta { color: var(--text-dim); font-size: 13px; }

/* Skills grid */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.skill-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.skill-tile:hover { transform: translateY(-6px); border-color: var(--accent-blue); }
.skill-emoji.big { font-size: 34px; display: block; margin-bottom: 14px; }
.skill-tile h4 { font-size: 15.5px; margin-bottom: 8px; }
.skill-tile p { font-size: 13.5px; color: var(--text-dim); }

/* Timeline (experience section) */
.timeline { position: relative; max-width: 800px; margin: 0 auto; padding-left: 30px; border-left: 2px solid var(--card-border); }
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -37px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px rgba(139,92,246,0.6);
}
.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}
.timeline-content ul { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.timeline-content ul li { font-size: 14px; color: var(--text-muted); padding-left: 16px; position: relative; }
.timeline-content ul li::before {
  content: '';
  position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-blue);
}

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent-purple); }
.project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.project-icon { font-size: 26px; }
.project-card h4 { font-size: 17px; margin-bottom: 8px; }
.project-stack { font-size: 12.5px; color: var(--accent-cyan); margin-bottom: 14px; }
.project-card ul { display: flex; flex-direction: column; gap: 8px; }
.project-card ul li { font-size: 13.5px; color: var(--text-muted); padding-left: 16px; position: relative; }
.project-card ul li::before {
  content: '';
  position: absolute; left: 0; top: 7px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-purple);
}

/* Certifications */
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 800px; margin: 0 auto; }
.cert-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.cert-card:hover { transform: translateY(-6px); border-color: var(--accent-blue); }
.cert-icon { font-size: 30px; display: block; margin-bottom: 14px; }
.cert-card h4 { font-size: 15.5px; margin-bottom: 6px; }
.cert-card p { font-size: 13px; color: var(--text-dim); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-main);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-line:hover { border-color: var(--accent-blue); transform: translateX(4px); }
.contact-line svg { color: var(--accent-cyan); flex-shrink: 0; }

.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14.5px;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}
.form-note { font-size: 13px; color: var(--accent-cyan); min-height: 18px; }

/* =========================================
   FOOTER CTA
========================================= */
.footer-cta {
  background: var(--bg-alt);
  border-top: 1px solid var(--card-border);
  padding: 40px;
}
.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-heading { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.footer-info { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.footer-item svg { color: var(--accent-purple); flex-shrink: 0; }
.footer-copy { text-align: center; margin-top: 28px; font-size: 12.5px; color: var(--text-dim); }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(99,102,241,0.4);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 999;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; }
  .hero-right { order: -1; min-height: 320px; }
  .info-grid { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid, .cert-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-container { padding: 14px 20px; }
  .nav-links {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    padding: 20px;
    gap: 18px;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    z-index: 999;
  }
  .nav-links.open { transform: translateY(0); }
  .hamburger { display: flex; }
  .hero { padding: 40px 20px; }
  .section { padding: 60px 20px; }
  .skills-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .footer-container { flex-direction: column; text-align: center; }
  .footer-info { justify-content: center; }
}