/* Literata, SIL Open Font License 1.1 — fonts/OFL.txt. Served from this site, not from a font CDN. */
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-latin-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-cyrillic-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-latin-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
  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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-cyrillic-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --bg: #fbfaf6;
  --text: #22252a;
  --muted: #676d75;
  --line: #e4e0d6;
  --accent: #1c6a86;
  --serif: "Literata", Georgia, "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16191d;
    --text: #e4e1da;
    --muted: #9ba2aa;
    --line: #2d3238;
    --accent: #7dbdd6;
  }
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  font-size: clamp(18px, 17px + 0.3vw, 20px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.7;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
main {
  max-width: 35rem;
  margin: 0 auto;
  padding: 1.75rem 16px 5rem;
}

/* Top line: where you are, and the other language. Small and quiet. */
nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin-bottom: 4.5rem;
}
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--accent); }
nav .crumbs a + a::before { content: "/"; margin: 0 0.5em; color: var(--muted); opacity: 0.5; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
  /* "Конфиденциальности" alone is wider than a phone column at this size. */
  hyphens: auto;
  overflow-wrap: break-word;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.35;
  font-weight: 600;
  margin: 3.5rem 0 1rem;
}
h3 {
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 650;
  margin: 2rem 0 0.35rem;
}
p, li { margin: 0 0 1.1rem; }
ul { padding-left: 1.25rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--muted); }
strong { font-weight: 650; }

.lead { font-size: 1.2rem; line-height: 1.6; }
.meta {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}
.subtitle {
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--muted);
  margin: -1rem 0 1.5rem;
}

/* Projects on the home page: a plain list that has room for more than one. */
.projects { list-style: none; padding: 0; margin: 0; }
.projects li {
  margin: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.projects li:last-child { border-bottom: 1px solid var(--line); }
.projects h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.projects h3 a { text-decoration: none; }
.projects h3 a:hover { text-decoration: underline; }
.projects p { margin: 0 0 0.5rem; }
.projects .meta { margin: 0; }

footer {
  margin-top: 4.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

@media (max-width: 480px) {
  h1 { font-size: 1.9rem; }
  nav { margin-bottom: 3rem; }
  h2 { margin-top: 3rem; }
}
