/* Progressive visual enhancements for the main portfolio.
   Existing layout, spacing, and content structure remain unchanged. */

.site-header {
  border-bottom: 1px solid transparent;
  transition:
    background-color 360ms ease,
    backdrop-filter 360ms ease,
    border-color 360ms ease;
}

.site-header.is-over-hero {
  background: rgba(12, 12, 12, .16);
  backdrop-filter: blur(6px);
  border-bottom-color: rgba(255, 255, 255, .06);
}

.site-header.is-scrolled {
  background: rgba(17, 17, 17, .84);
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(255, 255, 255, .1);
}

.site-header nav a {
  position: relative;
  transition: color 220ms ease, opacity 220ms ease;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 240ms ease;
}

.site-header nav a.is-active {
  color: #fff;
}

.site-header nav a.is-active::after {
  transform: scaleX(1);
}

/* Keep the existing 40-second hero rhythm, adding only a slight focus transition. */
.hero-slide {
  will-change: opacity, transform, filter;
}

@keyframes heroBlend {
  0% {
    opacity: 0;
    transform: scale(1.03);
    filter: blur(1.4px);
  }

  4% {
    opacity: .86;
    filter: blur(0);
  }

  18% {
    opacity: .86;
    filter: blur(0);
  }

  26% {
    opacity: 0;
    transform: scale(1.085);
    filter: blur(1.4px);
  }

  92% {
    opacity: 0;
    transform: scale(1.085);
    filter: blur(1.4px);
  }

  100% {
    opacity: 0;
    transform: scale(1.085);
    filter: blur(1.4px);
  }
}

/* Reveal is activated only after JavaScript marks the page ready. */
.enhancements-ready .reveal-item {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 520ms cubic-bezier(.22, .61, .36, 1),
    transform 520ms cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.enhancements-ready .reveal-item.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Existing CV wording remains unchanged; only link behavior is refined. */
.cv-source-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.cv-source-link:hover,
.cv-source-link:focus-visible {
  color: var(--muted);
  text-decoration-color: var(--ink) !important;
}

.current-work img {
  cursor: zoom-in;
  transition: opacity 220ms ease;
}

.current-work img:hover {
  opacity: .94;
}

.current-work img:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 5px;
}

body.is-lightbox-open {
  overflow: hidden;
}

.art-lightbox[hidden] {
  display: none;
}

.art-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 54px 36px 30px;
  background: rgba(8, 8, 8, .965);
  opacity: 0;
  transition: opacity 220ms ease;
}

.art-lightbox.is-open {
  opacity: 1;
}

.art-lightbox__frame {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  justify-items: center;
  width: min(100%, 1680px);
  height: calc(100vh - 84px);
  pointer-events: none;
}

.art-lightbox__figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  min-height: 0;
  pointer-events: auto;
}

.art-lightbox__image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 152px);
  object-fit: contain;
  opacity: .96;
  transform: scale(.992);
  transition: opacity 260ms ease, transform 300ms cubic-bezier(.22, .61, .36, 1);
}

.art-lightbox.is-open .art-lightbox__image {
  opacity: 1;
  transform: scale(1);
}

.art-lightbox__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 12px;
  max-width: min(920px, 90vw);
  color: rgba(255, 255, 255, .9);
  text-align: center;
}

.art-lightbox__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.35;
}

.art-lightbox__year {
  color: rgba(255, 255, 255, .56);
  font-size: 11px;
  line-height: 1.7;
}

.art-lightbox__close {
  position: fixed;
  top: 20px;
  right: 26px;
  z-index: 1;
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  font: inherit;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
}

.art-lightbox__close:hover,
.art-lightbox__close:focus-visible {
  color: #fff;
}

.art-lightbox__close:focus-visible {
  outline: 1px solid rgba(255, 255, 255, .72);
  outline-offset: 5px;
}

.now-exhibition.is-featured-record .now-exhibition-media {
  position: relative;
  background: #070707;
}

.now-exhibition.is-featured-record .now-exhibition-media::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  content: "";
  pointer-events: none;
}

.now-exhibition-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  max-width: calc(100% - 28px);
  padding: 8px 10px;
  border: 1px solid rgba(17, 17, 17, .16);
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.now-exhibition.is-featured-record .now-exhibition-body {
  border-top-color: var(--ink);
}

.now-exhibition-proof {
  margin-top: 13px !important;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.62;
}

.now-proof-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.now-proof-list span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.now-proof-list strong {
  color: var(--ink);
  font-size: 10px;
  letter-spacing: .07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-page--inward-red .site-header {
  background: rgba(17, 17, 17, .9);
}

.project-page--inward-red .project-hero {
  align-items: end;
}

.project-hero-mark {
  display: inline-flex;
  align-items: center;
  margin: 0 0 18px;
  padding: 6px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-feature-visual {
  margin: 0;
  padding: 34px 0 18px;
  border-bottom: 1px solid var(--line);
}

.project-feature-visual img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #070707;
}

.project-feature-caption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.project-feature-caption strong {
  color: var(--ink);
}

.project-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 32px 0 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.project-highlight {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 18px 16px;
  background: #fff;
}

.project-highlight span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-highlight strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.12;
}

.project-highlight p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
}

.project-text-section {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 52px;
  padding: 34px 0 70px;
  border-bottom: 1px solid var(--line);
}

.project-text-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
}

.project-text-section p {
  margin: 0 0 .75em;
  font-size: 15px;
  line-height: 1.72;
}

.project-text-section p:last-child {
  margin-bottom: 0;
}

.project-record-note {
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .site-header {
    backdrop-filter: blur(8px);
  }

  .site-header.is-over-hero {
    background: rgba(12, 12, 12, .24);
    backdrop-filter: blur(8px);
  }

  .now-proof-list,
  .project-highlight-grid,
  .project-text-section {
    grid-template-columns: 1fr;
  }

  .project-text-section {
    gap: 18px;
  }
}

@media (max-width: 560px) {
  .art-lightbox {
    padding: 58px 14px 22px;
  }

  .art-lightbox__frame {
    height: calc(100vh - 80px);
  }

  .art-lightbox__image {
    max-height: calc(100vh - 142px);
  }

  .art-lightbox__close {
    top: 14px;
    right: 16px;
  }

  .now-exhibition-badge {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }

  .project-feature-caption {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header nav a,
  .site-header nav a::after,
  .current-work img,
  .art-lightbox,
  .art-lightbox__image {
    transition: none;
  }

  .enhancements-ready .reveal-item,
  .enhancements-ready .reveal-item.is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-slide {
    filter: none !important;
    will-change: opacity;
  }
}
