:root {
  color-scheme: light;
  --ink: #24211e;
  --muted: #6d6760;
  --paper: #f5f1ea;
  --surface: #ffffff;
  --line: #d8d0c4;
  --oxide: #9f422f;
  --moss: #5e6f62;
  --blue: #315f72;
  --shadow: 0 18px 42px rgb(37 35 33 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgb(245 241 234 / 90%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  text-decoration: none;
}

.brand img {
  width: 98px;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--oxide);
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(760px, 78svh);
  overflow: hidden;
  padding: clamp(48px, 8vw, 108px) clamp(18px, 6vw, 92px);
  background: #1f1b17;
  color: #fffefa;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding-bottom: clamp(12px, 4vh, 44px);
  text-shadow: 0 2px 28px rgb(20 16 12 / 44%);
}

.kicker {
  margin: 0 0 12px;
  color: var(--oxide);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.05;
}

h1 {
  font-size: clamp(4rem, 13vw, 10rem);
}

h1 img {
  width: min(38vw, 330px);
  min-width: 180px;
  height: auto;
  filter: invert(1) brightness(2.4);
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h3 {
  font-size: 1.2rem;
}

.hero-subtitle {
  max-width: 520px;
  margin: 20px 0 6px;
  color: rgb(255 254 250 / 88%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3.2vw, 3rem);
  line-height: 1.05;
}

.hero-location {
  margin: 0 0 30px;
  color: rgb(255 254 250 / 70%);
  font-size: 0.98rem;
}

.button,
.filter,
.icon-button,
.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--surface);
  cursor: pointer;
  text-decoration: none;
}

.button {
  padding: 10px 18px;
}

.text-link {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.hero .button {
  border-color: rgb(255 254 250 / 76%);
  background: rgb(255 254 250 / 8%);
  color: #fffefa;
  backdrop-filter: blur(10px);
}

.hero .button:hover,
.hero .button:focus-visible {
  background: rgb(255 254 250 / 18%);
}

.hero-art {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
}

.hero-art::after {
  position: absolute;
  inset: 0;
  display: block;
  background:
    linear-gradient(90deg, rgb(18 15 12 / 74%), rgb(18 15 12 / 28%) 52%, rgb(18 15 12 / 8%)),
    linear-gradient(0deg, rgb(18 15 12 / 42%), transparent 46%);
  content: "";
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.03);
}

.section {
  padding: clamp(44px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.work-section {
  background: #fffefa;
}

.intro-band,
.split-band,
.contact-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 6vw, 80px);
  border-top: 1px solid var(--line);
}

.intro-band p:not(.kicker),
.contact-band p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.welcome-copy {
  display: grid;
  gap: 16px;
}

.welcome-copy p:not(.welcome-lede) {
  max-width: 760px;
  font-size: clamp(1rem, 1.45vw, 1.22rem);
}

.welcome-copy a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.welcome-lede {
  font-family: Georgia, "Times New Roman", serif;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-description {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.filters {
  display: flex;
  flex-wrap: nowrap;
  max-width: min(720px, 58vw);
  gap: 10px;
  justify-content: flex-end;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.filter {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 0;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
}

.filter.is-active,
.filter:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.art-grid {
  column-count: 4;
  column-gap: clamp(18px, 2.6vw, 38px);
}

.art-card {
  display: block;
  width: 100%;
  margin: 0 0 clamp(22px, 3vw, 42px);
  padding: 0;
  break-inside: avoid;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
  box-shadow: none;
}

.art-card figure {
  margin: 0;
}

.art-image-frame {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--ratio, 4 / 5);
  background: #eee8de;
}

.art-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--thumb-position, center);
  transform: scale(var(--thumb-scale, 1.04));
  transition: transform 220ms ease;
}

.art-card:hover img,
.art-card:focus-visible img {
  transform: scale(calc(var(--thumb-scale, 1.04) + 0.02));
}

.art-card figcaption {
  padding: 10px 0 0;
}

.art-card h3 {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.25;
}

.art-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-links {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.exhibition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 34px);
}

.exhibition-card {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.exhibition-image-frame {
  display: block;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: #e8e0d5;
}

.exhibition-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--thumb-position, center);
  transform: scale(var(--thumb-scale, 1.04));
  transition: transform 220ms ease;
}

.exhibition-card:hover img,
.exhibition-card:focus-visible img {
  transform: scale(calc(var(--thumb-scale, 1.04) + 0.02));
}

.exhibition-card-text {
  display: grid;
  gap: 2px;
}

.exhibition-card-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.exhibition-card-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.exhibition-card-copy {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.contact-links {
  align-content: start;
}

.contact-links a {
  width: fit-content;
  color: var(--blue);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.cv-page h1 {
  font-size: clamp(4rem, 10vw, 8rem);
}

.cv-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: clamp(28px, 6vw, 84px);
  align-items: end;
  background: #fffefa;
  border-bottom: 1px solid var(--line);
}

.cv-intro-copy {
  max-width: 760px;
}

.cv-intro-copy p:not(.kicker) {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.cv-portrait {
  margin: 0;
  overflow: hidden;
  background: #e8e0d5;
}

.cv-portrait img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.cv-content {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.cv-panel {
  display: grid;
  gap: 16px;
}

.cv-panel:nth-child(2) {
  grid-column: 1;
}

.exhibition-history {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.cv-panel h2 {
  font-size: clamp(1.85rem, 3.2vw, 3rem);
}

.cv-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.cv-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.cv-list.compact {
  padding-left: 18px;
  list-style: disc;
}

.cv-list a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.exhibition-list {
  gap: 9px;
}

.exhibition-list li,
.cv-list li {
  line-height: 1.45;
}

.cv-year {
  display: inline-block;
  min-width: 78px;
  color: var(--ink);
  font-weight: 650;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.lightbox {
  width: min(96vw, 1280px);
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
  background: #11100f;
  border: 0;
  border-radius: 0;
  color: #fffefa;
  box-shadow: 0 28px 80px rgb(17 16 15 / 38%);
}

.lightbox::backdrop {
  background: rgb(18 16 14 / 84%);
}

.lightbox img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: #11100f;
}

.lightbox-caption {
  padding: 16px 18px 18px;
}

.lightbox-caption p {
  margin: 6px 0 0;
  color: rgb(255 254 250 / 64%);
}

.icon-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  min-height: 38px;
  border-color: rgb(255 255 255 / 70%);
  background: rgb(24 22 20 / 76%);
}

.admin-shell {
  min-height: 100svh;
  background: #f2eee7;
}

.admin-main {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(360px, 1fr) minmax(300px, 420px);
  gap: 16px;
  align-items: start;
  padding: 18px clamp(14px, 3vw, 34px) 34px;
}

.admin-panel,
.preview-panel {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgb(37 35 33 / 6%);
}

.admin-panel {
  padding: 18px;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-panel h1,
.admin-panel h2 {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 650;
  line-height: 1.15;
}

.admin-panel h1 {
  font-size: 1.35rem;
}

.admin-panel h2 {
  font-size: 1.15rem;
}

.admin-count {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.admin-tab {
  min-height: 34px;
  padding: 6px 10px;
  background: #fffefa;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
}

.admin-tab:last-child {
  border-right: 0;
}

.admin-tab.is-active {
  background: var(--ink);
  color: var(--surface);
}

.field-grid {
  display: grid;
  gap: 14px;
}

.compact-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 0.88rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffefa;
  color: var(--ink);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.library-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.admin-button {
  min-height: 38px;
  padding: 8px 12px;
}

.admin-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-button.secondary {
  background: transparent;
  color: var(--ink);
}

.admin-button.danger {
  border-color: #b34a3d;
  color: #9d352a;
}

.admin-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-list {
  display: grid;
  max-height: calc(100svh - 246px);
  overflow: auto;
  gap: 6px;
  padding-right: 2px;
}

.library-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffefa;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.library-item.is-active {
  border-color: var(--blue);
  outline: 2px solid rgb(47 98 113 / 18%);
}

.library-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  background: #e9e2d8;
}

.library-item-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.library-item-title,
.library-item-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-title {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.library-item-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-empty {
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f3ec;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill.published {
  border-color: rgb(94 111 98 / 32%);
  background: rgb(94 111 98 / 10%);
  color: var(--moss);
}

.status-pill.draft {
  border-color: rgb(159 66 47 / 30%);
  background: rgb(159 66 47 / 8%);
  color: var(--oxide);
}

.preview-panel {
  position: sticky;
  top: 82px;
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0;
}

.preview-panel img {
  width: 100%;
  max-height: 58svh;
  object-fit: contain;
  background: #e9e2d8;
}

.preview-meta {
  padding: 16px;
}

.preview-meta p {
  margin: 8px 0 0;
  color: var(--muted);
}

.preview-actions {
  margin-top: 16px;
}

@media (max-width: 1100px) {
  .art-grid {
    column-count: 3;
  }

  .admin-main {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  }

  .preview-panel {
    position: static;
    grid-column: 1 / -1;
  }

  .admin-list {
    max-height: 620px;
  }
}

@media (max-width: 820px) {
  .site-header,
  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .intro-band,
  .split-band,
  .contact-band,
  .cv-intro,
  .cv-content,
  .admin-main {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 70svh;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-art::after {
    background:
      linear-gradient(0deg, rgb(18 15 12 / 70%), rgb(18 15 12 / 16%) 68%),
      linear-gradient(90deg, rgb(18 15 12 / 46%), transparent);
  }

  .filters {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
  }

  .art-grid {
    column-count: 2;
  }

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

  .cv-panel:nth-child(2),
  .exhibition-history {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 520px) {
  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: 3.6rem;
  }

  .hero {
    min-height: 66svh;
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .art-grid {
    column-count: 1;
  }

  .compact-fields {
    grid-template-columns: 1fr;
  }
}
