:root {
  --text-color: black;
  --body-bg: white;
  --image-bg: #f0f0f0;
  --logo-bg: #eaeaea;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--body-bg);
  font-family: Roboto, sans-serif;
  font-weight: 400;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

#project-detail {
  width: 70vw;
  max-width: 70rem;
  text-align: left;
  padding: 5vw 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#logo-link {
  display: block;
  text-decoration: none;
}

#logo-link:hover #logo {
  background: #d0d0d0;
  transition: background-color 0.3s ease;
}

#logo {
  width: clamp(12rem, 20vw, 18rem);
  height: 2.5rem;
  margin-bottom: 0.5rem;
  background: var(--logo-bg);
  -webkit-mask: url("../assets/SUPERFLUO-LOGO.svg") no-repeat center / contain;
  mask: url("../assets/SUPERFLUO-LOGO.svg") no-repeat center / contain;
}

#description {
  margin: 0 0 5vw 0;
  font-size: clamp(1.5rem, 2vw, 2.5rem);
  line-height: 1.2;
  max-width: 100%;
}

#image-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  align-self: center;
}

.image-container {
  position: relative;
  width: 100%;
  background-color: var(--image-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.image-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 1;
}

.image-container::after {
  content: attr(data-title);
  font-family: Roboto, sans-serif;
  font-weight: 10;
  font-style: italic;
  color: white;
  font-size: 1rem;
  position: absolute;
  bottom: 0.8rem;
  left: 0.8rem;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.image-container:hover::before {
  opacity: 1;
}

.image-container:hover::after {
  opacity: 1;
}

.image-container:hover img {
  transform: scale(1);
}

#outLink {
  color: var(--logo-bg);
}

#outLink:hover {
  color: #d0d0d0;
}

#caption {
  color: var(--text-color);
  font-family: Roboto, sans-serif;
  font-weight: 400;
  margin: 0 0 0 0;
  font-size: clamp(1.5rem, 2vw, 2.5rem);
  line-height: 1.2;
  max-width: 98%;
}

@media (max-width: 50em) {
  #description {
    font-size: clamp(1.5rem, 2vw, 2.5rem);
  }
  #logo {
    width: clamp(10rem, 40vw, 15rem);
    height: 2rem;
  }
  #project-detail {
    width: 85vw;
  }
}

/* MacBook-style screens */
@media (min-width: 1400px) and (max-width: 1600px) {
  #project-detail {
    width: 60vw;
  }
}
