:root {
  color-scheme: light;
  --bg: #f4efe6;
  --bg-paper: #fbf9f4;
  --ink: #1b1915;
  --muted: #6f675c;
  --line: #e0d5c4;
  --accent: #b07a3a;
  --accent-strong: #8a5a27;
  --accent-ink: #20323a;
  --shadow: 0 18px 48px rgba(24, 18, 10, 0.15);
  --radius: 18px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 520px at 12% -10%, rgba(255, 241, 218, 0.9), transparent 65%),
    radial-gradient(900px 420px at 90% 0%, rgba(235, 226, 214, 0.9), transparent 60%),
    linear-gradient(180deg, #f7f2e9 0%, #f2ede4 100%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 0);
  background-size: 3px 3px;
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
}

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

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

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

p {
  margin: 0 0 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: "Fraunces", "Times New Roman", serif;
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 4.1rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.7rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

small,
.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 1.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(248, 244, 235, 0.9);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.logo {
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding-bottom: 0.2rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

.hero {
  padding: 5rem 0 3rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
}

.hero-title {
  font-size: clamp(2.8rem, 4.2vw, 4.5rem);
}

.hero-card {
  background: var(--bg-paper);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(176, 122, 58, 0.2);
}

.hero-card p {
  font-size: 1.05rem;
}

.tagline {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
}

.section {
  padding: 2rem 0 3rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.section-title span {
  color: var(--muted);
  font-size: 0.95rem;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

.art-card {
  background: var(--bg-paper);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(28, 25, 19, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.art-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(28, 25, 19, 0.16);
}

.art-card img {
  height: 200px;
  object-fit: cover;
}

.art-card-body {
  padding: 1.4rem 1.4rem 1.6rem;
  display: grid;
  gap: 0.6rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.lens-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.lens-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}


.art-card-image {
  display: block;
}

.art-card-image img {
  width: 100%;
}

.category-card {
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(28, 25, 19, 0.12);
}

.category-card.is-soon {
  opacity: 0.75;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-paper);
  padding: 1rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 25px rgba(28, 25, 19, 0.08);
  margin-bottom: 1.8rem;
}

.filter-stack {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.filter-stack .filter-bar {
  margin-bottom: 0;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  color: var(--accent-strong);
}

.filter-chip.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.filter-input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 1rem;
  outline: none;
  color: var(--ink);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  z-index: 12;
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-ink));
  transition: width 0.2s ease;
}

.artwork-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 2.5rem;
}

.artwork-hero figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-paper);
  border: 1px solid var(--line);
}

.artwork-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artwork-hero .detail-img {
  height: 100%;
  object-position: center;
}

.figcaption {
  padding: 0.8rem 1rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.article-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  margin-top: 2.5rem;
}

.summary-box {
  background: var(--bg-paper);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(28, 25, 19, 0.08);
}

.summary-box h3 {
  margin-bottom: 0.6rem;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.facts li {
  display: grid;
  gap: 0.2rem;
}

.facts span {
  font-weight: 600;
}

.pull-quote {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  padding: 1.3rem 1.6rem;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  margin: 2rem 0;
}

.related-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.related-card {
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  color: var(--muted);
}

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

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (max-width: 900px) {
  .artwork-hero {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 680px) {
  .nav-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .hero {
    padding: 3.5rem 0 2rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
  }

  .art-card img {
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
  }

  .reading-progress span {
    transition: none;
  }

  .art-card {
    transition: none;
  }
}
