:root {
  /* Burnt umber page background with subtle gradient */
  --bg: linear-gradient(165deg, #3f251f9b 0%, #6b4a448e 48%, #3c1c159b 100%);
  --surface: #ffffff;
  --text: #111;
  --muted: #666;
  --brand: #111;
  --radius: 16px;
  --shadow-1: 0 10px 28px rgba(0,0,0,.14);
  --shadow-2: 0 8px 22px rgba(0, 0, 0, 0.551);
  
  /* Frame properties */
  --frame-inner: 24px;
  --frame-outer: 32px;
  
  /* Frame border widths */
  --frame-inner: 10px;
  --frame-outer: 14px;
  
  /* Frame colors */
  --frame-color-inner: #3b221600;
  --frame-color-outer: #6b4d3500;
}

/* Reset-ish */
* { box-sizing: border-box }
html, body { margin: 0; padding: 0 }
img { max-width: 100%; height: auto; display: block }

/* Base */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ===== Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.05) blur(4px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.brand {
  color: var(--brand);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: .2px;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text);
  padding: .4rem .6rem;
  border-radius: 10px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-menu a:hover {
  background: rgba(0,0,0,.06);
}

.nav-menu a[aria-current="page"] {
  background: rgba(0,0,0,.04);
  font-weight: 500;
}

/* Mobile nav */
.nav-toggle {
  display: none;
}

.hamburger {
  display: none;
  cursor: pointer;
  padding: .5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #222;
  margin: 5px 0;
  transition: transform .3s ease, opacity .3s ease;
}

@media (max-width: 767px) {
  .nav-toggle {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
  }

  .hamburger {
    display: block;
    z-index: 51;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    padding: 5rem 2rem 2rem;
    background: rgba(255,255,255,.98);
    flex-direction: column;
    gap: 1rem;
    transition: right .3s ease;
  }

  .nav-toggle:checked ~ .nav-menu {
    right: 0;
  }

  .nav-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
}

/* ===== Layout ===== */
.container {
  max-width: 1000px;
  margin: 1rem auto 3rem;
  padding: 0 1rem;
}

/* ===== Piece (tile) ===== */

.piece-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  font-family: 'merriweather', serif;
}

/* ===== Painting Metadata ===== */
.piece-meta-portrait {
  font-size: 0.7rem;             /* small and elegant */
  color: rgba(0, 0, 0, 0.55);    /* subdued neutral tone */
  font-family: 'Inter', sans-serif; /* keep it clean */
  letter-spacing: 0px;
  margin-top: 0rem;
  text-align: right;
  font-style: italic;            /* optional — feels classy and understated */
}

/* ===== Painting Metadata ===== */
.piece-meta {
  font-size: 0.9rem;             /* small and elegant */
  color: rgba(0, 0, 0, 0.55);    /* subdued neutral tone */
  font-family: 'Inter', sans-serif; /* keep it clean */
  letter-spacing: 0px;
  text-align: left;
  font-style: italic;            /* optional — feels classy and understated */
}


.piece {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  margin: 1rem 0 2rem;
  display: flex;
  flex-direction: column;
  max-height: none; /* allow card to grow with content on desktop too */
}

.piece-media {
  padding: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.piece-media {
  padding: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.piece-media img {
  max-width: calc(100% - 6rem);
  max-height: calc(75vh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow:
    inset 0 6px 12px rgba(255,255,255,0.6),
    inset 0 -6px 12px rgba(0,0,0,0.06),
    0 0 0 var(--frame-inner) var(--frame-color-inner),
    0 0 0 var(--frame-outer) var(--frame-color-outer),
    0 32px 72px rgba(0,0,0,0.30),
    0 10px 24px rgba(0,0,0,0.12);
  filter: drop-shadow(0 26px 60px rgba(0,0,0,.30));
  transition: filter .22s ease, box-shadow .22s ease;
  cursor: pointer;
}

.piece-content {
  padding: 0 2rem 2rem 2rem;
}

/* Portrait layout (10% taller than wide) */
@media (min-width: 768px) {
  .piece.is-portrait {
    flex-direction: row;
    align-items: stretch;
  }

  .piece.is-portrait .piece-media {
    flex: 0 0 65%;
    max-width: 55%;
    padding: 3rem 1.5rem 3rem 1.5rem;
  }

  .piece.is-portrait .piece-content {
    flex: 1;
    padding: 2rem 2rem 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    max-width: 85%;
    text-align: right;
  }
}

/* ===== Mobile styles ===== */
@media (max-width: 767px) {
  :root {
    --frame-inner: 16px;
    --frame-outer: 24px;
  }
  
  .container {
    padding: 0 .5rem; /* small side gutters on mobile */
    margin: 0 auto 2rem;
    max-width: 100vw;
  }

  .piece {
    margin: 1rem 0;
    border-radius: 10px;
    box-shadow: var(--shadow-1);
    max-height: none;
  }

  .piece-media {
    padding: 1rem;
  }

  :root {
    --frame-inner: 6px;
    --frame-outer: 10px;
  }
  
  .piece-media {
    padding: 0;
  }

  .piece-media img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
    object-fit: contain;
    box-shadow:
      inset 0 6px 12px rgba(255,255,255,0.6),
      inset 0 -6px 12px rgba(0,0,0,0.06),
      0 0 0 var(--frame-inner) var(--frame-color-inner),
      0 0 0 var(--frame-outer) var(--frame-color-outer),
      0 32px 72px rgba(0,0,0,0.30),
      0 10px 24px rgba(0,0,0,0.12);
  }

  .piece-content {
    padding: 1rem;
    max-width: 100%;
  }

  /* Left-align meta for portrait pieces on mobile */
  .piece.is-portrait .piece-meta-portrait {
    text-align: left;
  }

  .nav {
    flex-direction: column;
    gap: .5rem;
    padding: .5rem;
  }

  .nav-menu {
    flex-direction: column;
    gap: .5rem;
    width: 100%;
    align-items: flex-start;
  }
}

/* ===== Fullscreen viewer styles ===== */
.fullscreen-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 20, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.fullscreen-viewer.active {
  opacity: 1;
  pointer-events: auto;
}

.fullscreen-viewer img {
  max-width: 96vw;
  max-height: 92vh;
  box-shadow: 0 32px 72px rgba(0,0,0,0.30);
  background: #fff;
  object-fit: contain;
}

.viewer-active {
  overflow: hidden;
}

/* ===== Shop Page ===== */
.page-header {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin: 0 0 1rem;
}

.shop-coming-soon {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.shop-coming-soon h2 {
  font-size: 2rem;
  margin: 0 0 1rem;
}

.shop-coming-soon p {
  max-width: 600px;
  margin: 1rem auto;
  color: var(--muted);
}

.shop-coming-soon a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.shop-coming-soon a:hover {
  opacity: 0.8;
}

/* ===== About & Contact Pages ===== */
.about-content,
.contact-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.prose {
  line-height: 1.7;
}

.prose h2 {
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
}

.prose p {
  margin: 1rem 0;
}

/* Subtle gray text-bubble for quotes inside pieces */
.piece-body .prose p > i,
.piece-body.prose p > i {
  display: block;
  position: relative;
  background: rgba(0,0,0,0.04);
  color: #444;
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  margin: .25rem 0 .35rem 0; /* breathing room above/below bubble */
}

/* Prefer a dedicated paragraph as the bubble container */
.piece-body .prose p.quote,
.piece-body.prose p.quote {
  position: relative;
  background: rgba(0,0,0,0.04);
  color: #444;
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  margin: .25rem 0 .35rem 0;
}

.piece-body .prose p.quote i,
.piece-body.prose p.quote i {
  display: inline;
  background: transparent;
  border: 0;
  padding: 0;
}

.piece-body .prose p.quote .quote-author,
.piece-body.prose p.quote .quote-author {
  display: block;
  font-size: .9rem;
  color: rgba(0,0,0,0.55);
  margin-top: .5rem;
  padding-left: .25rem;
}

.piece-body .prose p > i::before,
.piece-body.prose p > i::before {
  content: none;
  display: none;
}

/* Sender name under the quote bubble */
.piece-body .prose .quote-author,
.piece-body.prose .quote-author {
  display: block;
  font-size: .9rem;
  color: rgba(0,0,0,0.55);
  margin: 0 0 .75rem 0;
  padding-left: .5rem; /* slight indent from bubble edge */
}

.piece-body .prose .quote-author::before,
.piece-body.prose .quote-author::before {
  content: "\2014\00A0"; /* em dash + non-breaking space */
}

.prose ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.contact-info {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.contact-method {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.contact-method h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.contact-method a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-method a:hover {
  border-color: currentColor;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  margin-top: auto;
}

/* ===== Text Alignment ===== */
.text-right {
  text-align: right !important;
}
