/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f8fafc;
  color: #334155;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode {
  background: #0f172a;
  color: #e2e8f0;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #38bdf8;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 1001;
  transition: background 0.3s;
}

.dark-mode-toggle:hover {
  background: #0ea5e9;
}

.dark-mode-toggle i {
  font-size: 1.2rem;
}

/* Header */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: #0f172a;
  color: #fff;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.3s;
}

header.dark-mode {
  background: #1e293b;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  padding: 15px 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo i {
  color: #38bdf8;
}
.logo span {
  color: #38bdf8;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}
nav ul li a:hover {
  color: #38bdf8;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(to right, #0f172a, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 20px;
  transition: background 0.3s;
}

.hero.dark-mode {
  background: linear-gradient(to right, #1e293b, #334155);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 800px;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid #38bdf8;
  object-fit: cover;
}

.hero-text h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 10px;
}
.hero-text h2 span {
  color: #38bdf8;
}
.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.btn {
  background: #38bdf8;
  color: #fff;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s, transform 0.2s;
}
.btn:hover {
  background: #0ea5e9;
  transform: translateY(-2px);
}

/* Sections */
.section {
  max-width: 1200px;
  margin: auto;
  padding: 100px 20px;
  text-align: center;
  transition: background 0.3s;
}
.section.dark-mode {
  background: #1e293b;
}
.section h2 {
  margin-bottom: 20px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #0f172a;
}
.section.dark-mode h2 {
  color: #fff;
}
.section-subtitle {
  color: #64748b;
  margin-bottom: 40px;
  font-style: italic;
}

/* About */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}
.about-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
}
.contributions {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 12px;
  transition: background 0.3s;
}
.contributions.dark-mode {
  background: rgba(56, 189, 248, 0.2);
}
#streak-container {
  font-size: 1.5rem;
  margin-top: 10px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.skill-card {
  background: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}
.skill-card.dark-mode {
  background: #334155;
}
.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.skill-card i {
  font-size: 2.5rem;
  color: #38bdf8;
  margin-bottom: 15px;
}
.skill-card h3 {
  margin-bottom: 10px;
  color: #0f172a;
}
.skill-card.dark-mode h3 {
  color: #fff;
}
.progress-bar {
  background: #e2e8f0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-bar.dark-mode {
  background: #475569;
}
.progress {
  background: #38bdf8;
  height: 100%;
  transition: width 0.3s;
}

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s;
  text-align: center;
}
.card.dark-mode {
  background: #334155;
}
.card:hover {
  transform: translateY(-5px);
}
.card i {
  font-size: 2rem;
  color: #38bdf8;
  margin-bottom: 15px;
}
.card h3 {
  margin-bottom: 10px;
  color: #0f172a;
}
.card.dark-mode h3 {
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: #38bdf8;
  border: 1px solid #38bdf8;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s;
  margin-top: 10px;
  display: inline-block;
}
.btn-secondary:hover {
  background: #38bdf8;
  color: #fff;
}

/* Contact */
.contact-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #38bdf8;
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid #38bdf8;
  border-radius: 25px;
  transition: all 0.3s;
}
.contact-link:hover {
  background: #38bdf8;
  color: #fff;
}
.contact-link i {
  font-size: 1.2rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #0f172a;
  color: #fff;
  transition: background 0.3s;
}
footer.dark-mode {
  background: #1e293b;
}
footer a {
  color: #38bdf8;
  text-decoration: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0f172a;
    padding: 20px;
    gap: 0;
  }
  nav ul.active {
    display: flex;
  }
  nav ul li {
    margin: 10px 0;
  }
  .hero-content {
    gap: 15px;
  }
  .profile-img {
    width: 120px;
    height: 120px;
  }
  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}

/* Dark Mode for Sections */
.section.dark-mode {
  color: #e2e8f0;
}
.card.dark-mode p,
.skill-card p {
  color: #cbd5e1;
  }
