/* Overall scrollbar width */
::-webkit-scrollbar {
  width: 12px; /* width of vertical scrollbar */
  height: 12px; /* height of horizontal scrollbar */
}

/* Track (background) */
::-webkit-scrollbar-track {
  background: #f1f1f1; /* light gray track */
  border-radius: 10px;
}

/* Scrollbar handle (the draggable part) */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8e2de2, #4a00e0); /* gradient color */
  border-radius: 10px;
  border: 3px solid #f1f1f1; /* padding around thumb */
}

/* On hover */
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4a00e0, #8e2de2);
}

/* ==================== VARIABLES ==================== */
:root {
  --bg-color: #f5f5f7;
  --text-color: #1c1c1e;
  --accent-color: #8e2de2;
  --secondary-color: #6c63ff;
  --highlight-color: #ff6f91;
  --cyan-color: #00e5ff;
  --card-bg: rgba(255, 255, 255, 0.85);
  --dark-bg: #121212;
  --dark-card: rgba(28, 28, 30, 0.85);
  --transition-speed: 0.3s;
}

.dark-mode {
  --bg-color: #121212;
  --text-color: #f5f5f7;
  --card-bg: var(--dark-card);
}

/* ================== TYPEWRITER EFFECT ================== */
.typewriter {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--secondary-color);
  font-size: 1.3rem;
  font-weight: 500;
  animation: typing 3s steps(30, end), blink .75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: var(--secondary-color); }
}

/* ==================== GLOBAL STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

section {
  padding: 80px 0;
}

h1, h2, h3 {
  text-align: center;
  margin-bottom: 20px;
}

p {
  line-height: 1.6;
}

/* ==================== NAVIGATION ==================== */
nav {
  position: fixed;
  width: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  top: 0;
  left: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  z-index: 100;
  transition: background var(--transition-speed);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  width: 90%;
  max-width: 1100px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  transition: color var(--transition-speed);
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(45deg, var(--accent-color), var(--cyan-color));
  transition: 0.3s;
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-links li a:hover {
  color: var(--accent-color);
}

#mode-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-color);
  transition: transform 0.3s;
}

#mode-toggle:hover {
  transform: rotate(20deg);
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-align: center;
}

#bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: drop-shadow(0 0 10px var(--accent-color));
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.hero-content h1 span {
  background: linear-gradient(45deg, var(--accent-color), var(--highlight-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 400% 400%;
  animation: gradientAnimation 10s ease infinite;
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-content p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
}

/* Typewriter effect for tagline */
.typewriter {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--secondary-color);
  animation: typing 3s steps(30, end) infinite, blink 0.75s step-end infinite;
}

@keyframes typing {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}

@keyframes blink {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--secondary-color); }
}

.btn {
  background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
  background: linear-gradient(45deg, var(--highlight-color), var(--cyan-color));
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}


/* ==================== ABOUT ==================== */
#about {
  text-align: center;
}

#about img {
  border-radius: 50%;
  width: 180px;
  margin-bottom: 20px;
  border: 5px solid var(--accent-color);
}

/* ==================== STATS ==================== */
#stats {
  background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
  color: white;
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat h3 {
  font-size: 2rem;
}

/* ==================== SKILLS ==================== */
.skills-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 30px;
}

.skill {
  text-align: center;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.skill:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.skill i {
  background: linear-gradient(45deg, var(--accent-color), var(--highlight-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================== PROJECTS SECTION ================== */
#projects {
  padding: 4rem 0;
  text-align: center;
  background: var(--bg-color);
}

#projects h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.projects-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.project-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card-bg, #fff);
  color: var(--text-color);
  text-decoration: none;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s;
  min-width: 160px;
}

.project-icon-card i {
  color: var(--secondary-color, #8e2de2);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.project-icon-card h3 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 600;
}

.project-icon-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  background: var(--accent-light, #f5f5f7);
}

.project-icon-card:hover i {
  color: var(--accent-color, #6a11cb);
}

 
/* ==================== TIMELINE ==================== */
.timeline {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.event {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ==================== TESTIMONIALS ==================== */
.testimonial-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.testimonial {
  background: var(--card-bg);
  padding: 20px;
  max-width: 300px;
  border-radius: 15px;
  text-align: center;
  font-style: italic;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ==================== AWARDS ==================== */
.awards-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.award {
  background: var(--card-bg);
  padding: 20px;
  text-align: center;
  border-radius: 15px;
  transition: transform 0.3s;
}

.award:hover {
  transform: scale(1.05);
}

/* ==================== HIRE ==================== */
#hire {
  text-align: center;
  background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
  color: white;
  padding: 60px 20px;
}

/* ================== CONTACT SECTION ================== */
.contact-section {
  padding: 80px 20px;
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: #fff;
  text-align: center;
  transition: background 0.4s ease, color 0.4s ease;
}

body.dark-mode .contact-section {
  background: #1e1e1e; /* Dark mode background */
  color: #e0e0e0;
}

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

.contact-title {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.contact-subtitle {
  font-size: 1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: #333;
  transition: background 0.3s, color 0.3s;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
  outline: 2px solid #8e2de2;
}

body.dark-mode .contact-form .form-group input,
body.dark-mode .contact-form .form-group textarea {
  background: #2c2c2c;
  color: #e0e0e0;
}

body.dark-mode .contact-form .form-group input:focus,
body.dark-mode .contact-form .form-group textarea:focus {
  outline: 2px solid #8e2de2;
}

.contact-btn {
  padding: 12px 20px;
  background: #fff;
  color: #4a00e0;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.contact-btn:hover {
  background: #eee;
  transform: translateY(-2px);
}

body.dark-mode .contact-btn {
  background: #8e2de2;
  color: #fff;
}

body.dark-mode .contact-btn:hover {
  background: #a555f1;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 1.5rem;
}

.social-links a {
  color: #fff;
  transition: 0.3s;
}

.social-links a:hover {
  color: #ffd700;
  transform: translateY(-3px);
}

body.dark-mode .social-links a {
  color: #e0e0e0;
}

body.dark-mode .social-links a:hover {
  color: #8e2de2;
}


/* ==================== FOOTER ==================== */
footer {
  background: var(--bg-color);
  text-align: center;
  padding: 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.social-links a {
  margin: 0 10px;
  font-size: 1.4rem;
  color: var(--text-color);
  transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

/* ==================== BACK TO TOP ==================== */
#back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: background 0.3s, transform 0.3s;
}

#back-to-top:hover {
  background: linear-gradient(45deg, var(--highlight-color), var(--cyan-color));
  transform: translateY(-3px);
}

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

  .skills-container, .stats-container {
    flex-direction: column;
    align-items: center;
  }
}

/* === Mode Toggle Icon State === */
.dark-mode #mode-toggle i::before {
  content: "\f185"; /* Font Awesome sun icon when in dark mode */
}

/* ================== Profile Picture ================== */
.profile-pic {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--secondary-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1rem;
}

.profile-pic:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(142, 45, 226, 0.5);
}

/* ==================== MOBILE & TOUCH OPTIMIZATION ==================== */
@media (max-width: 768px) {

  /* ===== Navigation: Hamburger Menu Placeholder ===== */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
  }

  .nav-links.nav-active {
    right: 0;
  }

  /* ===== Hero Section ===== */
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p,
  .hero-content .tagline {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  /* ===== Skills Section ===== */
  .skills-container {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .skill {
    width: 80%;
  }

  /* ===== Stats Section ===== */
  .stats-container {
    flex-direction: column;
    align-items: center;
  }

  /* ===== Projects Section Horizontal Scroll ===== */
  .projects-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .project-icon-card {
    min-width: 160px;
    flex: 0 0 auto;
  }

  /* ===== Timeline / Experience ===== */
  .timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* ===== Contact Section ===== */
  .contact-container {
    padding: 0 1rem;
  }

  .contact-form input,
  .contact-form textarea,
  .contact-btn {
    width: 100%;
    font-size: 1rem;
  }

  .social-links {
    justify-content: center;
    gap: 1rem;
  }

  /* ===== Footer ===== */
  footer {
    text-align: center;
    padding: 2rem 1rem;
  }

  /* ===== Scrollbar Styling for Mobile ===== */
  ::-webkit-scrollbar {
    height: 8px;
  }

  ::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
  }

  ::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
  }
}
