/* Philomine Wales — shared styles
   Design tokens straight from the handoff spec. Flat/minimal by intent:
   no border-radius, no shadows. */

:root {
  --color-bg: #fff;
  --color-primary: #111;
  --color-body: #333;
  --color-muted: #777;
  --color-lightbox-bg: rgba(255, 255, 255, 0.97);
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --page-padding: 48px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
}

body {
  color: var(--color-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

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

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

/* ---------- Nav ---------- */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px var(--page-padding);
}

.site-nav a {
  font-size: 15px;
  letter-spacing: 0.02em;
}

/* ---------- Home / Portfolio header ---------- */

.home-header {
  max-width: 720px;
  margin: 24px auto 80px;
  padding: 0 var(--page-padding);
}

.home-header h1 {
  font-size: 48px;
  font-weight: 400;
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

.home-header p {
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  color: var(--color-body);
}

/* ---------- Portfolio grid ---------- */

.portfolio-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--page-padding) 96px;
}

.year-group {
  margin-bottom: 56px;
}

.year-group h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 20px;
  letter-spacing: 0.02em;
}

.masonry {
  column-count: 3;
  column-gap: 32px;
}

.work-figure {
  margin: 0 0 32px;
  break-inside: avoid;
  position: relative;
}

.work-image {
  width: 100%;
  overflow: hidden;
  cursor: pointer;
  background: rgba(127, 127, 127, 0.08);
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-caption {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-primary);
}

.work-caption .work-meta {
  color: var(--color-muted);
}

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

.lightbox {
  position: fixed;
  inset: 0;
  background: var(--color-lightbox-bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 32px;
  right: 48px;
  background: none;
  border: none;
  font-size: 16px;
  font-family: inherit;
  color: var(--color-primary);
  cursor: pointer;
  letter-spacing: 0.02em;
  padding: 0;
}

.lightbox-close:hover {
  color: var(--color-muted);
}

.lightbox-figure {
  margin: 0;
  max-width: 900px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image-wrap {
  width: min(90vw, 900px);
  max-height: 75vh;
}

.lightbox-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-primary);
  text-align: center;
}

.lightbox-caption .work-meta {
  color: var(--color-muted);
}

/* ---------- About page ---------- */

.about-main {
  max-width: 1100px;
  margin: 24px auto 120px;
  padding: 0 var(--page-padding);
}

.about-main h1 {
  font-size: 40px;
  font-weight: 400;
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 64px;
  align-items: start;
}

.about-portrait-col {
  position: sticky;
  top: 48px;
}

.about-portrait {
  width: 100%;
  height: auto;
  margin: 0;
}

.about-statement {
  margin-bottom: 48px;
}

.about-statement p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-body);
  margin: 0 0 24px;
}

.about-statement p:last-child {
  margin-bottom: 0;
}

.about-section {
  margin-bottom: 40px;
}

.about-section h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 14px;
}

.about-section p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-body);
  margin: 0;
}

.exhibitions-intro {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-muted);
  margin: 0 0 16px;
}

.exhibition-row {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-body);
}

.exhibition-year {
  width: 56px;
  flex-shrink: 0;
  color: var(--color-primary);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  :root {
    --page-padding: 32px;
  }

  .masonry {
    column-count: 2;
    column-gap: 24px;
  }

  .work-figure {
    margin-bottom: 24px;
  }

  .home-header h1 {
    font-size: 40px;
  }

  .about-main {
    max-width: 720px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .about-portrait-col {
    position: static;
  }

  .about-portrait {
    margin: 0 0 48px;
  }
}

@media (max-width: 600px) {
  :root {
    --page-padding: 20px;
  }

  .site-nav {
    padding: 24px var(--page-padding);
  }

  .masonry {
    column-count: 1;
  }

  .home-header {
    margin: 16px auto 56px;
  }

  .home-header h1 {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .about-main h1 {
    font-size: 32px;
  }

  .lightbox {
    padding: 24px;
  }

  .lightbox-close {
    top: 16px;
    right: 20px;
  }

  .exhibition-row {
    gap: 16px;
  }

  .exhibition-year {
    width: 44px;
  }
}
