/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
  --color-bg: #f3bd7c;
  --color-bg-alt: #eba85a;
  --color-text: #3a332c;
  --color-text-soft: #6b6255;
  --color-accent: #8f5527;
  --color-line: #d99a5c;
  --color-overlay: rgba(30, 26, 20, 0.94);
  --font-serif: 'Garamond', 'EB Garamond', 'Adobe Garamond Pro', Baskerville, 'Times New Roman', serif;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-serif);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
}

/* Painting background, fixed behind the whole page (a real element — #fixed-bg
   in index.html, the first thing inside <body> — rather than
   background-attachment:fixed, which is unreliable on mobile browsers and
   can fail to render at all there). position:fixed + inset:0 pins it to the
   viewport regardless of scroll, and background-size:cover scales it to
   fill the viewport without stretching (cropped, not distorted). z-index:-1
   keeps it behind every section, each of which has its own translucent veil
   color (below) rather than repeating the image per-section. */
#fixed-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('../images/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Translucent orange veil for every section except Home (see .hero-section's
   own rule) — sits on top of #fixed-bg. background-color doesn't inherit in
   CSS, so this has to be set explicitly on each section. */
.about-section,
.gallery-section,
.press-section,
.contact-section,
.site-footer {
  background-color: rgba(243, 189, 124, 0.85);
}

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

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

h1, h2, h3, p {
  margin: 0 0 1em 0;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ==========================================================================
   Sticky pill navigation
   ========================================================================== */
.site-nav-wrap {
  position: sticky;
  top: 20px;
  z-index: 50;
  display: flex;
  justify-content: center;
  margin-bottom: -1px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: rgba(243, 189, 124, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(58, 51, 44, 0.1);
}

.site-nav .nav-link {
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  padding: 8px 18px;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav .nav-link:hover {
  color: var(--color-text);
}

.site-nav .nav-link.active {
  color: var(--color-bg);
  background-color: var(--color-text);
}

.nav-divider {
  width: 1px;
  height: 18px;
  background-color: var(--color-line);
}

.lang-btn {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 7px 12px;
  border-radius: 999px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-text-soft);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.lang-btn:hover {
  color: var(--color-text);
}

.lang-btn.active {
  color: var(--color-bg);
  background-color: var(--color-accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-line);
  margin-top: 80px;
  padding: 32px 0;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 15px;
  font-style: italic;
}

/* ==========================================================================
   Home section
   ========================================================================== */
/* The hero name/tagline/scroll-cue are positioned with JS (js/hero-position.js)
   so they line up with the shelf in the fixed background painting — the name
   just above it, the tagline centered on it. Each gets a "top" (in px, from
   the top of .hero-section) set at runtime; position:relative on the section
   makes it their positioning context. */
.hero-section {
  position: relative;
  min-height: 100vh;
  scroll-margin-top: 100px;
  /* Lighter, more vibrant veil than the rest of the site (which uses the
     shared 0.85 veil above), since Home is mostly large display text. */
  background-color: rgba(243, 189, 124, 0.55);
}

.hero-name {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 24px;
  white-space: nowrap;
  font-size: clamp(48px, 13vw, 160px);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 2pt;
  margin: 0;
}

.hero-tagline {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 24px;
  font-size: 30px;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  margin: 0;
}

.scroll-cue-wrap {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
}

.scroll-cue {
  display: inline-block;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  border-bottom: 1px solid var(--color-line);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.scroll-cue:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ==========================================================================
   About section
   ========================================================================== */
.about-section {
  padding: 40px 0 96px;
  scroll-margin-top: 100px;
}

.about-layout {
  display: flex;
  align-items: center;
  gap: 64px;
}

.about-portrait {
  /* Scales between 240px and 420px with viewport width, instead of a fixed
     420px, so narrower windows still leave the bio text enough room instead
     of squeezing it into a few-word-wide column. */
  flex: 0 0 clamp(240px, 34vw, 420px);
}

.about-portrait img {
  width: 100%;
  border: 1px solid var(--color-line);
  box-shadow: 0 12px 32px rgba(58, 51, 44, 0.12);
}

.about-portrait figcaption {
  margin-top: 14px;
  text-align: center;
  font-style: italic;
  color: var(--color-text-soft);
  font-size: 16px;
}

.about-bio {
  flex: 1;
  min-width: 260px;
}

.about-bio h2 {
  font-size: 34px;
  font-weight: 400;
  margin-bottom: 24px;
}

.about-bio p {
  font-size: 19px;
  color: var(--color-text);
}

@media (max-width: 720px) {
  .about-layout {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .about-portrait {
    flex: 0 0 auto;
    width: 75%;
    max-width: 340px;
  }
}

/* ==========================================================================
   Gallery section
   ========================================================================== */
.gallery-section {
  scroll-margin-top: 100px;
}

.gallery-intro {
  padding: 64px 0 24px;
  text-align: center;
}

.gallery-intro h2 {
  font-size: 40px;
  font-weight: 400;
}

.gallery-intro p {
  color: var(--color-text-soft);
  font-style: italic;
  max-width: 560px;
  margin: 0 auto;
}

.gallery-categories {
  padding-bottom: 96px;
}

.category {
  border-bottom: 1px solid var(--color-line);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 22px 4px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
}

.category-years {
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-soft);
  margin-left: 12px;
}

.category-toggle {
  font-size: 26px;
  color: var(--color-accent);
  width: 24px;
  text-align: center;
  flex: none;
}

.category-panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s ease;
}

.category-panel.collapsed {
  grid-template-rows: 0fr;
}

.category-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 8px 0 56px;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.artwork-card {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.artwork-card .frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-line);
  background-color: var(--color-bg-alt);
  box-shadow: 0 8px 24px rgba(58, 51, 44, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.artwork-card:hover .frame {
  box-shadow: 0 16px 36px rgba(58, 51, 44, 0.18);
  transform: translateY(-3px);
}

.artwork-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.artwork-card:hover img {
  transform: scale(1.03);
  filter: grayscale(85%) brightness(0.55);
}

.artwork-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.artwork-card:hover .artwork-overlay {
  opacity: 1;
}

.artwork-overlay .overlay-title {
  color: #fdf8ea;
  font-style: italic;
  font-size: 21px;
  line-height: 1.3;
}

.artwork-overlay .overlay-meta {
  color: #e6dcc0;
  font-size: 14px;
  letter-spacing: 0.03em;
  margin-top: 8px;
}

/* ==========================================================================
   Press section
   ========================================================================== */
.press-section {
  scroll-margin-top: 100px;
  padding-bottom: 40px;
}

.press-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 24px 32px 40px;
  scroll-snap-type: x mandatory;
}

.press-scroll.empty {
  display: block;
  padding: 8px 32px 56px;
  color: var(--color-text-soft);
  font-style: italic;
}

.press-card {
  position: relative;
  flex: 0 0 auto;
  width: 220px;
  cursor: pointer;
  border: 1px solid var(--color-line);
  background-color: var(--color-bg-alt);
  box-shadow: 0 8px 24px rgba(58, 51, 44, 0.08);
  padding: 0;
  scroll-snap-align: start;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.press-card:hover {
  box-shadow: 0 16px 36px rgba(58, 51, 44, 0.18);
  transform: translateY(-3px);
}

.press-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease;
}

.press-card:hover img {
  filter: grayscale(85%) brightness(0.55);
}

.press-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.press-card:hover .press-overlay {
  opacity: 1;
}

.press-overlay .overlay-title {
  color: #fdf8ea;
  font-style: italic;
  font-size: 16px;
  line-height: 1.3;
}

.press-overlay .overlay-meta {
  color: #e6dcc0;
  font-size: 12px;
  letter-spacing: 0.03em;
  margin-top: 6px;
}

@media (max-width: 560px) {
  .press-card {
    width: 170px;
  }

  .press-card img {
    height: 230px;
  }
}

/* ==========================================================================
   Contact section
   ========================================================================== */
.contact-section {
  scroll-margin-top: 100px;
  padding: 64px 0 96px;
  text-align: center;
}

.contact-section h2 {
  font-size: 40px;
  font-weight: 400;
}

.contact-intro {
  color: var(--color-text-soft);
  font-style: italic;
  max-width: 560px;
  margin: 0 auto 32px;
}

.contact-card {
  display: inline-block;
  text-align: left;
  padding: 32px 48px;
  border: 1px solid var(--color-line);
  background-color: var(--color-bg-alt);
  box-shadow: 0 8px 24px rgba(58, 51, 44, 0.08);
}

.contact-name {
  font-size: 22px;
  font-style: italic;
  margin-bottom: 14px;
}

.contact-card a,
.contact-card .contact-location {
  display: block;
  margin-bottom: 8px;
  color: var(--color-text);
}

.contact-card a {
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-card a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.contact-card .contact-location {
  color: var(--color-text-soft);
  margin-bottom: 0;
  margin-top: 14px;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--color-overlay);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: 1000px;
  max-height: 90vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-height: 72vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #f2ece0;
  text-align: center;
  margin-top: 20px;
}

.lightbox-caption .title {
  font-style: italic;
  font-size: 22px;
  margin-bottom: 4px;
}

.lightbox-caption .meta {
  color: #c9beac;
  font-size: 16px;
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 36px;
  color: #f2ece0;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-serif);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #f2ece0;
  font-size: 42px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 18px;
  font-family: var(--font-serif);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 8px;
}

.lightbox-next {
  right: 8px;
}

@media (max-width: 600px) {
  .lightbox-close {
    top: 16px;
    right: 20px;
    font-size: 28px;
  }

  .lightbox-nav {
    font-size: 30px;
    padding: 8px 10px;
  }
}

.lightbox-filmstrip {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 4px 4px 8px;
  max-width: 100%;
  overflow-x: auto;
}

.lightbox-filmstrip .thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 80px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.55;
  overflow: hidden;
  background: none;
  padding: 0;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lightbox-filmstrip .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-filmstrip .thumb:hover {
  opacity: 0.85;
}

.lightbox-filmstrip .thumb.active {
  opacity: 1;
  border-color: var(--color-accent);
}

@media (max-width: 600px) {
  .lightbox-filmstrip .thumb {
    width: 48px;
    height: 60px;
  }
}
