/* ============================================================
   Николай Волынец — персональный сайт
   Дизайн: тёплая «бумажная» палитра, крупная типографика для чтения
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg:        #f7f3ec;
  --bg-card:   #fffdf9;
  --ink:       #23201b;
  --ink-soft:  #5c554a;
  --ink-faint: #938a7c;
  --line:      #e6ddce;
  --accent:    #9a6a3a;   /* тёплая охра */
  --accent-dk: #7a5027;
  --accent-bg: #f0e6d6;
  --shadow:    0 1px 2px rgba(60,45,25,.04), 0 8px 30px rgba(60,45,25,.06);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-dk); text-decoration: none; transition: color .18s; }
a:hover { color: var(--accent); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 720px; }

/* ---------- Хедер ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,243,236,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--serif);
  font-size: 24px; font-weight: 600;
  letter-spacing: .2px; color: var(--ink);
  display: flex; align-items: center; gap: 12px;
}
.brand .mono {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  letter-spacing: 0;
}
.nav { display: flex; gap: 30px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--ink-soft); }
.nav a:hover, .nav a.active { color: var(--accent-dk); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 60px; }
.hero .wrap { display: grid; grid-template-columns: 1.3fr .9fr; gap: 64px; align-items: center; }
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: .18em;
  font-size: 12.5px; font-weight: 600; color: var(--accent);
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 66px);
  line-height: 1.04; font-weight: 600; margin: 0 0 24px;
  letter-spacing: -.5px;
}
.hero p { font-size: 20px; color: var(--ink-soft); margin: 0 0 32px; max-width: 30em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 999px; transition: all .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); color: #fff; transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink-soft); background: var(--bg-card); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dk); }

.hero-photo {
  position: relative;
}
.hero-photo img {
  width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 20px; box-shadow: var(--shadow);
  filter: saturate(1.02);
}
.hero-photo::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 20px; box-shadow: inset 0 0 0 1px rgba(60,45,25,.06);
}

/* ---------- Секции ---------- */
.section { padding: 56px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 36px; gap: 20px; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--serif); font-size: 38px; font-weight: 600;
  margin: 0; letter-spacing: -.3px;
}
.section-head .muted { color: var(--ink-faint); font-size: 15px; }

/* ---------- Сетка статей ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 26px;
  box-shadow: var(--shadow);
  transition: transform .22s, box-shadow .22s, border-color .22s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 4px 10px rgba(60,45,25,.06), 0 18px 44px rgba(60,45,25,.10); border-color: #dcd0bd; }
.card .cat {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.card h3 {
  font-family: var(--serif); font-size: 27px; font-weight: 600;
  line-height: 1.15; margin: 0 0 12px; letter-spacing: -.2px;
}
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent-dk); }
.card p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 20px; flex: 1; }
.card .meta {
  font-size: 13px; color: var(--ink-faint);
  display: flex; gap: 14px; align-items: center;
  padding-top: 16px; border-top: 1px solid var(--line);
}

/* ---------- Статья ---------- */
.article-head { padding: 64px 0 20px; text-align: center; }
.article-head .cat {
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.article-head h1 {
  font-family: var(--serif); font-size: clamp(36px, 5.5vw, 56px);
  line-height: 1.08; font-weight: 600; margin: 0 auto 22px; max-width: 14em;
  letter-spacing: -.4px;
}
.article-head .meta { color: var(--ink-faint); font-size: 14.5px; display:flex; gap:16px; justify-content:center; }

.article-body { padding: 20px 0 40px; }
.article-body p {
  font-size: 20px; line-height: 1.78; color: #33302a;
  margin: 0 0 26px;
}
.article-body p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 4.6em; line-height: .78;
  float: left; margin: 8px 14px 0 0; color: var(--accent); font-weight: 600;
}
.article-body .lead-sub {
  font-family: var(--serif); font-size: 26px; font-weight: 600;
  color: var(--ink); margin: 34px 0 8px;
}
.article-body ul { margin: 0 0 26px; padding-left: 4px; list-style: none; }
.article-body li {
  font-size: 19px; padding: 8px 0 8px 30px; position: relative; color: #33302a;
  border-bottom: 1px dashed var(--line);
}
.article-body li::before {
  content: '—'; position: absolute; left: 0; color: var(--accent); font-weight: 600;
}
.embed {
  margin: 32px 0; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9;
  border: 1px solid var(--line); box-shadow: var(--shadow); background:#000;
}
.embed iframe { width: 100%; height: 100%; border: 0; }

.article-nav {
  display: flex; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--line); padding: 34px 0; margin-top: 20px;
}
.article-nav a { font-size: 15px; font-weight: 500; max-width: 46%; }
.article-nav .dir { display:block; font-size: 12px; text-transform: uppercase; letter-spacing:.08em; color: var(--ink-faint); margin-bottom: 4px; }
.article-nav .next { text-align: right; margin-left: auto; }

/* ---------- Страница «Обо мне» / текстовая ---------- */
.page-hero { padding: 70px 0 30px; }
.page-hero h1 {
  font-family: var(--serif); font-size: clamp(38px, 6vw, 60px);
  font-weight: 600; margin: 0 0 16px; letter-spacing: -.4px;
}
.page-hero .sub { font-size: 20px; color: var(--ink-soft); max-width: 34em; }

.prose p { font-size: 19px; line-height: 1.78; color: #33302a; margin: 0 0 24px; }
.prose h2 { font-family: var(--serif); font-size: 32px; margin: 40px 0 14px; }

.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 52px; align-items: start; }
.about-photo { position: sticky; top: 92px; }
.about-photo img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); aspect-ratio: 1/1; object-fit: cover; }
.about-photo .caption { font-size: 13.5px; color: var(--ink-faint); margin-top: 12px; text-align: center; }

.facts { list-style: none; padding: 0; margin: 22px 0 0; }
.facts li { display:flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.facts .k { color: var(--ink-faint); min-width: 130px; }
.facts .v { color: var(--ink); font-weight: 500; }

/* ---------- Галерея ---------- */
.gallery {
  columns: 3; column-gap: 18px;
}
.gallery figure { margin: 0 0 18px; break-inside: avoid; }
.gallery img {
  width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s; cursor: zoom-in;
}
.gallery img:hover { transform: scale(1.015); box-shadow: 0 10px 30px rgba(60,45,25,.16); }

/* ---------- Лайтбокс ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(30,24,16,.9); place-items: center; padding: 30px;
  cursor: zoom-out; backdrop-filter: blur(4px);
}
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* ---------- Цитата/призыв ---------- */
.pullquote {
  background: var(--accent-bg); border-radius: 18px;
  padding: 44px 48px; margin: 20px 0;
  font-family: var(--serif); font-size: 27px; line-height: 1.35;
  color: var(--accent-dk); font-style: italic;
}

/* ---------- Футер ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 60px;
  padding: 50px 0 40px; background: var(--bg-card);
}
.site-footer .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.site-footer .brand { font-size: 20px; margin-bottom: 10px; }
.site-footer .tagline { color: var(--ink-faint); font-size: 14.5px; max-width: 26em; }
.site-footer .cols { display: flex; gap: 60px; flex-wrap: wrap; }
.site-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer a { color: var(--ink-soft); font-size: 15px; }
.site-footer a:hover { color: var(--accent-dk); }
.copyright { color: var(--ink-faint); font-size: 13px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { max-width: 360px; order: -1; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 320px; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-card);
    border-bottom: 1px solid var(--line); padding: 8px 0; }
  .nav.open { display: flex; }
  .nav a { padding: 13px 28px; }
  .nav-toggle { display: grid; place-items: center; width: 42px; height: 42px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--bg-card); cursor: pointer; }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content:''; display:block; width: 18px; height: 2px; background: var(--ink); position: relative; }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after { position: absolute; top: 6px; }
  .grid { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
  .section { padding: 40px 0; }
  .article-body p:first-of-type::first-letter { font-size: 3.6em; }
  .pullquote { padding: 30px 26px; font-size: 22px; }
}
