/* Стили блога. Поменяй переменные ниже под цвета и шрифты своего сайта. */
:root {
  --bg: #fbfaf7;
  --text: #1d1d1b;
  --muted: #7a776f;
  --accent: #c2410c;
  --border: #e6e2d9;
  --code-bg: #f1eee7;
  --font-body: Georgia, 'Times New Roman', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --width: 680px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161614; --text: #ecebe6; --muted: #9a978f; --accent: #fb923c; --border: #2e2d29; --code-bg: #22211e; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 19px; line-height: 1.7; }
a { color: var(--accent); text-underline-offset: 3px; }

.site-header, .site-footer, .blog { max-width: var(--width); margin: 0 auto; padding: 0 20px; }
.site-header { padding-top: 28px; padding-bottom: 8px; font-family: var(--font-ui); font-size: 15px; }
.site-header nav { display: flex; gap: 20px; }
.site-header a { color: var(--text); text-decoration: none; }
.site-header a:hover { color: var(--accent); }
.site-footer { margin-top: 80px; padding-bottom: 40px; font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.site-footer a { color: var(--muted); }

.blog h1 { font-size: 2.2rem; line-height: 1.2; margin: 40px 0 8px; letter-spacing: -0.01em; }
time { display: block; font-family: var(--font-ui); font-size: 14px; color: var(--muted); }

/* Главная */
.hero { display: flex; align-items: flex-end; gap: 32px; margin: 56px 0 56px; }
.hero .portrait { width: 240px; height: auto; flex-shrink: 0; border-radius: 4px; }
.home h1 { font-family: var(--font-ui); font-size: 1rem; font-weight: 400; color: var(--muted); letter-spacing: 0; margin: 0; }
.home .lead { font-size: 1.25rem; color: var(--text); margin: 8px 0 0; }
@media (max-width: 600px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 32px; }
  .hero .portrait { width: 100%; max-width: 360px; }
}
.home h2 { font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.home .post-list { margin-top: 12px; }
.home .post-list li { padding: 32px 0; }
.home .post-list a { font-size: 1.9rem; line-height: 1.25; letter-spacing: -0.01em; }
.home .post-list time { margin-bottom: 6px; }
.home .post-list p { font-size: 1.1rem; margin-top: 10px; }
.home .about { margin-top: 24px; }
.home .about p { margin: 6px 0 0; font-size: 1.05rem; }

/* Список постов */
.post-list { list-style: none; padding: 0; margin: 32px 0 0; }
.post-list li { padding: 22px 0; border-top: 1px solid var(--border); }
.post-list a { font-size: 1.3rem; font-weight: 600; color: var(--text); text-decoration: none; }
.post-list a:hover { color: var(--accent); }
.post-list p { margin: 4px 0 0; color: var(--muted); font-size: 17px; }

/* Пост */
.back { display: inline-block; margin-top: 32px; font-family: var(--font-ui); font-size: 14px; text-decoration: none; color: var(--muted); }
.post-content { margin-top: 32px; }
.post-content h2 { font-size: 1.5rem; margin: 2em 0 0.5em; line-height: 1.3; }
.post-content h3 { font-size: 1.2rem; margin: 1.6em 0 0.4em; }
.post-content img { display: block; max-width: 100%; max-height: 75vh; width: auto; height: auto; margin: 0 auto; border-radius: 6px; }
.post-content figure { margin: 2em 0; }
.post-content figcaption { font-family: var(--font-ui); font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.post-content blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.post-content code { background: var(--code-bg); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
.post-content pre { background: var(--code-bg); padding: 16px; border-radius: 6px; overflow-x: auto; line-height: 1.5; }
.post-content pre code { background: none; padding: 0; }
.post-content hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

.source { margin-top: 32px; font-family: var(--font-ui); font-size: 14px; }
.source a { color: var(--muted); }

.pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--border); font-family: var(--font-ui); font-size: 15px; }
.pager a { text-decoration: none; }
.pager .next { text-align: right; }

@media (max-width: 600px) { body { font-size: 17px; } .blog h1 { font-size: 1.8rem; } }
@media (max-width: 600px) {
  .home h1 { font-size: 1rem; }
  .home .post-list a { font-size: 1.5rem; }
}

/* Меню */
.site-header nav { flex-wrap: wrap; row-gap: 6px; }
.site-header a.active { color: var(--accent); }

/* Обычные страницы */
.page h2 { font-size: 1.4rem; margin: 48px 0 8px; }
.page .lead { font-size: 1.2rem; color: var(--muted); margin: 8px 0 32px; }

/* Галерея */
.series { margin-top: 48px; }
.series h2 { margin: 0; }
.series h2 span { font-family: var(--font-ui); font-size: 14px; font-weight: 400; color: var(--muted); }
.series-link { margin: 4px 0 0; font-family: var(--font-ui); font-size: 14px; }
.gallery { columns: 3 200px; column-gap: 10px; margin-top: 16px; }
.gallery a { display: block; margin-bottom: 10px; break-inside: avoid; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 4px; transition: opacity .2s; }
.gallery a:hover img { opacity: .85; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; z-index: 10; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 94vw; max-height: 94vh; }
@media (max-width: 600px) {
  .site-header nav { gap: 14px; font-size: 14px; }
}

/* Логотип: тихо, без акцента */
.site-header { display: flex; align-items: center; gap: 20px; }
.site-header .logo { display: flex; flex-shrink: 0; }
.site-header .logo img { width: 22px; height: 22px; opacity: .5; transition: opacity .2s; }
.site-header .logo:hover img { opacity: .9; }
.footer-logo { width: 16px; height: 16px; opacity: .45; vertical-align: -3px; margin-right: 4px; }

/* Главная в духе Linktree */
.links-page { max-width: 560px; margin: 0 auto; padding: 0 20px; text-align: center; }
.profile { margin-top: 40px; }
.profile .avatar { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto; }
.profile h1 { font-family: var(--font-ui); font-size: 15px; font-weight: 500; color: var(--muted); margin: 16px 0 0; }
.profile .bio { font-size: 1.2rem; line-height: 1.55; margin: 10px 0 0; }
.profile .about { font-size: 1.02rem; color: var(--text); margin: 12px 0 0; }
.profile .about span { color: var(--muted); }

.link-group { margin-top: 44px; }
.links-page h2 { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.link-btn { display: block; padding: 14px 20px; margin-top: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, background .15s; }
.link-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.link-btn b { display: block; font-family: var(--font-ui); font-size: 16px; font-weight: 600; }
.link-btn small { display: block; font-family: var(--font-ui); font-size: 13px; color: var(--muted); margin-top: 2px; }

.latest { margin-top: 56px; text-align: left; }
.latest h2 { text-align: center; }
.latest .post-list { margin-top: 4px; }
.latest .post-list li { padding: 28px 0; }
.latest .post-list a { font-size: 1.7rem; line-height: 1.25; font-weight: 600; color: var(--text); text-decoration: none; }
.latest .post-list a:hover { color: var(--accent); }
.latest .post-list p { font-size: 1.05rem; margin-top: 10px; }
.latest .all-posts { text-align: center; font-family: var(--font-ui); font-size: 15px; }
.links-page .mark { display: block; width: 40px; height: 40px; margin: 48px auto 0; opacity: .3; }
@media (max-width: 600px) {
  .latest .post-list a { font-size: 1.4rem; }
  .site-header { gap: 14px; }
}
@media (max-width: 600px) {
  .site-header { gap: 10px; }
  .site-header nav { gap: 11px; font-size: 13.5px; }
  .site-header .logo img { width: 18px; height: 18px; }
}
@media (max-width: 600px) {
  .site-header nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 10px; font-size: 13px; scrollbar-width: none; }
  .site-header nav::-webkit-scrollbar { display: none; }
}

/* Главная: «Цифровой след Паши» */
.home-page { min-height: 100vh; display: flex; flex-direction: column; }
.trace { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 40px 20px 0; text-align: center; }
.emblem { position: relative; width: 220px; height: 190px; margin: 0 auto; }
.emblem .avatar { position: absolute; left: 0; top: 10px; width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }
.emblem .hand { position: absolute; right: 0; bottom: 0; width: 120px; height: 120px; opacity: .92; filter: drop-shadow(0 1px 0 var(--bg)); }
.trace h1 { font-family: var(--font-body); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.01em; margin: 24px 0 0; }

.contacts { list-style: none; padding: 0; margin: 40px 0 0; font-family: var(--font-ui); font-size: 15px; }
.contacts li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.contacts li:first-child { border-top: 1px solid var(--border); }
.contacts span { color: var(--muted); }
.contacts a { color: var(--text); text-decoration: none; }
.contacts a:hover { color: var(--accent); }

.sections { display: flex; justify-content: space-between; margin-top: 36px; font-family: var(--font-ui); font-size: 15px; }
.sections a { color: var(--accent); text-decoration: none; }
.sections a:hover { text-decoration: underline; }

.home-page .site-footer { text-align: center; margin-top: 64px; }
@media (max-width: 340px) {
  .contacts li { flex-direction: column; gap: 2px; text-align: left; }
  .sections { font-size: 14px; }
}

.home-page .site-header { width: 100%; box-sizing: border-box; }

/* Главная: маленькое фото, тихий заголовок с рукой между словами */
.avatar-small { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: 8px auto 0; }
.trace .trace-title { font-family: var(--font-ui); font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0.02em; margin: 14px 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.hand-inline { width: 30px; height: 30px; opacity: .8; }

/* Подписи блоков на главной */
.trace .block-label { font-family: var(--font-ui); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: left; margin: 40px 0 8px; }
.trace .block-label + .contacts { margin-top: 0; }
.trace .block-label + .sections { margin-top: 0; }

/* Шапка по центру */
.site-header { justify-content: center; }
.site-header nav { min-width: 0; }

/* Навигация на главной: 4 колонки с подписями */
.trace .sections { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.trace .sections a b { display: block; font-weight: 500; }
.trace .sections a small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.trace .sections a:hover { text-decoration: none; }
.trace .sections a:hover b { text-decoration: underline; }
@media (max-width: 480px) {
  .trace .sections { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
}

/* Шапка: разделительная полоса во всю ширину экрана */
html, body { overflow-x: clip; }
.site-header { position: relative; padding-top: 22px; padding-bottom: 18px; }
.site-header::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 100vw; transform: translateX(-50%); border-bottom: 1px solid var(--border); }

/* Главная: основной блок по центру по вертикали */
.trace { display: flex; flex-direction: column; justify-content: center; padding-top: 32px; padding-bottom: 32px; }
.home-page .site-footer { margin-top: 0; }

/* Навигация на главной: шире основного блока, подписи в одну строку */
.trace .block-label { text-align: center; }
.nav-block { width: min(880px, calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }
.trace .nav-block .sections { grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 24px; }
.trace .nav-block .sections a small { white-space: nowrap; font-size: 13px; }
@media (max-width: 760px) {
  .nav-block { width: 100%; margin-left: 0; transform: none; }
  .trace .nav-block .sections { grid-template-columns: 1fr; row-gap: 18px; }
  .trace .nav-block .sections a small { white-space: normal; }
}

/* Фото и подпись прижаты к правому краю блока контактов */
.avatar-small { margin: 8px 0 0 auto; }
.trace .trace-title { justify-content: flex-end; }

.trace .contacts-label { text-align: left; }

/* Блог: фото и текст о себе над списком постов */
.blog-hero { display: flex; align-items: flex-end; gap: 32px; margin: 48px 0 8px; }
.blog-hero .portrait { width: 220px; height: auto; flex-shrink: 0; border-radius: 4px; }
.blog-hero p { margin: 0; }
.blog-hero .hero-name { font-family: var(--font-ui); font-size: 15px; color: var(--muted); }
.blog-hero .hero-lead { font-size: 1.2rem; line-height: 1.55; margin-top: 8px; }
.blog-hero .hero-label { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 20px; }
.blog-hero .hero-about { font-size: 1.05rem; margin-top: 4px; }
.blog .blog-title { margin-top: 56px; }
@media (max-width: 600px) {
  .blog-hero { flex-direction: column; align-items: flex-start; gap: 18px; margin-top: 28px; }
  .blog-hero .portrait { width: 100%; max-width: 360px; }
}

/* Фото внутри обычных страниц */
.page p { margin: 0 0 1em; }
.page-photo { margin: 24px 0 8px; }
.page-photo img { display: block; width: 100%; height: auto; border-radius: 6px; }
.page-photo figcaption { font-family: var(--font-ui); font-size: 14px; color: var(--muted); margin-top: 8px; }

.page-photo.narrow { max-width: 340px; }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 8px; }
.photo-pair .page-photo { margin: 0; }
.media-links { font-family: var(--font-ui); font-size: 15px; }
.media-links { color: var(--muted); }

/* Выпадающее меню «Падел» в шапке */
.site-header { z-index: 20; }
.nav-drop { position: relative; display: inline-flex; }
.nav-drop .drop { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); padding-top: 12px; z-index: 30; }
.nav-drop .drop::before { content: ""; position: absolute; inset: 12px 0 0; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08); z-index: -1; }
.nav-drop .drop a { display: block; white-space: nowrap; padding: 8px 16px; color: var(--text); }
.nav-drop .drop a:first-child { padding-top: 12px; }
.nav-drop .drop a:last-child { padding-bottom: 12px; }
.nav-drop .drop a:hover { color: var(--accent); }
.nav-drop:hover .drop, .nav-drop:focus-within .drop { display: block; }
@media (max-width: 600px), (hover: none) {
  .nav-drop .drop { display: none !important; }
}

/* Список статей на странице падела */
.page .post-list { margin-top: 8px; }
.page .post-list li { padding: 18px 0; }
@media (max-width: 600px) { .photo-pair { grid-template-columns: 1fr; } }

/* Заголовки разделов в стиле главной: мелкие серые прописные */
.page h1, .page h2, .blog .blog-title {
  font-family: var(--font-ui); font-size: 12px; font-weight: 500; line-height: 1.4;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.page h1 { margin: 48px 0 12px; }
.page h2 { margin: 56px 0 12px; }
.blog .blog-title { margin: 56px 0 4px; }
.page .lead { font-size: 1.25rem; color: var(--text); margin: 0 0 16px; }
.page .post-list li:first-child, .blog .post-list li:first-child { border-top: 1px solid var(--border); }
.blog .blog-title + .post-list { margin-top: 12px; }
