@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Jost:wght@200;300;400;500&display=swap');

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

:root {
  --bg:          #f2ece0;   /* warm buff paper */
  --surface:     #e9e1d0;   /* slightly deeper paper */
  --border:      #ccc0a8;   /* warm mid-tone rule */
  --accent:      #7b5c38;   /* warm sienna / ink */
  --accent-light: #9a7850;  /* lighter sienna */
  --text:        #1c1812;   /* warm near-black ink */
  --text-muted:  #7a6a54;   /* warm brown-grey */
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Jost', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll; /* always reserve scrollbar gutter so nav doesn't shift between pages */
}

body {
  background-color: var(--bg);
  /* Subtle paper grain via SVG turbulence */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeBlend in='SourceGraphic' mode='multiply'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER / NAV ─────────────────────────────── */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 3.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 236, 224, 0.92);
  backdrop-filter: blur(8px);
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 2.5rem;
}

.site-nav a {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

/* ── FOOTER ───────────────────────────────────── */

.site-footer {
  margin-top: auto;
  padding: 1.8rem 3.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ── INDEX / HOME ─────────────────────────────── */

.home-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem 4rem;
  text-align: center;
}

.home-artist-name {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 0.9;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.home-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3.5rem;
}

.home-rule {
  width: 1px;
  height: 60px;
  background: var(--accent);
  opacity: 0.35;
  margin: 0 auto 3.5rem;
}

.home-quote {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-style: italic;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 2;
  margin-bottom: 1.2rem;
}

.home-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 0.8rem;
  color: var(--text-muted);
  opacity: 0.65;
}

.home-cta {
  display: inline-block;
  margin-top: 3.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.3s;
}

.home-cta:hover { opacity: 0.55; }

.home-preview {
  display: flex;
  gap: 2px;
  width: 100%;
  max-width: 900px;
  margin-top: 4rem;
}

.home-preview a {
  flex: 1;
  overflow: hidden;
  display: block;
}

.home-preview img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  filter: grayscale(20%) brightness(0.95);
  transition: filter 0.6s ease, transform 0.6s ease;
}

.home-preview a:hover img {
  filter: grayscale(0%) brightness(1.02);
  transform: scale(1.05);
}

/* ── PAGE HEADING ─────────────────────────────── */

.page-heading {
  padding: 4rem 3.5rem 2.5rem;
  text-align: center;
}

.page-heading h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--text);
  line-height: 1;
}

.page-heading .label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.6rem;
}

/* ── GALLERY PAGE ─────────────────────────────── */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px;
  padding: 0 3.5rem 5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--surface);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(10%) brightness(0.97);
  transition: filter 0.5s ease, transform 0.6s ease;
}

.gallery-item:hover img {
  filter: grayscale(0%) brightness(1.02);
  transform: scale(1.06);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,14,6,0.72) 0%, rgba(20,14,6,0) 52%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 1.2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: #f2ece0;
  margin-bottom: 0.3rem;
}

.gallery-item-meta {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242,236,224,0.55);
}

.gallery-item > a {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* ── ABOUT PAGE ───────────────────────────────── */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 3.5rem 6rem;
  flex: 1;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(8%) brightness(0.97);
}

.about-text {
  padding-top: 0.5rem;
}

.about-text h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.about-text .label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

.about-rule {
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
  margin-bottom: 2rem;
}

.about-text p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 1.5rem;
}

/* ── CONTACT PAGE ─────────────────────────────── */

.contact-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.contact-layout h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.contact-layout .label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3rem;
}

.contact-rule {
  width: 1px;
  height: 50px;
  background: var(--accent);
  opacity: 0.3;
  margin: 0 auto 3rem;
}

.contact-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 2;
  margin-bottom: 2.5rem;
}

.contact-email {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.3s;
}

.contact-email:hover { opacity: 0.55; }

/* ── SCULPTURE VIEWER ─────────────────────────── */

.sculpture-page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sculpture-viewer {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 2.5rem 3.5rem 4rem;
}

.sculpture-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  margin-bottom: 1rem;
  min-height: 400px;
  max-height: 68vh;
  overflow: hidden;
}

.sculpture-main img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease;
}

.sculpture-main img.fading {
  opacity: 0;
}

.sculpture-thumbs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.s-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.3s, outline 0.2s;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.s-thumb:hover { opacity: 0.75; }
.s-thumb.active {
  opacity: 1;
  outline-color: var(--accent);
}

.sculpture-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.s-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.55rem 1.4rem;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}

.s-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sculpture-count {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  min-width: 60px;
  text-align: center;
}

.sculpture-info {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

.sculpture-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-style: italic;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.sculpture-meta {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.back-link {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.3s;
}

.back-link:hover { opacity: 0.55; }

/* ── RESPONSIVE ───────────────────────────────── */

@media (max-width: 768px) {
  .site-header {
    padding: 1.2rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .site-nav { gap: 1.2rem; }

  .site-footer {
    padding: 1.5rem;
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
  }

  .page-heading { padding: 2.5rem 1.5rem 1.5rem; }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    padding: 0 1rem 3rem;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem 1.5rem 4rem;
  }

  .sculpture-viewer { padding: 1.5rem 1.2rem 3rem; }

  .home-preview { display: none; }

  .home-hero { padding: 4rem 1.5rem 3rem; }
}
