/* stepankotok.com — home page: a one-screen card in the CV's "Bureau" look, Slate and lime theme.
   A graphite panel with the name, one proof and two doors (hire / project); a full-height portrait beside it.
   Bitter for headings, Source Sans 3 for text. Shared by the RU page, the EN page and 404. No JavaScript. */

/* ---- Fonts: subsets latin, latin-ext, cyrillic ---- */
@font-face {
  font-family: "Bitter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/bitter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Bitter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/bitter-latin-ext-wght-normal.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: "Bitter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/bitter-latin-wght-normal.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;
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-sans-3-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-wght-normal.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: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-sans-3-latin-wght-normal.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;
}

/* ---- Colour roles: the CV's Slate and lime ----
   column = the page; column-2 = plates on it; accent = fills, the role line and the portrait edge. */
:root {
  color-scheme: dark;
  --column: #27313A;
  --column-2: #323E49;
  --accent: #C8F060;
  --on-accent: #161D23;
  --on-column: #F1F4F6;
  --on-column-soft: #BCC7D0;

  --font-head: "Bitter", Georgia, "Times New Roman", serif;
  --font-text: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px; --s8: 64px;
  --radius: 8px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--column); color: var(--on-column);
  font-family: var(--font-text); font-size: 1.125rem; line-height: 1.6; font-weight: 400;
  font-kerning: normal; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--on-accent); }
img { display: block; max-width: 100%; }
p { margin: 0; }
strong { font-weight: 700; }

a { color: var(--on-column); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 3px; text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--on-column); outline-offset: 3px; }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: var(--s2); top: var(--s1); z-index: 30;
  padding: 12px 20px; background: var(--on-column); color: var(--on-accent);
  font-weight: 700; border-radius: var(--radius); text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 22px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-text); font-weight: 700; font-size: 1.0625rem; line-height: 1.2; text-align: center;
  text-decoration: none; border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--on-accent);
}
.btn:hover { color: var(--on-accent); text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn-2 { background: transparent; color: var(--on-column); border: 2px solid var(--on-column-soft); box-shadow: none; }
.btn-2:hover { color: var(--on-column); background: var(--column); border-color: var(--on-column); filter: none; }
.btn-2:active { transform: none; }

/* ---- Layout: phones first, portrait on top ---- */
.home { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }

.portrait { position: relative; order: -1; flex: none; height: 260px; background: var(--column-2); }
.portrait picture, .portrait img { display: block; width: 100%; height: 100%; }
.portrait img { object-fit: cover; object-position: 50% 22%; }
.portrait::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--accent); pointer-events: none; }

.panel { flex: 1 0 auto; display: flex; flex-direction: column; padding: var(--s2) 20px var(--s4); }
.lang { display: flex; justify-content: flex-end; font-size: 1rem; }
.lang a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; color: var(--on-column-soft); font-weight: 600; }
.lang a:hover { color: var(--on-column); }

.panel-main { margin-top: var(--s1); }
h1 {
  margin: 0; font-family: var(--font-head); font-weight: 800; color: var(--on-column);
  font-size: clamp(2.75rem, 5.6vw, 4.75rem); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance;
}
.role { margin-top: 12px; font-weight: 700; font-size: 1.1875rem; line-height: 1.35; color: var(--accent); }
.lead { margin-top: var(--s3); max-width: 36em; font-size: 1.25rem; line-height: 1.55; text-wrap: pretty; }

.proof {
  margin-top: var(--s3); max-width: 40em; padding: 14px 20px;
  background: var(--column-2); border-left: 6px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.0625rem; line-height: 1.5; text-wrap: pretty;
}
.proof strong { color: var(--accent); white-space: nowrap; }

.doors { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); margin-top: var(--s4); max-width: 52rem; }
.door { display: flex; flex-direction: column; padding: 20px; background: var(--column-2); border-radius: var(--radius); }
.door h2 {
  margin: 0 0 var(--s2); font-family: var(--font-head); font-weight: 700; color: var(--on-column);
  font-size: 1.25rem; line-height: 1.25; text-wrap: balance;
}
.door-actions { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: auto; }
.door-actions .btn { flex: 1 1 140px; padding-inline: 16px; white-space: nowrap; }

.contacts {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--s3);
  margin: var(--s4) 0 0; padding: 0; font-size: 1rem; line-height: 1.5; color: var(--on-column-soft);
}
.contacts li { display: inline-flex; align-items: center; min-height: 44px; }
.contacts li:first-child { flex: 0 0 100%; min-height: 0; }
.contacts a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- Phones: the doors come right after the lead, the proof under them ---- */
@media (max-width: 639px) {
  .panel-main { display: flex; flex-direction: column; }
  .proof { order: 1; }
  .lead { font-size: 1.125rem; }
}

/* ---- Wider phones and tablets: the two doors side by side ---- */
@media (min-width: 640px) {
  .portrait { height: 420px; }
  .portrait img { object-position: 50% 35%; }
  .panel { padding: var(--s3) var(--s5) var(--s5); }
  .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contacts li:first-child { flex: none; }
}

/* ---- Desktop: panel on the left, a full-height portrait on the right ---- */
@media (min-width: 960px) {
  .home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 36%); }
  .portrait { order: 0; height: auto; min-height: 100vh; min-height: 100svh; }
  .portrait picture { position: absolute; inset: 0; }
  .portrait img { object-position: 50% 22%; }
  .portrait::after { left: 0; right: auto; top: 0; bottom: 0; width: 6px; height: auto; }
  .panel { padding: var(--s3) clamp(40px, 6vw, 96px) var(--s4); }
  .panel-main { margin: auto 0; padding: var(--s4) 0; }
  .contacts { margin-top: 0; }
}

/* ---- 404 ---- */
.notfound { display: flex; flex-direction: column; justify-content: center; gap: var(--s2); min-height: 100vh; min-height: 100svh; padding: var(--s5) 20px; max-width: 40rem; margin-inline: auto; }
.notfound-code { font-family: var(--font-head); font-weight: 800; font-size: clamp(4rem, 14vw, 7rem); line-height: 1; color: var(--accent); }
.notfound p:not(.notfound-code) { font-size: 1.25rem; line-height: 1.5; }
