:root {
  --bg: #e8e8e6;
  --panel: #f4f4f2;
  --text: #171717;
  --muted: #6f6f6f;
  --line: rgba(0, 0, 0, 0.08);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  --sidebar-width: 220px;
  --radius: 18px;
  --content-max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(160px, var(--sidebar-width)) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 72px);
  max-width: calc(var(--content-max) + var(--sidebar-width) + 140px);
  margin: 0 auto;
  padding: 40px clamp(18px, 2.8vw, 48px) 72px;
}

.sidebar {
  direction: rtl;
  position: sticky;
  top: 28px;
  align-self: start;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 42px;
}

.brand__name {
  font-size: 1.58rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__role {
  font-size: 0.95rem;
  color: var(--muted);
}

.sidebar-nav {
  display: grid;
  gap: 12px;
}

.sidebar-toggle {
  display: none;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.category-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-align: right;
  padding: 4px 0;
  color: var(--muted);
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.category-link:hover,
.category-link:focus-visible {
  color: var(--text);
  transform: translateX(-3px);
  outline: none;
}

.category-link.is-active {
  color: var(--text);
  font-weight: 700;
}


.main-content {
  direction: rtl;
  min-width: 0;
}

.page-header {
  margin-bottom: 28px;
}

.page-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.page-title {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.page-description {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(214px, 1fr));
  gap: 40px 28px;
  align-items: start;
}

.project-card {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: right;
  cursor: pointer;
  transition: transform 0.22s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: scale(1.026);
  outline: none;
}

.project-card__image-wrap {
  position: relative;
  overflow: hidden;
  background: #d8d8d8;
  aspect-ratio: 4 / 4.8;
  border-radius: 0;
  box-shadow: none;
}

.project-card__image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  pointer-events: none;
}

.project-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.project-card:hover .project-card__image,
.project-card:focus-visible .project-card__image {
  transform: scale(1.04);
}

.project-card__body {
  padding-top: 14px;
}

.project-card__title {
  margin: 0 0 4px;
  font-size: 1.08rem;
  line-height: 1.55;
}

.project-card__meta,
.project-card__description {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.75;
}

.project-card__meta {
  margin-top: 6px;
}

.project-view {
  display: grid;
  gap: 26px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumbs button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.breadcrumbs button:hover,
.breadcrumbs button:focus-visible {
  color: var(--text);
  outline: none;
}

.project-summary {
  display: grid;
  gap: 10px;
  padding: 0 0 12px;
}

.project-summary h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.project-summary p {
  margin: 0;
  color: var(--muted);
  max-width: 75ch;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
  outline: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.gallery-item {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.gallery-item__image-wrap {
  overflow: hidden;
  background: #d8d8d8;
  aspect-ratio: 4 / 5;
}

.gallery-item__image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  pointer-events: none;
}

.gallery-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.gallery-item:hover .gallery-item__image,
.gallery-item:focus-visible .gallery-item__image {
  transform: scale(1.03);
}

.gallery-item:focus-visible {
  outline: none;
}

.empty-state {
  padding: 32px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.lightbox {
  width: min(95vw, 1380px);
  max-width: none;
  border: 0;
  padding: 0;
  background: rgba(19, 19, 19, 0.92);
  color: white;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(3px);
}

.lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
  gap: 10px;
}

.lightbox__close,
.lightbox__nav {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.4rem;
}

.lightbox__content {
  padding: 16px 16px 22px;
}

.lightbox__content img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox__caption {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-size: 0.95rem;
}

.fallback-image {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.04),
      rgba(0, 0, 0, 0.04) 10px,
      rgba(255, 255, 255, 0.18) 10px,
      rgba(255, 255, 255, 0.18) 20px
    );
}

@media (max-width: 920px) {
  .site-shell {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sidebar {
    position: static;
  }

  .brand {
    margin-bottom: 20px;
  }

  .sidebar-toggle {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.44);
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
  }

  .category-list {
    margin-top: 12px;
  }

  .category-list.is-collapsed {
    display: none;
  }

  .sidebar-note {
    display: none;
  }

  .project-grid {
    gap: 24px 18px;
  }
}

@media (max-width: 620px) {
  .site-shell {
    padding-inline: 14px;
    padding-top: 22px;
  }

  .project-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-title {
    font-size: 1.42rem;
  }

  .project-card__title {
    font-size: 1rem;
  }
}

@media (max-width: 460px) {
  .project-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}


.gallery-item.is-video {
  cursor: default;
}

.gallery-item__label {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.gallery-item__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.gallery-item__image-wrap.is-video-wrap {
  aspect-ratio: 4 / 5;
  background: #000;
}
