/* ========== Variables ========== */
:root {
  --bg: #0f0f0f;
  --text: #eaeaea;
  --card: #1b1b1b;
  --muted: #bdbdbd;
  --accent-cyan: #38a9a9;
  --accent-mag: #c28fc2;
  --header-height: 72px;
}

/* Reset & base styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Light theme variables */
body.light-theme {
  --bg: #f5f6f7;
  --text: #1a1a1a;
  --card: #ffffff;
  --muted: #444;
  --accent-cyan: #0077b6;
  --accent-mag: #9b4dca;
}

/* Scroll Progress */
#progress-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 2000;
  background: transparent;
}

#progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-mag));
  transition: width .12s linear;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
}

.navbar {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 12px;
}

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

.nav-links {
  list-style: none;
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: 600;
  opacity: 0.98;
}

.nav-links a.active {
  color: var(--accent-cyan);
}

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

#theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
}

.resume-btn {
  background: var(--accent-mag);
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

/* Sections */
.section {
  padding: calc(var(--header-height) + 20px) 20px 64px;
  max-width: 1100px;
  margin: 0 auto;
}

h2 {
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

/* Hero */
.hero-inner {
  display: flex;
  flex-direction: column;  /* stack avatar + text vertically */
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-mag));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  border: 4px solid rgba(255, 255, 255, 0.03);
}

.hero-text {
  max-width: 600px;
  margin: 0 auto 20px;
  position: relative;
  z-index: 2;
}

/* Role / tagline text */
.role {
  display: block;
  margin: 6px 0;
}

.role.tagline {
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
  margin: 10px auto;
  padding: 0 16px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  color: var(--text);
  font-weight: 500;
}

.role.dynamic {
  font-size: 1rem;
  text-align: center;
  margin: 6px auto 0;
  padding: 0 16px;
  color: var(--accent-mag);
  display: block;
  min-height: 1.6em;     /* fixes the height */
  line-height: 1.4;      /* consistent vertical spacing */
  transition: opacity 0.4 ease;
  overflow: hidden;      /* hides any overflow */
}

.hero-ctas {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-ctas .btn {
  padding: 10px 18px;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
}

/* Projects Timeline */
#projects .timeline {
  border-left: 2px solid var(--accent-cyan);
}

#projects .timeline-marker {
  background: var(--accent-cyan);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

#projects .timeline-content h3 {
  color: var(--text);
}

#projects .timeline-content p {
  color: var(--text);
}

#projects .timeline-content .muted {
  color: var(--muted);
}

#projects .timeline-content a {
  color: var(--accent-cyan);
  font-weight: 600;
  text-decoration: none;
  margin-right: 8px;
}

#projects .timeline-content a:hover {
  color: var(--accent-mag);
  text-decoration: underline;
}

/* Skills */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  align-items: flex-start;
}

.skill {
  width: 110px;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  flex-shrink: 0;
}

.skill-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.skill i {
  color: inherit;
}

.skill-icon i {
  display: block;
  font-size: 28px;
  line-height: 1;
  transform-origin: center;
}

.skill span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  display: block;
  width: 100%;
}

.skill:hover {
  transform: translateY(-6px);
  transition: transform .16s ease;
  color: whitesmoke;
}

.skill-icon i:hover {
  filter: drop-shadow(0 0 6px currentColor);
}

.html-icon {color: #e34f26 !important;}
.css-icon {color: #264de4 !important;}
.js-icon {color: #f7df1e !important;}
.react-icon {color: #61dafb !important;}
.python-icon {color: #3776ab !important;}
.java-icon {color: #f89820 !important;}
.cpp-icon {color: #00599c !important;}
.mysql-icon {color: #4479a1 !important;}
.node-icon {color: #68a063 !important;}
.git-icon {color: #f05032 !important;}
.github-icon {color: #181717 !important;transform: scale(0.92);}

@media (max-width: 520px) {
  .skill { width: 88px; }
  .skill-icon { width: 56px; height: 56px; }
  .skill-icon i { font-size: 22px; }
}

/* Timeline */
.timeline {
  border-left: none;    /* remove line */
  padding-left: 0;      /* no extra space */
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 20px 0;
}

.timeline-icon {
  font-size: 1.4rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
  margin-top: 4px;
}

.timeline-content h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}


/* Certifications Carousel */
.cert-carousel {
  overflow: hidden;
  border-radius: 10px;
}

.cert-track {
  display: flex;
  gap: 12px;
  transition: transform .45s cubic-bezier(.25, .9, .3, 1);
}

.cert-card {
  min-width: 220px;
  background: var(--card);
  padding: 18px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.contact-grid form input,
.contact-grid form textarea {
  width: 100%;
  margin: 8px 0;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: inherit;
}

.btn {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-mag));
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  font-weight: 700;
  color: #000;
  cursor: pointer;
}

.btn.outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
}

.small{
  padding: 6px 10px;
  font-size: 0.8rem;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease, filter .6s;
}

.reveal.active {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.social-icons a {
  font-size: 1.6rem;
  color: var(--text);
  background: var(--card);
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, color 0.2s, box-shadow 0.2s;
}

.social-icons a:hover {
  color: var(--accent-cyan);
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Small screens */
@media (max-width:900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .navbar { padding: 10px; }
  .avatar { width: 96px; height: 96px; }
  :root { --header-height: 64px; }
  html { scroll-padding-top: 64px; }
}

/* ===== Particles background fix ===== */
#particles-container,
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
}

/* ========== Mobile navbar (hamburger) ========== */
#menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
  padding: 6px;
}

@media (max-width: 768px) {
  #menu-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: var(--header-height);
    right: 12px;
    flex-direction: column;
    gap: 8px;
    background: var(--card);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 2800;
    min-width: 160px;
    display: flex;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  }
  .nav-links.open {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    white-space: nowrap;
  }
  .nav-actions { gap: 8px; }
  .resume-btn { padding: 8px 10px; font-size: .9rem; }
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .section {
    padding: calc(var(--header-height) + 10px) 14px 30px;
  }
  .role.tagline {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 8px auto;
    padding: 0 12px;
  }
  .role.dynamic {
    font-size: 0.85rem;
    line-height: 1.3;
    padding: 0 12px;
  }
}
