/* Frank Kent — site styles. Change the values in :root to restyle the whole site. */
@font-face { font-family: "Raleway"; font-weight: 300; font-style: normal; font-display: swap; src: url("/fonts/raleway-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/raleway-latin-400-normal.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #8a8a8a;
  --line: #e2e2e2;
  --font: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 4vw, 3rem);   /* page margin */
  --gap: clamp(2.5rem, 6vw, 5rem);    /* space between works */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 300 1rem/1.6 var(--font);
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; padding: 0 var(--pad); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
h1, h2 { font-weight: 400; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem;
  padding: clamp(1.5rem, 3.5vw, 2.5rem) var(--pad) clamp(2.5rem, 7vw, 5rem);
}
.site-name { font-size: clamp(1.35rem, 2.4vw, 1.6rem); font-weight: 400; letter-spacing: 0.02em; text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem clamp(1.1rem, 3vw, 2.25rem); }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--text); }
.site-header nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* ---------- Selected Works: two-column grid, works keep their proportions ---------- */
.works {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap) clamp(1.5rem, 5vw, 5rem);
  max-width: 1300px; margin: 0 auto;
}
.work { margin: 0; display: flex; flex-direction: column; }
.work-link { display: block; cursor: zoom-in; }
.work-link img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: contain; object-position: center bottom;
  transition: opacity 0.25s ease;
}
.work-link:hover img { opacity: 0.88; }
.work figcaption { margin-top: 1rem; text-align: center; font-size: 0.95rem; color: var(--muted); }
.work figcaption em { font-style: normal; color: var(--text); }

/* ---------- Exhibitions: details left, installation photos right ---------- */
.show {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 1000px; margin: 0 auto; text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--line);
}
.show:first-of-type { border-top: 0; padding-top: 0; }
.show-info { text-align: center; }
.show-year { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.9rem; letter-spacing: 0.05em; }
.show-info h2 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.3; }
.show-venue { margin: 0.25rem 0 0; }
.show-images { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.show-images img { width: 100%; max-height: 85vh; width: auto; margin-inline: auto; object-fit: contain; }

/* ---------- Contact ---------- */
.contact {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(2.5rem, 6vw, 4rem);
  max-width: 640px; margin: 0 auto; width: 100%;
}
.portrait { width: 100%; max-width: 360px; }
.contact-text h1 { margin: 0 0 1rem; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.contact-text h2 { margin: 3.5rem 0 0.5rem; font-size: 1.15rem; }
.contact-text p { margin: 0 0 0.5rem; }
.email { font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin-top: 0.75rem !important; }
.signup { display: flex; gap: 0.75rem; margin: 1.25rem auto 0; max-width: 30rem; }
.signup input {
  flex: 1; min-width: 0; font: inherit; color: var(--text);
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 0; background: var(--bg);
}
.signup input:focus { outline: 1px solid var(--text); outline-offset: -1px; }
.signup button {
  font: inherit; font-weight: 400; color: var(--bg); background: var(--text);
  border: 0; padding: 0.85rem 1.4rem; cursor: pointer;
}
.signup button:hover { opacity: 0.85; }

.notice { text-align: center; padding-top: 10vh; }
.notice h1 { font-weight: 300; font-size: clamp(1.3rem, 3vw, 1.6rem); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem;
  padding: clamp(4rem, 10vw, 7rem) var(--pad) 2rem; font-size: 0.9rem; color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 30; background: var(--bg);
  display: grid; grid-template-columns: 4rem minmax(0, 1fr) 4rem; align-items: center;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; height: 100vh; padding: 4rem 0 2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox img { max-height: calc(100vh - 10rem); width: auto; object-fit: contain; }
.lightbox figcaption { margin-top: 1.25rem; text-align: center; font-size: 0.95rem; max-width: 40rem; }
.lightbox button { background: none; border: 0; cursor: pointer; color: var(--text); font: inherit; padding: 0.5rem; justify-self: center; }
.lightbox button:hover { color: var(--muted); }
.lightbox svg { width: 1rem; height: 2.4rem; fill: none; stroke: currentColor; stroke-width: 1.4; }
.lb-close { position: absolute; top: 1.25rem; right: var(--pad); }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 720px) {
  .works { grid-template-columns: 1fr; }
  .work-link img { aspect-ratio: auto; }
  .portrait { max-width: 75%; }
  .signup { flex-direction: column; }
  .lightbox { grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Exhibition carousel ---------- */
/* Without JavaScript: first photo large, the rest as a grid */
.show-images { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.show-images .slide-link:first-child { grid-column: 1 / -1; }
.show-images .slide-link img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; max-height: none; }
.show-images .slide-link:first-child img { aspect-ratio: auto; object-fit: contain; max-height: 80vh; width: auto; margin-inline: auto; }

/* With JavaScript: main image + thumbnail strip */
.carousel { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.carousel-stage {
  position: relative; width: 100%;
  height: min(72vh, 720px);
  display: flex; align-items: center; justify-content: center;
}
.show-images .carousel-main {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  cursor: pointer; transition: opacity 0.25s ease;
}
.show-images .carousel-main.is-loading { opacity: 0.35; }
.carousel-prev, .carousel-next {
  position: absolute; top: 0; bottom: 0; width: 15%;
  display: flex; align-items: center;
  background: none; border: 0; cursor: pointer; color: var(--text); padding: 0;
}
.carousel-prev { left: calc(-1 * clamp(2.5rem, 6vw, 5rem)); justify-content: flex-start; }
.carousel-next { right: calc(-1 * clamp(2.5rem, 6vw, 5rem)); justify-content: flex-end; }
.carousel-prev svg, .carousel-next svg { width: 1rem; height: 2.4rem; fill: none; stroke: currentColor; stroke-width: 1.4; }
.carousel-prev:hover, .carousel-next:hover { color: var(--muted); }
.carousel-count { margin: 0; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.05em; }
.carousel-thumbs {
  display: flex; gap: 0.5rem; max-width: 100%;
  overflow-x: auto; padding: 0.25rem 0.25rem 0.5rem;
  justify-content: safe center; scrollbar-width: thin;
}
.carousel-thumbs button {
  flex: 0 0 auto; width: 64px; height: 64px; padding: 0; border: 0; background: none; cursor: pointer;
  opacity: 0.45; transition: opacity 0.2s ease; outline-offset: 2px;
}
.carousel-thumbs button:hover { opacity: 0.8; }
.carousel-thumbs button[aria-current="true"] { opacity: 1; outline: 1px solid var(--text); }
.show-images .carousel-thumbs img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 720px) {
  .show-images { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .carousel-stage { height: auto; }
  .show-images .carousel-main { max-height: 70vh; }
  .carousel-prev, .carousel-next { display: none; } /* tap the image or swipe on phones */
  .carousel-thumbs { justify-content: flex-start; }
  .carousel-thumbs button { width: 52px; height: 52px; }
}

/* Selected Works: one work per block, caption under the carousel */
.piece { gap: 1.25rem; }
.piece-caption { margin: 0; font-size: 0.95rem; color: var(--muted); }
.piece-caption em { font-style: normal; color: var(--text); }
.carousel-caption { margin: 0; font-size: 0.95rem; color: var(--muted); max-width: 40rem; min-height: 3.2em; }
.carousel-caption em { font-style: normal; color: var(--text); }
