:root {
  --bg: #f8f6f1;
  --text: #171717;
  --muted: #66625b;
  --line: rgba(23, 23, 23, 0.12);
  --max-width: 1920px;
  --sidebar-width: 46%;
  --content-width: 54%;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

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

.layout {
  display: grid;
  grid-template-columns: minmax(320px, var(--sidebar-width)) minmax(420px, var(--content-width));
  max-width: var(--max-width);
  min-height: 100vh;
}

.sidebar-inner {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: 2rem 1.8rem 1rem;
}

.sidebar-top,
.sidebar-footer {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 220px);
  gap: 2rem;
  align-items: start;
}

.brand,
.nav-button,
.group-title,
.project-button {
  font-family: "Oswald", sans-serif;
}

.brand {
  font-size: 1.28rem;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1;
}

.top-nav,
.group-links {
  display: grid;
  gap: 0.08rem;
}

.nav-button,
.project-button {
  font-size: 0.96rem;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.nav-button:hover,
.project-button:hover,
.brand:hover {
  opacity: 0.55;
}

.nav-button.is-active,
.project-button.is-active {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.sidebar-groups {
  display: grid;
  align-content: start;
  gap: 3rem;
  padding-top: 4rem;
}

.sidebar-group {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(220px, 1fr);
  gap: 1.5rem;
}

.group-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 500;
}

.sidebar-footer {
  padding-top: 2rem;
  color: var(--muted);
}

.sidebar-footer p {
  grid-column: 1;
  margin: 0;
}

.content-panel {
  min-height: 100vh;
  padding: 1.8rem 1.8rem 1.8rem 0;
}

.content-view {
  display: none;
  height: calc(100vh - 3.6rem);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.content-view.is-visible {
  display: block;
}

.panel-stack {
  display: grid;
  gap: 0.9rem;
}

.text-panel-page {
  min-height: 100%;
  display: grid;
  align-content: center;
  gap: 1.15rem;
  max-width: 42rem;
  padding: 2rem 1rem 2rem 0;
}

.page-label,
.media-label,
.media-caption p {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.text-panel-page h1,
.media-copy h1,
.media-copy h2 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-weight: 400;
  line-height: 0.97;
}

.text-panel-page h1,
.media-copy h1 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.media-copy h2 {
  font-size: clamp(1.45rem, 2.5vw, 2.3rem);
}

.page-copy,
.media-copy {
  display: grid;
  gap: 0.55rem;
}

.logo-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-strip-image {
  display: block;
  width: auto;
  height: 2rem;
  max-width: 10rem;
  object-fit: contain;
}

.page-copy p,
.media-copy p,
.media-caption span,
.sidebar-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.inline-link {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.inline-link:hover {
  opacity: 0.65;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "Oswald", sans-serif;
  font-size: 0.85rem;
  line-height: 1;
}

.social-icon-link:hover {
  opacity: 0.65;
}

.media-card {
  margin: 0;
}

.media-frame,
.media-asset {
  display: block;
  width: 100%;
  min-height: 38rem;
  border-radius: var(--radius);
}

.media-asset {
  object-fit: cover;
  background: #ddd8cf;
}

.media-asset-compact {
  min-height: 30rem;
  object-fit: contain;
  background: #ece7dd;
}

.media-frame {
  position: relative;
  overflow: hidden;
  padding: 1rem;
}

.media-frame-dark {
  background: #050505;
  color: #f7f1ff;
}

.media-frame-light {
  background: #e6e0d5;
  color: var(--text);
}

.media-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.media-badges span {
  padding: 0.12rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 0.7rem;
}

.media-copy {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 28rem;
}

.media-copy-light {
  position: absolute;
  color: var(--text);
}

.media-frame-dark .media-copy p {
  color: rgba(247, 241, 255, 0.72);
}

.media-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.15rem 0;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar-inner {
    position: relative;
    min-height: auto;
  }

  .content-panel {
    padding: 0 1rem 1rem;
  }

  .content-view {
    height: auto;
    overflow: visible;
  }

  .sidebar-top,
  .sidebar-group,
  .sidebar-footer {
    grid-template-columns: 1fr;
  }

  .sidebar-footer p {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .sidebar-inner {
    padding: 1rem;
  }

  .sidebar-groups {
    gap: 2rem;
    padding-top: 2.5rem;
  }

  .media-frame,
  .media-asset {
    min-height: 22rem;
  }

  .media-asset-compact {
    min-height: 18rem;
  }

  .media-caption {
    flex-direction: column;
    align-items: flex-start;
  }
}
