@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent-text: #d50c42;
  --fg: #000;
  --fg-muted: #555;
  --pad: clamp(20px, 2.6vw, 40px);
  --pad-y: clamp(24px, 4vh, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #fff; color: var(--fg); }
body {
  font-family: "Geist", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- landing ---------- */
.landing {
  min-height: 100vh;
  background: #fff;
  padding: var(--pad-y) var(--pad);
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
}

.landing__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  margin-bottom: clamp(20px, 3vh, 44px);
  flex-shrink: 0;
  font-size: clamp(17px, 1.4vw, 20px);
}
.landing__byline { color: var(--accent-text); }
.landing__title  { color: var(--fg); }

/* Info toggle (top-right) + expandable vita panel */
.landing-info { position: relative; flex-shrink: 0; }
.landing-info__toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-transform: uppercase;
  color: var(--accent-text);
  cursor: pointer;
}
.landing-info__panel {
  position: absolute;
  top: calc(100% + 0.15em);
  right: 0;
  width: min(110ch, 84vw);
  background: #fff;
  text-align: left;
  text-transform: none;                  /* vita in normal case, not caps */
  font-size: clamp(13px, 0.95vw, 15px);  /* smaller than the header */
  line-height: 1.5;
  color: var(--fg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 50;
}
.landing-info:hover .landing-info__panel,
.landing-info.open  .landing-info__panel { opacity: 1; visibility: visible; }
.landing-info__panel p + p { margin-top: 0.7em; }

.landing-table {
  display: flex;
  flex-direction: column;
  row-gap: clamp(56px, 9vh, 100px);
  margin-top: clamp(40px, 6vh, 88px);   /* just enough to clear the open Info panel */
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
}
.landing-table .row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: clamp(24px, 4vw, 64px);
}
.landing-table .cell-project a { color: var(--accent-text); }
.landing-table .cell-project a:hover { text-decoration: none; }
.landing-table .cell-semester { color: var(--fg); white-space: nowrap; text-align: right; }

@media (max-width: 700px) {
  .landing-table .row { grid-template-columns: 1fr; column-gap: 0; }
  .landing-table .cell-semester { display: none; }
}

/* ---------- slider page (= project page) ---------- */
.project-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: var(--pad-y) var(--pad);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  text-transform: uppercase;
  font-size: clamp(13px, 1vw, 15px);
  margin-bottom: clamp(28px, 5vh, 56px);
  flex-shrink: 0;
}
.project-home  { color: var(--accent-text); }
.project-index { color: var(--fg); }
.project-header a:hover { text-decoration: none; }

.project-close {
  position: fixed;
  top: clamp(12px, 2vh, 22px);
  right: clamp(16px, 3vw, 40px);
  z-index: 10;
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
}
.project-close:hover { color: var(--accent-text); }

.project-intro {
  max-width: 78ch;
  margin-bottom: clamp(28px, 4vh, 52px);
  flex-shrink: 0;
}
.project-title {
  font-weight: 500;
  font-size: clamp(15px, 1.2vw, 18px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.project-meta {
  margin-top: 0.2em;
  color: var(--fg);
  text-transform: uppercase;
  font-size: clamp(13px, 1vw, 15px);
  white-space: pre-line;
}
.project-text {
  margin-top: clamp(16px, 2.5vh, 28px);
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.55;
  color: var(--fg);
}
.project-text p + p { margin-top: 0.7em; }
.project-text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-readmore {
  margin-top: 0.5em;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  color: var(--fg);
  cursor: pointer;
}
.project-readmore:hover { color: var(--accent-text); }

.project-gallery {
  flex: 1;
  display: flex;
  align-items: center;
  gap: clamp(48px, 6vw, 120px);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;          /* Firefox — hide scrollbar */
  -ms-overflow-style: none;       /* old Edge */
}
.project-gallery::-webkit-scrollbar { display: none; }  /* WebKit — hide scrollbar */
/* Züri Nord Blow Up! — 3 tall images: equal spacing on all sides
   (left/right via space-evenly, top/bottom via vertical centering) */
.gallery-kunst {
  justify-content: space-evenly;
  align-items: center;
}
/* Kaijima — the tighter spacing looked better here */
.gallery-kaijima-hs24 { gap: clamp(6px, 0.8vw, 14px); }
.gallery-figure {
  flex: 0 0 auto;
  margin: 0;
}
.gallery-figure img {
  height: clamp(300px, 58vh, 720px);
  width: auto;
  object-fit: contain;   /* aspect preserved — never cropped */
  display: block;
  cursor: zoom-in;
}
/* Captions stay in the markup so the lightbox can read them, but are hidden
   in the strip itself. */
.gallery-figure figcaption { display: none; }

@media (max-width: 700px) {
  .gallery-figure img { height: clamp(220px, 42vh, 420px); }
}

/* ---------- lightbox (fullscreen slider, opened on image click) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fff;
  display: none;
}
.lightbox.open {
  display: grid;
  grid-template-rows: auto 1fr;
}
.lightbox-counter {
  text-align: center;
  padding: clamp(16px, 2.5vh, 28px) 0 0;
  font-size: 14px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.lightbox-close {
  position: fixed;
  top: clamp(12px, 2vh, 22px);
  right: clamp(16px, 3vw, 40px);
  background: none;
  border: none;
  color: var(--fg);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--accent-text); }
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--fg);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  padding: 16px 14px;
  cursor: pointer;
}
.lightbox-nav:hover { color: var(--accent-text); }
.lightbox-prev { left: clamp(8px, 2vw, 32px); }
.lightbox-next { right: clamp(8px, 2vw, 32px); }
.lightbox-figure {
  margin: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vh, 32px) clamp(56px, 8vw, 110px) clamp(20px, 4vh, 48px);
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;   /* aspect preserved — never cropped */
  display: block;
}
.lightbox-figure figcaption {
  margin-top: 16px;
  font-size: 13px;
  color: var(--fg);
  text-align: center;
  line-height: 1.5;
}
