:root {
  color-scheme: light;
  --ink: #202521;
  --muted: #535b55;
  --paper: #f8f7f3;
  --pane: #eeede7;
  --white: #fff;
  --rule: #d4d5cb;
  --accent: #923c29;
  --accent-hover: #76301f;
  --font: Calibri, "Portfolio Sans", Arial, sans-serif;
}
@font-face {
  font-family: "Portfolio Sans";
  src: url("/assets/portfolio-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Portfolio Sans";
  src: url("/assets/portfolio-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; }
img { display: block; width: 100%; }
figure { margin: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.13; }
h1, h2 {
  font-weight: 700;
  letter-spacing: -.04em;
}
h2 { font-size: clamp(2.05rem, 3.7vw, 3.25rem); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(100% - 104px, 1320px); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 5;
  top: 6px;
  left: 6px;
  padding: .65rem 1rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-140%);
}
.skip-link:focus { transform: none; }

.site-header {
  --header-accent: #eea992;
  --header-rule: #797f78;
  position: relative;
  z-index: 1;
  color: #f4f4ee;
  background: var(--ink);
  border-bottom: 1px solid var(--ink);
}
.site-header :focus-visible { outline-color: var(--header-accent); }
.header-inner {
  min-height: 90px;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(.75rem, 2vw, 1.75rem);
}
.brand {
  --brand-color: #76283f;
  display: inline-flex;
  align-items: center;
  gap: .48em;
  width: max-content;
  max-width: 100%;
  padding: .33em .46em;
  font-size: 1.25rem;
  line-height: 1;
}
.brand-name {
  width: 8.4em;
  min-width: 0;
  height: auto;
}
.brand-mark {
  --brand-line-thickness: 29%;
  width: 1.4em;
  align-self: stretch;
  flex-shrink: 0;
  background:
    linear-gradient(var(--brand-color), var(--brand-color)) left top / 100% var(--brand-line-thickness) no-repeat,
    linear-gradient(var(--brand-color), var(--brand-color)) left center / .95em var(--brand-line-thickness) no-repeat,
    linear-gradient(var(--brand-color), var(--brand-color)) left bottom / .5em var(--brand-line-thickness) no-repeat;
}
.site-header .brand { font-size: clamp(1.275rem, 2.82vw, 2.04rem); }
.header-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .15rem clamp(.8rem, 2vw, 2.25rem);
}
.header-nav a, .menu-panel a, .site-header .language-link, .menu-toggle {
  font-family: var(--font);
  font-size: clamp(.92rem, 2.04vw, 1.456rem);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.header-nav a { padding-block: .55rem; }
.site-header a:hover { color: var(--header-accent); }
.email:hover, .back-link:hover { color: var(--accent); }
.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: clamp(.4rem, 1.1vw, 1rem);
}
.header-menu { position: relative; }
.menu-toggle {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .22rem;
  list-style: none;
  cursor: pointer;
}
.menu-toggle::-webkit-details-marker { display: none; }
.menu-toggle::before {
  content: "";
  width: .85rem;
  height: .65rem;
  border-block: 1px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}
.menu-toggle:hover, .header-menu[open] .menu-toggle { color: var(--header-accent); }
.header-menu[open] .menu-panel { display: grid; }
.menu-panel {
  position: absolute;
  inset: calc(100% + .2rem) 0 auto auto;
  min-width: 10rem;
  padding: .35rem .6rem;
  background: var(--ink);
  border: 1px solid var(--header-rule);
  box-shadow: 0 .5rem 1rem #20252118;
}
.menu-panel a { padding: .5rem .55rem; }
.menu-panel a:hover, .menu-panel a:focus-visible { background: #353d37; }
.language-options {
  display: inline-flex;
  gap: .35rem;
}
.site-header .language-link {
  border: 1px solid var(--header-rule);
  padding: .28rem .56rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.9rem, 4.1vw, 4.1rem);
  padding-block: clamp(2.5rem, 4.8vw, 4.7rem) clamp(2.1rem, 4vw, 3.9rem);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: .105em;
  color: var(--accent);
}
.eyebrow > span { width: 24px; height: 2px; background: currentColor; }
.hero h1 {
  margin-top: 1rem;
  font-size: clamp(2.75rem, 5.14vw, 5.2rem);
  line-height: 1.01;
}
.intro {
  max-width: 42ch;
  padding-block: 1.4rem 1.45rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .65rem 1.04rem;
  border: 1px solid transparent;
  font-size: .94rem;
  font-weight: 680;
  line-height: 1.3;
  cursor: pointer;
}
.primary { color: var(--white); background: var(--accent); }
.primary:hover { background: var(--accent-hover); }
.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.secondary:hover { color: var(--white); background: var(--ink); }
.hero-figure {
  align-self: start;
  min-width: 0;
  background: var(--ink);
  color: var(--white);
}
.hero-figure > a { display: block; overflow: hidden; }
.hero-image {
  aspect-ratio: 1.75;
  object-fit: cover;
  background: #283135;
}
.hero-figure figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1rem;
  flex-wrap: wrap;
  padding: .66rem 1rem;
  font-size: .86rem;
}
.hero-figure figcaption a { font-weight: 680; }
.hero-figure figcaption a:hover { text-decoration: underline; }
.hero-figure figcaption span { color: #d6d9d1; }
.hero-figure a:focus-visible, .site-footer a:focus-visible { outline-color: #eea992; outline-offset: -3px; }

.projects-section {
  background: var(--pane);
  border-block: 1px solid var(--rule);
  padding-block: clamp(2.2rem, 4vw, 4rem) clamp(2.7rem, 5vw, 4.8rem);
  scroll-margin-top: 16px;
}
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.result-count { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}
.filter-grid label {
  display: grid;
  gap: .32rem;
  font-size: .875rem;
  font-weight: 670;
}
.filter-grid input, .filter-grid select {
  width: 100%;
  min-height: 47px;
  border: 1px solid #aeb2a8;
  border-radius: 0;
  background-color: #fcfbf8;
  padding: .58rem .7rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 450;
}
.filter-grid input::placeholder { opacity: 1; color: var(--muted); }
.filter-grid select {
  appearance: none;
  padding-right: 2rem;
  background-image:
    linear-gradient(45deg, transparent 49%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 51%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.32rem;
  margin-top: 1.4rem;
}
.project-card { background: var(--white); box-shadow: 0 0 0 1px #222c1d0c inset; }
.project-card > a { display: flex; flex-direction: column; height: 100%; }
.card-image {
  aspect-ratio: 1.62;
  overflow: hidden;
  background: #daddd3;
}
.card-image img {
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}
.project-card a:hover img { transform: scale(1.035); }
.project-card a:hover h3 { color: var(--accent); }
.card-copy { padding: 1.05rem 1.05rem 1.2rem; }
.card-category { color: var(--accent); font-weight: 660; font-size: .82rem; }
.card-copy h3 { margin-block: .3rem .35rem; font-size: clamp(1.13rem, 1.6vw, 1.42rem); letter-spacing: -.038em; }
.card-location { color: var(--muted); font-size: .91rem; }
.no-results {
  padding: 1rem 1.1rem;
  margin-top: 1.4rem;
  border: 1px solid var(--rule);
}
.no-results .button { margin-top: .55rem; }
.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem 2rem;
  align-items: baseline;
  padding-block: 3.6rem;
}
.about-section p { max-width: 53ch; color: var(--muted); }
.site-footer { color: #f4f4ee; background: var(--ink); }
.footer-inner {
  min-height: 105px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .7rem 1.25rem;
  padding-block: 1.25rem;
  font-size: .92rem;
}
.site-header .brand, .site-footer .brand { --brand-color: #bd6c84; }
.site-header .brand-name, .site-footer .brand-name { filter: brightness(0) invert(1); }
.site-footer .email:hover { color: #eea992; }

.detail { padding-block: clamp(1.3rem, 3.7vw, 3rem) 3rem; }
.back-link {
  display: inline-block;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .24em;
}
.detail-heading { margin-block: clamp(1.5rem, 3vw, 2.8rem) clamp(1.1rem, 2.5vw, 2rem); }
.detail-heading h1 {
  max-width: 24ch;
  margin-block: .65rem .65rem;
  font-size: clamp(2.55rem, 5.4vw, 5.1rem);
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.1rem, 3.5vw, 3.1rem);
}
.detail-cover { background: var(--pane); }
.detail-cover img {
  max-height: 650px;
  aspect-ratio: 1.54;
  object-fit: contain;
}
.detail-grid--cover-above { grid-template-columns: minmax(0, 1fr); }
.detail-grid--cover-above .detail-cover img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
}
.detail-grid--portrait-cover .detail-cover { background: none; }
.detail-grid--portrait-cover .detail-cover img {
  width: min(100%, 61.5vh, 615px);
  margin-inline: auto;
}
.facts { border-top: 3px solid var(--accent); }
.facts h2 { margin-block: .8rem .6rem; font-size: 1.9rem; }
.facts dl > div { padding-block: .55rem; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--muted); font-size: .86rem; }
.facts dd { font-weight: 610; }
.about-project-description { margin-top: 1.1rem; color: var(--muted); }
.board-section { margin-top: 2.6rem; }
.board-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.2rem;
  margin-bottom: 1rem;
}
.board-frame { display: block; border: 1px solid var(--rule); cursor: zoom-in; }
.board-gallery {
  display: grid;
  gap: clamp(.25rem, 1vw, .8rem);
  padding: clamp(.3rem, 1.15vw, .95rem);
  min-width: 0;
  background: var(--white);
}
.board-row {
  display: grid;
  grid-template-columns: var(--board-columns);
  gap: clamp(.25rem, 1vw, .8rem);
  align-items: start;
  min-width: 0;
}
.board-row img {
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  outline: 1px solid #eceae2;
  outline-offset: -1px;
}
.detail-navigation {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.next-project { text-align: right; font-weight: 650; }
.next-project span { display: block; color: var(--muted); font-size: .875rem; font-weight: 500; }
.next-project:hover { color: var(--accent); }
.board-dialog {
  padding: 0;
  border: 0;
  max-width: none;
  max-height: none;
  width: min(96vw, 1500px);
  height: min(92dvh, 1100px);
  background: #222722;
  color: var(--white);
}
.board-dialog[open] { display: flex; flex-direction: column; }
.board-dialog::backdrop { background: #111610dd; }
body:has(.board-dialog[open]) { overflow: hidden; }
.dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  padding: .65rem .85rem;
  flex-shrink: 0;
}
.dialog-bar h2 { letter-spacing: 0; font-size: 1rem; }
.dialog-actions { display: flex; gap: .55rem; }
.dialog-actions button {
  min-height: 42px;
  padding: .35rem .65rem;
  cursor: pointer;
  border: 1px solid #b5bcb3;
  color: var(--white);
  background: transparent;
}
.dialog-actions button:hover { background: #454d44; }
.board-dialog :focus-visible { outline-color: #eea992; outline-offset: -2px; }
.dialog-scroll {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #353b34;
  overflow: auto;
  padding: .55rem;
}
.dialog-scroll .board-gallery {
  flex: none;
  width: min(100%, calc(var(--board-aspect) * (min(92dvh, 1100px) - 100px)));
  margin: auto;
}
.dialog-scroll.is-zoomed .board-gallery {
  width: max(1600px, 145%);
  margin: 0;
}

@media (max-width: 1040px) {
  .wrap { width: min(100% - 64px, 1320px); }
  .hero { gap: 1.6rem; }
  .hero h1 { font-size: clamp(2.55rem, 5.3vw, 4.5rem); }
}
@media (max-width: 700px) {
  .header-inner {
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .6rem;
  }
  .site-header .brand {
    font-size: clamp(1.008rem, 4.14vw, 1.68rem);
  }
  .header-nav { display: none; }
  .header-menu { position: static; }
  .menu-panel {
    inset: calc(100% + 1px) 0 auto;
    padding: .45rem .8rem;
  }
  .menu-panel a { padding-block: .65rem; }
}
@media (max-width: 730px) {
  .wrap { width: calc(100% - 40px); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2.55rem, 9.5vw, 4.3rem); }
  .hero-image { aspect-ratio: 1.62; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .filter-grid label:first-child { grid-column: 1 / -1; }
  .about-section { grid-template-columns: 1fr; padding-block: 2.6rem; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .brand { font-size: 1.12rem; }
  .site-header .language-link { padding-inline: .41rem; }
  .hero { padding-top: 2rem; }
  .hero-figure figcaption { padding-inline: .65rem; }
  .project-grid { grid-template-columns: 1fr; gap: 1rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

:lang(en) .hero h1 { font-size: clamp(2.55rem, 4.5vw, 4.65rem); }
@media (max-width: 730px) {
  :lang(en) .hero h1 { font-size: clamp(2.55rem, 8.5vw, 4.1rem); }
}
@media (max-width: 360px) {
  .header-inner { width: calc(100% - 28px); }
}

:lang(ru) .hero h1 { font-size: clamp(2.4rem, 4.05vw, 4.2rem); }
@media (max-width: 730px) {
  :lang(ru) .hero h1 { font-size: clamp(2.2rem, 6.85vw, 3.65rem); }
}
@media (max-width: 390px) {
  .language-options { gap: .25rem; }
  .site-header .language-link { padding-inline: .32rem; }
}

.about-more { margin-top: 1.2rem; }
.about-page {
  display: grid;
  grid-template-columns: minmax(13rem, .44fr) minmax(0, 1fr);
  gap: clamp(1.8rem, 5vw, 5.5rem);
  align-items: start;
  padding-block: clamp(2.65rem, 6vw, 5.3rem);
}
.about-page-heading h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.7rem, 4.6vw, 4.8rem);
}
.about-page-heading .back-link { color: var(--accent); }
.about-article {
  max-width: 74ch;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  line-height: 1.65;
}
.about-article p + p { margin-top: 1.05rem; }
.about-activities {
  margin-top: 2.15rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}
.about-activities h2 { margin-bottom: .85rem; font-size: clamp(1.8rem, 3.2vw, 2.85rem); }
.about-signature {
  display: grid;
  margin-top: 2rem;
  padding-left: .85rem;
  border-left: 2px solid var(--accent);
}
.about-signature span { color: var(--muted); }

@media (max-width: 730px) {
  .about-page { grid-template-columns: minmax(0, 1fr); }
}

.contact-page { padding-block: clamp(1.5rem, 4.5vw, 4rem) clamp(2rem, 5vw, 5rem); }
.contact-panel {
  display: grid;
  grid-template-columns: minmax(15rem, .72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(1.15rem, 3.4vw, 3.25rem);
  padding: clamp(1.25rem, 3.5vw, 3rem);
  background: #1d171a;
  color: #fcfaf9;
}
.contact-info h1 { font-size: clamp(2.75rem, 5vw, 4.8rem); }
.contact-details { margin-top: clamp(.75rem, 2.3vw, 1.8rem); }
.contact-details > div { padding-block: .55rem; }
.contact-details > div + div { border-top: 1px solid #514148; }
.contact-details dt { margin-bottom: .15rem; color: #f0a6bb; font-weight: 700; }
.contact-details dd { margin: 0; }
.contact-details address { font-style: normal; }
.contact-details a { display: block; width: fit-content; text-underline-offset: .17em; }
.contact-details a:hover, .contact-details a:focus-visible { text-decoration: underline; }
.contact-panel a:focus-visible { outline-color: #f0a6bb; }
.contact-map { display: block; border: 1px solid #795461; border-radius: .95rem; overflow: hidden; }
.contact-map-viewport { position: relative; display: block; aspect-ratio: 926 / 730; overflow: hidden; }
.contact-map-viewport img {
  position: absolute;
  top: -30.4%;
  left: -58.15%;
  width: 161.1%;
  max-width: none;
  height: auto;
}
.contact-map-caption {
  display: block;
  padding: .7rem 1rem;
  border-top: 1px solid #795461;
  color: #fcfaf9;
  background: #35262e;
  font-weight: 700;
}
.contact-map:hover .contact-map-caption { background: #543340; }
.contact-original { margin-top: 1.15rem; border-block: 1px solid var(--rule); }
.contact-original summary { padding-block: .8rem; cursor: pointer; font-weight: 650; }
.contact-original img { display: block; width: 100%; max-width: 60rem; height: auto; margin: 0 auto 1rem; }

@media (max-width: 730px) {
  .contact-panel { grid-template-columns: minmax(0, 1fr); }
}

.past-projects-page { padding-block: clamp(2rem, 5vw, 4.5rem); }
.past-projects-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.past-projects-heading h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.archive-project-grid { margin-bottom: 2rem; }
.past-projects-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.past-projects-table tr { border-bottom: 1px solid var(--rule); }
.past-projects-table thead { background: var(--pane); }
.past-projects-table th, .past-projects-table td {
  padding: .65rem clamp(.35rem, 1.3vw, 1rem);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.past-projects-table tbody th { font-weight: 610; }
.past-projects-table thead th:first-child { width: clamp(3.1rem, 10vw, 6rem); }
.past-projects-table thead th:last-child { width: 29%; }
.past-projects-table td { color: var(--muted); }
