:root {
  --padding: 30px;
  --color-black: #000;
  --color-white: #fff;
  --skeleton-bg: #f7f6f6;

  --head-serif: "Cormorant Garamond", serif;
  --serif: "Cormorant", serif;
  --sans: "Inter", sans-serif;

  --big-font: 78px;
  --body-font: 20px;
  --artist-font: 93px;
  --artist-font-profile: 48px;
  --title-font: 28px;
  --content-font: 14px;
  --small-font: 12px;
  --slide-text: 48px;
  --line-height: 30px;
  --big-line-height: 52px;
  --artist-letter-spacing: -2px;

  --ease-primary: cubic-bezier(1, 0, 0.47, 1.01);
  --ease-secondary: cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-smooth: cubic-bezier(0.77, 0, 0.18, 1);
}

@media screen and (max-width: 768px) {
  :root {
    --padding: 22px;
    --big-font: 44px;
    --body-font: 23px;
    --content-font: 17px;
    --artist-font: 48px;
    --artist-font-profile: 48px;
    --slide-text: 28px;
  }
}

/* ── Reset ── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*::-webkit-scrollbar { display: none !important; }
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html {
  font-size: var(--body-font);
  background: var(--color-white);
  color: var(--color-black);
}

body {
  font-family: var(--sans);
  overflow: hidden;
  width: 100%;
  height: 100%;
}

body.panel-open .container-content,
body.panel-open .site-footer {
  transform: translateY(-20%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  font-size: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

::selection {
  color: #c4c4c4;
}

/* ── List View ── */

.container-content {
  position: fixed;
  inset: 0;
  overflow-y: scroll;
  z-index: 1;
}

.designers-list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding: var(--padding);
  min-height: 100%;
}

.list-names {
  display: flex;
  flex-direction: column;
}

.designer-name-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.designer-name-item:hover {
  opacity: 0.5;
}

.designer-name-item.filtered-out {
  display: none;
}

.designer-name-item .name-text {
  font-family: var(--head-serif);
  font-size: var(--artist-font);
  line-height: 1.05;
  letter-spacing: -0.78px;
  transition: opacity 0.3s ease;
}

.designer-name-item:nth-child(even) .name-text {
  font-style: italic;
}

.designer-name-item .name-tags {
  font-family: var(--sans);
  font-size: 16px;
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
  white-space: nowrap;
}

@media screen and (max-width: 1280px) {
  .designer-name-item .name-text {
    font-size: 64px;
  }
}

@media screen and (max-width: 768px) {
  .designer-name-item .name-text {
    font-size: 40px;
    line-height: 44px;
    letter-spacing: -0.44px;
  }

  .designer-name-item .name-tags {
    font-size: 13px;
  }
}

/* ── List Thumbnails ── */

.designer-name-item {
  flex-wrap: wrap;
}

.name-thumb {
  width: 100%;
  flex-shrink: 0;
  padding: 4px 0 8px;
  overflow: hidden;
}

.name-thumb img {
  width: min(24vw, 220px);
  height: min(24vw, 220px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-secondary);
}

.name-thumb img.landscape {
  height: 24vw;
  width: auto;
  max-height: 220px;
}

.name-thumb img.portrait {
  width: 24vw;
  height: auto;
  max-width: 220px;
}

.name-thumb img.loaded {
  opacity: 1;
}

/* ── Filters ── */

.list-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 46px;
  margin-bottom: 104px;
}

.filter-item {
  font-family: var(--serif);
  font-size: 16px;
  display: inline-block;
  width: fit-content;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.3s ease;
  padding: 2px 0;
}

.filter-item:nth-child(even) {
  font-style: italic;
}

.filter-item:hover,
.filter-item.active {
  opacity: 1;
}

.info-panel-filters .filter-item {
  font-size: 20px;
}

/* ── Fixed Footer ── */

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 56px var(--padding) 10px var(--padding);
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 58%);
  pointer-events: none;
  transition: transform 0.8s 0.05s var(--ease-primary);
}

.footer-logo {
  font-family: var(--head-serif);
  font-size: 24px;
  font-weight: 400;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.footer-logo:hover {
  opacity: 0.5;
}

.logo-arrow {
  font-size: 14px;
  opacity: 0.4;
  margin-left: 2px;
}

@media screen and (max-width: 768px) {
  .footer-logo {
    font-size: 20px;
  }
}

.footer-info-btn {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  pointer-events: auto;
  transition: opacity 0.5s ease;
}

.footer-info-btn:hover {
  opacity: 0.4;
}

.detail-view.active ~ .site-footer .footer-info-btn,
.detail-view.active ~ .site-footer .logo-arrow {
  opacity: 0;
  pointer-events: none;
}

/* ── Overlay Panels (shared base) ── */

.overlay-panel {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: var(--color-white);
  color: var(--color-black);
  transform: translateY(120%);
  transition: transform 0.8s 0.05s var(--ease-primary);
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
}

.overlay-panel.open {
  transform: translateY(0);
}

.info-panel-filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 6px;
}

.info-close {
  position: fixed;
  bottom: var(--padding);
  right: var(--padding);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--color-black);
  z-index: 1000001;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.1s ease;
}

.info-close.visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.info-close.visible:hover {
  opacity: 0.4;
}

/* ── Nav Panel ── */

.nav-panel-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
}

.nav-panel-item {
  font-family: var(--head-serif);
  font-size: 48px;
  line-height: 1.1;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.3s ease;
  background: none;
  border: none;
  color: inherit;
}

.nav-panel-item:nth-child(even) {
  font-style: italic;
}

.nav-panel-item.active {
  opacity: 1;
}

.nav-panel-item:hover {
  opacity: 0.7;
}

.nav-panel-item.active:hover {
  opacity: 1;
}

@media screen and (max-width: 768px) {
  .nav-panel-item {
    font-size: 36px;
  }
}

/* ── Detail View ── */

.detail-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--color-white);
  transform: translateY(100%);
  transition: transform 0.8s var(--ease-primary);
  overflow: hidden;
}

.detail-view.active {
  transform: translateY(0);
}

.detail-scroll {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

.detail-back {
  position: fixed;
  top: 18px;
  left: var(--padding);
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--body-font);
  z-index: 110;
  transition: opacity 0.5s ease;
}

.detail-back:hover {
  opacity: 0.4;
}

.detail-header {
  text-align: center;
  padding: 130px 0 60px;
}

@media screen and (max-width: 768px) {
  .detail-header {
    padding: 60px 0 40px;
  }
}

.detail-name {
  font-family: var(--head-serif);
  font-style: italic;
  font-size: calc(var(--title-font) + 2px);
  font-weight: 300;
  letter-spacing: var(--artist-letter-spacing);
}

.detail-role {
  font-family: var(--sans);
  font-size: var(--small-font);
  text-transform: uppercase;
  letter-spacing: -0.1px;
  font-weight: 300;
  margin-top: 8px;
}

.detail-source {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--content-font);
  margin-top: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.3s ease;
}

.detail-source:hover {
  opacity: 0.4;
}

.detail-source:empty {
  display: none;
}

/* ── Detail Galleries ── */

.detail-galleries {
  order: 0;
}

.gallery-project {
  position: relative;
  width: 100%;
}

@media screen and (min-width: 769px) {
  .gallery-project {
    margin-bottom: 192px;
  }
}

.gallery-project .swiper {
  width: 100%;
  overflow: hidden;
}

.gallery-project .swiper-slide {
  width: 100%;
  height: auto;
}

@media screen and (min-width: 769px) {
  .gallery-project .swiper-slide {
    width: auto;
    height: calc(580px + 5vh);
  }

  .gallery-project .swiper-slide img {
    height: 100%;
    width: auto;
    object-fit: cover;
  }
}

.gallery-project .swiper-slide .skeleton {
  background: var(--skeleton-bg);
  width: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-project .swiper-slide img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-project .swiper-slide img.loaded {
  opacity: 1;
}

.mobile-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.mobile-arrow:hover {
  opacity: 1;
}

.mobile-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--color-black);
  stroke-width: 1.5;
}

.mobile-arrow.mobile-prev {
  left: var(--padding);
}

.mobile-arrow.mobile-next {
  right: var(--padding);
}

/* Single adapted image (no slider) */
.gallery-single {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
  padding: 0 var(--padding);
}

@media screen and (min-width: 769px) {
  .gallery-single {
    margin-bottom: 192px;
  }
}

.gallery-single .skeleton {
  background: var(--skeleton-bg);
  width: 100%;
  max-width: 50vw;
  min-height: 300px;
}

@media screen and (max-width: 768px) {
  .gallery-single .skeleton {
    max-width: 100%;
  }
}

.gallery-single img {
  max-height: calc(100vh - var(--padding) * 2);
  max-width: 50vw;
  height: auto;
  width: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media screen and (max-width: 768px) {
  .gallery-single img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }
}

.gallery-single img.loaded {
  opacity: 1;
}

.gallery-single .skeleton:has(img.loaded) {
  min-height: 0;
}

.gallery-project .swiper-slide .skeleton:has(img.loaded) {
  min-height: 0;
}

/* ── Detail Info (Bio, Links) ── */

.detail-info {
  order: 1;
  padding: 0px var(--padding) 87px;
  width: 100%;
}

@media screen and (min-width: 769px) {
  .detail-info {
    max-width: 600px;
    padding: 0px var(--padding) 87px;
  }
}

.detail-bio {
  margin-top: 36px;
}

.detail-bio p {
  font-family: var(--serif);
  font-size: var(--content-font);
  line-height: 23px;
}

@media screen and (max-width: 768px) {
  .detail-bio p {
    font-size: 17px;
    line-height: 23px;
  }
}

.detail-bio:empty {
  display: none;
}


.detail-links {
  margin-top: 40px;
}

.detail-links a {
  display: block;
  font-family: var(--serif);
  font-size: var(--content-font);
  line-height: 2;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.3s ease;
}

.detail-links a:hover {
  opacity: 0.5;
}

.detail-links .visit-cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--small-font);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  border: 1px solid var(--color-black);
  padding: 12px 24px;
  transition: background 0.3s ease, color 0.3s ease;
}

.detail-links .visit-cta:hover {
  background: var(--color-black);
  color: var(--color-white);
}

/* ── View Transition States ── */

.container-content {
  transition: transform 0.8s var(--ease-primary), opacity 0.5s var(--ease-primary);
}

.container-content.transitioning-out {
  transform: translateY(-20%);
  opacity: 0;
}

.container-content.collection-switching {
  opacity: 0;
}

/* ── Utility ── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
