* {
  box-sizing: border-box;
}

::-webkit-scrollbar {
  display: none;
  width: 0;
  background: transparent;
}

body {
  font-family: Avenir Next;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  scrollbar-width: none;
}

h2 {
  position: relative;
  font-size: 1.8em;
  font-weight: 550;
  margin-bottom: 15px;
  word-spacing: 0.2rem;
}
h3 {
  font-size: 1.5em;
  font-weight: 400;
  margin-bottom: 35px;
  margin-top: 40px;
}

header.site-header {
  padding-top: 30px;
  padding-right: 30px;
  padding-left: 0;
}
header nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
  gap: 2rem;
}
header nav ul li a {
  color: black;
  text-decoration: none;
  font-weight: normal;
}
header nav ul li a.active {
  font-weight: bold;
}

.intro-stripe {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background-color: #e6eefa;
  padding: 40px 30px;
  margin-top: 40px;
}
.intro-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 10px;
}
.page-heading {
  font-size: 2rem; /* 2.2 */
  margin: 0 0 30px 0;
  letter-spacing: 0.08em; /* 0.1 */
  word-spacing: 0.5rem; /* 0.8 */
}
.intro-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.profile-pic {
  max-width: 400px;
  height: auto;
}
.intro-text {
  max-width: 715px;
  text-align: justify;
}
.intro-text p {
  margin: 0 0 10px 0;
  line-height: 1.5;
}
.intro-text p:last-child {
  margin-bottom: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.portfolio-preview {
  margin-top: 75px;
}
.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.project-card img {
  width: 300px;
  height: 225px;
  object-fit: cover;
  border: 1px solid #5f7094;
}
.project-card h3,
.project-card p {
  text-align: center;
  margin: 5px 0;
}
.project-card-image-wrapper {
  position: relative;
  display: inline-block;
}
.project-card-image-wrapper .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 225px;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card-image-wrapper:hover .overlay {
  opacity: 1;
}
.overlay span {
  color: white;
  font-size: 2rem;
}

.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 40px 20px;
}
.project-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 50px 0;
}
.project-slider {
  display: flex;
  gap: 20px;
  overflow: hidden;
  width: calc(3 * 300px + 2 * 20px);
  transition: transform 0.3s ease;
}
.slider-arrow {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  color: #001745;
}
.slider-arrow.left {
  left: -50px;
  top: 40%;
}
.slider-arrow.right {
  right: -50px;
  top: 40%;
}

.about-preview {
  text-align: left;
  margin: 75px 0;
}
.about-buttons {
  display: flex;
  justify-content: center;
  gap: 120px;
  margin-top: 60px;
  align-items: center;
}
.btn-blue {
  background-color: #001745;
  color: #f0f0f0;
  padding: 22px 44px;
  text-decoration: none;
  border-radius: 1px;
  font-weight: bold;
  transition: background 0.3s;
  font-size: 1.2rem;
  text-align: center;
  min-width: 200px; /* You can adjust this value as needed */
}
.btn-blue:hover {
  background-color: #263f73;
}

footer {
  background-color: white;
  color: black;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
}
a[href^="mailto:"] {
  color: #5f7094;
  text-decoration: none;
}
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.social-icons a {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: inline-block;
  line-height: 0;
  transition: transform 0.2s ease-in-out;
}
.social-icons a:hover {
  transform: scale(1.1);
}
.social-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}
.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 3px;
  width: 95%;
  max-width: 1600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2.5rem;
  font-weight: bold;
  color: #555;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover {
  color: #000;
}

.flex-center-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.summary-text {
  font-style: italic;
  text-align: justify;
  max-width: 1000px;
}

.education-list {
  border-top: 1px solid #8c9bba;
  border-bottom: 1px solid #8c9bba;
  max-width: 95%;
  margin: 0 auto;
}
.education-entry {
  padding-top: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #8c9bba;
}
.education-list .education-entry:last-child {
  border-bottom: none;
}
.education-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}
.education-header h4 {
  margin: 0;
  color: #001745;
  font-size: 1.2em;
}
.education-years {
  font-size: 0.9em;
  color: #5f7094;
}
.education-degree {
  font-weight: bold;
  color: #001745;
}
.education-notes {
  font-size: 0.95em;
  font-style: italic;
}
.education-entry p {
  margin: 5px 0;
  font-size: 0.95em;
  line-height: 1.4;
}
.education-entry h4 + p {
  margin-top: 2px;
}
.degree-info {
  margin-bottom: 10px;
}

.resume-container {
  max-width: 95%;
  margin: 0 auto;
}

.content-box {
  width: 92%;
  margin: 0 auto 40px auto;
}
.fun-facts-heading {
  margin-top: 40px;
}
.fun-facts-list {
  list-style-type: disc;
  padding-left: 0; /* Ensures bullets align with container */
  margin-right: 40px;
  margin-bottom: 20px;
}
.fun-facts-list li {
  margin-bottom: 8px;
  text-align: justify;
}
.fun-fact-photos {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  margin-bottom: 20px;
}
.fun-fact-photo {
  width: calc(16.666% - 10px);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  object-fit: cover;
}

/* ---- Mobile Responsive Layouts (for screens < 768px) ---- */
@media (max-width: 768px) {
  body {
    font-size: 0.95rem; /* Reduces the base font size for the whole page */
  }

  img, video {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents images from having extra space below them */
  }

  .container, .intro-container {
    padding: 0 20px;
  }

  .content-box {
    max-width: 100%;
    padding: 0;
  }

  .project-slider {
    width: 300px;
    justify-content: center;
  }
  .project-slider-wrapper {
    margin: 20px 0;
  }
  .slider-arrow.left {
    left: -20px;
    top: 40%;
    padding-left: 12px;
  }
  .slider-arrow.right {
    right: -20px;
    top: 40%;
    padding-right: 12px;
  }

  body {
    overflow-x: hidden;
  }

  .page-heading {
    font-size: 1.5rem;
  }

  .intro-wrapper {
    flex-direction: column;
  }
  .profile-pic {
    max-width: 90%;
    margin-bottom: 10px;
  }

  .about-buttons {
    flex-direction: column;
    gap: 20px;
  }
  .btn-blue {
    min-width: 80%;
    font-size: 1rem;
    padding: 18px 36px;
  }

  .portfolio-grid {
    flex-direction: column;
    align-items: center;
  }

  footer {
    padding: 5px 0;
  }

  .fun-fact-photos {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
  }
  .fun-fact-photo {
    width: calc(50% - 8px);
  }
  
  .fun-facts-list {
    list-style-position: inside;
    padding: 0;
    margin-right: 10px;
  }
  .fun-facts-list li {
    overflow-wrap: break-word;
    word-wrap: break-word;
    margin: 10px 0;
  }

  .modal-backdrop {
      padding: 0;
  }
  .modal-content {
    width: 100%;
    height: 100%;
    max-width: 100%;
    border-radius: 0;
    padding: 25px;
    overflow-y: scroll;
  }

  resume-container, .pdf-container {
    padding-left: 0;
    padding-right: 0;
  }
  
  iframe {
    border: 1px solid #8c9bba;
  }

  .resume-container iframe, .pdf-container iframe {
    height: 800px; /* NEW: Adjusts height for specific content */
  }
}
