@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500&family=Archivo:wght@400;500&display=swap');

:root {
  --ink: #111110;
  --paper: #FFFFFF;
  --steel: #8A8782;
  --line: #E9E7E2;
  --accent: #A34A24;
  --sidebar-w: 280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: 640px;
  padding: 0 48px;
}

/* ---------- Sidebar ---------- */

aside.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  padding: 48px 36px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar .wordmark {
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink);
}

.sidebar .meta {
  font-size: 12px;
  color: var(--steel);
  margin-top: 10px;
  line-height: 1.6;
}

nav.links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
}

nav.links a {
  text-decoration: none;
  color: var(--steel);
  transition: color .15s ease;
}

nav.links a:hover,
nav.links a[aria-current="page"] {
  color: var(--ink);
}

.sidebar footer {
  font-size: 11px;
  color: var(--steel);
}

/* ---------- Content column ---------- */

.content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

/* ---------- Hero ---------- */

.hero {
  padding: 60px 0 0;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(24px, 3.6vw, 30px);
  line-height: 1.35;
  margin: 0 0 40px;
  max-width: 34ch;
  color: var(--ink);
}

.hero-image {
  aspect-ratio: 16 / 10;
  border: 1px dashed var(--line);
  background: #FBFBF9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel);
  font-size: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

/* ---------- Sections ---------- */

section.block {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

section.block h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 19px;
  margin: 0 0 24px;
  color: var(--ink);
}

section.block p {
  max-width: 60ch;
  margin: 0 0 16px;
  color: var(--ink);
}

section.block p:last-child { margin-bottom: 0; }

/* ---------- CV list ---------- */

.cv-group h3 {
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--steel);
  margin: 0 0 12px;
}

.cv-group { margin-bottom: 32px; }
.cv-group:last-child { margin-bottom: 0; }

.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-list li {
  display: flex;
  gap: 20px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.cv-list li:last-child { border-bottom: 1px solid var(--line); }

.cv-year {
  flex: 0 0 auto;
  color: var(--steel);
  min-width: 3.5em;
  font-variant-numeric: tabular-nums;
}

.cv-desc { flex: 1; }
.cv-desc .place { color: var(--steel); }

/* ---------- Gallery teaser on home ---------- */

.gallery-teaser {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.gallery-teaser p { margin: 0; max-width: 42ch; color: var(--steel); font-size: 14px; }

.btn {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  padding: 0 0 2px;
  font-size: 13px;
  white-space: nowrap;
  border-bottom: 1px solid var(--ink);
}

.btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Gallery page ---------- */

.gallery-intro {
  padding: 60px 0 8px;
}

.gallery-intro h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(24px, 4vw, 30px);
  margin: 0 0 14px;
  color: var(--ink);
}

.gallery-intro p {
  max-width: 56ch;
  margin: 0;
  color: var(--steel);
  font-size: 14px;
}

.collection {
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.collection h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 17px;
  margin: 0 0 3px;
  color: var(--ink);
}

.collection .count {
  color: var(--steel);
  font-size: 12px;
  margin: 0 0 22px;
}

.imgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.solo-piece {
  max-width: 320px;
}

.imgbox {
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--line);
  background: #FBFBF9;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--steel);
  font-size: 11px;
  padding: 10px;
  cursor: pointer;
}

.imgbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease;
  z-index: 100;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lb-stage {
  max-width: min(84vw, 900px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lb-img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  display: block;
}

.lb-placeholder {
  width: min(60vw, 520px);
  aspect-ratio: 4 / 5;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

.lb-placeholder[hidden] {
  display: none;
}

.lb-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  text-align: center;
}

.lb-close,
.lb-nav {
  position: fixed;
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  font-family: 'Archivo', sans-serif;
}

.lb-close {
  top: 24px;
  right: 28px;
  font-size: 16px;
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  padding: 10px 14px;
}

.lb-nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.lb-prev { left: 12px; }
.lb-next { right: 12px; }

@media (max-width: 620px) {
  .lb-close { top: 16px; right: 16px; }
  .lb-nav { font-size: 28px; padding: 8px 10px; }
}

/* ---------- Footer ---------- */

footer.site {
  padding: 40px 0 60px;
  color: var(--steel);
  font-size: 11px;
}

/* ---------- Responsive: collapse sidebar under content on narrow screens ---------- */

@media (max-width: 860px) {
  aside.sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 20px 24px;
  }

  .sidebar .meta { display: none; }
  .sidebar footer { display: none; }

  nav.links { flex-direction: row; flex-wrap: wrap; gap: 16px 18px; }

  .content { margin-left: 0; }

  .wrap { padding: 0 24px; }

  .imgrid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  aside.sidebar { padding: 16px; }
  nav.links { font-size: 12px; gap: 12px 14px; }
  .wrap { padding: 0 18px; }
  .hero { padding-top: 40px; }
  section.block { padding: 40px 0; }
}
