/* ==========================================================================
   Custom Minimalist Styles - Clara Schmitt Sculpture
   Overrides w3.css for clean, zoeyfrank.com-inspired aesthetic
   ========================================================================== */

/* CSS Custom Properties */
:root {
  --font-logo: "Playfair Display", Georgia, serif;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-light: #666666;
  --color-border: #e0e0e0;
  --color-hover: #000000;
  --color-footer-bg: #fafafa;
  --max-width: 1200px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 32px;
  --spacing-lg: 64px;
  --spacing-xl: 128px;
  --header-height: 72px;
}

/* Reset w3.css opinions */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove w3.css default margins/paddings on containers */
.w3-container,
.w3-content,
.w3-row,
.w3-row-padding,
.w3-col,
.w3-half,
.w3-third,
.w3-twothird,
.w3-quarter,
.w3-threequarter {
  padding: 0;
  margin: 0;
}

.w3-row-padding > .w3-col,
.w3-row-padding > .w3-half,
.w3-row-padding > .w3-third,
.w3-row-padding > .w3-twothird,
.w3-row-padding > .w3-quarter,
.w3-row-padding > .w3-threequarter {
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 var(--spacing-sm);
  color: var(--color-text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

p {
  margin: 0 0 var(--spacing-md);
  color: var(--color-text);
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-hover);
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.site-logo {
  font-family: var(--font-logo);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-logo a {
  display: block;
}

.nav-desktop {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-desktop a {
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width 0.2s ease;
}

.nav-desktop a:hover::after,
.nav-desktop a[aria-current="page"]::after {
  width: 100%;
}

.nav-desktop a[aria-current="page"] {
  color: var(--color-text);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 320px;
  background: var(--color-bg);
  padding: calc(var(--header-height) + var(--spacing-md)) var(--spacing-lg) var(--spacing-lg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 99;
  border-left: 1px solid var(--color-border);
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer a {
  display: block;
  padding: var(--spacing-sm) 0;
  font-size: 1.25rem;
  font-family: var(--font-sans);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .mobile-drawer {
    display: block;
  }
  
  .site-header {
    padding: 0 var(--spacing-md);
  }
  
  .site-logo {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
main {
  padding-top: var(--header-height);
}

/* Page wrapper for consistent max-width and padding */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

@media (max-width: 768px) {
  .page-wrapper {
    padding: 0 var(--spacing-md);
  }
}

/* ==========================================================================
   Home Page - Hero
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.hero-image {
  position: absolute;
  top: var(--spacing-lg);
  left: 0;
  width: 100%;
  height: calc(100% - 2 * var(--spacing-lg));
  object-fit: contain;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  padding: var(--spacing-xl);
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  margin: 0 0 var(--spacing-sm);
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
}

/* Hero overlay for readability */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  z-index: 1;
}

@media (max-width: 768px) {
  .hero {
    min-height: calc(100vh - var(--header-height));
  }
  
  .hero-content {
    padding: var(--spacing-lg);
  }
}

/* ==========================================================================
   Work Page - Series Tabs + Sculpture Grid
   ========================================================================== */
.work-header {
  padding: var(--spacing-lg) 0 0;
  margin-bottom: var(--spacing-lg);
}

.work-header h1 {
  margin-bottom: 0;
}

.series-tabs {
  display: flex;
  gap: var(--spacing-xs);
  overflow-x: auto;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-xs);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.series-tabs::-webkit-scrollbar {
  display: none;
}

.series-tab {
  flex-shrink: 0;
  padding: var(--spacing-xs) var(--spacing-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--color-text-light);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.series-tab:hover {
  color: var(--color-text);
  border-color: var(--color-border);
}

.series-tab.active {
  color: var(--color-text);
  border-color: var(--color-text);
  background: var(--color-bg);
}

.sculpture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.sculpture-card {
  position: relative;
  aspect-ratio: 3/4;
  background: #f5f5f5;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.sculpture-card:hover {
  transform: translateY(-4px);
}

.sculpture-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.sculpture-card-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--spacing-lg);
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.75) 100%);
  color: #ffffff;
}

.sculpture-card-text {
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.sculpture-card:hover .sculpture-card-text {
  transform: translateY(-8px);
}

.sculpture-card-info h3 {
  font-size: 1.25rem;
  margin: 0;
  color: #ffffff;
  text-align: center;
}

.sculpture-card-info p {
  font-size: 0.875rem;
  margin: var(--spacing-xs) 0 0;
  opacity: 0.9;
  text-align: center;
}

/* ==========================================================================
   Series Page
   ========================================================================== */
.series-hero {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  background: #f5f5f5;
  margin-bottom: var(--spacing-xl);
}

.series-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
}

.series-hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: var(--spacing-xl);
  color: #ffffff;
}

.series-hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin: 0;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.series-description {
  max-width: var(--max-width);
  margin: 0 auto var(--spacing-xl);
  padding: 0 var(--spacing-lg);
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text-light);
}

@media (max-width: 768px) {
  .series-hero {
    height: 50vh;
    min-height: 300px;
  }
  
  .series-hero-content {
    padding: var(--spacing-lg);
  }
}

/* ==========================================================================
   Sculpture Detail Page (PDP)
   ========================================================================== */
.pdp-info {
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  padding: 0 var(--spacing-lg);
  text-align: left;
}

.pdp-info h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin: 0 0 var(--spacing-xs);
  color: var(--color-text);
}

.pdp-info p {
  margin: 0 0 var(--spacing-xs);
}

.sculpture-meta-container {
  margin-bottom: var(--spacing-xl);
}

.sculpture-meta {
  font-size: 1.125rem;
  color: var(--color-text-light);
  margin: 0 var(--spacing-xs);
}

.pdp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.pdp-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .pdp-gallery {
    grid-template-columns: 1fr;
  }
}

/* Clickable thumbnail */
.pdp-thumb {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: zoom-in;
}

.pdp-gallery figure {
  margin: 0;
}

/* Photo zoom / lightbox */
.pdp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  background: rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pdp-lightbox.open {
  display: flex;
  opacity: 1;
}

.pdp-lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.pdp-lightbox-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pdp-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
  .pdp-lightbox {
    padding: var(--spacing-sm);
  }
}

/* ==========================================================================
   About / CV / Contact Pages
   ========================================================================== */
.content-page {
  padding: 0 0 var(--spacing-xl);
}

.content-page header {
  padding: var(--spacing-lg) 0 0;
  margin-bottom: var(--spacing-lg);
}

.content-page h1 {
  margin: 0;
}

.content-page .content-body {
  max-width: 800px;
}

.content-page .content-body p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: var(--spacing-lg);
}

.content-page .content-body h2 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  margin: var(--spacing-xl) 0 var(--spacing-sm);
}

.content-page .content-body h3 {
  font-size: 1.25rem;
  margin: var(--spacing-lg) 0 var(--spacing-sm);
}

.content-page .content-body ul {
  margin: 0 0 var(--spacing-lg);
  padding-left: var(--spacing-lg);
}

.content-page .content-body li {
  margin-bottom: var(--spacing-xs);
  line-height: 1.7;
}

/* CV page: compact entries */
/* Wider than the default 800px so long award/exhibition lines fit on one line */
.content-page .content-body.cv-body {
  max-width: 1000px;
}

.content-page .content-body.cv-body p {
  display: flex;
  align-items: baseline;
  line-height: 1.6;
  margin-bottom: var(--spacing-xs);
}

.content-page .content-body.cv-body h2 {
  margin: var(--spacing-lg) 0 var(--spacing-xs);
}

.content-page .content-body.cv-body strong {
  flex: 0 0 auto;
  min-width: 7rem;
  margin-right: var(--spacing-sm);
}

.content-page .content-body.cv-body .cv-birth {
  margin-bottom: var(--spacing-md);
}

@media (max-width: 600px) {
  .content-page .content-body.cv-body strong {
    min-width: 5rem;
  }
}

/* Contact page specific */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.125rem;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border);
  transition: border-color 0.2s ease;
}

.contact-links a:hover {
  border-color: var(--color-text);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: var(--spacing-xl) 0;
  background: var(--color-footer-bg);
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  text-align: center;
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  border-color: var(--color-text);
  background: var(--color-text);
  color: var(--color-bg);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-copyright {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* Loading state */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Image loading states */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .menu-toggle,
  .mobile-drawer {
    display: none;
  }
  
  main {
    padding-top: 0;
  }
  
  .hero,
  .series-hero {
    min-height: auto;
    height: auto;
    page-break-after: avoid;
  }
}