/* Easy settings */
:root {
  --background: url("assets/background.jpg");
  --min-size: 150px;
  --max-size: 200px;
  --field-width: 62vw;
  --field-height: 62vh;
  --logo-width: clamp(300px, 12vw, 500px);
  --logo-offset: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Roboto", sans-serif;
  font-weight: 300; /* light */
}

body {
  background-image: var(--background);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-color: #eee;
}

button { font: inherit; }

#home {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.logo-button {
  position: absolute;
  z-index: 1000;
  top:  var(--logo-offset);
  left: 50%;

  width: var(--logo-width);
  aspect-ratio: 3 / 1;

  padding: 0;
  border: 0;

  background-image: url("assets/logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;

  cursor: pointer;

  transform: translateX(-50%);
}

#project-field {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--field-width);
  height: var(--field-height);
  transform: translate(-50%, -50%);
}

.project {
  position: absolute;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transform-origin: center center;
}

.project:active { cursor: grabbing; }

.project-frame {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(5px 7px 6px rgba(0, 0, 0, 0.3));
}

.project-image {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 50%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.frame-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.86);
}

.overlay.open { display: flex; }

.gallery-content {
  position: relative;
  width: min(80vw, 1200px);
  height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#gallery-media {
  width: 100%;
  height: calc(100% - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
}

#gallery-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#gallery-media iframe {
  width: min(80vw, 1100px);
  aspect-ratio: 16 / 9;
  max-height: 75vh;
  border: 0;
}

.project-title {
  font-weight: 500;
}

.inquire-link {
  margin-left: auto;
  color: inherit;
  text-decoration: underline;
  font-style: normal;
  font-weight: 400;
}

.inquire-link:hover {
  text-decoration: none;
}

.available-back-link {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;

  color: white;
  opacity: 0.7;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;

  display: none;
}

.available-back-link:hover {
  text-decoration: underline;
}

.gallery-text {
  width: 100%;
  max-width: 700px;
  margin-top: 20px;
  color: white;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.gallery-text strong,
.bio-text strong {
  font-weight: 700;
}

.gallery-text a,
.bio-text a {
  color: inherit;
  text-decoration: underline;
}

.gallery-text a:hover,
.bio-text a:hover {
  text-decoration: none;
}

.gallery-arrow, .close-button {
  position: absolute;
  z-index: 10;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.gallery-arrow {
  top: 50%;
  transform: translateY(-50%);
  padding: 30px;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.close-button {
  top: 22px;
  right: 28px;
  padding: 10px;
  font-size: 38px;
}

#bio {
  overflow-y: auto;
  align-items: flex-start;
  padding: 80px 0;
}


.bio-content {
  width: min(700px, 80vw);
  max-height: none;
  display: flex;
  gap: 35px;
  align-items: flex-start;
  color: white;
  margin: auto;
}

.bio-content > img {
  width: min(280px, 35vw);
  max-height: 70vh;
  object-fit: contain;
}

.bio-text {
  max-width: 400px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.5;
}

#bio .close-button {
  position: fixed;
  top: 22px;
  right: 28px;
}

.cv-link {
  display: inline-block;
  margin-top: 20px;
  color: white;
  font-size: 14px;
  text-decoration: underline;
}

.cv-link:hover {
  text-decoration: none;
}

@media (max-width: 700px) {
  :root {
    --field-width: 88vw;
    --field-height: 75vh;
	--min-size: clamp(150px, 18vw, 150px);
	--max-size: clamp(200px, 30vw, 200px);
  }

  .logo-button {
  top:  var(--logo-offset);
  left: 50%;
  transform: translateX(-50%);
}

  .gallery-content { width: 88vw; height: 82vh; }
  .gallery-arrow { padding: 15px; }

  #bio {
  display: none;
  overflow-y: auto;
  align-items: flex-start;
  padding: 70px 0 60px;
}

#bio.open {
  display: flex;
}

#bio .close-button {
  position: fixed;
  top: 15px;
  right: 15px;
}

.bio-content {
  width: min(700px, 80vw);
  max-height: none;
  display: flex;
  gap: 35px;
  align-items: flex-start;
  color: white;
  margin: auto;
}

.bio-content > img {
  width: 55vw;
  max-height: none;
  object-fit: contain;
}

.bio-info {
  width: 100%;
}

.bio-text {
  max-width: 100%;
}
}

.logo-button {
  transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-button:hover {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}