/* ===== Font (self-hosted, same look in every browser) =====
   Put the file "latin-400-normal.woff2" into the folder "fonts/".
   Until it is there, the site falls back to Bodoni 72 / Didot / Times. */
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== Basics ===== */
:root {
  color-scheme: only light;   /* always white, even in dark mode */
  --bg: #ffffff;
  --fg: #111111;
  --muted: #8a8a8a;
  --serif: "Bodoni Moda", "Bodoni 72", "Bodoni MT", Didot, "Didot LT STD", "Libre Bodoni", "Times New Roman", serif;
  --pad: clamp(1.25rem, 3vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: #ffffff; color: #111111; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem var(--pad);
  background: rgba(255, 255, 255, .96);
}
.brand { font-size: clamp(1.4rem, 2.6vw, 1.75rem); letter-spacing: .01em; text-decoration: none; }
.site-nav { display: flex; gap: 1rem; }
.site-nav a {
  padding-bottom: .15rem;
  font-size: 1.05rem; text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a.active { border-color: var(--fg); }

/* ===== Home ===== */
.home-main { display: flex; justify-content: center; align-items: flex-start; padding: 2rem var(--pad) 1.5rem; }
.home-image {
  width: auto; height: auto;
  max-width: min(1400px, 100%); max-height: calc(100vh - 210px);
  opacity: 0; transition: opacity 1s ease;
}
.home-image.loaded { opacity: 1; }

/* ===== Work ===== */
.work-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5rem 4rem;
  max-width: 1600px; margin: 0 auto;
  padding: 4rem var(--pad) 3rem;
}
.work-item { display: block; text-decoration: none; }
.work-item .cover { aspect-ratio: 4 / 3; overflow: hidden; background: #f2f2f2; }
.work-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.work-item:hover img { opacity: .85; }
.work-item h3 { margin: 1.6rem 0 0; font-size: 1.15rem; font-weight: 400; }
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem 2rem; } }
@media (max-width: 560px) { .work-grid { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2rem; } .work-item h3 { margin-top: .9rem; } }

/* ===== Project ===== */
.project { display: flex; flex-direction: column; align-items: center; padding: 0 var(--pad) 1rem; }
/* Fixed stage: arrows and caption never move, photos are centered inside */
.slider {
  position: relative;
  width: 100%;
  height: calc(100vh - 200px);
  min-height: 320px;
}
.slide {
  position: absolute; inset: 0 3.5rem;
  margin: 0;
  display: flex; align-items: center; justify-content: center;
}
.slide img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  cursor: pointer; transition: opacity .35s ease;
}
.slide img.fading { opacity: 0; }
.arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  padding: 1rem .5rem; background: none; border: 0; color: var(--fg); cursor: pointer;
}
#prev { left: 0; }
#next { right: 0; }
.arrow svg { display: block; width: 10px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.2; }
/* Next album: top right, directly under Work / About */
.project-top { display: flex; justify-content: flex-end; width: 100%; margin-bottom: .75rem; }
.next-project {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: 1.05rem; text-decoration: none; white-space: nowrap;
}
.next-project svg { width: 8px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.next-project:hover #next-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.slide-caption { margin: 1rem 0 0; font-size: 1.15rem; text-align: center; }
.slide-caption:empty { display: none; }
@media (max-width: 560px) {
  .slider { height: 62vh; min-height: 0; }
  .slide { inset: 0 2rem; }
  .slide-caption { font-size: 1rem; }
}

/* ===== About ===== */
.about {
  display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 400px);
  justify-content: center; align-items: start;
  gap: clamp(2rem, 9vw, 6rem);
  padding: 1.75rem var(--pad) 3rem;
}
.about-portrait { width: 100%; height: auto; }
.about-text p { margin: .3rem 0 1rem; font-size: 1.15rem; line-height: 1.75; }
.about-text p.small { font-size: .95rem; }
.about-text a { text-decoration: none; border-bottom: 1px solid transparent; }
.about-text a:hover { border-color: var(--fg); }
@media (max-width: 700px) {
  .about { grid-template-columns: 1fr; justify-items: start; }
  .about-portrait { max-width: 320px; }
}

/* ===== Impressum / text pages ===== */
.legal { max-width: 680px; margin: 0 auto; padding: 3rem var(--pad); }
.legal h1 { margin: 0 0 1.5rem; font-size: 2rem; font-weight: 400; }
.legal h2 { margin: 2rem 0 .4rem; font-size: 1.1rem; font-weight: 400; }
.legal p { margin: 0 0 1rem; line-height: 1.7; }

/* ===== Footer ===== */
.site-footer { display: flex; justify-content: center; gap: 1.5rem; padding: 2rem var(--pad) 2.25rem; font-size: 1rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer a.subtle { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .home-image, .slide img, .work-item img { transition: none; }
}

.notice { grid-column: 1 / -1; max-width: 34rem; margin: 2rem auto; color: var(--muted); text-align: center; line-height: 1.7; }

/* ===== Thin black frame around all photos ===== */
:root { --frame: 6px solid #000; }   /* change 6px to make it thinner or thicker */
.home-image,
.work-item .cover,
.slide img,
.about-portrait { border: var(--frame); }
/* No long-press save on phones, no selecting/dragging photos */
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
