@font-face{font-family:'Roboto Flex';font-style:normal;font-display:swap;font-weight:100 1000;font-stretch:25% 151%;src:url(fonts/rf-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}
@font-face{font-family:'Roboto Flex';font-style:normal;font-display:swap;font-weight:100 1000;font-stretch:25% 151%;src:url(fonts/rf-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Roboto Flex';font-style:normal;font-display:swap;font-weight:100 1000;font-stretch:25% 151%;src:url(fonts/rf-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
:root {
  --concrete: #E4E2DC;
  --paper: #F1F0EB;
  --ink: #1B232A;
  --slate: #515C66;
  --line: #C9C6BD;
  --gold: #A27C2C;
  --steel: #26313A;
  --steel-ink: #D9D6CE;
  --font: "Roboto Flex", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--concrete); color: var(--ink);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.55;
  font-variation-settings: "wdth" 100, "opsz" 16;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 16px; }

/* Headings: wide, heavy, like lettering on plant equipment */
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 1.2rem + 3.9vw, 4.4rem); font-variation-settings: "wdth" 130, "opsz" 144; text-wrap: balance; }
:lang(ru) h1 { font-size: clamp(1.9rem, 1rem + 3.2vw, 3.7rem); font-variation-settings: "wdth" 112, "opsz" 144; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); font-variation-settings: "wdth" 140, "opsz" 72; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; font-variation-settings: "wdth" 112, "opsz" 24; }
p { margin: 0 0 1em; max-width: 68ch; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--concrete); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 76px; flex-wrap: wrap; padding-block: 10px; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a, .langs a { text-decoration: none; font-weight: 550; font-size: .95rem; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.langs { display: flex; border: 1px solid var(--ink); }
.langs a { padding: 6px 10px; font-size: .85rem; font-variation-settings: "wdth" 120; }
.langs a + a { border-left: 1px solid var(--ink); }
.langs a[aria-current] { background: var(--ink); color: var(--concrete); }
@media (max-width: 760px) {
  .nav { order: 3; width: 100%; margin-left: 0; gap: 18px; overflow-x: auto; padding-bottom: 4px; }
  .langs { margin-left: auto; }
  .brand img { height: 32px; }
}

/* Hero */
.hero-in { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; padding-block: clamp(36px, 6vw, 80px); }
.hero-text { padding-bottom: 8px; border-top: 6px solid var(--ink); padding-top: 28px; }
.lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--slate); margin-top: 24px; max-width: 46ch; }
.hero-fig { margin: 0; }
.hero-fig img { width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: min(66vh, 600px); object-fit: cover; object-position: 50% 35%; }
.hero-fig figcaption { font-size: .85rem; color: var(--slate); margin-top: 8px; }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-fig img { aspect-ratio: 4 / 3; max-height: none; }
}

.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; padding: 13px 20px; border: 2px solid var(--ink); text-decoration: none; font-weight: 650; font-variation-settings: "wdth" 110; }
.btn:hover { background: var(--paper); }
.btn-solid { background: var(--ink); color: var(--concrete); }
.btn-solid:hover { background: var(--steel); }

/* Sections */
.sec { padding-block: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line); }
.two { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(20px, 4vw, 64px); }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.about p { font-size: 1.15rem; }

.svcs { list-style: none; margin: 0; padding: 0; }
.svc { padding: 20px 0; border-bottom: 1px solid var(--line); }
.svc:first-child { padding-top: 0; }
.svc p { margin: 8px 0 0; color: var(--slate); }
.svc .seen { font-size: .9rem; }
.seen span { color: var(--ink); font-weight: 600; }
.seen a { margin-right: 14px; text-underline-offset: 3px; }

/* Projects ledger */
.projects { background: var(--paper); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.sec-head p { margin: 0; color: var(--slate); }
.ledger { list-style: none; margin: 0; padding: 0; }
.proj { display: grid; grid-template-columns: 250px 1fr; gap: clamp(16px, 3vw, 48px); padding-block: 36px; border-top: 2px solid var(--ink); scroll-margin-top: 16px; }
.year { margin: 0; font-weight: 900; font-size: clamp(2.6rem, 1.6rem + 3vw, 4.2rem); line-height: .9; color: var(--gold); font-variation-settings: "wdth" 132, "opsz" 144; font-feature-settings: "tnum"; }
.scope { font-size: 1.15rem; margin: 6px 0 12px; }
.notes { margin: 0 0 14px; padding-left: 1.1em; color: var(--slate); }
.proj dl { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0 0 20px; font-size: .92rem; }
.proj dt { color: var(--slate); }
.proj dd { margin: 0; font-weight: 600; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gallery a { display: block; background: var(--line); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity .15s; }
.gallery a:hover img { opacity: .85; }
.gallery li:nth-child(n+6) { display: none; } /* extra photos stay reachable in the lightbox */
@media (max-width: 640px) {
  .proj { grid-template-columns: 1fr; gap: 8px; }
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: -16px; padding-right: 16px; }
  .gallery li { flex: 0 0 72%; scroll-snap-align: start; }
  .gallery li:nth-child(n+6) { display: block; }
}

/* Contact */
.contact-p { color: var(--slate); margin-top: 16px; }
.cdl { margin: 0; }
.cdl div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cdl dt { color: var(--slate); }
.cdl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 520px) { .cdl div { grid-template-columns: 1fr; gap: 2px; } }

.foot { background: var(--steel); color: var(--steel-ink); font-size: .9rem; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; }
.foot p { margin: 0; }

/* Lightbox */
.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lb::backdrop { background: rgba(20, 26, 31, .92); }
.lb figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 16px 24px; }
.lb img { max-height: calc(100vh - 120px); width: auto; max-width: 100%; object-fit: contain; }
.lb figcaption { color: #E9E7E1; margin-top: 10px; font-size: .95rem; text-align: center; }
.lb-close { position: absolute; top: 12px; right: 12px; background: var(--concrete); color: var(--ink); border: 0; padding: 10px 16px; font: 600 .95rem var(--font); cursor: pointer; }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(228, 226, 220, .9); color: var(--ink); border: 0; width: 48px; height: 64px; font-size: 2rem; cursor: pointer; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
