* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

:root {
  --bg: #ffffff;
  --text: #222;
  --accent: #2563eb;
  --card-bg: #f5f5f5;
  --section1: #f8fafc;
  --section2: #eef2ff;
  --section3: #f0fdf4;
  --section4: #fff7ed;
  --section5: #fef2f2;
  --section-bg: #f8fafc;
  --text-color: #1e293b;
  --text-light: #555;
  --chip-bg: #f3f3f3;
  --accent-color: #ff6b6b;
  --accent-hover: #e65a5a;
}

body.dark {
  --bg: #0f172a;
  --text: #e2e8f0;
  --accent: #38bdf8;
  --card-bg: #1e293b;
  --section1: #1e293b;
  --section2: #2d3748;
  --section3: #334155;
  --section4: #3b4252;
  --section5: #475569;
  --section-bg: #0f172a;
  --text-color: #e2e8f0;
}

[data-theme="dark"] {
  --card-bg: #1e1e1e;
  --text-color: #f5f5f5;
  --text-light: #aaa;
  --chip-bg: #333;
  --accent-color: #00adb5;
  --accent-hover: #0097a7;
}


body {
  background: var(--bg);
  color: var(--text);
  transition: 0.4s;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 60px;
  background: var(--card-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: 0.3s;
}

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

.resume-btn {
  background: var(--accent);
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 6px;
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.4rem;
}

/* ===== Theme Button Styling ===== */
.theme-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover, .theme-toggle-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}


.theme-toggle-btn {
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
}


/* Section styling */
.section {
  padding: 120px 78px;
  min-height: 80vh;
}

/* section:nth-of-type(odd) {
  background: var(--section1);
} */

section:nth-of-type(even) {
  background: var(--card-bg);
}

.highlight {
  color: var(--accent);
}

.profile-pic {
  width: 150px;
  border-radius: 50%;
  margin-bottom: 15px;
  border: 3px solid var(--accent);
}

/* Buttons */
.btn, .btn-outline {
  display: inline-block;
  margin: 10px 8px;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s;
}

.btn {
  background: var(--accent);
  color: #fff;
}

.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
}

/* Social Links */
.social-links {
  margin-top: 20px;
}

.find-text {
  font-weight: 500;
  margin-bottom: 10px;
  font-size: 1rem;
}

.social-links a {
  display: inline-block;
  margin: 0 10px;
  font-size: 1.5rem;
  color: var(--accent);
  transition: 0.3s;
}

.social-links a:hover {
  transform: scale(1.1);
  color: #000; /* for light theme */
}

body.dark .social-links a:hover {
  color: #fff; /* adjust hover for dark mode */
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-content > h1, .home-content > p{
  text-align: center;
}

/* Floating animation for profile pic */
.floating {
  animation: float 3s ease-in-out infinite;
}

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

/* Typing animation text */
.typing-text {
  font-size: 1.2rem;
  color: var(--accent);
  margin: 10px 0 15px 0;
  height: 30px;
}

.cursor {
  display: inline-block;
  width: 2px;
  background: var(--accent);
  animation: blink 0.7s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Glowing social icons */
.social-links a {
  display: inline-block;
  margin: 0 10px;
  font-size: 1.6rem;
  color: var(--accent);
  transition: transform 0.3s, text-shadow 0.3s;
}

.social-links a:hover {
  transform: scale(1.2);
  text-shadow: 0 0 10px var(--accent);
}

/* Subtle gradient background */
.section1 {
  background: linear-gradient(120deg, var(--bg) 0%, var(--light-bg) 100%);
}

.social-section {
  margin-top: 25px;
  text-align: center;
}

.find-text {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.social-badges {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: 0.3s;
  border: 2px solid transparent;
}

.social-btn i {
  font-size: 1.2rem;
}

/* LinkedIn button */
.linkedin {
  background-color: #0a66c2;
  color: #fff;
}

.linkedin:hover {
  background-color: transparent;
  border-color: #0a66c2;
  color: #0a66c2;
}

/* GitHub button */
.github {
  background-color: #333;
  color: #fff;
}

.github:hover {
  background-color: transparent;
  border-color: #333;
  color: #333;
}

/* Dark theme adjustments */
body.dark .linkedin:hover {
  color: #fff;
  border-color: #0a66c2;
}

body.dark .github:hover {
  color: #fff;
  border-color: #999;
}

/* resume button */
.btn-resume {
  position: relative;
  display: inline-block;
  padding: 12px 28px;
  margin-top: 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #2563eb, #1e40af);
  border: none;
  border-radius: 50px;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-resume:hover {
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  box-shadow: 0 0 20px #2563eb, 0 0 40px #1e40af;
  transform: translateY(-3px);
}

.btn-resume::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  transition: left 0.6s;
}

.btn-resume:hover::before {
  left: 100%;
}

/* Dark mode adjustment */
body.dark .btn-resume {
  background: linear-gradient(90deg, #22d3ee, #0ea5e9);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

body.dark .btn-resume:hover {
  box-shadow: 0 0 20px #22d3ee, 0 0 40px #0ea5e9;
}

/* Projects */
.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 25px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(270px, 313px));
  justify-content: center;
  gap: 29px;
  margin-top: 40px;
  padding: 0 20px;
  align-items: stretch; /* ensures all cards have equal height */
}

.project-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

/* Make content stretch evenly */
.project-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 15px 18px;
}

/* Headings & text area stay on top */
.project-content h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.project-content p {
  flex-grow: 1;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Tech stack area */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

/* Buttons always aligned at bottom */
.project-buttons {
  display: flex;
  gap: 10px;
  margin-top: auto; /* Pushes buttons to bottom */
  justify-content: flex-start;
  align-items: center;
}

/* Button styling */
.project-buttons a {
  background: var(--accent-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.project-buttons a:hover {
  background: var(--accent-hover);
}

.code-btn:hover { background: #fff; color: #000; }

/* Contact */
.section5 {
  background: var(--section-bg);
  color: var(--text-color);
  /* text-align: center; */
  padding: 100px 60px;
}

.contact-subtitle {
  font-size: 1rem;
  color: #aaa;
  margin-top: -10px;
  margin-bottom: 40px;
}

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

.contact-info-box,
.contact-form-box {
  flex: 1 1 380px;
  background: var(--card-bg);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.contact-info-box h3,
.contact-form-box h3 {
  margin-bottom: 20px;
  font-size: 1.4rem;
  color: var(--accent);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.info-item i {
  font-size: 1.5rem;
  color: var(--accent);
}

.info-item h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #ccc;
}

.info-item p,
.info-item a {
  color: var(--text-color);
  font-weight: 500;
  text-decoration: none;
}

.social-title {
  margin-top: 25px;
  font-size: 1.1rem;
}

.social-links {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}

.social-links a {
  font-size: 1.3rem;
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.1); /* light translucent background */
  padding: 10px;
  border-radius: 50%;
  transition: 0.3s ease;
}

.social-links a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-4px);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f9f9f9;
  color: #333;
  font-size: 0.95rem;
  transition: 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.contact-form .btn {
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s ease;
}

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

.send-btn {
  background: var(--accent);
  color: white;
  border: none;
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.send-btn:hover {
  background: #0056b3;
  transform: scale(1.05);
}


/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer {
  background: var(--card-bg);
  text-align: center;
  padding: 20px 60px;
  color: var(--text-muted);
  font-size: 0.9rem;
  box-shadow: 0 -3px 10px rgba(0,0,0,0.1); /* subtle top shadow */
}

footer span.heart {
  color: red;
  animation: beat 1s infinite;
  font-size: 1.5rem; /* increase the heart size */
  vertical-align: middle; /* aligns with text nicely */
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}



/* contact form submission result */
.form-status {
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  transition: opacity 0.3s ease;
}

.form-status.success {
  color: #2ecc71;
}

.form-status.error {
  color: #e74c3c;
}

/* About Section */
#about {
  background: var(--section-bg);
  color: var(--text-color);
  text-align: left;
  position: relative;
}

.section h2 {
  font-size: 2.2rem;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
  text-align: left;
}

.section h2::after {
  content: "";
  position: absolute;
  width: 60%;
  height: 3px;
  background: var(--accent);
  bottom: -8px;
  left: 0;
  border-radius: 5px;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 1.05rem;
}

.about-content p {
  margin-bottom: 18px;
  animation: fadeSlideUp 1s ease forwards;
  opacity: 0;
}

.about-content p:nth-child(1) { animation-delay: 0.1s; }
.about-content p:nth-child(2) { animation-delay: 0.3s; }
.about-content p:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Override only for content that needs left alignment */
.section h2 {
  font-size: 2.2rem;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
  text-align: left;
}

/* Center content but allow heading to align left properly */
#skills {
  text-align: left; /* override center for this section */
  padding: 100px 78px;
  position: relative;
  overflow: hidden;
}

#skills h2 {
  margin-left: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
  margin-top: 50px;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--section-bg);
  padding: 15px;
  border-radius: 12px;
  font-weight: 500;
  text-align: center;
  border: 2px solid var(--accent);
  transition: 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.skill:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-4px);
}

/* Heading + Hero Image layout */
.skills-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.skills-header h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  position: relative;
}

.skills-header h2::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 3px;
  background: var(--accent);
  bottom: -8px;
  left: 0;
  border-radius: 4px;
}

/* Hero Image */
.skills-hero {
  max-width: 380px;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: 0.4s ease;
}

.skill img {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}

.skill span {
  font-size: 0.95rem;
}

/* Hover effect */
.skill:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-4px);
}

/* Light & Dark Theme */
:root {
  --accent: #2563eb;
  --section-bg: #f8fafc;
  --text: #1e293b;
}

body.dark {
  --accent: #38bdf8;
  --section-bg: #0f172a;
  --text: #e2e8f0;
}

/* Experience Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 35px;
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.exp-item {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  position: relative;
}

.exp-item::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -9px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
}

.exp-content h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--accent);
}

.exp-duration {
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.7;
}

.exp-content p {
  margin: 8px 0 10px;
  line-height: 1.5;
}

.tech-stack span {
  background: var(--section-bg);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 4px 8px;
  margin: 3px;
  border-radius: 6px;
  font-size: 0.85rem;
  display: inline-block;
  transition: 0.3s;
}

.tech-stack span:hover {
  background: var(--accent);
  color: #fff;
}

/* Row containing Stats + Languages */
.github-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  margin-top: 60px;
  width: 100%;
  padding: 0 20px; /* prevent overflow on small screens */
  box-sizing: border-box;
}

/* Row containing Stats + Languages */
.stats-row {
  max-width: 850px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 30px;
  flex-wrap: wrap;
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}

.stat-card {
  flex: 1;
  max-width: 480px;
  border-radius: 16px;
  background: var(--section-bg);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  padding: 10px;
  object-fit: contain;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.small-card {
  width: 100%;
  height: auto;
}

/* Contribution Graph */
.graph-container {
  width: 100%;
  text-align: center;
}

.graph-container h3 {
  margin-bottom: 10px;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
}

.graph-card {
  width: 90%;
  max-width: 850px;
  border-radius: 18px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: block;
}

/* Calendar */
.calendar:hover {
  transform: scale(1.02);
}

.calendar-container {
  text-align: center;
  margin-top: 20px;
  width: 100%;
}

.calendar-container h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
  color: var(--accent);
}

.calendar {
  display: inline-block;
  transition: transform 0.3s ease;
  width: 90%;
  max-width: 850px;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* Style for Demo Video button */
.btn-demo {
  background: #4caf50;        /* green color */
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-demo:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  background: #45a049; /* slightly darker green on hover */
}

/* Style for View Code button */
.btn-code {
  background: #2196f3;        /* blue color */
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-code:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  background: #1976d2; /* slightly darker blue on hover */
}

/* Keep spacing */
.project-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.theme-toggle-li{
  display: none;
}