*,
*::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;
  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;
}

.badge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 20px;
  background: #1a1a1a;
  width: 25%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}
.badge-name {
  font-family: "Playfair Display", serif;
  font-size: 3rem;
  color: rgba(252, 252, 252, 0.858);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-style: italic;
}
.badge-title {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: white;
  text-align: center;
  min-height: 2.5rem;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.4rem;
  background: white;
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.icons-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.icon-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 5px 12px 5px 7px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-family: "Roboto", sans-serif;
  animation: fadeUp 0.4s ease both;
}
.icon-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.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;
}

.header-text-wrapper a {
  color: #1c3331;
  font-weight: 500;
  text-decoration: underline;
  transition: color 0.2s ease;
}
.header-text-wrapper a:hover {
  color: #c49a4a;
}

.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;
  align-items: center;
}

.footer-container h2 {
  padding-bottom: 10px;
}

/* Terminal styles */

.terminal-wrapper {
  width: 50%;
  min-width: 260px;
}
.terminal {
  background: #0d0d0d;
  border-radius: 8px;
  overflow: hidden;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.terminal-bar {
  background: #1e1e1e;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red {
  background: #ff5f56;
}
.dot-yellow {
  background: #ffbd2e;
}
.dot-green {
  background: #27c93f;
}
.terminal-title {
  margin-left: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}
.terminal-body {
  padding: 18px 20px 22px;
  min-height: 300px;
  line-height: 1.7;
}
.t-line {
  display: flex;
  gap: 8px;
  margin-bottom: 2px;
}
.t-prompt {
  color: #3ddc97;
}
.t-cmd {
  color: #e8e8e8;
}
.t-output {
  color: rgba(255, 255, 255, 0.45);
  padding-left: 18px;
  font-size: 12px;
}
.t-output.hl {
  color: #c49a4a;
}
.term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #3ddc97;
  margin-left: 2px;
  vertical-align: middle;
  animation: termBlink 0.9s step-end infinite;
}
@keyframes termBlink {
  50% {
    opacity: 0;
  }
}

/* Contact Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 25px 0;
  width: 100%;
  max-width: 400px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
}

.form-group textarea {
  resize: none;
  min-height: 100px;
}

.submit-btn {
  padding: 12px 24px;
  background-color: #c49a4a;
  color: #1c1c1c;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: #d4a84f;
  transform: translateY(-2px);
}

/* Ensure the button stretches on mobile for a better touch target */
@media (max-width: 600px) {
  .contact-form {
    margin: 25px auto;
  }
  .submit-btn {
    align-self: stretch;
  }
}

.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;
}

.swiper-pagination-bullet {
  width: 12px !important;
  height: 12px !important;
  margin: 0 6px !important;
}

.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;
  }

  .badge-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;
  }
  .badge-wrapper h1 {
    top: -10px;
    left: 85%;
    font-size: 2.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;
  }
  .badge-wrapper {
    float: none;
    width: 100%;
    margin-right: 0;
  }
  .badge-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;
  }
  .terminal-wrapper {
    width: 100%;
    min-width: unset;
  }
}
