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

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
    background-color: rgb(250, 250, 250);

}

.layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    flex: 1;
    /* Ensure layout takes available space above footer */
}

/* Fixed Left Sidebar */
.profile-container {
    width: 400px;
    background-color: white;
    padding: 20px;
    border: 2px solid #ccc;
    border-radius: 10px;
    margin: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 20px;
    left: 20px;
    max-height: calc(110vh - 40px - 60px);
    /* Account for footer height (40px) + padding/margin (20px) */
    overflow-y: auto;
}

.profile-pic {
    display: block;
    width: 200px;
    height: 200px;
    border: 2px solid #ccc;
    border-radius: 50%;
    padding: 5px;
    background-color: white;
    margin: 0 auto;
}

.upper-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.profile-container h1 {
    text-align: center;
    font-size: 2rem;
    color: #333;
    padding: 10px;
    width: 350px;
}

.profile-container h2 {
    text-align: center;
    font-size: 1rem;
    color: #333;
    padding: 10px;
    border: 2px solid #ccc;
    width: fit-content;
    background-color: rgb(211, 251, 255);
    border-radius: 10px;
    margin-left: 110px;

}

.profile-container h2:hover {
    color: #000;
    background-color: rgb(171, 255, 230);
    cursor: pointer;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 18px;
}

.social-links a {
    text-decoration: none;
}

.lower-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 10px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item img {
    width: 32px;
    height: 32px;
}

.resume-download .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0066ff;
    color: white;
    border: none;
    border-radius: 20px;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.resume-download .button:hover {
    background-color: #3b89ff;
    cursor: pointer;
}

/* Central Scrollable Content */
.main-container {
    flex: 1;
    padding: 40px;
    margin-left: 360px;
    /* Adjusted for fixed sidebar width + margin */
    margin-right: 100px;
    /* Adjusted for fixed nav width */
}

.about {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.about-1st {
    margin-bottom: 20px;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
}

.about-1st h1 {
    font-size: 2rem;
    color: #333;
    padding: 8px;
}

.about-1st h2 {
    font-size: 2rem;
    color: #555;
    padding: 8px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.about-2nd {
    padding: 32px;
    border-radius: 8px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
}

.about-2nd h1 {
    font-size: 2rem;
    color: #353434;
    padding: 8px;
}

.p1,
.p2,
.p3 {
    font-size: 18px;
    line-height: 1.9;
    color: #5b5757;
    padding: 8px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    justify-content: center;
}

.skill-box {
    border: 2px solid grey;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
}

.skill-box:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    color: #007bff;
    cursor: pointer;
}

/* 🔷 Project Grid Container */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 40px auto;
  max-width: 1100px;
  width: 75%;
}

/* 🔷 Individual Project Card */
.project-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-5px);
}

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

.project-card h3 {
  font-size: 1.2rem;
  padding: 16px;
  text-align: center;
}

.project-card:hover h3 {
  color:blue;
  text-decoration: none;
}

/* 🔷 Modal Overlay */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: flex-start;  /* 👈 show from top */
  z-index: 9999;
  overflow-y: auto;
  padding: 60px 20px 40px;  /* 👈 add top padding to make room */
}

/* When active */
.project-modal.active {
  display: flex;
}

/* 📦 Modal Content Box */
.project-content {
  width: 75vw;
  max-width: 850px;
  background-color: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: fadeInUp 0.4s ease;
  overflow: hidden;
  margin-top: 40px; /* 👈 avoid being stuck at the top edge */
}

.project-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 20px 0;
}

.project-content ul {
  padding-left: 20px;
  line-height: 1.7;
}

.project-content h2 {
  margin-top: 24px;
  font-size: 1.5rem;
}

/* 🔷 Close Button */
.close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
}

/* 🔷 Animation */
@keyframes fadeInUp {
  from {
    transform: translateY(60px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 🔷 Responsive */
@media (max-width: 768px) {
  .project-content {
    width: 90vw;
    padding: 20px;
  }

  .project-grid {
    width: 90%;
  }
}

/* Achievements Section */
/* Achievements Section */

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.achievement-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.achievement-card:hover {
  transform: translateY(-5px);
  color: blue;
}

.achievement-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.achievement-card h3 {
  font-size: 1.1rem;
  padding: 16px;
}

/* Let's Connect Section */

.connect-section {
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
}

.connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 40px auto 0;
}

.connect-card {
  background-color: #fff;
  border-radius: 12px;
  text-decoration: none;
  color: #000;
  padding: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.connect-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.connect-card img {
  width: 48px;
  height: 48px;
  margin-bottom: 15px;
}

.connect-card h3 {
  font-size: 1rem;
  margin-top: 0;
  font-weight: 600;
}


/* Fixed Right Sidebar Navigation */
nav {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    padding: 10px;
    border-left: 2px solid #e0e0e0;
    border-radius: 10px 0 0 10px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    background-color: white;
}

.nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-list li a {
    display: inline-block;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-list li a:hover {
    border: 2px solid #007bff;
    background-color: rgba(0, 123, 255, 0.05);
    transform: scale(1.05);
}

.nav-list li a img {
    width: 32px;
    height: 32px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    width: 100%;
    z-index: 1000;
    /* Ensure footer is above other elements */
}

/* Responsive Design */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
        padding: 10px;
    }

    .profile-container {
        position: static;
        width: 100%;
        margin: 10px auto;
        max-height: none;
        padding: 15px;
    }

    .main-container {
        margin-left: 0;
        margin-right: 0;
        padding: 16px;
    }

    .project-card img {
        height: 160px; /* reduce image height */
    }

    .about-1st h1,
    .about-1st h2,
    .about-2nd h1 {
        font-size: 1.5rem;
    }

    .p1,
    .p2,
    .p3 {
        font-size: 16px;
    }

    nav {
        position: static;
        transform: none;
        border-radius: 10px;
        margin: 20px auto;
        width: fit-content;
        box-shadow: none;
        border-left: none;
    }

    .nav-list {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }

    .nav-list li a img {
        width: 28px;
        height: 28px;
    }

    .connect-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 20px;
    }

    .connect-card {
        padding: 16px;
    }

    .connect-card img {
        width: 36px;
        height: 36px;
    }

    .project-content {
        width: 95vw;
        padding: 20px;
        margin-top: 30px;
    }

    .achievement-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }

    .achievement-card img {
        height: 140px;
    }

    .skill-box {
        font-size: 13px;
        padding: 8px 12px;
    }

    .footer {
        font-size: 0.9rem;
        padding: 12px;
    }
}
