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

html, body {
  width: 100vw;
  height: 100vh;
  font-family: Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Navigation Bar Style */
header {
  background-color: #2C2C2C;
  padding: 0.75rem 2vw;
  flex-shrink: 0;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
}

nav ul li {
  margin: 0 1rem;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
}

/* Profile Container */
.profile-container {
  width: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  gap: 1.5vw;
  margin: 1.5vh auto 1vh auto;
  flex-shrink: 0;
}

.profile-pic img {
  width: 10vw;
  height: 10vw;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 0.4375rem 0.625rem rgba(0, 0, 0, 0.3);
}

.intro {
  background-color: #F5F5F5;
  padding: 1rem 2vw;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  font-size: clamp(0.8rem, calc(1.2vw + 0.4vh), 1.2rem);
}

/* Skills & Projects Container */
.skills-projects-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
  width: 80%;
  margin: 0 auto 20px;
}
.skills, 
.projects {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Skills */
.skills {
  flex: 2 1 62%;
  display: flex;
  flex-direction: column;
}

.skills-list {
  background-color: #F5F5F5;
  padding: 1rem;
  font-size: clamp(0.75rem, calc(1vw + 0.25vh), 1.2rem);
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.2);
  border-radius: 0.625rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  word-wrap: break-word;
}

.skill-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.skill-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-icons img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}

/* Projects */
.projects {
  flex: 1 1 38%;
  display: flex;
  flex-direction: column;
}

.project {
  background-color: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.2);
  border-radius: 0.625rem;
  padding: 0.5rem;
  text-align: center;
  height: 100%;
}

.project-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Additional Styles */
iframe {
  width: 100%;
  height: 100vh;
  border: none;
}

.resume-desktop {
  display: block;
  width: 100%;
  height: 100vh;
  border: none;
}

.resume-mobile {
  display: none;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.box {
  background-color: #F5F5F5;
  padding: 1.5rem;
  border-radius: 0.625rem;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
}

.main-content, .box {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 0 1rem;
}

.main-image-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1rem 0;
}

.image-container {
  display: grid;  
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  font-size: clamp(0.8rem, calc(0.8vw + 0.2vh), 1rem);
  margin: 1rem 0;
}

.image-container p {
  padding: 1rem;
  font-size: 1.1rem;
}

.image-box, .image-boxCapstone,.project {
  background-color: #fff;
  border-radius: 0.625rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  text-align: center;
}

.project {
  background-color: #F5F5F5;
  border-radius: 0.625rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  text-align: center;
}

.image-box:hover, .image-boxCapstone:hover,.project:hover {
  transform: translateY(-5px);
}

.image-box img, .image-boxCapstone img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  max-height: 350px;
}

.image-boxCapstone .center-text {
  padding: 1rem;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: bold;
  color: #2C2C2C;
}

/*Contact Card*/
.contact-card {
  width: 90%;
  max-width: 1000px;
  margin: 4rem auto;
  padding: 4rem 3rem;
  background-color: #ffffff;
  border-left: 6px solid #2C2C2C;
  border-radius: 0.625rem;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card h2 {
  font-size: clamp(1.2rem, calc(1.8vw + 0.6vh), 2.2rem);
  margin-bottom: 2rem;
  color: #2C2C2C;
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 4rem;
}

.contact-icon {
  width: 2rem;
  margin-right: 1rem;
}

.contact-item .text {
  font-size: clamp(0.9rem, calc(1.2vw + 0.4vh), 1.3rem);
  color: #333333;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 60%;
  max-width: 1000px;
  text-align: center;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


.main-content{
  margin-bottom: 1rem;
}


/*larger screens*/
@media (min-width: 1593px) {
  .profile-container {
    max-height: none;
    padding: 2rem 1rem;
    gap: 3vw;
  }

  .profile-pic img {
    width: 12vw;
    height: 12vw;
  }

  .intro {
    font-size: clamp(1.2rem, 1.5vw + 0.6vh, 2rem);
    padding: 2rem 3vw;
  }

  .skills-projects-container {
    margin-bottom: 40px;
  }
}

/*Mobile Screens*/
@media only screen and (max-width: 768px) {
  html, body {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  .profile-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-pic {
    margin-bottom: 1rem;
  }

  .profile-pic img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
  }

  .intro {
    padding: 0 1rem;
    font-size: 0.95rem;
  }

  .skill-icons img {
    width: 27px;
    height: 27px;
    margin: 4px;
  }

  .skills-projects-container {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .skills, .projects {
    width: 90%;
    max-width: 500px;
  }

  .skills-list, .skill-text, .project-text, .project {
    text-align: center;
  }

  .skills-list p, .skills-list h3 {
    margin: 0.25rem 0;
  }

  .project img {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
  }

  .image-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .image-box img {
    max-height: none;
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .image-box p {
    font-size: 1.2rem;
    padding: 0.5rem 0.5rem;
  }

  .main-image-container {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 90%;
    margin: 20% auto;
  }

  .resume-desktop {
    display: none;
  }

  .resume-mobile {
    display: block;
  }

  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }

  .contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }

  .contact-item .icon {
    flex-shrink: 0;
    font-size: 1.2rem;
  }

  .contact-item .text {
    font-size: 0.95rem;
    word-break: break-word;
  }

  .contact-item a {
    text-decoration: none;
    color: inherit;
    word-break: break-all;
  }
}
