body {
  margin: 0;
  background-color: #000;
}

html {
  scroll-snap-type: y mandatory;
}

.page-section-full,
.project-section {
  scroll-snap-align: start;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.page-section-full {
  width: 100%;
  min-height: 100vh;
  min-height: 100lvh;
  position: relative;
  z-index: 0;
}

.bg-image-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

@font-face {
  font-family: 'logoFont';
  src: url('fonts/AvianoFlareBlack.woff2') format('woff2'),
       url('fonts/AvianoFlareBlack.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.logo-symbol-r {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .7rem;
  font-weight: 700;
}

.preloader-bg {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 999;
  pointer-events: none;
}

.nav-wrapper {
  position: fixed;
  top: 50%;
  left: 0;
  width: 100%;
  height: auto;
  padding: .5rem 1rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: #000000;
  z-index: 1000;
  gap: 5rem;
}

.nav-wrapper.is-preloading {
  visibility: hidden;
}

nav {
  display: flex;
  gap: 1.5rem;
}

.nav-right {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-project-title {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: normal;
  overflow-wrap: break-word;
  max-width: 40vw;
  text-align: right;
  line-height: 1.4;
  pointer-events: none;
}

.nav-logo {
  font-family: 'logoFont', monospace;
  font-size: .7rem;
  font-weight: 700;
  color: #e1e1e1;
  line-height: 1;
  margin: 0;
}

.nav-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: #e1e1e1;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
}

/* ── Introduction Overlay ── */
.intro-overlay {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.intro-close,
.intro-content {
  pointer-events: auto;
}

.intro-close {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.intro-content {
  position: absolute;
  top: calc(50% + 2.2rem);
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  max-width: 26rem;
}

.intro-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: #e1e1e1;
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.05em;
}

.intro-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(225, 225, 225, 0.6);
  margin: 0;
  line-height: 1.8;
}
/* ── End Introduction Overlay ── */

/* ── Preloader ── */
.char-outer {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.15;
}

.char-inner {
  display: inline-block;
}
/* ── End Preloader ── */

/* ── Project Sections ── */

.project-section {
  width: 100%;
  height: 100lvh;
  position: relative;
  overflow: hidden;
  background: #000;
  --section-pad: 3rem;
}

.project-media {
  position: absolute;
  inset: var(--section-pad);
}

.project-media img,
.project-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── End Project Sections ── */

/* ── List View ── */

html.list-view-mode {
  scroll-snap-type: none;
}

.view-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1001;
  display: flex;
  gap: 1rem;
}

.view-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.12s;
}

.view-btn.is-active {
  pointer-events: none;
}

.view-btn:not(.is-active) {
  color: rgba(225, 225, 225, 0.3);
}

#list-view {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 500;
  overflow-y: auto;
  padding: calc(50lvh + 2.5rem) 1rem 4rem;
  scrollbar-width: none;
}

#list-view::-webkit-scrollbar {
  display: none;
}

#list-view.is-active {
  display: block;
}

.list-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-row-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0;
  cursor: default;
}

.list-connector {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(225, 225, 225, 0.2);
  flex-shrink: 0;
  user-select: none;
}

.list-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: #e1e1e1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.4;
  transition: color 0.12s;
}

.list-row:hover .list-title {
  color: rgba(225, 225, 225, 0.4);
}

/* Cursor follower preview */
.list-cursor-preview {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 300px;
  height: 210px;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.15s ease;
  overflow: hidden;
  background: #000;
}

.list-cursor-preview.is-visible {
  opacity: 1;
}

.list-cursor-preview img,
.list-cursor-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

/* Mobile inline expand */
.list-row-media {
  display: none;
  padding: 0.5rem 0 0.75rem 2rem;
}

.list-row.is-expanded .list-row-media {
  display: block;
}

.list-row-media img,
.list-row-media video {
  width: 100%;
  max-height: 56vw;
  object-fit: contain;
  display: block;
  background: #000;
}

@media (hover: hover) {
  .list-row-head {
    cursor: pointer;
  }
}

@keyframes section-highlight {
  0%   { box-shadow: inset 0 0 0 1px rgba(225, 225, 225, 0); }
  15%  { box-shadow: inset 0 0 0 1px rgba(225, 225, 225, 0.7); }
  100% { box-shadow: inset 0 0 0 1px rgba(225, 225, 225, 0); }
}

.project-section.is-highlighted {
  animation: section-highlight 1.2s ease-out forwards;
}

/* ── End List View ── */

@media (max-width: 768px) {
  .nav-wrapper {
    gap: 1rem;
  }

  .nav-project-title {
    white-space: normal;
    max-width: 50vw;
    text-align: right;
    line-height: 1.4;
  }
}
