/* arapovo.ru — сайт об Иване Андреевиче Арапове */

:root {
  --bg: #f7f8f6;
  --bg-soft: #eef0ec;
  --card: #ffffff;
  --text: #1e2228;
  --muted: #5f6772;
  --line: #d9ddd6;
  --accent: #2c4a6e;      /* гвардейский тёмно-синий */
  --accent-soft: #4a6b93;
  --gold: #a8842c;
  --link: #274363;
  --shadow: 0 1px 2px rgba(30, 34, 40, .06), 0 8px 24px rgba(30, 34, 40, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-soft: #1b1e24;
    --card: #1e2229;
    --text: #e7e9ec;
    --muted: #9aa3ad;
    --line: #2f343c;
    --accent: #7fa3cc;
    --accent-soft: #6689b3;
    --gold: #cfae5e;
    --link: #93b4d9;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "PT Serif", Georgia, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

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

/* ---- шапка ---- */

.top {
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  max-width: 860px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.top img { width: 34px; height: 34px; }

.brand {
  font-family: "PT Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: "PT Sans", system-ui, sans-serif; font-size: 15px; }
nav a { color: var(--muted); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }

/* ---- текст ---- */

main { padding: 34px 0 10px; }

h1 {
  font-family: "PT Sans", system-ui, sans-serif;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15; margin: 0 0 6px; letter-spacing: -.01em;
}
.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; }

h2 {
  font-family: "PT Sans", system-ui, sans-serif;
  font-size: 24px; margin: 40px 0 12px; line-height: 1.25;
  padding-top: 14px; border-top: 1px solid var(--line);
}
h3 { font-family: "PT Sans", system-ui, sans-serif; font-size: 19px; margin: 26px 0 8px; }

p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }

blockquote {
  margin: 22px 0; padding: 2px 0 2px 20px;
  border-left: 3px solid var(--gold);
  color: var(--muted); font-style: italic;
}

/* ---- портрет у начала страницы ---- */

.portrait {
  float: right; width: min(38%, 300px);
  margin: 6px 0 14px 24px;
}
.portrait img { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--line); }
.portrait figcaption { font-family: "PT Sans", system-ui, sans-serif; font-size: 13.5px; color: var(--muted); margin-top: 8px; }

@media (max-width: 560px) {
  .portrait { float: none; width: min(100%, 320px); margin: 0 auto 18px; }
}

/* ---- карточка фактов ---- */

.facts {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 4px 20px; margin: 0 0 30px;
  clear: both;
}
.facts dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 0; margin: 0; font-size: 16px; }
.facts dt, .facts dd {
  padding: 11px 0; margin: 0; border-top: 1px solid var(--line);
}
.facts dt { color: var(--muted); font-family: "PT Sans", system-ui, sans-serif; font-size: 15px; }
.facts dl > dt:first-of-type, .facts dl > dt:first-of-type + dd { border-top: 0; }

/* ---- иллюстрации ---- */

figure { margin: 26px 0; }
figure img { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--line); }
figcaption { font-family: "PT Sans", system-ui, sans-serif; font-size: 13.5px; color: var(--muted); margin-top: 8px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin: 26px 0; align-items: start; }
.gallery figure { margin: 0; }

/* ---- плитки-ссылки ---- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 26px 0 10px; }
.card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); color: inherit; }
.card b { display: block; font-family: "PT Sans", system-ui, sans-serif; font-size: 17px; margin-bottom: 4px; }
.card span { font-size: 15px; color: var(--muted); }

/* ---- таблица ---- */

.table-box { overflow-x: auto; margin: 22px 0; }
table { border-collapse: collapse; width: 100%; font-size: 16px; min-width: 420px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-family: "PT Sans", system-ui, sans-serif; font-size: 14px; color: var(--muted); font-weight: 700; }
tbody tr:hover { background: var(--bg-soft); }

/* ---- мелочи ---- */

.note-box {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin: 24px 0; font-size: 15.5px; color: var(--muted);
  clear: both;
}
.note-box p:last-child { margin-bottom: 0; }

.credits { font-size: 14px; color: var(--muted); }
.credits li { margin-bottom: 10px; }

footer {
  margin-top: 50px; border-top: 1px solid var(--line); background: var(--bg-soft);
  font-family: "PT Sans", system-ui, sans-serif; font-size: 14px; color: var(--muted);
}
footer .wrap { padding-top: 22px; padding-bottom: 28px; }
footer a { color: var(--muted); }
footer p { margin: 0 0 8px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .facts dl { grid-template-columns: 1fr; }
  .facts dt { padding-bottom: 0; border-top: 1px solid var(--line); }
  .facts dd { padding-top: 2px; border-top: 0; }
  .facts dl > dt:first-of-type + dd { border-top: 0; }
}
