@font-face {
  font-family: "WTGaramono";
  src: url("Assets/Fonts/WTGaramonoTRIAL-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "WTGaramono";
  src: url("Assets/Fonts/WTGaramonoTRIAL-Italic.otf") format("opentype");
  font-weight: normal;
  font-style: italic;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background-color: rgba(26, 26, 26, 0.15);
  color: #1a1a1a;
}

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: "WTGaramono", Georgia, "Times New Roman", serif;
  background-color: #f0ece4;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

.projects-container {
  height: 100%;
  height: 100dvh;
  overflow-y: scroll;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

/* ── Header ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 32px;
  z-index: 100;
  pointer-events: none;
}

.site-title {
  font-size: 16px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #1a1a1a;
  pointer-events: auto;
}

.info-toggle {
  font-family: "WTGaramono", Georgia, serif;
  font-size: 16px;
  letter-spacing: 0.04em;
  background: none;
  border: none;
  color: #1a1a1a;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.info-toggle:hover {
  opacity: 1;
}

/* ── About overlay ── */

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(240, 236, 228, 0.90);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.about-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.about-content {
  max-width: 520px;
  padding: 32px;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  text-align: left;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.about-overlay.visible .about-content {
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.1s,
              opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.1s;
}

.about-links {
  margin-top: 1.2em;
}

.about-links a {
  color: #1a1a1a;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.about-links a:hover {
  opacity: 1;
}

/* ── Project list (fixed bottom-left) ── */

.project-list {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-list-item {
  line-height: 1.35;
  font-variant-numeric: oldstyle-nums;
  -moz-font-feature-settings: "onum";
  -webkit-font-feature-settings: "onum";
  font-feature-settings: "onum";
  transition: opacity 0.22s ease;
}

.project-list-item.fading-out {
  opacity: 0;
}

.project-list-item .item-title {
  display: block;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.project-list-item .item-dimensions,
.project-list-item .item-year {
  display: block;
  font-size: 16px;
  letter-spacing: 0.03em;
  font-style: italic;
}

/* ── Project sections ── */

.slide-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 5;
  cursor: pointer;
}

.slide-zone-left {
  right: 50%;
}

.slide-zone-right {
  left: 50%;
}

.project-section {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  overflow: hidden;
}

.slideshow-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.slideshow-image {
  display: block;
  max-height: 75vh;
  max-height: 75dvh;
  max-width: 55vw;
  object-fit: contain;
}

@keyframes fade-in-only {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.slideshow-image.anim-next,
.slideshow-image.anim-prev,
.slideshow-image.anim-wrap,
.description-slide.anim-wrap {
  animation: fade-in-only 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

/* ── Slideshow controls row ── */

.controls-row {
  position: fixed;
  bottom: 32px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity 0s ease;
  opacity: 0;
  pointer-events: none;
}

.controls-row.controls-visible {
  transition: opacity 0.4s ease;
  opacity: 1;
  pointer-events: auto;
}


.slideshow-controls {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 16px;
  letter-spacing: 0.04em;
  user-select: none;
}

.slide-number {
  cursor: pointer;
  opacity: 0.2;
  transition: opacity 0.3s ease, visibility 0s;
  padding: 2px 0;
}

.controls-row:not(.controls-visible) .slide-number {
  opacity: 0 !important;
  visibility: hidden;
}

.slide-number.active {
  opacity: 1;
}

.slide-number:hover {
  opacity: 1;
}

.slide-number.active:hover {
  opacity: 1;
}

.slide-number::before {
  content: "(";
}
.slide-number::after {
  content: ")";
}

/* ── Description slide ── */

.description-slide {
  display: none;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  text-align: left;
  padding: 32px;
}

.description-slide.anim-next,
.description-slide.anim-prev {
  animation: fade-in-only 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

.slide-plus {
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.slide-plus:hover {
  opacity: 1;
}

/* ── Intro animation ── */

.typewriter-target {
  visibility: hidden;
}

.typewriter-target.typing,
.typewriter-target.typed {
  visibility: visible;
}

.typewriter-cursor {
  display: inline;
  opacity: 1;
  animation: blink-cursor 0.6s steps(1) infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.fade-in-element {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.fade-in-element.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .site-header {
    padding: 16px 20px;
  }

  .project-list {
    top: 48px;
    bottom: auto;
    left: 20px;
    gap: 12px;
  }

  .controls-row {
    bottom: 16px;
  }

  .slideshow-wrapper {
    padding-top: 50px;
  }

  .slideshow-image {
    max-width: 85vw;
    max-height: 65vh;
    max-height: 65dvh;
  }

  .description-slide {
    padding: 32px 20px;
    max-width: 100%;
    text-align: left;
  }
}
