/* GENERAL */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
}

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

html {
  scroll-behavior: smooth;
}

p {
  color: rgb(85, 85, 85);
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */

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

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: black;
  text-decoration: none;
  text-decoration-color: white;
}

a:hover {
  color: grey;
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: rgb(181, 181, 181);
}

.logo {
  font-size: 2rem;
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: black;
  transition: all 0.3 ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3 ease-in-out;
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: black;
  text-decoration: none;
  transition: all 0.3 ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
  transform: none;
}

.hamburger-icon span:first-child {
  opacity: 1;
}

.hamburger-icon span:first-child {
  transform: none;
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: auto;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
  position: relative;

}

.section-container {
  display: flex;
}

/* PROFILE SECTION */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  width: 100%; /* Adjusts to screen width */
  max-width: 400px; /* Ensures it doesn't get too large */
  height: auto; /* Adjust height automatically */
  aspect-ratio: 1 / 1; /* Ensures a perfect square before rounding */
  margin: auto;
  border-radius: 50%; /* Makes it circular */
  overflow: hidden; /* Keeps image within the circle */
  display: flex;
  align-items: center;
  justify-content: center;
}

.section__pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Prevents stretching */
}


.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.title {
  font-size: 3rem;
  text-align: center;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem; /* Space between GitHub and Details buttons */
  margin-top: auto; /* Pushes the button group to the bottom of the card */
  padding-top: 1rem; /* Adds a little space between the title and buttons */
}
.project-btn {
  width: auto; /* Allows buttons to size based on text */
  min-width: 100px;
  padding: 0.8rem;
  font-size: 0.9rem;
}
.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
}

.btn-color-1,
.btn-color-2 {
  border: rgb(53, 53, 53) 0.1rem solid;
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: rgb(53, 53, 53);
  color: white;
}

.btn-color-1:hover {
  background: rgb(0, 0, 0);
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: rgb(255, 255, 255) 0.1rem solid;
}

.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
    position: relative;
  }
  

  /* Reduce Gap Between Title and Box */
  #about h1 {
    margin-bottom: 10px; /* Reduce space below "About Me" */
  }
  
  .education-box h3 {
    margin-bottom: 5px; /* Reduce spacing inside the box */
  }
  
  .section-container {
    gap: 2rem; /* Reduce space between sections */
    height: auto; /* Adjust height dynamically */
  }
  

  #projects {
    position: relative;
    overflow-x: hidden; /* Remove horizontal scrolling */
    white-space: normal; /* Allow wrapping */
    text-align: center; /* Ensure text content is centered */
}

.experience-details-container {
    display: flex;
    flex-direction: column; /* Stack projects vertically on mobile */
    align-items: center; /* Center the items */
    justify-content: center;
    width: 100%;
    gap: 2rem;
    padding-bottom: 1rem;
}

.about-containers {
    display: flex;
    flex-direction: column; /* Ensure stacking */
    gap: 2rem;
    align-items: center; /* Center project cards */
    width: 100%;
}

.details-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: 2rem;
  background: white;
  border: rgb(163, 163, 163) 0.1rem solid;
  text-align: center;
  
  /* UNIFORM BOX SIZE */
  flex: 0 1 320px;    /* Don't grow too much, base width 320px */
  height: 520px;      /* Hard limit: Every box will be exactly this tall */
  box-sizing: border-box;
  overflow: hidden;   /* Ensures nothing leaks out of the rounded corners */
}

.project-img {
  width: 100%;
  height: 220px;      /* Hard limit: Every image takes up the same vertical space */
  object-fit: cover;  /* Crops the image to fill the area without distortion */
  border-radius: 1.5rem;
}

.details-container h2 {
  font-size: 1.2rem;
  margin: 1rem 0;
  /* Text wrapping to prevent title overflow */
  white-space: normal; 
  word-wrap: break-word;
  line-height: 1.3;
  /* Limit title height to keep buttons aligned */
  height: 3.2rem; 
  display: flex;
  align-items: center;
  justify-content: center;
}

  /* SCROLLBAR STYLING */
  .experience-details-container::-webkit-scrollbar {
    height: 8px;
  }
  
  .experience-details-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
  }
  
  .experience-details-container::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
/* FOOTER SECTION */

footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
}

#contact {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers items horizontally */
  justify-content: center; /* Centers items vertically */
  text-align: center; /* Ensures text is centered */
}


/* GENERAL */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

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

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

html {
  scroll-behavior: smooth;
}

p {
  color: rgb(85, 85, 85);
}

/* TRANSITION */
a, .btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */
nav, .nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: black;
  text-decoration: none;
  text-decoration-color: white;
}

a:hover {
  color: grey;
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: rgb(181, 181, 181);
}

.logo {
  font-size: 2rem;
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */
#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: black;
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: black;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* SECTIONS */
section {
  padding-top: 4vh;
  height: auto;
  margin: 0 10rem;
  position: relative; /* Ensures absolute elements inside are positioned properly */
}

/* PROFILE SECTION */
#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  width: 100%;            /* Allows flexibility */
  max-width: 340px;       /* Keeps it from getting too large */
  height: auto;           /* Allows the height to follow the original image shape */
  margin: auto;           /* Centers the container */
  border-radius: 2rem;    /* Sets the roundness of the corners (adjust as needed) */
  overflow: hidden;       /* Essential: clips the image to the rounded corners */
  border: 2px solid rgb(0, 0, 0);
}

.section__pic-container img {
  width: 100%;            /* Fills the container width */
  height: auto;           /* Maintains original aspect ratio */
  display: block;         /* Removes bottom whitespace */
}
.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.title {
  font-size: 3rem;
  text-align: center;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS */
.icon {
  cursor: pointer;
  height: 2rem;
}

/* BUTTONS */
.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
}

.btn-color-1, .btn-color-2 {
  border: rgb(53, 53, 53) 0.1rem solid;
}

.btn-color-1:hover, .btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1, .btn-color-2:hover {
  background: rgb(53, 53, 53);
  color: white;
}

.btn-color-1:hover {
  background: rgb(0, 0, 0);
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: rgb(255, 255, 255) 0.1rem solid;
}

/* ABOUT SECTION */
#about {
  position: relative;
}

#about h1 {
  margin-bottom: 10px;
}

.education-box h3 {
  margin-bottom: 5px;
}

.section-container {
  gap: 2rem;
  height: auto;
}

/* PROJECTS SECTION */
#projects {
  position: relative;
  overflow-x: auto;
  white-space: nowrap;
}
.experience-details-container {
  display: flex;
  justify-content: center; /* Centers the whole group on the page */
  width: 100%;
  padding-bottom: 1rem;
  /* REMOVED: overflow-x: auto and scroll-snap (they prevent wrapping) */
}

.about-containers {
  display: flex;
  flex-direction: row; /* Ensure they sit side-by-side */
  flex-wrap: wrap;     /* KEY: This allows items to drop to the next line */
  justify-content: center; /* Centers items in the row */
  gap: 2rem;
  width: 100%;         /* Changed from max-content to 100% to stay within screen */
}

.details-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: 2rem;
  background: #E3D8CB; /* Your updated background color */
  border: 4px solid rgb(0, 0, 0); /* Your thicker border */
  
  flex: 0 1 320px;
  /* CHANGE 1: Change 'height' to 'height: auto' or 'min-height' */
  height: auto; 
  min-height: 520px; /* This keeps all boxes looking aligned even if they have less text */
  
  box-sizing: border-box;
  
  /* CHANGE 2: Remove or change overflow to visible so buttons aren't cut */
  overflow: visible; 
}

.details-container h3 {
  font-size: 1.2rem;
  word-wrap: break-word;
  flex-grow: 1; /* Ensures title takes up available space */
}

.details-container .github-button {
  margin-top: auto; /* Pushes the button to the bottom */
}

.project-img {
  border-radius: 1rem;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* SCROLLBAR STYLING */
.experience-details-container::-webkit-scrollbar {
  height: 8px;
}

.experience-details-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.experience-details-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

/* FOOTER SECTION */
footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
}

#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}



@media (max-width: 768px) {
  .project-card {
    width: 90%; /* Ensures the cards fit nicely */
    margin: 10px auto; /* Centers them properly */
  }

  .project-title {
    font-size: 1.2rem; /* Adjusts text size */
    text-align: center;
  }

  .github-button {
    width: 80%;
  }
}

.text-container{
  text-align: justify;

}

body {
  background-color: #A08F7A; /* Change to any color */
}
    .hidden { 
        display: none; 
    }
    .project-description {
        margin-top: 10px;
        font-size: 14px;
        color: #555;
    }

        /* Modal Background */
    .modal {
        display: none; 
        position: fixed;
        z-index: 1;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
    }

  /* Modal Content */
  .modal-content {
      background-color: #E3D8CB;
      margin: 15% auto;
      padding: 25px;
      width: 90%;          /* Responsive for mobile */
      max-width: 500px;    /* Keeps the box small on desktop */
      border-radius: 20px;
      text-align: center;
      border: 3px solid black; /* Adds the border from your screenshot */
      
      /* FIX FOR OVERFLOWING TEXT */ 
      word-wrap: break-word;   
      overflow-wrap: break-word;
      height: auto;            /* Let the box grow with the text */
      min-height: 150px;
  }
  /* Optional: Make the text inside more readable */
  .modal-content p {
      margin-top: 15px;
      line-height: 1.6;
      color: #333;
      display: block;
      white-space: normal;
      text-align: justify;
      text-justify: inter-word;
  }
    /* Close Button */
    .close {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
    }

    .close:hover {
        color: black;
    }
.about-details-container {
    background: rgba(255, 255, 255, 0.4); /* Very subtle white overlay */
    border: 2px solid rgb(5, 5, 5); /* Match your project box borders */
    border-radius: 2rem;
    padding: 3rem;
    margin: 2rem auto;
    max-width: 900px; /* Limits line length for better readability */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Soft premium shadow */
}