/* ── Reset & Base ───────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #fff;
  color: #222;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: #222;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}


h1, h2, h3 {
  font-weight: 200 !important;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ────────────────────────────────────────── */

.artist-name {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-weight: 300;
  font-size: 3.2rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}

.exhibition-title {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-weight: 300;
  font-style: italic;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  margin-top: 0.4rem;
  line-height: 1.3;
}

.section-heading {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.image-title {
  font-size: 0.95rem;
  color: #222;
  margin-top: 0.6rem;
  text-align: center;
  font-weight: 200;
  letter-spacing: 0.03em;
}

.caption {
  font-size: 0.85rem;
  color: #222;
  margin-top: 0.3rem;
  text-align: center;
  font-style: italic;
}

.img-tag {
  font-size: 0.7rem;
  color: #999;
  text-align: center;
  margin-top: 0.3rem;
  font-family: monospace;
}


/* ── Layout ────────────────────────────────────────────── */

#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* ── Masthead ──────────────────────────────────────────── */

.masthead {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin-left: calc(-50vw + 50%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.masthead__overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #C3C3C3;
  padding: 0 1.5rem;
}

.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.masthead__title {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-weight: 300;
  font-size: 4rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #C3C3C3;
}

.masthead__subtitle {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-weight: 300;
  font-style: italic;
  font-size: 2rem;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  line-height: 1.3;
  color: rgba(195, 195, 195, 0.85);
}

.masthead__arrow {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: #C3C3C3;
  opacity: 0.8;
  animation: bounceArrow 2s ease infinite;
  text-decoration: none;
}

.masthead__arrow:hover {
  opacity: 1;
  text-decoration: none;
}

@keyframes bounceArrow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}


/* ── Header ────────────────────────────────────────────── */

.site-header {
  text-align: center;
  padding: 6rem 1rem 4rem;
}


/* ── Bio ───────────────────────────────────────────────── */

.bio {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1rem 1rem;
  text-align: center;
  font-size: 0.92rem;
}

.bio__image {
  width: 38%;
  margin: 0 auto 2rem;
  display: block;
}

.bio__sinhala-name {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
  color: #222;
}

.bio__byline {
  font-size: 0.95rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: #222;
}

.bio p {
  margin-bottom: 1rem;
  color: #222;
  text-wrap: pretty;
}


/* ── Sections ──────────────────────────────────────────── */

.section {
  margin-bottom: 80px;
}

/* --- Image --- */
.section--image {
  width: 100%;
}


.section--image img {
  width: 100%;
  height: auto;
}

/* --- Image Pair --- */
.section--image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.image-pair__item {
  overflow: hidden;
}

.image-pair__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Video --- */
.section--video {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section--video video {
  max-height: 90vh;
  max-width: 100%;
  width: auto;
  display: block;
}

/* --- Placeholder (shown when no image is assigned) --- */
.placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e8e8e8;
  border: 2px dashed #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder__label {
  font-family: monospace;
  font-size: 1.1rem;
  color: #222;
  letter-spacing: 0.05em;
  background: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
}

/* --- Text --- */
.section--text {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 1rem;
  text-align: center;
}

.section--text p {
  margin-bottom: 1rem;
  color: #222;
  text-wrap: pretty;
}

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


/* --- Contact --- */
.contact__heading {
  width: 100%;
  text-align: center;
  margin-bottom: 0;
}

.section--contact {
  display: flex;
  flex-wrap: wrap;
  column-gap: 12rem;
  row-gap: 3rem;
  align-items: center;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto 80px;
  padding: 3rem 2rem;
}

.contact__image {
  width: 20%;
  flex-shrink: 0;
}

.contact__image img {
  width: 100%;
  display: block;
}

.contact__info {
  flex: 1;
}

.contact__item {
  margin-bottom: 1.5rem;
  color: #222;
  font-size: 0.95rem;
}

.contact__label {
  font-weight: 400;
}

.contact__item a {
  color: #222;
  text-decoration: underline;
}

.contact__item a:hover {
  color: #555;
}


/* --- Articles --- */
.section--articles {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 1rem;
  text-align: center;
}

.articles__list {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: center;
}

.article-card {
  display: block;
  max-width: 280px;
  text-decoration: none;
  color: #222;
  transition: opacity 0.2s;
}

.article-card:hover {
  opacity: 0.8;
  text-decoration: none;
}

.article-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.article-card:hover img {
  transform: scale(1.05);
}

.article-card .article-card__thumb {
  overflow: hidden;
}

.article-card__title {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

/* --- Article Page --- */
.article-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.article-page__header {
  text-align: center;
  padding: 2rem 0 3rem;
}

.article-page__back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #222;
}

.article-page__back:hover {
  text-decoration: underline;
}

.article-page__title {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-size: 2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}

.article-page__images img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 2rem;
}

.article-page__images img:last-child {
  margin-bottom: 0;
}


/* ── Carousel / Slideshow ─────────────────────────────── */

.section--carousel {
  width: 100%;
}

.carousel__stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.carousel__viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 1;
  overflow: hidden;
  min-height: 300px;
}

.carousel__slide {
  flex-shrink: 0;
  overflow: hidden;
  text-align: center;
}

.carousel__slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.carousel__slide--prev,
.carousel__slide--next {
  display: none;
}

.carousel__slide--curr {
  width: 60%;
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
}

.carousel__slide--curr img {
  transition: transform 0.3s ease;
}

.carousel__slide--zoomed {
  cursor: zoom-out;
}

.carousel__slide--zoomed:hover {
  transform: none;
  box-shadow: none;
}

/* Zoom hint on current slide */
.carousel__zoom-hint {
  position: absolute;
  bottom: 1.8rem;
  right: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.carousel__slide--zoomed .carousel__zoom-hint {
  opacity: 0;
}

/* Expand / fullscreen button on current slide */
.carousel__expand-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  line-height: 0;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.carousel__slide--curr:hover .carousel__expand-btn {
  opacity: 1;
}

.carousel__expand-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel__slide--zoomed .carousel__expand-btn {
  opacity: 0;
  pointer-events: none;
}

.carousel__arrow {
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  font-size: 3rem;
  color: #B37E2E;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.carousel__arrow:hover {
  color: #d4a04a;
}

/* Thumbnail strip */
.carousel__thumbs {
  display: flex;
  gap: 0.4rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding: 0.4rem 0;
  justify-content: center;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.carousel__thumbs::-webkit-scrollbar {
  height: 4px;
}

.carousel__thumbs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.carousel__thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.carousel__thumb:hover {
  opacity: 0.8;
}

.carousel__thumb--active {
  opacity: 1;
  border-color: #B37E2E;
}

@media (max-width: 768px) {
  .carousel__slide--curr {
    width: 100%;
  }

  .carousel__expand-btn {
    opacity: 1;
  }

  .carousel__arrow {
    font-size: 2rem;
    padding: 0.3rem;
  }

  .carousel__thumb {
    width: 56px;
    height: 40px;
  }
}


/* ── Carousel Popup ───────────────────────────────────── */

.carousel-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.carousel-popup--open {
  opacity: 1;
  pointer-events: auto;
}

.carousel-popup__img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  cursor: zoom-in;
}

.carousel-popup__img-wrap--zoomed {
  cursor: zoom-out;
}

.carousel-popup__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.carousel-popup__zoom-hint {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.carousel-popup__img-wrap--zoomed .carousel-popup__zoom-hint {
  opacity: 0;
}

.carousel-popup__close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2.8rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  z-index: 2;
}

.carousel-popup__close:hover {
  color: #ccc;
}


/* ── Lightbox ──────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox--open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  user-select: none;
}

.lightbox__close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2.4rem;
  color: #222;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  z-index: 2;
}

.lightbox__close:hover {
  color: #555;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 3.5rem;
  color: #B37E2E;
  cursor: pointer;
  padding: 0.5rem 1rem;
  line-height: 1;
  user-select: none;
  z-index: 2;
}

.lightbox__arrow:hover {
  color: #d4a04a;
}

.lightbox__arrow--prev {
  left: 1rem;
}

.lightbox__arrow--next {
  right: 1rem;
}

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: #555;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .lightbox__arrow {
    font-size: 2.5rem;
    padding: 0.3rem 0.6rem;
  }

  .lightbox__arrow--prev {
    left: 0.3rem;
  }

  .lightbox__arrow--next {
    right: 0.3rem;
  }

  .lightbox__img {
    max-width: 94vw;
    max-height: 85vh;
  }
}


/* ── Footer ────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid #e0e0e0;
  padding: 3rem 1rem;
  text-align: center;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #222;
}

.footer-gallery {
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #222;
  margin-bottom: 0.4rem;
}

.footer-address {
  margin-bottom: 0.4rem;
}

.footer-contact {
  margin-bottom: 0.4rem;
}

.footer-contact a {
  color: #222;
}

.footer-contact a:hover {
  color: #222;
}

.footer-social {
  margin-bottom: 1rem;
}

.social-link {
  color: #222;
  margin: 0 0.5rem;
}

.social-link:hover {
  color: #222;
}

.back-to-top {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #222;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.back-to-top:hover {
  color: #222;
}

.footer-credit {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: #aaa;
  letter-spacing: 0.06em;
}


/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
  .masthead__title {
    font-size: 2.8rem;
    letter-spacing: 0.14em;
  }

  .masthead__subtitle {
    font-size: 1.4rem;
  }

  .artist-name {
    font-size: 2.2rem;
    letter-spacing: 0.12em;
  }

  .exhibition-title {
    font-size: 1.3rem;
  }

  .site-header {
    padding: 4rem 1rem 3rem;
  }

  .section--text {
    padding: 2rem 1rem;
  }

  .section--image-pair {
    grid-template-columns: 1fr;
  }

  .section--contact {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact__image {
    flex: 0 0 auto;
    max-width: 250px;
  }

  #app {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .masthead__title {
    font-size: 2rem;
    letter-spacing: 0.1em;
  }

  .masthead__subtitle {
    font-size: 1.1rem;
  }

  .artist-name {
    font-size: 1.6rem;
    letter-spacing: 0.1em;
  }

  .exhibition-title {
    font-size: 1.1rem;
  }

  .site-header {
    padding: 3rem 0.75rem 2rem;
  }

  .section--text {
    padding: 1.5rem 0.75rem;
  }

  #app {
    padding: 0 0.75rem;
  }
}
