:root {
  --paper: #d9dbd8;
  --paper-deep: #c7cac7;
  --ink: #070707;
  --muted: #5f625f;
  --line: rgba(7, 7, 7, 0.26);
  --panel: #d1d3d0;
  --glass: rgba(235, 237, 234, 0.58);
  --glass-line: rgba(7, 7, 7, 0.18);
  --max: 1680px;
  --content-size: 16px;
  --content-weight: 300;
  --content-line: 1.45;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: var(--content-size);
  font-weight: var(--content-weight);
  letter-spacing: 0;
}

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

button {
  color: inherit;
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  gap: 28px;
  align-items: start;
  padding: 18px clamp(16px, 2.7vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(225, 227, 224, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(0.7);
  backdrop-filter: blur(18px) saturate(0.7);
}

.brand {
  display: flex;
  gap: 12px;
  font-weight: var(--content-weight);
  font-size: var(--content-size);
  line-height: 1;
}

.nav {
  display: flex;
  gap: 18px;
  font-size: var(--content-size);
  font-weight: var(--content-weight);
  text-transform: uppercase;
}

.nav a,
.language-toggle {
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.language-toggle:hover {
  border-bottom-color: var(--ink);
}

.language-toggle {
  border: 0;
  background: transparent;
  min-width: 28px;
  padding: 0;
  font-size: var(--content-size);
  font-weight: var(--content-weight);
  text-align: right;
  cursor: pointer;
}

main {
  max-width: var(--max);
  margin: 0 auto;
}

.home {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr auto;
  gap: clamp(16px, 2vw, 32px);
  padding: 96px clamp(16px, 2.7vw, 44px) 42px;
  overflow: hidden;
}

.monument-title {
  grid-column: 1 / 13;
  grid-row: 1;
  position: relative;
  z-index: 0;
  align-self: center;
  margin: 0;
  font-size: clamp(76px, 15vw, 248px);
  line-height: 0.76;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.monument-title span {
  display: block;
}

.manifesto {
  grid-column: 1 / 13;
  grid-row: 2;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 32px);
  margin: 0;
  padding: 22px 22px 20px;
  border: 1px solid var(--glass-line);
  border-top-color: var(--ink);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(0.72);
  backdrop-filter: blur(18px) saturate(0.72);
}

.manifesto p {
  grid-column: 1 / 10;
  margin: 0 0 18px;
  font-size: clamp(28px, 4.2vw, 68px);
  line-height: 0.98;
  font-weight: 950;
}

.manifesto cite {
  display: block;
  max-width: 620px;
  font-size: var(--content-size);
  line-height: var(--content-line);
  font-style: normal;
  font-weight: var(--content-weight);
}

.manifesto-footer {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid var(--glass-line);
}

.manifesto-year {
  font-size: clamp(46px, 5.8vw, 92px);
  line-height: 0.82;
  font-weight: 950;
}

.section {
  min-height: 80vh;
  padding: 110px clamp(16px, 2.7vw, 44px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: baseline;
  margin-bottom: 42px;
}

.section-heading span {
  font-size: var(--content-size);
  font-weight: var(--content-weight);
  color: var(--muted);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(52px, 10vw, 160px);
  line-height: 0.85;
  font-weight: 950;
  text-transform: uppercase;
}

.works-list {
  border-top: 2px solid var(--ink);
}

.work-year-group {
  display: block;
  margin-top: 34px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 0;
  font-size: var(--content-size);
  line-height: var(--content-line);
  font-weight: var(--content-weight);
}

.work-year-group::before {
  content: "";
}

.work-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1.7fr) 120px minmax(220px, 0.9fr);
  gap: 24px;
  align-items: center;
  width: 100%;
  min-height: 92px;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.work-row:hover {
  background: var(--paper-deep);
}

.work-number {
  font-size: var(--content-size);
  font-weight: var(--content-weight);
}

.work-title {
  margin: 0;
  min-width: 0;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-year,
.work-medium {
  font-size: var(--content-size);
  font-weight: var(--content-weight);
  line-height: var(--content-line);
}

.project-section {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px clamp(20px, 2.4vw, 40px);
  align-items: start;
}

.project-page main {
  max-width: var(--max);
  margin: 0 auto;
}

.standalone-project {
  padding-top: 124px;
}

.back-link {
  grid-column: 1 / 13;
  width: max-content;
  margin-bottom: 4px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--ink);
  font-size: 14px;
  line-height: var(--content-line);
  font-weight: var(--content-weight);
  text-transform: uppercase;
}

.project-info {
  grid-column: 9 / 13;
  grid-row: 2;
  position: sticky;
  top: 92px;
  align-self: start;
  padding: clamp(22px, 2.2vw, 34px);
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--glass-line);
  background: rgba(235, 237, 234, 0.58);
  backdrop-filter: blur(24px) saturate(0.68);
  -webkit-backdrop-filter: blur(24px) saturate(0.68);
}

.project-meta span {
  display: block;
  margin-bottom: 26px;
  font-size: 13px;
  font-weight: var(--content-weight);
  color: var(--muted);
  text-transform: uppercase;
}

.project-meta h1 {
  margin: 0 0 24px;
  font-size: clamp(32px, 3vw, 50px);
  line-height: 0.96;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.project-meta p {
  margin: 0;
  font-size: var(--content-size);
  font-weight: var(--content-weight);
  line-height: var(--content-line);
}

.project-statement {
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-line);
  font-size: var(--content-size);
  line-height: var(--content-line);
  font-weight: var(--content-weight);
}

.project-statement p {
  margin: 0 0 1em;
}

.project-gallery {
  grid-column: 1 / 9;
  grid-row: 2;
  min-width: 0;
}

.project-stage {
  position: relative;
  margin: 0;
  outline: none;
  touch-action: pan-y;
}

.project-stage:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.project-stage-media {
  display: grid;
  place-items: center;
  height: clamp(460px, 66vh, 780px);
  min-width: 0;
  background: rgba(199, 202, 199, 0.28);
  overflow: hidden;
}

.project-stage-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.project-fullscreen-button,
.lightbox-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: rgba(239, 241, 238, 0.74);
  backdrop-filter: blur(20px) saturate(0.7);
  -webkit-backdrop-filter: blur(20px) saturate(0.7);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.project-fullscreen-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.project-fullscreen-button:hover,
.project-fullscreen-button:focus-visible,
.lightbox-button:hover,
.lightbox-button:focus-visible {
  color: var(--paper);
  background: var(--ink);
  outline: none;
}

.project-stage-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 56px;
  margin-top: 10px;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-stage-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.project-stage-footer figcaption,
.project-stage-status span {
  font-size: var(--content-size);
  line-height: var(--content-line);
  font-weight: var(--content-weight);
}

.project-stage-status span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.project-gallery-controls {
  display: flex;
  align-self: stretch;
}

.project-gallery-controls button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 100%;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.project-gallery-controls button:hover,
.project-gallery-controls button:focus-visible {
  color: var(--paper);
  background: var(--ink);
  outline: none;
}

.project-gallery-controls button:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.38;
}

.project-thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding: 0 0 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(7, 7, 7, 0.38) transparent;
}

.project-thumbnail {
  flex: 0 0 auto;
  width: auto;
  height: 78px;
  padding: 0 0 7px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  opacity: 0.48;
  transition: opacity 160ms ease, border-color 160ms ease;
}

.project-thumbnail:hover,
.project-thumbnail:focus-visible,
.project-thumbnail.is-active {
  opacity: 1;
  border-color: var(--ink);
  outline: none;
}

.project-thumbnail img {
  display: block;
  width: auto;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  background: transparent;
}

body.viewer-open {
  overflow: hidden;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 44px);
  background: rgba(207, 210, 207, 0.78);
  backdrop-filter: blur(34px) saturate(0.58);
  -webkit-backdrop-filter: blur(34px) saturate(0.58);
}

.image-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - clamp(32px, 6vw, 88px));
  max-height: calc(100dvh - clamp(32px, 6vw, 88px));
  object-fit: contain;
  touch-action: pan-y;
}

.lightbox-button {
  position: absolute;
  z-index: 2;
}

.lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  min-width: 76px;
  padding: 8px 12px;
  transform: translateX(-50%);
  color: var(--ink);
  background: rgba(239, 241, 238, 0.74);
  backdrop-filter: blur(20px) saturate(0.7);
  -webkit-backdrop-filter: blur(20px) saturate(0.7);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.lightbox-close {
  top: 16px;
  right: 16px;
  color: var(--paper);
  background: var(--ink);
  font-size: 30px;
}

.lightbox-previous,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-previous {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-button:disabled {
  opacity: 0.24;
  cursor: default;
}

.text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 6vw, 96px);
  max-width: 1100px;
  margin-left: auto;
}

.text-grid p {
  margin: 0;
  font-size: var(--content-size);
  line-height: var(--content-line);
  font-weight: var(--content-weight);
}

.cv-table {
  max-width: 1040px;
  margin-left: auto;
  border-top: 2px solid var(--ink);
}

.cv-table h3 {
  margin: 54px 0 0;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--ink);
  font-size: clamp(26px, 4vw, 58px);
  line-height: 0.9;
  font-weight: 950;
  text-transform: uppercase;
}

.cv-table h3:first-child {
  margin-top: 0;
}

.cv-table div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}

.cv-table span {
  font-size: var(--content-size);
  font-weight: var(--content-weight);
  letter-spacing: 0.04em;
}

.cv-table p {
  margin: 0;
  font-size: var(--content-size);
  line-height: var(--content-line);
  font-weight: var(--content-weight);
}

.cv-table em {
  display: inline-block;
  margin-top: 9px;
  font-size: var(--content-size);
  font-style: normal;
  font-weight: var(--content-weight);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-block {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin-left: auto;
  font-size: var(--content-size);
  line-height: var(--content-line);
  font-weight: var(--content-weight);
  overflow-wrap: anywhere;
}

.contact-block p {
  margin: 0;
}

@media (max-width: 860px) {
  :root {
    --content-size: 15px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px 14px 12px;
  }

  .brand {
    display: grid;
    gap: 4px;
  }

  .nav {
    grid-column: 1 / 3;
    grid-row: 2;
    overflow-x: auto;
    padding-top: 4px;
    gap: 14px;
    scrollbar-width: none;
  }

  .language-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .home {
    min-height: 100svh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 116px 14px 24px;
    gap: 18px;
  }

  .monument-title,
  .manifesto {
    grid-column: 1;
    grid-row: auto;
  }

  .monument-title {
    align-self: center;
    font-size: clamp(54px, 22vw, 112px);
    line-height: 0.78;
    overflow-wrap: anywhere;
  }

  .manifesto {
    display: block;
    padding: 16px;
  }

  .manifesto p {
    font-size: clamp(28px, 9vw, 44px);
    line-height: 1;
  }

  .manifesto-footer {
    margin-top: 18px;
    padding-top: 14px;
  }

  .manifesto-year {
    font-size: clamp(40px, 14vw, 72px);
  }

  .section {
    min-height: auto;
    padding: 82px 14px;
  }

  .standalone-project {
    padding-top: 154px;
  }

  .section-heading {
    grid-template-columns: 42px minmax(0, 1fr);
    margin-bottom: 28px;
  }

  .section-heading h2 {
    font-size: clamp(38px, 13.5vw, 68px);
  }

  .work-row {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 0;
    gap: 12px;
    padding: 14px 0;
  }

  .work-title {
    font-size: clamp(20px, 6vw, 28px);
  }

  .work-year,
  .work-medium {
    grid-column: 2;
  }

  .work-year-group {
    margin-top: 26px;
    padding: 8px 10px;
  }

  .project-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .text-grid {
    display: block;
  }

  .back-link {
    order: 0;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 20px;
  }

  .project-info {
    display: contents;
  }

  .project-meta {
    order: 1;
    width: 100%;
    min-width: 0;
    margin-bottom: 30px;
    padding-top: 14px;
    border-top: 3px solid var(--ink);
  }

  .project-meta span {
    margin-bottom: 18px;
  }

  .project-meta h1 {
    margin-bottom: 20px;
    font-size: clamp(32px, 10vw, 48px);
    line-height: 0.95;
    overflow-wrap: anywhere;
  }

  .project-statement {
    order: 3;
    width: 100%;
    min-width: 0;
    margin-top: 36px;
    padding-top: 18px;
    border-top-color: var(--ink);
    font-size: var(--content-size);
  }

  .project-gallery {
    order: 2;
    width: 100%;
    min-width: 0;
  }

  .project-stage-media {
    height: clamp(280px, 52svh, 460px);
    min-height: 0;
  }

  .project-stage-footer {
    min-height: 52px;
    margin-top: 8px;
  }

  .project-stage-status {
    gap: 10px;
  }

  .project-stage-status span {
    font-size: 13px;
  }

  .project-gallery-controls button {
    width: 42px;
  }

  .project-thumbnail {
    flex-basis: auto;
    width: auto;
    height: 62px;
    padding-bottom: 6px;
  }

  .project-fullscreen-button,
  .lightbox-button {
    width: 40px;
    height: 40px;
  }

  .project-fullscreen-button {
    top: 10px;
    right: 10px;
  }

  .image-lightbox {
    padding: 10px;
  }

  .image-lightbox img {
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }

  .lightbox-counter {
    bottom: 10px;
  }

  .lightbox-previous {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .text-grid p + p {
    margin-top: 22px;
  }

  .cv-table div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cv-table h3 {
    margin-top: 38px;
  }
}
