:root {
  --bg: #0a0d0f;
  --bg-soft: #101619;
  --bg-tile: #0e1417;
  --line: #1d2b30;
  --text: #c9d4d6;
  --text-dim: #7d8f94;
  --aqua: #45d8d8;
  --aqua-soft: #9be8e8;
  --aqua-dim: #2a7f7f;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--aqua); text-decoration: none; }
a:hover { color: var(--aqua-soft); text-decoration: underline; }

img { max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.2rem;
  background: rgba(10, 13, 15, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--aqua-soft); }
.brand-logo { height: 34px; width: auto; }
.brand-name { font-size: 1.05rem; letter-spacing: 0.04em; }
.brand-small { font-size: 0.78em; }

.menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.2rem;
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
  margin-left: auto;
}
.site-nav a {
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.92rem;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--aqua-soft); text-decoration: none; background: var(--bg-soft); }
.site-nav a.active { color: var(--aqua); background: var(--bg-soft); }

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-toggle button {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 0.28rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.lang-toggle button.active { background: var(--aqua-dim); color: #04282a; font-weight: 600; }

.app {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem 1.2rem 3rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

h1 { color: var(--aqua); font-size: 1.5rem; font-weight: 600; margin: 0 0 1rem; }
h2 { color: var(--aqua-soft); font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.6rem; }
p { margin: 0 0 0.9rem; }

.intro-text { max-width: 46rem; color: var(--text); }

.loading { color: var(--text-dim); padding: 3rem 0; text-align: center; }

.home-hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}
.home-hero img { max-width: min(320px, 80%); height: auto; }
.home-hero .welcome { color: var(--aqua-soft); font-size: 1.05rem; margin-top: 1.2rem; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-content: center;
  gap: 1rem;
  margin: 1.2rem auto 0;
  max-width: 980px;
}

.tile {
  display: block;
  background: var(--bg-tile);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tile:hover { text-decoration: none; border-color: var(--aqua-dim); transform: translateY(-2px); }
.tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--bg-soft);
}
.tile .tile-label {
  padding: 0.55rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.tile .tile-title { color: var(--aqua-soft); }
.tile .tile-count { color: var(--text-dim); font-size: 0.82rem; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-top: 1.2rem;
}

.work {
  background: var(--bg-tile);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  cursor: zoom-in;
  transition: border-color 0.15s ease;
}
.work:hover { border-color: var(--aqua-dim); }
.work .work-imgs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  height: 320px;
}
.work img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--bg-soft);
  border-radius: 6px;
}
.work.pair img { width: calc(50% - 0.25rem); }
.work .work-title {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--aqua-soft);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.8rem;
}
.pager button {
  background: var(--bg-tile);
  border: 1px solid var(--line);
  color: var(--aqua);
  border-radius: 8px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  font-size: 0.92rem;
}
.pager button:hover:not(:disabled) { border-color: var(--aqua-dim); }
.pager button:disabled { opacity: 0.35; cursor: default; }
.pager .pager-status { color: var(--text-dim); font-size: 0.9rem; }

.page-back { display: inline-block; margin-bottom: 1rem; color: var(--text-dim); font-size: 0.9rem; }

.ex-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.2rem; }
.ex-item {
  background: var(--bg-tile);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  color: var(--text);
}
.ex-item:hover { text-decoration: none; border-color: var(--aqua-dim); }
.ex-item .ex-title { color: var(--aqua-soft); font-size: 1.02rem; margin-bottom: 0.3rem; }
.ex-item .ex-text { color: var(--text-dim); font-size: 0.92rem; }

.ex-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}
.ex-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: var(--bg-soft);
}

.link-list { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.2rem; }
.link-item { border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; background: var(--bg-tile); }
.link-item .link-name { color: var(--aqua-soft); }
.link-item .link-desc { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.2rem; }
.disclaimer { margin-top: 2rem; color: var(--text-dim); font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 1rem; }

.contact-line { text-align: center; margin-top: 2rem; }
.contact-email { margin-top: 1rem; }
.contact-email img { vertical-align: middle; }

.imprint-box { max-width: 34rem; margin: 2rem auto 0; text-align: center; }
.imprint-box .imprint-heading { color: var(--aqua-soft); font-weight: 600; margin-bottom: 0.8rem; }
.imprint-box p { margin: 0.15rem 0; }

.notfound { text-align: center; padding: 4rem 0; color: var(--text-dim); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 6, 7, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 3.5rem;
}
.lightbox[hidden] { display: none; }
.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  max-width: 100%;
  max-height: 100%;
}
.lb-figure .lb-imgs { display: flex; gap: 0.6rem; align-items: center; justify-content: center; max-height: 78vh; }
.lb-figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.lb-imgs.pair img { max-width: calc(50vw - 3rem); }
.lb-figure figcaption {
  color: var(--aqua-soft);
  font-size: 0.92rem;
  text-align: center;
  max-width: 46rem;
  line-height: 1.5;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  line-height: 1;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--aqua); }
.lb-close { top: 0.6rem; right: 0.9rem; }
.lb-prev { left: 0.4rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.4rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 13, 15, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1rem 1rem;
    margin-left: 0;
  }
  .site-nav.open { display: flex; }
  .brand-name { display: none; }
  .works-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .work .work-imgs { height: 220px; }
  .lightbox { padding: 2.5rem 2.6rem; }
  .lb-imgs.pair img { max-width: calc(50vw - 2.8rem); }
}
