*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  padding: 0;
  margin: 0;
}
html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}
body {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  min-height: 100vh;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
}
html,
body {
  max-width: 100%;
  /* overflow-x: hidden; */
}

/* header */
.header-wrapper {
  position: relative;
  padding: 100px 0;
  /* border: 2px solid red; */
  overflow: visible;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}
.header-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1c3331;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 0 100%);
  z-index: -1;
}
.header-container {
  position: relative;
  z-index: 1;
  display: flex;
  color: rgb(0, 0, 0);
  justify-content: center;
  width: 100%;
  flex-wrap: nowrap;
}
h1,
h2,
h3,
.image-wrapper p {
  font-family: "Playfair Display", serif;
  font-weight: 400;
}
h2 {
  font-size: 2.5rem;
}
.image-wrapper {
  position: relative;
  width: 25%;
}
.image-wrapper h1 {
  position: absolute;
  top: 82%;
  left: 8%;
  color: white;
  font-size: 3vw;
  text-shadow: 1px 5px 2px rgba(0, 0, 0, 0.15);
}

.image-wrapper img {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.header-text-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin: 40px 0;
  padding: 20px;
  background-color: rgb(255, 255, 255);
  max-width: 60ch;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  font-size: 1.3rem;
}

.button-container {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 30px;
  /* border: 1px dashed gray; */
}
.button-container a {
  cursor: pointer;
  transition: transform 0.2s ease;
}
.button-container a:hover {
  transform: scale(1.2);
}
.button-container img {
  width: 30px;
}

/* main */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  min-height: 100px;
}
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 10px 0 100px 0;

  align-items: start;
}

.github-icon {
  width: 25px;
}
.card {
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.project-images {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.title-card-wrapper {
  display: flex;
  justify-content: space-between;
  padding: 15px 20px 0;
}
.icons-wrapper {
  display: flex;
  gap: 15px;
}
.icons-wrapper a {
  transition: transform 0.2s ease;
}
.icons-wrapper a:hover {
  transform: scale(1.2);
}
.description-wrapper {
  padding: 10px 20px 20px;
  flex-grow: 1;
}

/* footer */
.footer-wrapper {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  background-color: #1c3331;
}
.footer-container {
  display: flex;
  color: white;
  width: 100%;
  max-width: 1000px;
  justify-content: space-between;
}
.footer-image-wrapper {
  width: 40%;
  display: flex;
  justify-content: flex-end;
}
.footer-image-wrapper img {
  width: 100%;
  max-width: 300px;
  display: block;
}
.footer-container h2 {
  padding-bottom: 10px;
}
.footer-button-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 30px;
}
.footer-button-container img {
  width: 25px;
  filter: grayscale(100%) brightness(0) invert(100%);
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}
.footer-button-container a {
  cursor: pointer;
  transition: transform 0.2s ease;
}
.footer-button-container a:hover {
  transform: scale(1.2);
}
.footer-button-container a:hover img {
  filter: grayscale(100%) brightness(0) invert(80%);
}
.contact-container {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
}
.contact-info-container a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 300;
  transition: color 0.3s ease;
}
.contact-info-container a:hover {
  color: #0891b2;
  text-decoration: underline;
}
.contact-info-container {
  display: flex;
  flex-direction: column;
  margin: 15px 0;
}

.expandable-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #ffffff;
}

.content-inner p {
  padding: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #475569;
  border-left: 2px solid #1c3331;
  margin: 10px 20px;
}

.content-inner {
  overflow: hidden;
}

.card.is-expanded .expandable-content {
  grid-template-rows: 1fr;
}

.content-inner p {
  padding: 0 20px 20px;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.6;
}

.card-footer {
  width: 100%;
  background-color: #f8fafc;
  border-top: 1px solid #eee;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
}

.card-footer:hover {
  background-color: #f1f5f9;
}

.expand-btn {
  background: none;
  border: none;
  padding: 12px;
  width: 100%;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  color: #1c3331;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.arrow-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.card.is-expanded .arrow-icon {
  transform: rotate(180deg);
}

.card.is-expanded .expand-btn {
  color: #0891b2;
}

.swiper {
  width: 100%;
}

.swiper-slide img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.lightbox-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 100;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.lightbox-swiper-main {
  width: 100%;
  max-width: 900px;
}

.lightbox-swiper-main .swiper-slide img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
}

.lightbox-swiper-thumbs {
  width: 100%;
  max-width: 900px;
  margin-top: 10px;
}

.lightbox-swiper-thumbs .swiper-slide img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  opacity: 0.5;
  cursor: pointer;
}

.lightbox-swiper-thumbs .swiper-slide-thumb-active img {
  opacity: 1;
}

.card .swiper-slide {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.card .swiper-slide::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  font-size: 2rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.card .swiper-slide:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card .swiper-slide img {
  transition: transform 0.3s ease;
}

.card .swiper-slide:hover img {
  transform: scale(1.05);
}

.lightbox-container {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.lightbox-container.is-open {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 1024px) {
  .header-container {
    display: block;
    padding-top: 60px;
    width: 90%;
    margin: 0 auto;
  }

  .image-wrapper {
    float: left;
    width: 60%;
    max-width: 450px;
    z-index: 5;
    margin-top: -20px;
    margin-right: 30px;
    margin-bottom: 20px;
    position: relative;
  }

  .header-text-wrapper {
    display: block;
    width: auto;
    max-width: none;
    margin-top: 50px;
    margin-left: 30px;
    padding: 30px;
  }
  .image-wrapper h1 {
    top: -10px;
    left: 85%;
    font-size: 3.5rem;
    white-space: nowrap;
    color: white;
  }
  main {
    clear: both;
    display: block;
    width: 100%;
  }
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    max-width: 100%;
    gap: 20px;
    padding: 20px;
    justify-items: center;
  }
  .card {
    width: 100%;
    max-width: 350px;
  }
  .main-container h2 {
    padding: 0 20px;
  }
}
@media (max-width: 600px) {
  .main-container h2 {
    padding: 0 20px;
  }
  .header-container {
    padding-top: 0px;
    padding-bottom: 20px;
  }
  .image-wrapper {
    float: none;
    width: 100%;
    margin-right: 0;
  }
  .image-wrapper h1 {
    font-size: 12vw;
    top: auto;
    bottom: 1%;
    left: 0;
    width: 100%;
    text-align: center;
    white-space: normal;
    padding: 0 10px;
  }
  .header-text-wrapper {
    margin-top: 20px;
    margin-left: 0;
    width: auto;
    padding: 20px;
  }
  .header-text-wrapper h2 {
    display: flex;
    justify-content: center;
  }
  .main-container h2 {
    display: flex;
    justify-content: center;
  }
  .grid-container {
    padding: 20px;
    grid-template-columns: repeat(1, 1fr);
  }
  .footer-wrapper {
    padding: 40px 0 0 0;
  }
  .footer-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: none;
  }
  .contact-container {
    align-items: center;
    padding: 0 20px;
    margin-bottom: 30px;
    width: 100%;
    text-align: center;
  }
  .footer-image-wrapper {
    width: 100%;
    justify-content: center;
  }
  .footer-image-wrapper img {
    width: 100%;
    max-width: none;
    height: auto;
    display: block;
  }
}
