:root {
  /* Colors */
  --bg-color: #000814;
  --highlight: #FFFF00;
  --blob-bg: rgba(141, 85, 0, 0.96);
  --blob-border: 5px solid black;
  
  /* Sizing */
  --img-size-mobile: calc(25vw - 1rem);
  --img-size-desktop: calc(13vw - 1.5rem);
  --blob-size-desktop: 12vw;
  --blob-size-mobile: 30vw;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-color);
  overscroll-behavior: none;
  touch-action: none;
}

body {
  background: var(--bg-color);
  margin: 0;
  overflow: hidden; 
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
  height: 100dvh;
  width: 100vw;
}

svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

nav { display: none; }

@keyframes slideOutLeft { to { transform: translate3d(-100%, 0, 0); opacity: 0; } }
@keyframes slideOutRight { to { transform: translate3d(100%, 0, 0); opacity: 0; } }
@keyframes slideOutUp { to { transform: translate3d(0, -100%, 0); opacity: 0; } }

.animate-next { animation: slideOutLeft 450ms cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards; }
.animate-prev { animation: slideOutRight 450ms cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards; }
.animate-down { animation: slideOutUp 450ms cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards; }

.instruction-blob {
  position: fixed;
  z-index: 1500;
  width: var(--blob-size-desktop);
  height: var(--blob-size-desktop);
  background-color: var(--blob-bg);
  border-radius: 6.5rem;
  box-shadow: 0 0 15px rgba(0,0,0,0.5), 0 0 30px 15px rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.blob-text-wrapper {
  transform: rotate(-45deg);
  width: 140%; 
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.blob-text-wrapper p {
  margin: 0;
  line-height: 1.1;
  font-weight: bold;
  font-family: 'Ranade', sans-serif;
  color: white; 
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8); 
  font-size: clamp(0.75rem, 1.0vw, 1.5rem);
}

.blob-left {
  top: 50%; left: 0;
  transform: translate(-50%, -50%) rotate(45deg);
}
.blob-left .blob-text-wrapper { padding-left: 50%; } 

.blob-right {
  top: 50%; right: 0;
  transform: translate(50%, -50%) rotate(45deg);
}
.blob-right .blob-text-wrapper { padding-right: 50%; }

.blob-bottom {
  bottom: 0; left: 50%;
  transform: translate(-50%, 50%) rotate(45deg);
}
.blob-bottom .blob-text-wrapper { padding-bottom: 50%; }

.mobile-msg { display: none; }
.desktop-msg { display: block; }

@media only screen and (max-width: 788px) {
  .instruction-blob {
    width: var(--blob-size-mobile);
    height: var(--blob-size-mobile);
    border-radius: 2rem;
  }
  .blob-bottom {
    transform: translate(-50%, 50%) rotate(45deg);
  }
  .blob-text-wrapper p { font-size: clamp(0.5rem, 3.2vw, 1.0rem); }
  .mobile-msg { display: block; }
  .desktop-msg { display: none; }
}

.gallery_wrapper_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  margin: 0 auto;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.gallery_wrapper {
  display: grid;
  gap: 1.5rem;
  opacity: 0;
  transition: opacity 300ms ease-in;
}
.gallery_wrapper.is-ready {
  opacity: 1;
}

#main-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

/* mobile grid */
@media only screen and (max-width: 788px) {
  .gallery_wrapper {
    --img-size: var(--img-size-mobile);
    grid-template-columns: repeat(4, var(--img-size));
    grid-template-rows: repeat(8, var(--img-size));
    margin: calc(var(--img-size) * 0.5 - 5rem ) 0 calc(var(--img-size) * -1) 0;
  }
  .gallery_wrapper .gallery_item:nth-of-type(3n) {
    grid-column: 2 / span 2;
  }
}

.gallery_wrapper .gallery_item {
  width: 100%;
  aspect-ratio: 1;
  grid-column: span 2;
  border-radius: 0.5rem;
  position: relative;
  display: block;
  text-decoration: none;
  color: white;
  transition: transform 300ms, z-index 0s;
}

.gallery_item a, 
.gallery_item a:hover, 
.gallery_item a:visited {
  text-decoration: none !important;
  margin: 0;
  line-height: 1.1;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  font-size: clamp(0.75rem, 1.0vw, 1.5rem);
}

.gallery_item .overlay-text * {
  text-decoration: none;
}
.gallery_wrapper .gallery_item a {
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  line-height: 1.1;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  font-size: clamp(0.75rem, 1.0vw, 1.5rem);
}

@media only screen and (min-width: 789px) {
  .gallery_wrapper {
    --img-size: var(--img-size-desktop);
    grid-template-columns: repeat(8, var(--img-size));
    grid-template-rows: repeat(10, var(--img-size));
    margin: calc(var(--img-size) * 0.5 - 5rem ) 0 calc(var(--img-size) * -1) 0;
  }
  .gallery_wrapper .gallery_item:nth-of-type(7n-2) { grid-column: 2 / span 2; }
}

.gallery_wrapper a {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  clip-path: url(#clip-path-1);
  transition: filter 300ms, clip-path 300ms;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery_wrapper .gallery_item:hover {
  z-index: 2000;
  transform: scale(1.05);
}

.gallery_wrapper .gallery_item:hover img {
  clip-path: url(#clip-path-2);
  filter: brightness(0.4) saturate(1.5);
}

.gallery_wrapper:hover > .gallery_item:not(:hover) img {
  filter: brightness(0.3) saturate(0);
}

.overlay-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0.5rem;
  opacity: 0.5;
  transition: opacity 300ms;
  pointer-events: none;
}

.overlay-text h3 { margin: 0; font-size: 1.2rem; text-shadow: 0 0 5px black; }
.overlay-text p { margin: 0.25rem 0 0; font-size: 0.8rem; text-shadow: 0 0 5px black; }

@media only screen and (max-width: 788px) {
  .overlay-text h3 { margin: 0; font-size: 0.9rem; text-shadow: 0 0 10px black; }
  .overlay-text p { margin: 0.25rem 0 0; font-size: 0.5rem; text-shadow: 0 0 10px black; }
}

.banner-container {
  position: fixed;
  width: 200%;
  left: -50%;
  background-color: var(--highlight);
  color: black;
  border-top: 5px solid black;
  border-bottom: 5px solid black;
  padding: 10px 0;
  z-index: 1000;
  font-weight: bold;
  pointer-events: none;
  transform: translateY(-60%) rotate(-22deg);
  top: 0%;
}

@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }
.scrolling-text { display: flex; }
.scrolling-text span {
  display: inline-block;
  white-space: nowrap;
  animation: scroll 15s linear infinite;
}

#popup-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  backdrop-filter: blur(5px);
}

#popup-container {
  background-color: #1a1a1a;
  padding: 2rem;
  border-radius: 0.5rem;
  position: relative;
  width: 80%;
  max-height: 80%;
  overflow-y: auto;
  color: white;
  border: 2px solid var(--highlight);
  box-shadow: 0 0 30px rgba(255, 255, 0, 0.2);
}

#popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
}
#popup-close:hover { color: var(--highlight); }

#popup-content a { color: var(--highlight); text-decoration: none; }
#popup-content a:hover { text-decoration: underline; }
#popup-content video, #popup-content audio { width: 100%; margin: 1rem 0; }

#popup-content .media-password {
  background-color: #333;
  border: 1px solid #555;
  border-radius: 4px;
  color: white;
  padding: 0.5rem;
  margin-right: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
}

#popup-content .media-password::placeholder {
  color: #bbb;
}

.unlock-media {
  background-color: var(--highlight);
  color: black;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: bold;
  margin-left: 0.5rem;
}

#bio-link { background-color: #8B4513; }
#socials-link { background-color: #A0522D; }
#cv-link { background-color: #D2B48C; }
#contact-email { background-color: #556B2F; }
#contact-phone { background-color: #6B8E23; }

.instagram { background: #3f729b; color: white; }
.facebook { background: #3b5998; color: white; }
.twitter { background: #00acee; color: white; }
.linkedin { background: #0e76a8; color: white; }
.google { background: #db4a39; color: white; }
.youtube { background: #c4302b; color: white; }
.tiktok { background: #000000; color: white; }
.mastodon { background: #9400d3; color: white; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
