/* === Fonts === */
@font-face {
  font-family: 'OutfitThin';
  src: url('../fonts/Outfit-Thin.woff2') format('woff2'),
       url('../fonts/Outfit-Thin.woff') format('woff');
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'OutfitLight';
  src: url('../fonts/Outfit-Light.woff2') format('woff2'),
       url('../fonts/Outfit-Light.woff') format('woff');
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'OutfitRegular';
  src: url('../fonts/Outfit-Regular.woff2') format('woff2'),
       url('../fonts/Outfit-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'OutfitSemiBold';
  src: url('../fonts/Outfit-SemiBold.woff2') format('woff2'),
       url('../fonts/Outfit-SemiBold.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'OutfitBold';
  src: url('../fonts/Outfit-Bold.woff2') format('woff2'),
       url('../fonts/Outfit-Bold.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/* === Base === */
body {
  background-color: white;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
}


/* === Header === */

:root {
  --side-gap: 36px;
  --header-gap: 16px;
  --header-gap-desktop: 27vw;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px var(--header-gap);
  box-sizing: border-box;
  z-index: 1060; /* above Bootstrap modal (1055) so header stays on top */
  background: transparent;
}



.logo {
  flex: 0 0 55%;
}

.logo-img {
  display: block;
  width: 100%;
  height: auto;
}

.containerheader {
  display: flex;
  justify-content: space-between;
  align-items: stretch; /* IMPORTANT: both sides same height */
}

.rightcontainer {
  position: relative;
  flex: 0 0 45%;
}

/* force it to match logo height */
.logo,
.rightcontainer {
  display: flex;
}

.plus-img {
  position: absolute;
  top: .2em;
  right: 0;
  height: clamp(1.5rem, 2vw, 3.5rem);
  width: auto;
  cursor: pointer;
}

/* === Main / Project Feed === */
main {
  padding-left: 0;
  padding-right: 0;
  padding-top: 80px; /* fallback until JS measures the real header height */
}


.project {
  cursor: pointer;
  padding: 0 calc(var(--side-gap) + 15px) 14px;
  margin-bottom: 1.5rem;
  font-family: OutfitLight;
  font-size: 0.7rem;
  line-height: 1.2;
}

.project-img-group {
  display: block;
  text-align: left;
}

.project-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.project-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.project-meta {
  margin-top: 5px;
  margin-bottom: 0;
  text-align: center;
  visibility: hidden;
}

.project-subtitle {
  font-family: OutfitBold;
}

/* === Modals — shared === */
.modal-backdrop.show {
  opacity: 0 !important;
  background-color: transparent;
}

.fullpage-modal {
  overflow: hidden !important;
}

.fullpage-modal .modal-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  max-width: 100%;
  background: white;
}

.fullpage-modal .modal-content {
  height: 100%;
  border-radius: 0;
  border: none;
  background: white;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* momentum scrolling on older iOS */
  overscroll-behavior: contain;
}

.btn-close {
  filter: none !important;
  opacity: 1 !important;
}

/* === Project Modal === */
#projectModal .modal-content {
  padding: 0;
}



.modal-cross-img {
  height: clamp(1.5rem, 2vw, 3.5rem);
  width: auto;
  cursor: pointer;
}

.project-img-wrap {
  padding: 0 calc(var(--side-gap) + 15px);
  width: 100%;
  box-sizing: border-box;
}

.project-img-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-modal-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.img-nav img {
  display: block;
  height: clamp(1.5rem, 2vw, 3rem); /* adjust as needed */
  width: auto;
}

.img-prev {
  left: calc(var(--header-gap) - var(--side-gap) - 15px);
}

.img-next {
  right: calc(var(--header-gap) - var(--side-gap) - 15px);
}

#projectModalBody {
  padding: 0 calc(var(--side-gap) + 15px) 2rem;
  width: 100%;
  box-sizing: border-box;
  font-family: OutfitLight;
  font-size: 0.7rem;
  line-height: 1.2;
}

#projectModalBody .project-meta {
  margin: 0;
  visibility: visible;
  text-align: left;
}

#projectModalBody .project-text {
  font-family: OutfitLight;
  font-size: 0.7rem;
  line-height: 1.2;
  margin-top: 1rem;
  white-space: pre-line;
  text-align: left;
}

/* === Contact Modal === */
#contactModal {
  font-family: OutfitRegular, sans-serif;
}

#contactModal .modal-content {
  padding: 0;
}

.contact-img-wrap {
  padding: 0 calc(var(--side-gap) + 15px);
  width: 100%;
  box-sizing: border-box;
}

.contact-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.contact-content {
  padding: 0 calc(var(--side-gap) + 15px) 2rem;
  margin-top: 40px; /* fallback, overridden by JS */
  width: 100%;
  box-sizing: border-box;
}

.contact-content p {
  margin-bottom: 1rem;
  font-size: small;
  font-size: 0.7rem;
  line-height: 1.5;
}

.contact-content a {
  color: inherit;
  text-decoration: none;
}

/* Cap logo on mobile landscape */
@media (max-width: 767px) and (orientation: landscape) {
  .logo {
    max-width: 200px;
  }
}

/* === Desktop layout (≥ 768px) === */
/* Simulate phone: constrain to a narrow column, centered with white space either side */
@media (min-width: 768px) {
  header {
    padding-left: 0;
    padding-right: 0;
  }

  .containerheader {
    padding: 0 var(--header-gap-desktop);
  }

  .logo {
    max-width: 374px;
  }

  .plus-img {
    height: 2.5rem;
    top: .6em;
  }

  .img-nav img {
    height: 2.5rem;
  }

  main {
    max-width: 680px;
    margin: 0 auto;
  }

  .img-nav {
    position: fixed;
  }

  .img-prev {
    left: var(--header-gap-desktop);
  }

  .img-next {
    right: var(--header-gap-desktop);
  }

  .fullpage-modal .modal-dialog {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fullpage-modal .modal-content {
    max-width: none;
    height: auto;
    overflow: visible;
  }

  .project,
  #projectModalBody,
  #projectModalBody .project-text,
  .contact-content p {
    font-size: 0.85rem;
  }

  .project-img-wrap,
  #projectModalBody,
  #contactModal .contact-img-wrap,
  #contactModal .contact-content {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }
}

body.modal-open {
  overflow: hidden !important;
}

#projectModalBody .project:first-child {
  padding-top: 0 !important;
}
