* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Outfit", sans-serif;
}

:root {
  --primary-color: #a900e8;
  --accent-color: #b300cd;
  --text-dark: #1e1e1e;
  --text-light: #555;
  --bg-color: #f9f9f9;
}

.navbar {
  background-color: white;
  color: var(--primary-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.logo {
  width: 150px;
  height: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 3rem;
}

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

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

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  transition: 0.3s;
}

/* Resume Button */
.resume-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  margin: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
}

.resume-btn:hover {
  background-color: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.hero {
  padding: 100px 20px;
  background-color: white;
}

.hero-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  gap: 60px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .hero-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.hero-text {
  flex: 1;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-text {
    text-align: left;
  }
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.hero-text h1 span {
  color: var(--accent-color);
}

.hero-text h2 {
  font-size: 1.8rem;
  margin: 12px 0 20px;
  font-weight: 600;
  color: var(--text-dark);
}

.hero-text p {
  font-size: 1.1rem;
  max-width: 500px;
  color: var(--text-light);
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-right: 15px;
  transition: background-color 0.3s ease;
}

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

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

.secondary-btn:hover {
  background-color: var(--primary-color);
}

.hero-image {
  flex: 1;
  text-align: center;
}

.hero-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
}

/* About-Section */
.about-section {
  max-width: 800px;
  margin: 80px auto;
  background-color: #fff;
  padding: 40px;
  text-align: justify;
}

.about-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
  font-weight: 700;
}

.about-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.download-btn {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.download-btn:hover {
  background-color: var(--accent-color);
}

/* Projects Section - Light Background */
#projects {
  background-color: var(--bg-color);
  padding: 60px 0;
  min-height: 100vh;
}

/* FIXED Portfolio Header Styles - Reduced gap */
.portfolio-header {
  text-align: center;
  margin-bottom: 20px; /* REDUCED from 50px to 20px */
  padding: 40px 20px 20px 20px; /* REDUCED bottom padding from 40px to 20px */
}

.portfolio-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 30px; /* REDUCED from 40px to 30px */
  text-transform: uppercase;
}

/* Project Filter Styles */
.project-filter {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 20px; /* REDUCED from 30px to 20px */
}

.filter-btn {
  background-color: #fff;
  color: var(--text-dark);
  border: 2px solid #ddd;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0;
  font-family: "Outfit", sans-serif;
}

.filter-btn:first-child {
  border-radius: 25px 0 0 25px;
}

.filter-btn:last-child {
  border-radius: 0 25px 25px 0;
}

.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.filter-btn:hover {
  background-color: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.filter-btn.active:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* FIXED Masonry Layout - Reduced gaps and better spacing */
.masonry-gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px; /* REDUCED top padding from 40px to 10px */
  column-count: 3;
  column-gap: 15px;
  column-fill: balance;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: inline-block;
  width: 100%;
}

.masonry-item.hidden {
  opacity: 0;
  transform: scale(0.8);
}

/* Project Card Styling */
.project-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0;
}

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

.image-wrapper {
  width: 100%;
  height: auto;
  overflow: hidden;
  margin: 0;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-title {
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  margin: 0;
  line-height: 1.3;
}

/* Contact Section */
.contact-section {
  background-color: #f5f5f5;
  padding: 60px 20px;
  text-align: center;
}

.contact-section h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 700;
}

.contact-section p {
  color: var(--text-light);
  margin-bottom: 30px;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: none;
  font-family: "Outfit", sans-serif;
}

.contact-form button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 0;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: var(--accent-color);
}

/* Footer Section */
.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 40px 20px 20px;
  font-family: "Outfit", sans-serif;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links,
.footer-socials {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.footer-links a,
.footer-socials a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-socials a i {
  font-size: 22px;
}

.footer-bottom {
  text-align: center;
  font-size: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 15px;
}

/* Container css */
.container {
  width: 100%;
  padding-right: var(--bs-gutter-x, 0.75rem);
  padding-left: var(--bs-gutter-x, 0.75rem);
  margin-right: auto;
  margin-left: auto;
}

/* Updated Lightbox Styles - 50-50 Layout */
#lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  background: #ffffff;
  border-radius: 20px;
  max-width: 90vw;
  width: 90vw;
  height: 85vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

/* Left side - Image Container (50%) */
.lightbox-image-container {
  flex: 1;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  background: white;
}

.carousel-images {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.carousel-images img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 15px;
  background: rgb(245, 245, 245);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--primary-color);
  border: none;
  font-size: 24px;
  padding: 15px 20px;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.carousel-btn.prev {
  left: 20px;
}

.carousel-btn.next {
  right: 20px;
}

/* Right side - Project Details (50%) */
.lightbox-details {
  flex: 1;
  background: #ffffff;
  padding: 40px;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  border-left: 2px solid #e9ecef;
}

.lightbox-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--primary-color);
  line-height: 1.3;
}

.info-section {
  margin-bottom: 20px;
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.info-value {
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.6;
  font-weight: 500;
}

.project-url {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  display: inline-block;
  transition: all 0.3s ease;
}

.project-url:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.close-btn:hover {
  background: var(--accent-color);
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

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

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    padding: 1rem 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    padding: 0.5rem 2rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .resume-btn {
    display: none;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .about-section {
    padding: 20px;
    margin: 40px 20px;
  }

  .about-section h2 {
    font-size: 2rem;
  }

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

  .contact-section h2 {
    font-size: 2rem;
  }

  /* Mobile Masonry - Reduced gaps */
  .masonry-gallery {
    column-count: 2;
    column-gap: 10px;
    padding: 5px 15px; /* REDUCED padding for mobile */
  }

  .masonry-item {
    margin-bottom: 10px;
  }

  .project-title {
    padding: 12px 15px;
    font-size: 15px;
  }

  .project-filter {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px; /* REDUCED margin for mobile */
  }

  .filter-btn {
    border-radius: 25px !important;
    min-width: 200px;
  }

  /* Mobile Lightbox */
  .lightbox-content {
    flex-direction: column;
    width: 95vw;
    height: 95vh;
    max-width: none;
  }

  .lightbox-image-container {
    flex: 1.5;
    padding: 20px;
  }

  .lightbox-details {
    flex: 1;
    padding: 20px;
    border-left: none;
    border-top: 2px solid #e9ecef;
  }

  .lightbox-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .carousel-btn {
    font-size: 18px;
    padding: 12px 15px;
    width: 50px;
    height: 50px;
  }

  .carousel-btn.prev {
    left: 15px;
  }

  .carousel-btn.next {
    right: 15px;
  }

  .close-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  /* Single column on very small screens */
  .masonry-gallery {
    column-count: 1;
    column-gap: 0;
    padding: 5px 10px; /* REDUCED padding for small mobile */
  }

  .masonry-item {
    margin-bottom: 15px;
  }

  .portfolio-title {
    font-size: 1.8rem;
  }

  .contact-section h2 {
    font-size: 1.8rem;
  }

  .about-section h2 {
    font-size: 1.8rem;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 12px;
    min-width: 180px;
  }

  .lightbox-image-container {
    padding: 15px;
  }

  .lightbox-details {
    padding: 15px;
  }
}

/* Responsive breakpoints */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Additional improvements for better spacing */
@media (min-width: 1200px) {
  .masonry-gallery {
    max-width: 1300px;
    column-gap: 18px;
  }
}

/* Ensure consistent spacing across all screen sizes */
.masonry-item:last-child {
  margin-bottom: 0;
}
