/* Аквариум дома — стили сайта. Светлая тема, без внешних шрифтов. */
:root {
  --bg: #f6f8f9;
  --paper: #ffffff;
  --text: #22323a;
  --muted: #647680;
  --line: #dde5e9;
  --accent: #1d7a8c;
  --accent-dark: #145a68;
  --accent-soft: #e3f1f4;
  --warm: #d9782a;
  --warm-soft: #fbeee2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 40, 50, .06), 0 6px 18px rgba(20, 40, 50, .06);
  --serif: Georgia, "Times New Roman", "DejaVu Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "DejaVu Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; color: #1a2a31; margin: 1.4em 0 .5em; font-weight: 700; }
h1 { font-size: 2.1rem; margin-top: .3em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }
li { margin-bottom: .35em; }
blockquote {
  margin: 1.4em 0; padding: .8em 1.2em;
  border-left: 4px solid var(--warm); background: var(--warm-soft);
  border-radius: 0 var(--radius) var(--radius) 0; font-style: italic;
}
table { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; font-size: .95em; }
th, td { border: 1px solid var(--line); padding: .5em .7em; text-align: left; vertical-align: top; }
th { background: var(--accent-soft); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
code { background: #eef2f4; padding: .1em .35em; border-radius: 4px; font-size: .92em; }

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

/* Шапка */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.logo { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: #1a2a31; display: flex; align-items: center; gap: .5em; }
.logo:hover { text-decoration: none; color: var(--accent-dark); }
.logo img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; gap: 1.4em; }
.nav a { color: var(--text); font-weight: 500; padding: .3em 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: .35em .6em; font-size: 1.2rem; cursor: pointer; color: var(--text); }

/* Главная: обложка */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center;
  margin: 28px 0 10px;
}
.hero h1 { font-size: 2.3rem; margin: 0 0 .4em; }
.hero p.tagline { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.2em; }
.hero .intro-img img { border-radius: var(--radius); box-shadow: var(--shadow); }
.btn {
  display: inline-block; background: var(--accent); color: #fff; padding: .55em 1.1em;
  border-radius: 8px; font-weight: 600; border: 0; cursor: pointer; font-size: 1rem;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn.secondary { background: var(--accent-soft); color: var(--accent-dark); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; border-bottom: 2px solid var(--line); padding-bottom: .3em; margin: 2em 0 1em; }
.section-title h2 { margin: 0; }
.section-title .more { font-size: .95rem; }

/* Лента статей */
.feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 1.5em; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.card:hover { transform: translateY(-2px); }
.card a.thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #e8eef1; }
.card a.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: .4em; flex: 1; }
.card .meta { font-size: .82rem; color: var(--muted); }
.card h3 { margin: 0; font-size: 1.12rem; }
.card h3 a { color: #1a2a31; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; font-size: .93rem; color: #3f4f57; }
.card .tag { display: inline-block; background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: .1em .7em; font-size: .78rem; margin-right: .4em; }

.feed.featured { grid-template-columns: 1fr; }
.feed.featured .card { flex-direction: row; }
.feed.featured .card a.thumb { flex: 0 0 46%; aspect-ratio: auto; }
.feed.featured .card .body { padding: 22px 26px; justify-content: center; }
.feed.featured .card h3 { font-size: 1.5rem; }

/* Двухколоночная часть главной */
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: start; }
.aside-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; }
.aside-box h3 { margin-top: 0; font-size: 1.05rem; }
.aside-box ul { padding-left: 1.1em; margin-bottom: 0; }
.aside-box .avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; float: left; margin: 0 14px 6px 0; }
.aside-box p { font-size: .95rem; }

/* Видео */
.video-box { background: #0d1b21; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 0 0 .6em; }
.video-box video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-caption { color: var(--muted); font-size: .9rem; margin-bottom: 1.6em; }

/* Статья */
.post { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 40px 36px; margin: 26px 0; box-shadow: var(--shadow); }
.post .meta { color: var(--muted); font-size: .92rem; margin-bottom: .2em; }
.post .lead { font-size: 1.15rem; color: #3b4a52; border-bottom: 1px solid var(--line); padding-bottom: 1em; margin-bottom: 1.4em; }
.post figure { margin: 1.6em 0; }
.post figure img { border-radius: 8px; width: 100%; }
.post figure figcaption { font-size: .88rem; color: var(--muted); margin-top: .5em; text-align: center; }
.post .tip { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: .8em 1.2em; border-radius: 0 8px 8px 0; margin: 1.4em 0; }
.post .tip strong { color: var(--accent-dark); }
.post .warn { background: var(--warm-soft); border-left: 4px solid var(--warm); padding: .8em 1.2em; border-radius: 0 8px 8px 0; margin: 1.4em 0; }
.post-footer { border-top: 1px solid var(--line); margin-top: 2em; padding-top: 1em; font-size: .92rem; color: var(--muted); }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin: 0 0 30px; }
.post-nav a { flex: 1; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; color: var(--text); }
.post-nav a span { display: block; font-size: .8rem; color: var(--muted); }
.post-nav a:hover { border-color: var(--accent); text-decoration: none; }
.post-nav a.next { text-align: right; }
.related { margin-bottom: 30px; }

/* Страницы «Об авторе», «Контакты» */
.page { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 40px 36px; margin: 26px 0; box-shadow: var(--shadow); }
.page figure { margin: 1.4em 0; }
.page figure img { border-radius: 8px; }
.page figure figcaption { font-size: .88rem; color: var(--muted); margin-top: .5em; text-align: center; }
.timeline { list-style: none; padding: 0; margin: 1em 0 1.6em; border-left: 3px solid var(--accent-soft); }
.timeline li { padding: 0 0 .9em 1.2em; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: .5em; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper); }
.timeline b { color: var(--accent-dark); }
.tanks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1em 0 1.6em; }
.tanks div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: .93rem; }
.tanks b { display: block; font-size: 1.05rem; margin-bottom: .3em; }

form.contact { display: grid; gap: 14px; max-width: 560px; }
form.contact label { display: grid; gap: .3em; font-weight: 600; font-size: .95rem; }
form.contact input, form.contact textarea {
  font: inherit; padding: .55em .7em; border: 1px solid #c9d4da; border-radius: 7px; background: #fff; width: 100%;
}
form.contact input:focus, form.contact textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
form.contact textarea { min-height: 140px; resize: vertical; }
.form-note { background: var(--accent-soft); border-radius: 8px; padding: .8em 1em; font-size: .95rem; display: none; }
.form-note.show { display: block; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { padding: .4em 0; border-bottom: 1px dashed var(--line); }

/* Подвал */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); margin-top: 40px; padding: 26px 0 30px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.site-footer .cols-foot { display: flex; flex-direction: column; gap: .3em; }
.site-footer a { color: var(--accent-dark); }

/* 404 */
.notfound { text-align: center; padding: 60px 0; }
.notfound .big { font-family: var(--serif); font-size: 5rem; color: var(--accent); margin: 0; line-height: 1; }

/* Просмотр фото */
.lightbox { position: fixed; inset: 0; background: rgba(8, 20, 26, .92); display: none; align-items: center; justify-content: center; z-index: 50; cursor: zoom-out; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox figcaption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #cfdde3; font-size: .95rem; }
.zoomable { cursor: zoom-in; }

.to-top { position: fixed; right: 18px; bottom: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 50%; width: 42px; height: 42px; font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; color: var(--accent-dark); }
.to-top.show { opacity: 1; pointer-events: auto; }

/* Телефон и планшет */
@media (max-width: 900px) {
  .feed { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; }
  .tanks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { flex-wrap: wrap; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; gap: .2em; padding: .4em 0 .8em; }
  .nav.open { display: flex; }
  .hero { grid-template-columns: 1fr; gap: 16px; margin-top: 18px; }
  .hero h1 { font-size: 1.7rem; }
  h1 { font-size: 1.65rem; }
  .feed { grid-template-columns: 1fr; }
  .feed.featured .card { flex-direction: column; }
  .feed.featured .card a.thumb { flex: auto; aspect-ratio: 3 / 2; }
  .feed.featured .card .body { padding: 16px; }
  .feed.featured .card h3 { font-size: 1.25rem; }
  .post, .page { padding: 20px 18px 24px; margin: 16px 0; }
  .post-nav { flex-direction: column; }
  .post-nav a.next { text-align: left; }
  .tanks { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .aside-box .avatar { width: 64px; height: 64px; }
}

/* Список авторов фотографий */
.credits { font-size: .88rem; color: var(--muted); padding-left: 1.2em; margin: .8em 0 1.6em; }
.credits li { margin-bottom: .35em; }
