:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #8c8c8c;
  --line: #e8e8e8;
  --placeholder: #f1f1f1;
  --gap: 20px;
  --pad: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 10px 32px;
  padding: 22px var(--pad);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.logo { font-weight: 600; letter-spacing: 0.01em; }
.header-right { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 32px; }
.lang { display: flex; gap: 2px; }
.lang[hidden] { display: none; }
.lang button {
  background: none; border: 0; cursor: pointer;
  padding: 0 4px; color: var(--muted); font-size: 13px; letter-spacing: 0.04em;
  transition: color 0.2s;
}
.lang button + button::before { content: "/"; margin-right: 6px; color: var(--line); }
.lang button:hover, .lang button.active { color: var(--fg); }
nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
nav a { color: var(--muted); transition: color 0.2s; }
nav a:hover, nav a.active { color: var(--fg); }

main {
  flex: 1;
  width: 100%; max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--pad) 96px;
  animation: fade 0.35s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- home ---------- */
.intro {
  max-width: 720px;
  margin: 48px 0 64px;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.3;
}
.intro .muted { color: var(--muted); }
.cat-title {
  margin: 40px 0 32px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 44px var(--gap);
}
.card .thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--placeholder);
}
.card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.card:hover .thumb img { transform: scale(1.03); }
.card .meta {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 10px; font-size: 14px;
}
.card .meta .r { color: var(--muted); white-space: nowrap; }
.badge {
  position: absolute; left: 10px; top: 10px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  font-size: 12px; border-radius: 2px;
}
.empty { color: var(--muted); margin-top: 40px; }

/* ---------- project ---------- */
.back {
  display: inline-block;
  margin: 28px 0 36px;
  color: var(--muted);
  transition: color 0.2s;
}
.back:hover { color: var(--fg); }

.project-head {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px 64px;
  margin-bottom: 56px;
}
.project-head h1 {
  font-size: clamp(30px, 4.5vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: 10px;
}
.project-head .sub { color: var(--muted); margin-bottom: 24px; }
.desc { max-width: 620px; }
.desc p + p { margin-top: 1em; }

.credits { align-self: end; font-size: 14px; }
.credits div {
  display: flex; gap: 16px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.credits dt { color: var(--muted); min-width: 96px; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: var(--gap);
  background: #000;
}
.video iframe, .video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.gallery { columns: 2; column-gap: var(--gap); }
.gallery.full { columns: 1; max-width: 1100px; margin: 0 auto; }
.gallery img {
  width: 100%;
  margin-bottom: var(--gap);
  break-inside: avoid;
  background: var(--placeholder);
  cursor: zoom-in;
}

.pager {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 72px; padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pager a { color: var(--muted); transition: color 0.2s; }
.pager a:hover { color: var(--fg); }

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 64px;
  margin-top: 48px;
  align-items: start;
}
.about img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--placeholder); }
.about h1 { font-size: clamp(30px, 4.5vw, 56px); font-weight: 500; line-height: 1.05; }
.about .sub { color: var(--muted); margin: 8px 0 28px; }
.about .text p + p { margin-top: 1em; }
.about .contacts { margin-top: 36px; display: grid; gap: 6px; }
.about .contacts a { border-bottom: 1px solid var(--line); width: fit-content; }
.about .contacts a:hover { border-color: var(--fg); }

/* ---------- footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px;
  padding: 24px var(--pad);
  color: var(--muted); font-size: 14px;
  border-top: 1px solid var(--line);
}
.site-footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--fg); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.98);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: calc(100vw - 140px);
  max-height: calc(100vh - 100px);
  object-fit: contain;
}
.lb-btn {
  position: absolute;
  background: none; border: 0;
  font-size: 40px; line-height: 1; color: var(--fg);
  cursor: pointer; padding: 16px;
  opacity: 0.55; transition: opacity 0.2s;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 8px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 20px; color: var(--muted); font-size: 13px; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .project-head, .about { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
  .grid { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .card .meta { flex-direction: column; gap: 0; font-size: 13px; }
  .lightbox img { max-width: 100vw; max-height: 85vh; }
  .lb-prev, .lb-next { display: none; }
}
