/* dkuz.org — hand-written, no build step. */

/* ---- fonts (self-hosted subsets, see fonts/) ---- */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-400-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-400-normal-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-400-normal-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;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500-normal-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500-normal-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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500-normal-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;
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url(fonts/newsreader-300-400-italic-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: 'Newsreader';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url(fonts/newsreader-300-400-italic-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;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url(fonts/newsreader-300-400-normal-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: 'Newsreader';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url(fonts/newsreader-300-400-normal-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;
}

/* ---- tokens ---- */

:root {
  --bg: #fbf8f4;
  --ink: #1d1713;
  --ink-soft: #38322d;
  --muted: #69625d;
  --muted-2: #77706b;
  --muted-3: #98918b;
  --accent: #b43e35;
  --accent-hover: #791a16;
  --hairline: #dbd7d2;
}
@supports (color: oklch(0 0 0)) {
  :root {
    --bg: oklch(0.981 0.006 85);
    --ink: oklch(0.21 0.012 60);
    --ink-soft: oklch(0.32 0.012 60);
    --muted: oklch(0.5 0.012 60);
    --muted-2: oklch(0.55 0.012 60);
    --muted-3: oklch(0.66 0.012 60);
    --accent: oklch(0.53 0.155 28);
    --accent-hover: oklch(0.38 0.13 28);
    --hairline: oklch(0.88 0.008 70);
  }
}

/* ---- base ---- */

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 9vh, 96px);
  padding: clamp(28px, 6vw, 76px) clamp(22px, 6vw, 80px) 40px;
  background: var(--bg);
  color: var(--ink);
  font-family: Newsreader, Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mono,
.name, .lang button, .label, .url, .site-footer {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

/* ---- language switching ----
   All three languages are in the markup; <html lang> picks the visible set.
   With JS off, lang="en" in the markup shows EN. */

[data-lang] { display: none; }
html[lang="ru"] [data-lang="ru"],
html[lang="en"] [data-lang="en"],
html[lang="fr"] [data-lang="fr"] { display: block; }

/* строчные варианты: имя проекта, подпись раздела, адрес проекта */
h3 > [data-lang],
.label > [data-lang],
.url[data-lang] { display: none; }
html[lang="ru"] :is(h3, .label) > [data-lang="ru"], html[lang="ru"] .url[data-lang="ru"],
html[lang="en"] :is(h3, .label) > [data-lang="en"], html[lang="en"] .url[data-lang="en"],
html[lang="fr"] :is(h3, .label) > [data-lang="fr"], html[lang="fr"] .url[data-lang="fr"] { display: inline; }

/* ---- header ---- */

.site-header {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vh, 52px);
  max-width: 30em;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}

.name {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
}

.lang {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.lang button {
  appearance: none;
  border: 0;
  background: none;
  /* invisible padding: ≥44px hit area, baseline row unchanged */
  margin: -16px -6px;
  padding: 16px 6px;
  font-size: 12.5px;
  letter-spacing: .1em;
  line-height: 1;
  color: var(--muted-3);
  cursor: pointer;
  transition: color .15s ease;
}
.lang button:hover { color: var(--accent); }
html[lang="ru"] .lang button[data-set-lang="ru"],
html[lang="en"] .lang button[data-set-lang="en"],
html[lang="fr"] .lang button[data-set-lang="fr"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.slogan {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.12;
  font-weight: 300;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}
.slogan-reply {
  font-style: italic;
  color: var(--accent);
  padding-left: clamp(18px, 3vw, 44px);
}

/* ---- projects ---- */

.projects { max-width: 46em; }

.label {
  margin: 0 0 26px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.project {
  padding: 22px 0 26px;
  border-top: 1px solid var(--hairline);
}

.project-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}
.project-title h3 {
  margin: 0;
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 400;
  letter-spacing: -0.008em;
}
.url {
  font-size: 12.5px;
  letter-spacing: .04em;
}

.desc {
  margin: 10px 0 0;
  max-width: 42em;
  font-size: clamp(17px, 1.5vw, 19.5px);
  line-height: 1.5;
  font-weight: 300;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---- footer ---- */

.site-footer {
  margin-top: auto;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--muted);
}
