/* Global box-sizing and margin reset */
* {
  box-sizing: border-box;
  margin: 0;
}



/* Base styles */
html {
  font-size: 12px;
  font-family: 'Times New Roman', Serif;
  line-height: 1.2;
  background-color: #ebeae533;
}

#imageSlider:focus,
#imageSlider:focus-visible {
  outline: none;
}

img {
  max-width: 100%;
  object-fit: cover;
  display: block;
}

ol {
  padding-inline-start: 30px;
}

li {
  padding: 0 0 1em 8em;
}

.cv-list li {
  margin-bottom: 1em;
}

figcaption {
  display: none;
}

/* Image blur-up effect */
.img-blurup {
  position: relative;
  width: 100%;
  aspect-ratio: 6 / 4;
  overflow: hidden;
  background-color: #d4bf8b;
}

.blurup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
  filter: blur(20px);
  transform: scale(1.05);
}

.blurup-img.loaded {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

/* Visually hidden (for SEO/accessibility) */
.visually-hidden,
.h-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Vertical text styles */
.vertical-text {
  position: fixed;
  padding: 2rem 0;
  left: 25%;
  top: 0;
  transform: translateX(-50%);
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  z-index: 90;
  pointer-events: none;
  text-transform: uppercase;
  font-weight: 300;
  color: #000;
  transition: left 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.vertical-text span {
  display: inline-block;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  animation: maskWipe 0.7s ease-out forwards;
  transform: rotate(90deg);
}

.vertical-text span:nth-child(n) {
  animation-delay: 0s;
}

@keyframes maskWipe {
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@media screen and (max-width: 500px) {
  .vertical-text {
    left: 50%;
  }
}

/* Project title */
#project-title {
  position: fixed;
  bottom: 10px;
  left: 10px;
  font-size: 1.2rem;
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 999;
  transition: opacity 0.3s ease;
}

/* Section layout */
section {
  display: grid;
  grid-template-columns: 5fr 4fr 0fr 0fr 0fr 0fr;
  gap: 0;
  position: relative;
  width: 100%;
  height: 100vh;
  cursor: pointer;
  padding: 1rem 0.5rem;
  transition: grid-template-columns 0.4s;
}

section div {
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.4s;
}

section div.hide {
  opacity: 0;
}

/* Toggle button */
.toggle {
  height: 50px;
  width: 40px;
  background-color: #000;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  transition: background-color 0.8s ease, transform 0.8s ease;
}

.toggle:hover {
  cursor: pointer;
  transform: scale(1.1);
}

.toggle.invert {
  background-color: #fbfbfa;
}

/* Information overlay */
.information {
  position: fixed;
  background: #151515;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s, visibility 0.8s;
  overflow: hidden;
  z-index: 98;
}

.information.open {
  opacity: 1;
  visibility: visible;
  overflow-y: hidden;
}

.info-columns {
  position: absolute;
  top: calc(100vh - 70px);
  left: 0;
  font-size: 12px !important;
  right: 0;
  margin-right: 80px;
  display: grid;
  grid-template-columns: 50% 25% 25%;
  gap: 40px;
  padding: 0 20px;
  color: #fbfbfa;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .info-columns {
    grid-template-columns: 40% 60%;
    gap: 24px;
    top: 50%;
    margin-right: 40px;
  }

  .info-columns p:nth-of-type(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .info-columns p:nth-of-type(2),
  .info-columns p:nth-of-type(3) {
    grid-column: 2;
  }

  .info-columns p:nth-of-type(2) {
    grid-row: 1;
  }

  .info-columns p:nth-of-type(3) {
    grid-row: 2;
  }
} /* ← correctly closes @media (max-width: 600px) */

@keyframes slideFadeUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.information.open .info-columns p {
  animation: slideFadeUp 0.5s ease forwards;
  opacity: 0;
}

.information.open .info-columns p:nth-of-type(1) { animation-delay: 0.1s; }
.information.open .info-columns p:nth-of-type(2) { animation-delay: 0.2s; }
.information.open .info-columns p:nth-of-type(3) { animation-delay: 0.3s; }

.info-columns a {
  color: #fbfbfa;
  transition: opacity 0.3s ease;
  text-decoration: none;
}

.info-columns a:hover {
  opacity: 0.8;
  cursor: pointer;
}

.info-columns p {
  margin: 0;
}

/* Project and slider */
.project {
  display: block;
  max-height: 60vh;
  width: 40vw;
  max-width: 800px;
  margin-left: auto;
}

@media (max-width: 600px) {
  .project {
    width: 100vw;
    padding: 20px;
  }
}

.image-slider {
  position: relative;
  width: 100%;
  max-width: 700px;
  max-height: 100vh;
  height: 100vh;
  overflow: hidden;
  cursor: pointer;
  margin-left: auto;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  background-color: #d8cbbf;
}

.image-wrapper img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: top right;
  filter: blur(20px);
  transform: scale(1.05);
  transition: filter 0.6s ease, transform 0.6s ease, opacity 0.6s ease;
  opacity: 0;
}

.image-wrapper img.loaded {
  filter: blur(0);
  transform: scale(1);
  opacity: 1;
}

#sliderCaption {
  position: fixed;
  bottom: 2em;
  left: 2em;
  max-width: 400px;
  color: #000;
  font-size: 0.9rem;
  display: flex;
  gap: 4em;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.6s ease;
  opacity: 1;
}

@media (max-width: 500px) {
  #sliderCaption {
    max-width: 75vw;
  }
}

#sliderCaption.fade-out {
  opacity: 0;
}

#sliderCaption.fade-in {
  opacity: 1;
}

#sliderCaption .year {
  min-width: 3ch;
}

#sliderCaption .details {
  flex-grow: 1;
  min-width: 0;
}

#sliderCaption .details p {
  margin: 0;
  line-height: 1.4;
  min-height: 1.4em; /* preserves space for empty caption fields */
}