:root {
  /* Colors from user pigment-based palette */
  /* Siena Tostado (Pantone 174 C) */
  --siena-tostado: #8A3826;
  --siena-tostado-light: #B25A45;
  --siena-tostado-dark: #5C2215;

  /* Gris de Payne (Pantone 432 C / 433 C) */
  --gris-payne: #333F48;
  --gris-payne-light: #5A6A77;
  --gris-payne-dark: #1D252D; /* "casi tormentoso" */

  /* Verde Vejiga (Pantone 364 C) */
  --verde-vejiga: #4A773C;
  --verde-vejiga-light: #6C9E5C;
  --verde-vejiga-dark: #2F5224;

  /* Azul Lapislázuli (Pantone 286 C) */
  --azul-lapislazuli: #0032A0;
  --azul-lapislazuli-light: #3361C9;
  --azul-lapislazuli-dark: #001D66;

  /* Marrón Vandyke (Pantone 476 C) */
  --marron-vandyke: #4E3629;
  --marron-vandyke-light: #7A5B49;
  --marron-vandyke-dark: #2E1E16;

  /* Rojo Veneciano (Pantone 1805 C) */
  --rojo-veneciano: #AF272F;
  --rojo-veneciano-light: #D5545D;
  --rojo-veneciano-dark: #7A171D;
  
  /* Core UI Setup */
  --surface-bg: #F7F5F0; /* Warm, earthy off-white to complement pigments */
  --surface-card: #FFFFFF;
  --surface-dark: var(--gris-payne-dark);
  
  /* Typography Colors */
  --text-primary: var(--gris-payne-dark); /* Using dark Payne's grey instead of black for elegance */
  --text-secondary: var(--gris-payne);
  --text-on-dark: #F7F5F0;
  --border-subtle: #E0DDD5;

  /* Typography */
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Source Serif 4', serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--surface-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Base Buttons */
.button-outline {
  display: inline-block;
  border: 1px solid var(--gris-payne-dark);
  color: var(--gris-payne-dark);
  padding: 0.75rem 2rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.button-outline:hover {
  background: var(--gris-payne-dark);
  color: var(--surface-bg);
}

.button-solid {
  display: inline-block;
  background: var(--siena-tostado);
  color: var(--surface-bg);
  padding: 0.75rem 2rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.button-solid:hover {
  background: var(--siena-tostado-dark);
}

/* Fade in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(247, 245, 240, 0.95); /* Matches --surface-bg */
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--border-subtle);
}

.header-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

.site-title-link {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gris-payne-dark);
}

.site-title-link:hover {
  color: var(--siena-tostado);
}

.main-navigation ul {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation.toggled ul {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--surface-bg);
  border-bottom: 1px solid var(--border-subtle);
}

.main-navigation.toggled li {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.main-navigation a {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.main-navigation a:hover {
  color: var(--verde-vejiga);
}

.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger-box {
  width: 24px;
  height: 24px;
  display: inline-block;
  position: relative;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  position: absolute;
  transition: transform 0.15s ease;
}

.hamburger-inner { top: 50%; transform: translateY(-50%); }
.hamburger-inner::before { content: ""; top: -6px; }
.hamburger-inner::after { content: ""; bottom: -6px; }

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .main-navigation ul {
    display: flex;
    gap: 2rem;
  }
}

/* Footer */
.site-footer {
  background: var(--marron-vandyke-dark); /* Deep earthy brown contrast */
  color: var(--text-on-dark);
  padding: 6rem 2rem;
  text-align: center;
}

.footer-title {
  font-size: 2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  color: var(--text-on-dark);
  position: relative;
}

/* Subtle accent line below the title to keep Siena Tostado */
.footer-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--siena-tostado);
  margin: 1.5rem auto 0 auto;
}

.footer-email {
  font-size: 1.25rem;
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--text-on-dark);
  border-bottom: 1px solid rgba(247, 245, 240, 0.3);
  padding-bottom: 0.2rem;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.footer-email:hover {
  color: var(--siena-tostado-light);
  border-bottom-color: var(--siena-tostado-light);
}

.footer-social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.social-link {
  color: rgba(247, 245, 240, 0.7);
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
  color: var(--siena-tostado-light);
  transform: translateY(-2px);
}

.site-info {
  font-size: 0.8rem;
  color: rgba(247, 245, 240, 0.6); /* Slightly faded text-on-dark */
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 80px; /* Offset for fixed header */
}

.hero-content {
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: var(--surface-bg);
  flex: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--gris-payne-dark);
}

.hero-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: var(--siena-tostado);
  margin-top: 1.5rem;
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.8;
  width: 100%;
  max-width: 700px;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
  text-align: justify;
}

.hero-description::first-letter {
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--siena-tostado);
  float: left;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.2rem;
  font-weight: 600;
}

.hero-image {
  flex: 1;
  background: var(--surface-dark); /* Gris de Payne */
  min-height: 50vh;
}

.placeholder-hero-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--gris-payne-dark), var(--verde-vejiga-dark));
}

@media (min-width: 1024px) {
  .hero-section {
    flex-direction: row;
    padding-top: 0;
  }
  .hero-content {
    flex: 0 0 50%;
    width: 50%;
    padding: 6rem;
    padding-top: 80px;
    box-sizing: border-box;
  }
  .hero-title {
    font-size: 5rem;
  }
  .hero-image {
    flex: 0 0 50%;
    width: 50%;
    min-height: 100vh;
  }
}

/* Portfolio Section (Dark) */
.portfolio-section {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: 6rem 2rem;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  letter-spacing: 0.2em;
  margin-bottom: 4rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 1;
}

.portfolio-item-image {
  width: 100%;
  height: 100%;
  position: relative;
}

.portfolio-item-image img, .placeholder-grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.3s ease;
}

.placeholder-grid-img {
  background: var(--gris-payne);
}

.portfolio-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

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

.portfolio-item:hover img, .portfolio-item:hover .placeholder-grid-img {
  transform: scale(1.05);
  opacity: 0.6;
}

.portfolio-item-title {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.portfolio-item-series {
  color: #ccc;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
}

.view-all-container {
  margin-top: 4rem;
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* About Page */
.about-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 100px 2rem 6rem;
}

.about-header {
  text-align: center;
  margin-bottom: 4rem;
}

.page-title {
  font-size: 3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.placeholder-portrait {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--siena-tostado);
}

.about-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
  position: relative;
}

.about-text::before {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: var(--siena-tostado);
  margin-bottom: 2rem;
}

.about-text > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--siena-tostado);
  float: left;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.2rem;
  font-weight: 600;
}

.about-text p,
.about-text div {
  margin-bottom: 1.5rem;
  text-align: justify;
}

@media (min-width: 768px) {
  .about-content-wrapper {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

/* Single Painting Page */
.painting-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 2rem 6rem;
}

.back-link {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  display: inline-block;
}

.back-link:hover {
  color: var(--siena-tostado);
}

.painting-title {
  font-size: 3rem;
  margin-bottom: 2rem;
}

.painting-main-image {
  margin-bottom: 4rem;
}

.painting-inline-meta {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: -1rem;
  margin-bottom: 2rem;
}

.painting-inline-meta a {
  color: var(--text-secondary);
}

.painting-inline-meta a:hover {
  color: var(--siena-tostado);
}

.meta-separator {
  margin: 0 0.5rem;
  color: var(--border-subtle);
}

.painting-description-container {
  max-width: 700px; /* Slightly narrower for better reading measure */
  margin: 5rem auto 6rem auto;
  position: relative;
}

/* Elegant subtle divider line above the text */
.painting-description-container::before {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  background: var(--siena-tostado);
  margin: 0 auto 3rem auto;
}

.painting-description {
  color: var(--text-primary); /* Darker for better contrast/readability */
  font-size: 1.15rem;
  line-height: 1.8; /* Let the text breathe */
}

.painting-description p,
.painting-description div {
  text-align: justify;
  margin-bottom: 1.5rem;
}

/* Classic Drop Cap for the first letter of the first paragraph */
.painting-description > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--siena-tostado);
  float: left;
  line-height: 0.8;
  padding-right: 0.5rem;
  padding-top: 0.2rem;
  font-weight: 600;
}

/* Gallery Horizontal Scroll */
.gallery-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.gallery-scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding-bottom: 2rem;
  scrollbar-width: thin;
}

.gallery-item {
  flex: 0 0 auto;
  width: 80vw;
  max-width: 600px;
}

.gallery-item img {
  width: 100%;
  height: auto;
}

/* Archive Page */
.archive-main .page-header {
  padding: 120px 2rem 2rem;
  text-align: center;
  max-width: 1440px;
  margin: 0 auto;
}

.archive-main .portfolio-container {
  padding: 0 2rem 6rem;
  max-width: 1440px;
  margin: 0 auto;
  background: var(--surface-bg);
  color: var(--text-primary);
}

.archive-main .portfolio-item {
  background: var(--surface-bg);
}

.series-nav {
  list-style: none;
  padding: 0;
  margin: 0 auto 4rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.series-nav a {
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 0;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.series-nav a:hover {
  border-color: var(--siena-tostado);
  color: var(--siena-tostado);
}

.series-nav a.active {
  background: var(--gris-payne-dark);
  color: var(--surface-bg);
  border-color: var(--gris-payne-dark);
}

.series-section {
  margin-bottom: 6rem;
}

.series-title {
  margin-bottom: 1rem;
  text-transform: uppercase;
  text-align: center;
}

.series-title-parent {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gris-payne-dark);
}

.series-title-child {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.series-description {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
  color: var(--text-secondary);
}

/* Image Zoom Lightbox */
#image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(29, 37, 45, 0.95); /* var(--gris-payne-dark) slightly transparent */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#image-lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
}

.lightbox-content {
  position: relative;
  width: 90vw;
  height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.1s ease; /* Smooth but fast for panning */
}

.lightbox-img.zoomed {
  cursor: zoom-out;
  transition: transform 0.2s ease; /* Slightly smoother when clicking to zoom */
}


/* Fix for WordPress Admin Bar overlap */
body.admin-bar .site-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

