/* ============================================================
   styles.css
   Version: 1.0.0
   Author: Kingston Caz Dominguez
   Description: Main stylesheet for Early Spring Website
   Fonts: Spectral (body text), Cormorant Garamond (headings, accents)
   Last Updated: May 1, 2026
   “All art is propaganda; on the other hand, not all propaganda is art.” - George Orwell, 1984
   ============================================================ */

/* ── Palette ── */
:root {
  --base: #23261f;
  --mantle: #2d3028;
  --crust: #373b32;
  --surface0: #3f443a;
  --surface1: #484d43;
  --surface2: #52584c;
  --text: #e6eadf;
  --subtext1: #c8cfbf;
  --subtext0: #b2b9a9;
  --overlay2: #9a9f91;
  --overlay1: #828779;
  --overlay0: #6b7064;
  --green: #bcc9a8;
  --teal: #b2c3a7;
  --sky: #acbda9;
  --blue: #a7b7a5;
  --yellow: #d9d1a8;
  --peach: #d0bea4;
  --maroon: #c2a293;
  --red: #b99688;
  --mauve: #ada596;
  --pink: #c6b9ab;
  --lavender: #aeb7a6;
  --rosewater: #e1e6da;
  --flamingo: #d6cabb;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--base);
  color: var(--text);
  font-family: 'Spectral', Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
}

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

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

/* ── Typography ── */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.875rem); }

p { margin-bottom: 1.25rem; color: var(--text); }
p:last-child { margin-bottom: 0; }

em { font-style: italic; }
strong { font-weight: 500; color: var(--text); }

/* ── Layout Utility ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.section {
  padding: 7rem 0;
  border-top: 1px solid var(--surface0);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.section-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--overlay1);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--subtext1);
  max-width: 720px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.image-caption {
  font-size: 0.8125rem;
  color: var(--overlay1);
  font-style: italic;
  margin-top: 0.875rem;
  line-height: 1.5;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Navigation ── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(35, 38, 31, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.875rem 0;
  border-bottom-color: var(--surface0);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--overlay2);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.25rem;
}

.nav-links a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--overlay1);
  transition: color 0.25s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--green); }

/* ── Hero ── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-image-wrap {
  position: absolute;
  inset: 0;
  will-change: transform;
}

#hero-painting {
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: 50% 20%;
  filter: sepia(0.2) brightness(0.5);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(35, 38, 31, 0.1) 0%,
    rgba(35, 38, 31, 0.3) 40%,
    rgba(35, 38, 31, 0.75) 70%,
    rgba(35, 38, 31, 0.97) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2.5rem 5rem;
}

.hero-eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.875rem;
  font-style: italic;
  letter-spacing: 0.15em;
  color: var(--overlay2);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 300;
  color: var(--rosewater);
  letter-spacing: 0.01em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.hero-chinese {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-style: italic;
  color: var(--overlay2);
  letter-spacing: 0.3em;
  margin-bottom: 1.25rem;
}

.hero-meta {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--overlay1);
  letter-spacing: 0.1em;
  margin-bottom: 0;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  font-style: italic;
  letter-spacing: 0.15em;
  color: var(--overlay0);
  animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── Overview ── */
.pull-quote {
  border-left: 2px solid var(--green);
  padding: 1.5rem 0 1.5rem 2.5rem;
  margin: 0 0 4rem;
  max-width: 800px;
}

.pull-quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-style: italic;
  color: var(--subtext1);
  font-weight: 300;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.pull-quote cite {
  font-size: 0.875rem;
  font-style: normal;
  color: var(--overlay1);
  letter-spacing: 0.04em;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.meta-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--surface0);
}

.meta-item {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--surface0);
}

.meta-item dt {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--overlay1);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
}

.meta-item dd {
  font-size: 0.9rem;
  color: var(--subtext1);
}

/* ── The Work ── */
#the-work { padding: 0; border-top: 1px solid var(--surface0); }

.work-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}

.work-image-col {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 2.5rem 4rem 2.5rem;
  background: var(--mantle);
}

.work-image-frame {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  cursor: zoom-in;
}

.work-image-frame img {
  height: 100%;
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: sepia(0.08);
}

.work-image-frame:hover img {
  transform: scale(1.02);
  filter: sepia(0.02);
}

.work-text-col {
  padding: 7rem 3.5rem 7rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Artist ── */
.artist-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}

.artist-image-frame {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--mantle);
}

.artist-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.15) brightness(0.85);
  transition: transform 0.6s ease;
}

.artist-image-frame:hover img { transform: scale(1.03); }

.artist-bio h3 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 0.25rem;
  color: var(--text);
}

.chinese-inline {
  font-size: 0.75em;
  color: var(--overlay1);
  margin-left: 0.75rem;
  letter-spacing: 0.2em;
}

.artist-dates {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--overlay1);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

/* ── Technique ── */
.three-distances {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.distance-card {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.distance-card:hover {
  border-color: var(--surface1);
  background: var(--crust);
}

.distance-char {
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  font-weight: 300;
  line-height: 1;
  color: var(--surface1);
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  pointer-events: none;
  transition: color 0.3s ease;
  letter-spacing: -0.02em;
}

.distance-card:hover .distance-char { color: var(--surface2); }

.distance-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--text);
  position: relative;
}

.distance-romanized {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--overlay1);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.distance-card p:last-child {
  font-size: 0.9375rem;
  color: var(--subtext0);
  position: relative;
}

.brushwork-note {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-left: 3px solid var(--green);
  padding: 2.5rem 3rem;
}

.brushwork-note h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text);
}

/* ── Gallery ── */
#gallery { padding-bottom: 7rem; }

.gallery-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 2rem 2.5rem 2.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--surface1) transparent;
  -webkit-overflow-scrolling: touch;
}

.gallery-scroll::-webkit-scrollbar { height: 4px; }
.gallery-scroll::-webkit-scrollbar-track { background: transparent; }
.gallery-scroll::-webkit-scrollbar-thumb { background: var(--surface1); border-radius: 2px; }

.gallery-item {
  flex: 0 0 380px;
  scroll-snap-align: start;
}

.gallery-img-wrap {
  height: 520px;
  overflow: hidden;
  background: var(--mantle);
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: sepia(0.1);
}

.gallery-item:hover .gallery-img-wrap img {
  transform: scale(1.06);
  filter: sepia(0.02);
}

.gallery-item figcaption {
  padding: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.gallery-item figcaption strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--subtext1);
  letter-spacing: 0.03em;
}

.gallery-item figcaption span {
  font-size: 0.82rem;
  color: var(--overlay1);
  font-style: italic;
  line-height: 1.5;
}

/* ── Legacy ── */
.legacy-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.legacy-text p { max-width: 520px; }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--surface0);
  align-items: baseline;
}

.timeline-item:first-child { border-top: 1px solid var(--surface0); }

.tl-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--green);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tl-text {
  font-size: 0.9rem;
  color: var(--subtext1);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── Footer ── */
#footer {
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--surface0);
  background: var(--mantle);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--surface0);
  margin-bottom: 2.5rem;
}

.footer-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--subtext1);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.footer-sub {
  font-size: 0.8rem;
  color: var(--overlay1);
  margin-bottom: 0;
}

.footer-credits { text-align: right; }

.footer-credits p {
  font-size: 0.78rem;
  color: var(--overlay1);
  margin-bottom: 0.3rem;
}

.sources-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  font-style: italic;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--overlay1);
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.sources-list {
  list-style: decimal;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sources-list li {
  font-size: 0.8rem;
  color: var(--overlay2);
  line-height: 1.6;
  padding-left: 0.25rem;
}

.sources-list em { font-style: italic; color: var(--subtext0); }

.sources-list a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--surface1);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.sources-list a:hover {
  color: var(--rosewater);
  text-decoration-color: var(--overlay1);
}

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(23, 26, 19, 0.96);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 2rem;
}

#lightbox.open { display: flex; }

#lightbox img {
  max-height: 90vh;
  max-width: 90vw;
  object-fit: contain;
  filter: sepia(0.05);
  box-shadow: 0 0 80px rgba(0,0,0,0.5);
}

#lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid var(--surface1);
  color: var(--overlay1);
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  border-radius: 2px;
  line-height: 1;
  font-weight: 300;
}

#lightbox-close:hover { color: var(--text); border-color: var(--overlay1); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .work-layout { grid-template-columns: 1fr; }

  .work-image-col {
    position: static;
    height: auto;
    min-height: 60vh;
    padding: 4rem 2rem 2rem;
  }

  .work-image-frame { max-height: 60vh; }

  .work-text-col { padding: 3rem 2rem 5rem; }

  .artist-layout,
  .legacy-layout { grid-template-columns: 1fr; gap: 3rem; }

  .three-distances { grid-template-columns: 1fr; }

  .two-col { grid-template-columns: 1fr; gap: 3rem; }

  .footer-top { flex-direction: column; }
  .footer-credits { text-align: left; }
}

@media (max-width: 768px) {
  .container { padding: 0 1.5rem; }

  .section { padding: 5rem 0; }

  .nav-links { display: none; }

  .hero-content { padding: 0 1.5rem 4rem; }

  .gallery-item { flex: 0 0 300px; }
  .gallery-img-wrap { height: 400px; }

  .gallery-scroll { padding: 1.5rem; }

  .timeline-item { grid-template-columns: 80px 1fr; }
}