* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: #ffffff;
  color: #111111;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.94rem;
  line-height: 1.45;
}
body.lightbox-open { overflow: hidden; }
img { display: block; width: 100%; height: auto; }
a, button, input, textarea, select { font: inherit; }

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #ffffff;
  z-index: 100;
}

.header-inner, .main-inner {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 28px;
  padding-top: 18px;
  padding-bottom: 14px;
}

.logo {
  color: #111111;
  text-decoration: none;
  font-size: 1.12rem;
  white-space: nowrap;
}

.main-nav { flex: 1 1 auto; display: flex; justify-content: flex-end; }

.nav-toggle {
  display: none;
  width: 26px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  width: 26px;
  height: 1.5px;
  background: #111111;
  transition: transform 180ms ease, opacity 180ms ease, top 180ms ease;
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 8px; }
.nav-toggle span:nth-child(3) { top: 16px; }

.nav-toggle.is-open span:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link, .filter-link, .toggle-btn {
  color: #111111;
  text-decoration: none;
  font-size: 1.02rem;
  opacity: 1;
  transition: opacity 160ms ease;
}

.logo:hover,
.nav-link:hover,
.nav-link.is-active,
.filter-link:hover,
.filter-link.is-active,
.toggle-btn:hover,
.toggle-btn.is-active {
  opacity: 0.65;
}

.site-main { min-height: 100vh; }
.main-inner {
  padding-top: 78px;
  padding-bottom: 80px;
}

.page-text { max-width: 760px; }
.page-title {
  margin: 0 0 18px;
  font-size: 0.98rem;
  font-weight: 400;
}
.page-text p, .placeholder-list li { margin: 0 0 16px; }
.placeholder-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}
.toggle-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.toggle-content.is-hidden { display: none; }

.project-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0 0 18px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  opacity: 1;
  transition: opacity 180ms ease;
}
.project-grid.is-fading { opacity: 0.35; }

.project-card {
  display: block;
  color: #111111;
  text-decoration: none;
  cursor: pointer;
}
.project-card.is-hidden { display: none; }

.project-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #efefef;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px 11px;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.2) 58%, rgba(0,0,0,0));
}
.project-title, .project-category {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.25;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: #e8e8e5;
  color: #111111;
}
.lightbox.is-open { display: block; }

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 1003;
  border: 0;
  background: transparent;
  color: #111111;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  padding: 0;
}

.lightbox-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.lightbox-media img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.08));
}
.lightbox-media img.touch-sides {
  width: 100vw;
  max-width: 100vw;
  max-height: calc(100vh - 150px);
}
.lightbox-media img.touch-top-bottom {
  height: calc(100vh - 120px);
  max-height: calc(100vh - 120px);
  max-width: calc(100vw - 48px);
}

.lightbox-video {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(100vw, 1400px);
  max-width: min(100vw, 1400px);
  aspect-ratio: 16 / 9;
  display: none;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.08));
}
.lightbox-video.is-visible { display: block; }
.lightbox-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #dcdcd8;
}

.lightbox-touch-layer {
  position: absolute;
  display: none;
  z-index: 1001;
  background: transparent;
  touch-action: pan-y;
}

.lightbox-touch-layer.is-visible {
  display: block;
}
.lightbox-image.is-hidden { display: none; }

.lightbox-caption {
  position: absolute;
  left: 0;
  top: 0;
  max-width: min(640px, calc(100vw - 120px));
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.45;
  color: #111111;
  pointer-events: none;
}

.lightbox-controls {
  position: absolute;
  right: 22px;
  bottom: 16px;
  z-index: 1002;
  display: flex;
  align-items: center;
  gap: 14px;
}
.lightbox-arrow, .lightbox-counter {
  color: #111111;
  font-size: 0.94rem;
  line-height: 1;
}
.lightbox-arrow {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.lightbox-arrow.is-hidden { display: none; }

.site-footer { min-height: 36px; }

@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .header-inner {
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 14px;
    padding-top: 16px;
    padding-bottom: 12px;
    position: relative;
  }

  .logo {
    font-size: 1.08rem;
  }

  .nav-link,
  .filter-link,
  .toggle-btn {
    font-size: 1rem;
  }

  .main-nav {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin-left: auto;
    width: auto;
  }

  .nav-toggle {
    display: block;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 24px;
    right: 0;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 10px;
    width: max-content;
    min-width: 140px;
    padding-top: 12px;
        background: #ffffff;
        padding: 12px 14px;
  }

  .nav-list li {
    width: 100%;
    text-align: right;
  }

  .nav-list.is-open {
    display: flex;
  }

  .main-inner {
    padding-top: 88px;
  }

  .lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 1003;
  border: 0;
  background: transparent;
  color: #111111;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  padding: 0;
}

  .lightbox-controls {
    right: 16px;
    bottom: 12px;
    gap: 12px;
  }

  .lightbox-media img.touch-sides {
    max-height: calc(100vh - 140px);
  }

  .lightbox-media img.touch-top-bottom {
    height: calc(100vh - 118px);
    max-height: calc(100vh - 118px);
    max-width: calc(100vw - 34px);
  }

  .lightbox-video {
    width: calc(100vw - 24px);
  }
}

@media (max-width: 520px) {
  body { font-size: 0.9rem; }
  .header-inner, .main-inner {
    padding-left: 14px;
    padding-right: 14px;
  }
  .project-grid { grid-template-columns: 1fr; }
  .project-overlay { padding: 9px 10px 10px; }
  .project-title, .project-category, .lightbox-caption, .lightbox-arrow, .lightbox-counter, .lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 1003;
  border: 0;
  background: transparent;
  color: #111111;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  padding: 0;
}
  .lightbox-controls { right: 12px; bottom: 10px; gap: 10px; }
  .lightbox-media img.touch-sides { max-height: calc(100vh - 152px); }
  .lightbox-media img.touch-top-bottom {
    height: calc(100vh - 126px);
    max-height: calc(100vh - 126px);
    max-width: calc(100vw - 24px);
  }
  .lightbox-caption { max-width: calc(100vw - 28px); }
  .lightbox-video { width: calc(100vw - 16px); }
}
