
/* --- Importing Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* --- Variable Definitions for Theming --- */
:root {
  /* Light Theme Colors */
  --primary-color: #007bff;
  --text-color: #333;
  --bg-color: #f4f7f6;
  --card-bg-color: #ffffff;
  --highlight-color: #007bff;
  --btn-hover-color: #0056b3;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  
  /* Dark Theme Colors */
  --dark-mode-bg: #1a1a1a;
  --dark-mode-text: #e0e0e0;
  --dark-mode-card-bg: #2d2d2d;
  --dark-mode-highlight: #64b5f6;
  --dark-mode-border: #444;
  --dark-mode-shadow: rgba(255, 255, 255, 0.05);
}

/* --- Base & Global Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.4s, color 0.4s;
}

/* Dark Mode Activation */
body.dark-mode {
  color: var(--dark-mode-text);
  background-color: var(--dark-mode-bg);
}

.highlight {
  color: var(--highlight-color);
  transition: color 0.4s;
}

body.dark-mode .highlight {
  color: var(--dark-mode-highlight);
}

.section {
  padding: 80px 5%;
  max-width: 1200px;
  margin: auto;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: background-color 0.4s;
}

body.dark-mode .section-title::after {
  background-color: var(--dark-mode-highlight);
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.secondary-btn {
  background-color: var(--primary-color);
  color: #fff;
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background-color: var(--btn-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px var(--shadow-color);
}

body.dark-mode .secondary-btn {
  background-color: var(--dark-mode-highlight);
  border-color: var(--dark-mode-highlight);
}

body.dark-mode .secondary-btn:hover {
  background-color: #4a8ac7;
  border-color: #4a8ac7;
}

/* --- Header & Navigation --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-color);
  box-shadow: 0 2px 10px var(--shadow-color);
  transition: background-color 0.4s, box-shadow 0.4s;
}

body.dark-mode header {
  background-color: var(--dark-mode-bg);
  box-shadow: 0 2px 10px var(--dark-mode-shadow);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  max-width: 1200px;
  margin: auto;
}

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

body.dark-mode .logo {
  color: var(--dark-mode-highlight);
}

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

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

body.dark-mode .nav-links a {
  color: var(--dark-mode-text);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  left: 0;
  bottom: -5px;
  transition: width 0.3s ease-in-out, background-color 0.4s;
}

body.dark-mode .nav-links a::after {
  background-color: var(--dark-mode-highlight);
}

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

.nav-links a.contact-btn {
  background-color: var(--primary-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  transition: background-color 0.3s, transform 0.2s;
}

.nav-links a.contact-btn:hover {
  background-color: var(--btn-hover-color);
  transform: translateY(-2px);
}

.nav-links a.contact-btn::after {
  content: none;
}

body.dark-mode .nav-links a.contact-btn {
  background-color: var(--dark-mode-highlight);
  color: var(--dark-mode-bg);
}

#theme-toggle,
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-color);
  transition: transform 0.2s, color 0.4s;
}

body.dark-mode #theme-toggle,
body.dark-mode .menu-toggle {
  color: var(--dark-mode-text);
}

#theme-toggle:hover,
.menu-toggle:hover {
  transform: scale(1.1);
}

.menu-toggle {
  display: none;
}

/* --- Hero Section --- */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  min-height: 100vh;
  padding: 20px 5%;
  flex-wrap: wrap-reverse;
  max-width: 1200px;
  margin: auto;
}

.hero-left, .hero-right {
  flex: 1;
  min-width: 300px;
}

.hero-left {
  display: flex;
  justify-content: center;
}

.profile-pic-container {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--primary-color);
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: transform 0.3s ease-in-out, border-color 0.4s, box-shadow 0.4s;
}

body.dark-mode .profile-pic-container {
  border-color: var(--dark-mode-highlight);
  box-shadow: 0 10px 30px var(--dark-mode-shadow);
}

.profile-pic-container:hover {
  transform: scale(1.05);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-right h2 {
  font-size: 3rem;
  font-weight: 700;
}

.hero-right h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-right p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.social-icons {
  display: flex;
  gap: 20px;
  margin-bottom: 2rem;
}

.social-icons img {
  width: 40px;
  height: 40px;
  transition: transform 0.2s, filter 0.2s;
}

.social-icons a:hover img {
  transform: scale(1.1);
}

body.dark-mode .social-icons img {
  filter: invert(1);
}

.cv-btn {
  background-color: var(--primary-color);
  color: #fff;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.2s;
}

.cv-btn:hover {
  background-color: var(--btn-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px var(--shadow-color);
}

body.dark-mode .cv-btn {
  background-color: var(--dark-mode-highlight);
}

body.dark-mode .cv-btn:hover {
  background-color: #4a8ac7;
}

/* --- About Section --- */
.about {
  padding: 80px 5%;
  background-color: var(--card-bg-color);
}

body.dark-mode .about {
  background-color: var(--dark-mode-card-bg);
}

.about-container {
  max-width: 800px;
  margin: auto;
  text-align: center;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.about-text .location {
  font-style: italic;
  font-weight: 300;
  margin-top: -10px;
}

/* General Section Styling */
#skills {
  padding: 80px 5%; /* Adds vertical and horizontal padding */
  background-color: #f4f7f6; /* A light background color */
  font-family: 'Poppins', sans-serif;
  color: #333;
}

/* Heading Styling */
#skills h2 {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
  color: #333;
  position: relative;
}

/* Underline effect for the heading */
#skills h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: #007bff; /* Primary brand color */
  border-radius: 2px;
}

/* List container styling */
#skills ul {
  list-style-type: none;
  max-width: 800px;
  margin: 0 auto; /* Centers the list */
  display: flex;
  flex-direction: column;
  gap: 25px; /* Spacing between list items */
}

/* Individual list item styling */
#skills li {
  background-color: #ffffff; /* White background for each skill category */
  border-left: 5px solid #007bff; /* Primary color highlight bar on the left */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Soft shadow for depth */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-size: 1.1rem;
}

#skills li:hover {
  transform: translateY(-5px); /* Lift effect on hover */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Strong tag (category title) styling */
#skills li strong {
  color: #007bff; /* Highlight color for the category title */
  font-weight: 600;
  margin-right: 10px;
}

/* Dark Mode Support (Optional but recommended) */
body.dark-mode #skills {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

body.dark-mode #skills h2 {
  color: #e0e0e0;
}

body.dark-mode #skills h2::after {
  background-color: #64b5f6;
}

body.dark-mode #skills li {
  background-color: #2d2d2d;
  border-left-color: #64b5f6;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

body.dark-mode #skills li:hover {
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.08);
}

body.dark-mode #skills li strong {
  color: #64b5f6;
}

/* --- Projects Section --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background-color: var(--card-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.4s;
  display: flex;
  flex-direction: column;
}

body.dark-mode .project-card {
  background-color: var(--dark-mode-card-bg);
  box-shadow: 0 4px 15px var(--dark-mode-shadow);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px var(--shadow-color);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.project-card h3 {
  font-size: 1.5rem;
  margin: 20px 20px 10px;
  font-weight: 600;
}

.project-card p {
  margin: 0 20px 20px;
  flex-grow: 1;
}

.project-card .btn {
  margin: 0 20px 20px;
  align-self: flex-start;
  white-space: nowrap;
}

/* --- Contact Section --- */
#contact {
  background-color: var(--bg-color);
  padding: 80px 5%;
}

body.dark-mode #contact {
  background-color: var(--dark-mode-bg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--card-bg-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: background-color 0.4s;
}

body.dark-mode .contact-form {
  background-color: var(--dark-mode-card-bg);
  border: 1px solid var(--dark-mode-border);
}

.contact-intro {
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.4s, color 0.4s;
  background-color: var(--bg-color);
  color: var(--text-color);
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background-color: var(--dark-mode-card-bg);
  border-color: var(--dark-mode-border);
  color: var(--dark-mode-text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form button {
  border: none;
  cursor: pointer;
  width: 100%;
}

#form-message {
  text-align: center;
  margin-top: 20px;
  font-weight: 600;
  font-size: 1.1rem;
}

/* --- Scroll to Top Button --- */
#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  font-size: 1.5rem;
  border: none;
  outline: none;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

#scrollToTopBtn:hover {
  background-color: var(--btn-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px var(--shadow-color);
}

body.dark-mode #scrollToTopBtn {
  background-color: var(--dark-mode-highlight);
}

body.dark-mode #scrollToTopBtn:hover {
  background-color: #4a8ac7;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 20px;
  background-color: var(--card-bg-color);
  border-top: 1px solid var(--border-color);
  transition: background-color 0.4s, border-color 0.4s;
}

body.dark-mode footer {
  background-color: var(--dark-mode-card-bg);
  border-top: 1px solid var(--dark-mode-border);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: 1rem 5%;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 15px;
    padding-top: 15px;
    display: none;
  }
  
  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 100px;
    min-height: auto;
  }

  .hero-left {
    margin-bottom: 2rem;
  }

  .hero-right h2 {
    font-size: 2.5rem;
  }

  .hero-right h3 {
    font-size: 1.5rem;
  }

  .social-icons {
    justify-content: center;
  }

  .section-title {
    font-size: 2rem;
  }

  .project-card .btn {
    margin: 0 auto 20px;
    align-self: center;
  }
}

@media (max-width: 480px) {
  .hero-right h2 {
    font-size: 2rem;
  }
  .hero-right h3 {
    font-size: 1.2rem;
  }
  .profile-pic-container {
    width: 250px;
    height: 250px;
  }
}
