/* Reset and Basic Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Define CSS Variables */
:root {
  --primary-color: #2575fc;
  --secondary-color: #0e0e0f; /* Dark grey/black */
  --gradient-bg: linear-gradient(to right, var(--secondary-color) 0%, var(--primary-color) 100%);
  --dark-grey: #333;
  --medium-grey: #555;
  --light-grey: #f0f4f8; /* Subtle cool grey-blue */
  --text-light: #ffffff;
  --text-dark: var(--secondary-color); /* Use secondary color for dark text on light backgrounds */
  --card-bg: #ffffff; /* Keep card background white */
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-dark: rgba(0, 0, 0, 0.2);
  --font-main: 'Poppins', sans-serif;
  --transition-speed: 0.3s;
  --border-radius: 15px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--light-grey);
  color: var(--text-dark); /* Use text-dark variable */
  line-height: 1.6; /* Slightly increased line height for readability */
}

/* Header & Navigation */
header {
  background: var(--secondary-color); /* Use secondary color for dark header */
  color: var(--text-light);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px var(--shadow-light);
}

nav {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: flex-end; /* Align nav items to the right */
  align-items: center;
}

/* .logo { /* Optional logo style - Add if you have a logo * /
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-light);
  text-decoration: none;
  margin-right: auto; /* Push logo to the left if present * /
  padding-left: 10px; /* Add a little padding on the left * /
} */


.nav-links {
  list-style: none;
  display: flex;
  transition: transform var(--transition-speed) ease-in-out;
}

.nav-links li {
  margin: 0 15px;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 400;
  padding: 5px 0;
  position: relative;
  transition: color var(--transition-speed);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width var(--transition-speed) ease-out;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Burger Menu Button */
.burger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.8rem;
  padding: 5px;
}

/* Button Styles */
.btn {
  padding: 10px 25px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, transform var(--transition-speed) ease;
  display: inline-block;
  text-align: center;
}

.btn-nav {
  background: var(--primary-color);
  color: var(--text-light);
  border: 1px solid var(--primary-color);
  margin-left: 15px; /* Add space after links if they exist */
}

.btn-nav:hover {
  background: var(--light-grey);
  border-color: var(--light-grey);
  color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-hero {
  background: var(--text-light);
  color: var(--primary-color);
  font-weight: bold;
  /* --- CHANGE: Reduced padding for the Hero button --- */
  padding: 6px 18px; /* Was 8px 20px */
  /* --- CHANGE: Reduced font size for the Hero button --- */
  font-size: 0.85rem; /* Was 0.9rem */
}

.btn-hero:hover {
  background: var(--light-grey);
  color: var(--secondary-color);
  transform: scale(1.05);
}

/* Hero Section */
#hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 10%;
  background: var(--gradient-bg);
  color: var(--text-light);
  text-align: center;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  max-width: 1100px;
  width: 100%;
  text-align: left;
}

.profile-pic {
  width: 200px;
  height: 250px;
  border-radius: 5%;
  object-fit: cover;
  box-shadow: 0 10px 30px var(--shadow-dark);
}

.hero-content {
  max-width: 600px;
  text-align: left;
}

.hero-content h1 {
  /* --- CHANGE: Reduced font size for Hero heading --- */
  font-size: clamp(1.8rem, 4vw, 2rem); /* Adjusted clamp values */
  margin-bottom: 10px; /* Reduced margin */
  text-shadow: 1px 1px 3px var(--shadow-medium);
}

.hero-content p {
  /* --- CHANGE: Reduced font size for Hero paragraph (typed text) --- */
  font-size: clamp(1rem, 3vw, 1.3rem); /* Adjusted clamp values */
  margin-bottom: 20px; /* Reduced margin */
  color: rgba(255, 255, 255, 0.9);
  min-height: 1.5em;
  text-shadow: 1px 1px 3px var(--shadow-medium);
}


/* General Section Styling */
section {
  /* --- CHANGE: Reduced vertical padding between sections --- */
  padding: 40px 40px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

/* Default section h2 style (used by Skills, Experience, Education, Projects, Contact) */
section:not(#about) h2 { /* Apply this to all sections except #about */
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--secondary-color);
  position: relative;
  padding-bottom: 10px; /* Space for underline */
}

section:not(#about) h2::after { /* Add underline to these sections */
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border-radius: 2px;
}


/* About Section - New Style */
#about h2 {
  /* --- CHANGE: Reduced font size for About Me heading (further reduced) --- */
  font-size: 2rem; /* Was 3rem, now 2.5rem */
  text-align: left;
  margin-bottom: 30px;
  color: var(--secondary-color); /* Ensure color is correct */
  position: static; /* Remove absolute positioning effects */
  padding-bottom: 0;
}

#about h2::after { /* Remove underline from #about h2 */
  content: none;
}


.about-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.about-list li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 20px;
}

.about-list li::before {
  content: '\2022';
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

.section-links-horizontal {
  display: flex;
  flex-wrap: wrap;
  /* --- CHANGE: Center the links horizontally --- */
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  /* --- CHANGE: Reduced margin-bottom to reduce space below links --- */
  margin-bottom: 15px; /* Was 0 */
  padding-top: 20px;
  border-top: 1px solid #ccc;
}

.section-links-horizontal a {
  color: var(--medium-grey); /* Default link color */
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  position: relative;
  transition: color var(--transition-speed), border-bottom var(--transition-speed);
  padding-bottom: 5px; /* Space for active border */
}

/* Styles for hover and active (click/touch) state */
.section-links-horizontal a:hover {
  color: var(--primary-color); /* Blue color on hover */
}

/* Added visual indicator for active link */
.section-links-horizontal a.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}


/* Styles for sections controlled by the About links */
.tab-content {
  display: none; /* Hide these sections by default */
  padding-top: 0; /* Reduce top padding if they follow #about closely */
  margin-top: 0; /* Reduce top margin */
}

.tab-content.active {
  display: block; /* Show the active section */
  /* --- CHANGE: Adjusted padding when active after reducing general section padding --- */
  padding-top: 25px; /* Was 40px, further reduced to match reduced margin below links */
  margin-top: 0;
}

/* Skills Section */
#skills {
  /* Use default section styles */
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
  /* Content within skills grid is already centered by text-align: center on .skill-group */
}

.skill-group {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px var(--shadow-light);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  text-align: center; /* Keep text centered */
}

.skill-group:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px var(--shadow-medium);
}

.skill-group h4 {
  margin-bottom: 10px;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.skill-group p {
  font-size: 1rem;
  color: var(--medium-grey);
}


/* Experience Section */
#experience {
  /* Use default section styles */
}

.experience-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  /* Container is already centered by margin: 0 auto on its children */
}

.experience-item {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 800px;
  margin: 0 auto; /* Keep items centered */
  box-shadow: 0 5px 15px var(--shadow-light);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  border-left: 5px solid var(--primary-color);
  text-align: left; /* Keep text left-aligned for readability */
}

.experience-item:hover {
  transform: translateX(5px);
  box-shadow: 8px 8px 20px var(--shadow-medium);
}

.experience-item h3 {
  margin-bottom: 5px;
  color: var(--primary-color);
  font-size: 1.3rem;
}
.experience-item p {
  color: var(--dark-grey);
  font-size: 1rem;
  margin-bottom: 10px;
}
.experience-item p strong {
  color: var(--dark-grey);
}
.experience-item p i {
  color: var(--medium-grey);
  font-style: normal;
  font-size: 0.9rem;
}

.experience-item ul {
  margin-top: 15px;
  margin-left: 20px;
  color: var(--medium-grey);
  list-style: disc;
}

.experience-item ul li {
  margin-bottom: 8px;
}

/* Education Section */
#education {
  /* Use default section styles */
}


.education-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 30px;
  /* Container is already centered by align-items: center */
}

.education-item {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--border-radius);
  width: 80%;
  max-width: 700px;
  box-shadow: 0 5px 15px var(--shadow-light);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  border-left: 5px solid var(--primary-color);
  text-align: left; /* Keep text left-aligned for readability */
}

.education-item:hover {
  transform: translateX(5px);
  box-shadow: 8px 8px 20px var(--shadow-medium);
}

.education-item h3 {
  margin-bottom: 5px;
  color: var(--dark-grey);
}
.education-item p {
  color: var(--medium-grey);
  font-size: 0.95rem;
}
.education-item p strong {
  color: var(--dark-grey);
}
.education-item p i {
  color: var(--primary-color);
}


/* Projects Section */
#projects {
  /* Use default section styles */
}

.project-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.project-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px var(--shadow-light);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px var(--shadow-medium);
}

.project-card h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.project-card p {
  color: var(--medium-grey);
  flex-grow: 1;
  margin-bottom: 15px;
}

.project-card a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
}

.project-card a:hover {
  text-decoration: underline;
}


/* Contact Section */
#contact {
  /* Use default section styles */
  text-align: center; /* Center the main heading */
}

#contact h2 {
   /* Use default section h2 style */
}
#contact h2::after {
   /* Use default section h2 underline style */
}


.contact-content-wrapper {
  display: flex; /* Use flexbox */
  flex-direction: column; /* Stack children vertically */
  align-items: center; /* Center items horizontally */
  gap: 40px; /* Space between items */
  margin-top: 40px;
  max-width: 800px; /* Limit max width for the content */
  margin-left: auto; /* Center the wrapper */
  margin-right: auto; /* Center the wrapper */
  text-align: left; /* Keep content inside left-aligned */
}

.contact-left,
.contact-right {
 width: 100%; /* Allow children to take full width of the wrapper */
 max-width: 500px; /* Optional: Add max-width to individual sections */
}

/* --- CHANGE: Style for horizontal contact info --- */
.contact-info {
  margin-bottom: 20px; /* Add some space below the info */
  display: flex; /* Use flexbox */
  flex-direction: column; /* Stack items vertically by default */
  gap: 10px; /* Space between info items */
  align-items: flex-start; /* Align items to the start */
}

.contact-info p {
  font-size: 1.2rem;
  margin-bottom: 0; /* Remove individual margin */
  color: var(--medium-grey);
  text-align: left;
  display: flex; /* Use flex for icon and text */
  align-items: center; /* Vertically align icon and text */
}

.contact-info p i {
  color: var(--primary-color);
  margin-right: 10px;
  width: 20px;
  text-align: center;
}
.contact-info a {
  color: var(--medium-grey);
  text-decoration: none;
  transition: color var(--transition-speed);
}
.contact-info a:hover {
  color: var(--primary-color);
}

.find-me-heading {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--dark-grey);
  text-align: left;
  margin-top: 0; /* Adjusted margin top */
}

/* --- CHANGE: Style for horizontal social links --- */
.social-links {
  display: flex; /* Use flexbox */
  justify-content: flex-start; /* Align items to the start */
  gap: 25px; /* Space between icons */
  margin-top: 0; /* Adjusted margin top */
}

.social-icon {
  font-size: 2rem;
  color: var(--dark-grey);
  transition: transform var(--transition-speed) ease, color var(--transition-speed) ease;
}

.social-links a:hover .social-icon {
  transform: scale(1.2) translateY(-3px);
  color: var(--primary-color);
}


.contact-form-container {
  width: 100%;
  margin: 0;
  background: var(--card-bg);
  padding: 20px 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px var(--shadow-light);
  text-align: left;
}

.form-group {
  margin-bottom: 15px;
  display: flex; /* Use flexbox to help with centering input */
  justify-content: center; /* Center the input within the form group */
}

.contact-form-container input[type="text"],
.contact-form-container input[type="email"],
.contact-form-container textarea {
  width: 100%; /* Takes full width of its flex container */
  max-width: 450px; /* Keep a max-width for larger screens */
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color var(--transition-speed) ease;
  box-shadow: none;
}

.contact-form-container input[type="text"]:focus,
.contact-form-container input[type="email"]:focus,
.contact-form-container textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(37, 117, 252, 0.3);
  outline: none;
}

.contact-form-container textarea {
  min-height: 80px;
  resize: vertical;
}

/* Reduced size for Send Message button */
.contact-form-container .btn-primary {
  display: block;
  width: 100%;
  max-width: 200px; /* Make the button narrower */
  margin-left: auto; /* Center the button */
  margin-right: auto; /* Center the button */
  background: var(--primary-color);
  color: var(--text-light);
  padding: 10px 20px; /* Reduced padding */
  margin-top: 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem; /* Adjusted font size */
  font-weight: bold;
  transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.contact-form-container .btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

#contact #form-status {
  text-align: center;
}


/* Footer */
footer {
  background: var(--secondary-color);
  color: var(--text-light);
  text-align: center;
  padding: 25px 0;
  /* --- CHANGE: Reduced margin top for footer --- */
  margin-top: 30px; /* Was 40px */
}

footer p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
      width: 95%;
      position: relative;
      justify-content: space-between;
  }

  .logo {
      padding-left: 5px;
  }

  .nav-links {
      position: absolute;
      top: 100%;
      left: 0;
      background: var(--secondary-color);
      width: 100%;
      flex-direction: column;
      align-items: center;
      padding: 15px 0;
      transform: translateY(-150%);
      transition: transform var(--transition-speed) ease-in-out;
      box-shadow: 0 5px 10px var(--shadow-medium);
      z-index: 999;
  }

  .nav-links.active {
      transform: translateY(0);
  }

  .nav-links li {
      margin: 10px 0;
      width: 100%;
      text-align: center;
  }

  .nav-links a {
      display: block;
      padding: 10px;
  }
  .nav-links a:hover::after {
      width: 0;
  }
  .nav-links a:hover {
      background-color: var(--dark-grey);
      color: var(--text-light);
  }

  .burger {
      display: block;
  }

  .btn-nav {
      order: -1;
      margin-right: auto;
      margin-left: 10px;
  }


  #hero {
      padding: 40px 5%;
      min-height: 70vh;
  }

  .hero-container {
      flex-direction: column;
      gap: 30px;
      text-align: center;
  }

  .profile-pic {
      width: 180px;
      height: 180px;
      border-radius: 50%;
  }

  .hero-content {
      text-align: center;
  }

  section {
      /* --- CHANGE: Reduced vertical padding for sections on mobile --- */
      padding: 30px 10px; /* Was 40px 10px */
  }

  /* Default section h2 style for mobile */
  section:not(#about) h2 {
      text-align: center;
      font-size: 2rem;
      margin-bottom: 30px;
      padding-bottom: 10px;
  }
  section:not(#about) h2::after {
      content: '';
      position: absolute;
      width: 60px; /* Slightly smaller underline */
      height: 3px;
      background: var(--primary-color);
      left: 50%;
      bottom: 0;
      transform: translateX(-50%);
      border-radius: 2px;
  }


  /* Mobile About Section */
  #about h2 {
      /* --- CHANGE: Reduced font size for About Me heading on mobile (further reduced) --- */
      font-size: 2rem; /* Was 2.5rem, now 2rem */
      margin-bottom: 20px;
      text-align: center; /* Center about heading on mobile */
  }

  .about-list {
      font-size: 1rem;
      margin-bottom: 20px;
  }
  .about-list li {
      padding-left: 15px;
  }
  .about-list li::before {
      left: -5px;
  }


  .section-links-horizontal {
      gap: 20px;
      flex-direction: column;
      align-items: center; /* Center links on mobile */
      padding-top: 15px;
      margin-top: 15px;
      border-top: 1px solid #ccc; /* Keep the border */
      /* --- CHANGE: Center the links horizontally on mobile (already was centered) --- */
      justify-content: center;
      /* --- CHANGE: Reduced margin-bottom to reduce space below links on mobile --- */
      margin-bottom: 15px; /* Was 0 */
  }

  .section-links-horizontal a {
      font-size: 1.1rem;
      padding-bottom: 3px;
  }
   .section-links-horizontal a.active {
     border-bottom: 2px solid var(--primary-color); /* Keep border for active link */
   }

   /* Tab content spacing on mobile */
  .tab-content.active {
      /* --- CHANGE: Adjusted padding when active on mobile --- */
      padding-top: 20px; /* Was 30px, further reduced */
      margin-top: 0;
  }


  /* Skills Section Mobile */
  #skills h2 {
       /* Inherits default mobile section h2 style */
  }
  #skills h2::after {
      /* Inherits default mobile section h2 underline style */
  }

  .skills-grid {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjust min width for smaller screens */
      gap: 20px;
      margin-top: 20px;
  }

  .skill-group {
      padding: 20px;
  }
  .skill-group h4 {
      font-size: 1.1rem;
  }
  .skill-group p {
      font-size: 0.9rem;
  }

  /* Experience Section Mobile */
  #experience h2 {
       /* Inherits default mobile section h2 style */
  }
   #experience h2::after {
      /* Inherits default mobile section h2 underline style */
   }

  .experience-item {
      padding: 20px;
  }
  .experience-item h3 {
      font-size: 1.2rem;
  }
  .experience-item p {
      font-size: 0.95rem;
  }
  .experience-item ul {
      margin-left: 15px;
      font-size: 0.9rem;
  }
   .experience-item ul li {
      margin-bottom: 5px;
   }

   /* Education Section Mobile */
  #education h2 {
       /* Inherits default mobile section h2 style */
  }
   #education h2::after {
      /* Inherits default mobile section h2 underline style */
   }
  .education-item {
      padding: 20px;
      width: 90%; /* Adjust width for mobile */
  }
  .education-item h3 {
       font-size: 1.1rem;
  }
  .education-item p {
      font-size: 0.9rem;
  }


  /* Projects Section Mobile */
  #projects h2 {
       /* Inherits default mobile section h2 style */
  }
   #projects h2::after {
      /* Inherits default section h2 underline style */
   }

   .project-container {
      grid-template-columns: 1fr; /* Stack projects in a single column */
      gap: 20px;
      margin-top: 20px;
  }

  .project-card {
      padding: 20px;
  }
  .project-card h3 {
      font-size: 1.2rem;
      margin-bottom: 10px;
  }
  .project-card p {
      font-size: 0.95rem;
      margin-bottom: 10px;
  }
  .project-card a {
      font-size: 0.95rem;
  }

/* --- CHANGE: Mobile styles for horizontal contact info and social links --- */
@media (max-width: 768px) {
  /* ... (previous mobile styles) ... */

  .contact-info {
      flex-direction: column; /* Keep vertical on smaller mobile */
      align-items: center; /* Center items vertically on smaller mobile */
      gap: 10px;
      margin-bottom: 20px;
  }

  .contact-info p {
      justify-content: center; /* Center text and icon horizontally */
      text-align: center; /* Ensure text is centered */
  }


  .social-links {
      justify-content: center; /* Center icons horizontally on mobile */
      gap: 20px;
  }

  /* ... (rest of mobile styles) ... */
}


/* Contact Section */
#contact {
  /* Use default section styles */
  text-align: center; /* Center the main heading */
}

#contact h2 {
   /* Use default section h2 style */
}
#contact h2::after {
   /* Use default section h2 underline style */
}


.contact-content-wrapper {
  display: flex; /* Use flexbox */
  flex-direction: column; /* Stack children vertically */
  align-items: center; /* Center items horizontally */
  gap: 40px; /* Space between items */
  margin-top: 40px;
  max-width: 800px; /* Limit max width for the content */
  margin-left: auto; /* Center the wrapper */
  margin-right: auto; /* Center the wrapper */
  text-align: left; /* Keep content inside left-aligned */
}

.contact-left,
.contact-right {
 width: 100%; /* Allow children to take full width of the wrapper */
 max-width: 500px; /* Optional: Add max-width to individual sections */
}

/* --- CHANGE: Style for horizontal contact info --- */
.contact-info {
  margin-bottom: 20px; /* Add some space below the info */
  display: flex; /* Use flexbox */
  flex-direction: row; /* Arrange items horizontally */
  gap: 20px; /* Space between info items */
  align-items: center; /* Vertically align items */
  justify-content: center; /* Center the info horizontally */
}

.contact-info p {
  font-size: 1.2rem;
  margin-bottom: 0; /* Remove individual margin */
  color: var(--medium-grey);
  text-align: left;
  display: flex; /* Use flex for icon and text */
  align-items: center; /* Vertically align icon and text */
}

.contact-info p i {
  color: var(--primary-color);
  margin-right: 10px;
  width: 20px;
  text-align: center;
}
.contact-info a {
  color: var(--medium-grey);
  text-decoration: none;
  transition: color var(--transition-speed);
}
.contact-info a:hover {
  color: var(--primary-color);
}

.find-me-heading {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--dark-grey);
  text-align: left;
  margin-top: 0; /* Adjusted margin top */
}

/* --- CHANGE: Style for horizontal social links --- */
.social-links {
  display: flex; /* Use flexbox */
  justify-content: center; /* Center items horizontally */
  gap: 25px; /* Space between icons */
  margin-top: 0; /* Adjusted margin top */
}

.social-icon {
  font-size: 2rem;
  color: var(--dark-grey);
  transition: transform var(--transition-speed) ease, color var(--transition-speed) ease;
}

.social-links a:hover .social-icon {
  transform: scale(1.2) translateY(-3px);
  color: var(--primary-color);
}


.contact-form-container {
  width: 100%;
  margin: 0;
  background: var(--card-bg);
  padding: 20px 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px var(--shadow-light);
  text-align: left;
}

.form-group {
  margin-bottom: 15px;
  display: flex; /* Use flexbox to help with centering input */
  justify-content: center; /* Center the input within the form group */
}

.contact-form-container input[type="text"],
.contact-form-container input[type="email"],
.contact-form-container textarea {
  width: 100%; /* Takes full width of its flex container */
  max-width: 450px; /* Keep a max-width for larger screens */
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color var(--transition-speed) ease;
  box-shadow: none;
}

.contact-form-container input[type="text"]:focus,
.contact-form-container input[type="email"]:focus,
.contact-form-container textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(37, 117, 252, 0.3);
  outline: none;
}

.contact-form-container textarea {
  min-height: 80px;
  resize: vertical;
}

/* Reduced size for Send Message button */
.contact-form-container .btn-primary {
  display: block;
  width: 100%;
  max-width: 200px; /* Make the button narrower */
  margin-left: auto; /* Center the button */
  margin-right: auto; /* Center the button */
  background: var(--primary-color);
  color: var(--text-light);
  padding: 10px 20px; /* Reduced padding */
  margin-top: 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem; /* Adjusted font size */
  font-weight: bold;
  transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.contact-form-container .btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

#contact #form-status {
  text-align: center;
}


/* Footer */
footer {
  background: var(--secondary-color);
  color: var(--text-light);
  text-align: center;
  padding: 25px 0;
  /* --- CHANGE: Reduced margin top for footer --- */
  margin-top: 30px; /* Was 40px */
}

footer p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
      width: 95%;
      position: relative;
      justify-content: space-between;
  }

  .logo {
      padding-left: 5px;
  }

  .nav-links {
      position: absolute;
      top: 100%;
      left: 0;
      background: var(--secondary-color);
      width: 100%;
      flex-direction: column;
      align-items: center;
      padding: 15px 0;
      transform: translateY(-150%);
      transition: transform var(--transition-speed) ease-in-out;
      box-shadow: 0 5px 10px var(--shadow-medium);
      z-index: 999;
  }

  .nav-links.active {
      transform: translateY(0);
  }

  .nav-links li {
      margin: 10px 0;
      width: 100%;
      text-align: center;
  }

  .nav-links a {
      display: block;
      padding: 10px;
  }
  .nav-links a:hover::after {
      width: 0;
  }
  .nav-links a:hover {
      background-color: var(--dark-grey);
      color: var(--text-light);
  }

  .burger {
      display: block;
  }

  .btn-nav {
      order: -1;
      margin-right: auto;
      margin-left: 10px;
  }


  #hero {
      padding: 40px 5%;
      min-height: 70vh;
  }

  .hero-container {
      flex-direction: column;
      gap: 30px;
      text-align: center;
  }

  .profile-pic {
      width: 180px;
      height: 180px;
      border-radius: 50%;
  }

  .hero-content {
      text-align: center;
  }

  section {
      /* --- CHANGE: Reduced vertical padding for sections on mobile --- */
      padding: 30px 10px; /* Was 40px 10px */
  }

  /* Default section h2 style for mobile */
  section:not(#about) h2 {
      text-align: center;
      font-size: 2rem;
      margin-bottom: 30px;
      padding-bottom: 10px;
  }
  section:not(#about) h2::after {
      content: '';
      position: absolute;
      width: 60px; /* Slightly smaller underline */
      height: 3px;
      background: var(--primary-color);
      left: 50%;
      bottom: 0;
      transform: translateX(-50%);
      border-radius: 2px;
  }


  /* Mobile About Section */
  #about h2 {
      /* --- CHANGE: Reduced font size for About Me heading on mobile (further reduced) --- */
      font-size: 2rem; /* Was 2.5rem, now 2rem */
      margin-bottom: 20px;
      text-align: center; /* Center about heading on mobile */
  }

  .about-list {
      font-size: 1rem;
      margin-bottom: 20px;
  }
  .about-list li {
      padding-left: 15px;
  }
  .about-list li::before {
      left: -5px;
  }


  .section-links-horizontal {
      gap: 20px;
      flex-direction: column;
      align-items: center; /* Center links on mobile */
      padding-top: 15px;
      margin-top: 15px;
      border-top: 1px solid #ccc; /* Keep the border */
      /* --- CHANGE: Center the links horizontally on mobile (already was centered) --- */
      justify-content: center;
      /* --- CHANGE: Reduced margin-bottom to reduce space below links on mobile --- */
      margin-bottom: 15px; /* Was 0 */
  }

  .section-links-horizontal a {
      font-size: 1.1rem;
      padding-bottom: 3px;
  }
   .section-links-horizontal a.active {
     border-bottom: 2px solid var(--primary-color); /* Keep border for active link */
   }

   /* Tab content spacing on mobile */
  .tab-content.active {
      /* --- CHANGE: Adjusted padding when active on mobile --- */
      padding-top: 20px; /* Was 30px, further reduced */
      margin-top: 0;
  }


  /* Skills Section Mobile */
  #skills h2 {
       /* Inherits default mobile section h2 style */
  }
  #skills h2::after {
      /* Inherits default mobile section h2 underline style */
  }

  .skills-grid {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjust min width for smaller screens */
      gap: 20px;
      margin-top: 20px;
  }

  .skill-group {
      padding: 20px;
  }
  .skill-group h4 {
      font-size: 1.1rem;
  }
  .skill-group p {
      font-size: 0.9rem;
  }

  /* Experience Section Mobile */
  #experience h2 {
       /* Inherits default mobile section h2 style */
  }
   #experience h2::after {
      /* Inherits default mobile section h2 underline style */
   }

  .experience-item {
      padding: 20px;
  }
  .experience-item h3 {
      font-size: 1.2rem;
  }
  .experience-item p {
      font-size: 0.95rem;
  }
  .experience-item ul {
      margin-left: 15px;
      font-size: 0.9rem;
  }
   .experience-item ul li {
      margin-bottom: 5px;
   }

   /* Education Section Mobile */
  #education h2 {
       /* Inherits default mobile section h2 style */
  }
   #education h2::after {
      /* Inherits default mobile section h2 underline style */
   }
  .education-item {
      padding: 20px;
      width: 90%; /* Adjust width for mobile */
  }
  .education-item h3 {
       font-size: 1.1rem;
  }
  .education-item p {
      font-size: 0.9rem;
  }


  /* Projects Section Mobile */
  #projects h2 {
       /* Inherits default mobile section h2 style */
  }
   #projects h2::after {
      /* Inherits default section h2 underline style */
   }

   .project-container {
      grid-template-columns: 1fr; /* Stack projects in a single column */
      gap: 20px;
      margin-top: 20px;
  }

  .project-card {
      padding: 20px;
  }
  .project-card h3 {
      font-size: 1.2rem;
      margin-bottom: 10px;
  }
  .project-card p {
      font-size: 0.95rem;
      margin-bottom: 10px;
  }
  .project-card a {
      font-size: 0.95rem;
  }

  /* --- CHANGE: Mobile styles for horizontal contact info and social links --- */
  @media (max-width: 768px) {
      /* ... (previous mobile styles) ... */

      .contact-info {
          flex-direction: column; /* Keep vertical on smaller mobile */
          align-items: center; /* Center items vertically on smaller mobile */
          gap: 10px;
          margin-bottom: 20px;
      }

      .contact-info p {
          justify-content: center; /* Center text and icon horizontally */
          text-align: center; /* Ensure text is centered */
      }


      .social-links {
          justify-content: center; /* Center icons horizontally on mobile */
          gap: 20px;
      }

      /* ... (rest of mobile styles) ... */
  }


/* Optional: Further adjustments for very small screens */
@media (max-width: 480px) {
  #hero {
      padding: 30px 3%;
  }

  .hero-container {
      gap: 20px;
  }

   .profile-pic {
      width: 150px;
      height: 150px;
       border-radius: 50%; /* Keep round on smaller screens */
  }
   .hero-content h1 {
      font-size: clamp(1.6rem, 5.5vw, 2.2rem); /* Further adjusted clamp values */
      margin-bottom: 8px; /* Further reduced margin */
  }
  .hero-content p {
      font-size: clamp(0.9rem, 4.5vw, 1.1rem); /* Further adjusted clamp values */
      margin-bottom: 15px; /* Further reduced margin */
  }


  section {
      /* --- CHANGE: Further reduced vertical padding for sections on smaller mobile --- */
      padding: 25px 10px; /* Was 30px 10px */
  }

  section:not(#about) h2 {
       font-size: 1.8rem;
       margin-bottom: 25px;
       padding-bottom: 8px;
  }
   section:not(#about) h2::after {
      width: 60px;
      height: 3px;
  }

  #about h2 {
      /* --- CHANGE: Further reduced font size for About Me heading on smaller mobile --- */
      font-size: 1.8rem; /* Was 2rem, now 1.8rem */
       margin-bottom: 15px;
  }
  .about-list {
      font-size: 0.9rem;
       margin-bottom: 15px;
  }
  .about-list li {
       margin-bottom: 8px;
  }

  .section-links-horizontal {
      gap: 15px;
       padding-top: 10px;
       margin-top: 10px;
       border-top: 1px solid #ccc; /* Keep the border */
       /* --- CHANGE: Center the links horizontally on smaller mobile (already was centered) --- */
       justify-content: center;
       /* --- CHANGE: Reduced margin-bottom to reduce space below links on smaller mobile --- */
       margin-bottom: 10px; /* Was 0 */
  }
   .section-links-horizontal a {
      font-size: 1rem;
  }

   /* Tab content spacing on smaller mobile */
   .tab-content.active {
       /* --- CHANGE: Adjusted padding when active on smaller mobile --- */
       padding-top: 20px; /* Was 25px, further reduced */
   }

   /* Contact Section adjustments */
   .contact-info {
      flex-direction: column; /* Keep vertical on very small mobile */
      align-items: center; /* Center items vertically on very small mobile */
      gap: 8px; /* Slightly less gap */
      margin-bottom: 15px; /* Slightly less margin */
   }
   .contact-info p {
       font-size: 0.9rem; /* Further reduced font size */
       justify-content: center; /* Center text and icon horizontally */
       text-align: center; /* Ensure text is centered */
   }
   .contact-info p i {
       margin-right: 5px; /* Adjust icon spacing */
       width: 18px; /* Slightly smaller icon area */
   }

  .find-me-heading {
      font-size: 1.2rem;
      margin-bottom: 10px;
  }
   .social-links {
      justify-content: center; /* Center social icons on mobile */
      gap: 20px;
  }

   .social-icon {
      font-size: 1.5rem;
  }

   .contact-form-container {
      padding: 15px;
  }
   .contact-form-container input[type="text"],
  .contact-form-container input[type="email"],
  .contact-form-container textarea {
      padding: 8px;
      font-size: 0.9rem;
  }

  .contact-form-container textarea {
      min-height: 50px;
  }

   /* Adjust Send Message button size on smaller mobile */
  .contact-form-container .btn-primary {
      padding: 8px 12px; /* Further adjusted padding */
      font-size: 0.9rem; /* Further adjusted font size */
       max-width: 160px; /* Further narrower */
  }


  footer {
      padding: 20px 0;
      /* --- CHANGE: Further reduced margin top for footer on smaller mobile --- */
      margin-top: 25px; /* Was 30px */
  }
  footer p {
      font-size: 0.8rem;
  }

}
