:root {
  --bg: #ffffff;
  --bg-soft: #ffffff;
  --text: #111111;
  --muted: #6e6e6a;
  --line: #d5d5d2;
  --shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  --sidebar-width: 290px;
  --content-width: 470px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page-shell {
  min-height: 100vh;
  position: relative;
}

.brand {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.menu-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-open .menu-btn span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-btn span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-btn span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  padding: 2.4rem 1.1rem;
}

.gallery-nav {
  margin-top: 2.1rem;
  display: grid;
  gap: 0.45rem;
}

.gallery-nav a,
.about-link {
  text-decoration: none;
  color: var(--text);
  font-size: 0.98rem;
}

.gallery-nav a {
  opacity: 0.9;
}

.gallery-nav a.active,
.gallery-nav a:hover,
.about-link.active,
.about-link:hover {
  opacity: 1;
  font-weight: 500;
}

.about-link {
  display: inline-block;
  margin-top: 1.8rem;
}

.content {
  margin-left: var(--sidebar-width);
  padding: 2rem 1rem 3.5rem;
  min-height: 100vh;
}

.gallery-wrap {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.gallery-image {
  width: 100%;
  display: block;
  margin: 0 0 1.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 500ms ease forwards;
  cursor: zoom-in;
}

.gallery-image:nth-child(2) { animation-delay: 80ms; }
.gallery-image:nth-child(3) { animation-delay: 140ms; }
.gallery-image:nth-child(4) { animation-delay: 200ms; }
.gallery-image:nth-child(5) { animation-delay: 260ms; }

.project-copy {
  margin-top: 1.2rem;
}

.project-copy h1 {
  font-size: 2rem;
  margin: 0 0 0.55rem;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
}

.project-meta {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.project-description {
  color: #444;
  font-size: 1.38rem;
  line-height: 1.34;
  white-space: pre-line;
  max-width: 26ch;
}

.next-project {
  display: inline-block;
  margin-top: 1rem;
  color: #70706c;
  text-decoration: none;
  font-size: 1rem;
}

.next-project:hover {
  color: var(--text);
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 8, 0);
  opacity: 0;
  pointer-events: none;
  transition: background 220ms ease, opacity 220ms ease;
}

.lightbox.open,
.lightbox.closing {
  pointer-events: auto;
}

.lightbox.open {
  background: rgba(8, 8, 8, 0.84);
  opacity: 1;
}

.lightbox-image {
  max-width: min(94vw, 1320px);
  max-height: 88vh;
  transform: scale(0.94);
  opacity: 0;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
  transition: transform 220ms ease, opacity 220ms ease;
}

.lightbox.open .lightbox-image {
  transform: scale(1);
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.content.about-mode {
  padding-top: 2.5rem;
}

.home-wrap {
  width: min(100%, 720px);
  margin: 0 auto;
}

.carousel {
  position: relative;
  min-height: 420px;
  touch-action: pan-y;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-image-link {
  display: block;
}

.carousel-image {
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow);
}

.carousel-caption {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  margin-top: 0.65rem;
  font-size: 0.97rem;
}

.carousel-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.carousel-title:hover {
  text-decoration: underline;
}

.carousel-caption span {
  color: var(--muted);
}

.about-wrap {
  width: min(100%, 1240px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(420px, 1fr);
  gap: 4.5rem;
}

.about-name {
  margin: 0 0 2.1rem;
  font-size: 2.1rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.about-block {
  margin-bottom: 2.2rem;
}

.about-block h2 {
  margin: 0 0 0.85rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.about-block p {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  line-height: 1.42;
}

.about-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-block li {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  line-height: 1.46;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 240ms ease;
    z-index: 30;
    background: rgba(255, 255, 255, 0.98);
    border-right: 1px solid var(--line);
    width: min(88vw, 320px);
    padding-top: 5.7rem;
  }

  .menu-open .sidebar {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
    padding-top: 1.1rem;
  }

  .gallery-wrap {
    width: min(100%, 620px);
    padding: 0 0.25rem;
  }

  .project-description {
    font-size: 1.08rem;
  }

  .next-project {
    display: block;
    width: 100%;
    text-align: right;
  }

  .content.about-mode {
    padding-top: 1.4rem;
  }

  .home-wrap {
    width: min(100%, 640px);
    padding: 0 0.25rem;
  }

  .carousel {
    min-height: 300px;
  }

  .carousel-caption {
    font-size: 0.92rem;
  }

  .about-wrap {
    width: min(100%, 680px);
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 0 0.25rem;
  }

  .about-name {
    font-size: 1.9rem;
    margin-bottom: 1.4rem;
  }

  .about-block h2 {
    font-size: 1.08rem;
  }

  .about-block p,
  .about-block li {
    font-size: 1rem;
  }
}
