/* semenov-vf.ru — светлый, книжный. Шрифты ParaType (PT Serif / PT Sans, OFL). */
@font-face{font-family:"PT Serif";src:url(/fonts/PT_Serif-Web-Regular.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"PT Serif";src:url(/fonts/PT_Serif-Web-Italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"PT Serif";src:url(/fonts/PT_Serif-Web-Bold.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"PT Sans";src:url(/fonts/PT_Sans-Web-Regular.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"PT Sans";src:url(/fonts/PT_Sans-Web-Italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}

:root{
  --paper:#f7f7f3; --ink:#1e1e1c; --title:#000; --muted:#6b6a62; --rule:#dad9d1; --rubric:#9e2a1c;
  --serif:"PT Serif",Georgia,"Times New Roman",serif; --sans:"PT Sans","Helvetica Neue",Arial,sans-serif;
  --measure:62ch; --wide:1120px;
  --k:clamp(4.4px,.72vw,8px); /* 1 см листа = --k пикселей на «полке» */
}
*{box-sizing:border-box}
html{background:var(--paper);color:var(--ink);font:400 19px/1.55 var(--serif);-webkit-text-size-adjust:100%}
body{margin:0;min-height:100vh;display:flex;flex-direction:column}
img{max-width:100%;height:auto;display:block}
a{color:var(--rubric);text-decoration:none;text-underline-offset:.16em}
a:hover{text-decoration:underline}
a:focus-visible,button:focus-visible{outline:2px solid var(--rubric);outline-offset:3px}
h1,h2,h3{font-weight:400;line-height:1.15;margin:0;color:var(--title);letter-spacing:-.005em}
h1{font-size:clamp(2rem,4.2vw,3.2rem)}
h2{font-size:clamp(1.5rem,2.6vw,2rem)}
h3{font-size:1.25rem}
p{margin:0 0 1em}
.small,figcaption,.meta,nav,.crumbs,footer{font-family:var(--sans);font-size:.95rem}
.muted{color:var(--muted)}
.wrap{width:min(var(--wide),100% - 2.5rem);margin-inline:auto}
.prose{max-width:var(--measure)}
.prose p+p{margin-top:.2em}

/* Шапка: имя слева, разделы справа, тонкая линейка снизу */
header.site{border-bottom:1px solid var(--rule)}
header.site .wrap{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.6rem 2rem;padding:1.1rem 0}
.brand{font-family:var(--serif);font-size:1.25rem;color:var(--title)}
.brand:hover{text-decoration:none;color:var(--rubric)}
nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.2rem 1.5rem}
nav a{color:var(--ink)}
nav a[aria-current]{color:var(--rubric)}
main{flex:1;padding:2.5rem 0 4rem}
footer{border-top:1px solid var(--rule);padding:1.4rem 0 2rem;color:var(--muted)}
footer .wrap{display:flex;flex-wrap:wrap;gap:.4rem 2rem;justify-content:space-between}
footer a{color:var(--muted)}
.crumbs{margin-bottom:1.2rem;color:var(--muted)}
.crumbs a{color:var(--muted)}
.crumbs span+span::before{content:" / ";color:var(--rule)}

/* Титульный лист */
.title-page{display:grid;grid-template-columns:1fr 1fr;gap:2rem 4rem;align-items:start}
.title-page .name{font-size:clamp(2.6rem,6.2vw,5rem);line-height:1;letter-spacing:-.01em;margin:.4rem 0 .35rem}
.title-page .years{font-size:1.4rem;color:var(--muted);margin-bottom:.6rem}
.title-page .role{font-size:1.25rem;font-style:italic;margin-bottom:1.6rem}
.title-page figure{margin:0;justify-self:end;width:100%;max-width:520px}
.title-page figure img{width:100%;box-shadow:0 1px 0 var(--rule)}
.title-page figcaption{margin-top:.6rem;color:var(--muted)}
.entries{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1.5rem 2rem;margin:3rem 0 0;padding:1.6rem 0 0;border-top:1px solid var(--rule)}
.entries a{display:block;color:var(--ink)}
.entries a:hover{text-decoration:none;color:var(--rubric)}
.entries .h{font-size:1.35rem;color:var(--title)}
.entries a:hover .h{color:var(--rubric)}
.entries .d{font-family:var(--sans);font-size:.95rem;color:var(--muted);margin-top:.25rem}

/* Полка: ряды листов в общем масштабе, 1 см = --k px. Ряды рассчитаны генератором так, что
   при сужении экрана масштаб уменьшается, а состав рядов не меняется — сирот не бывает. */
:root{--gap:34px;--avail:min(var(--wide),100vw - 3.5rem)}
.shelf-rows{margin:1.8rem 0 0}
.shelf{display:flex;flex-wrap:nowrap;align-items:flex-start;gap:0 var(--gap);margin:0 0 2.4rem;padding:0;list-style:none}
.shelf:last-child{margin-bottom:0}
.shelf li{margin:0;width:calc(var(--wcm)*var(--k));flex:none;display:grid;grid-template-rows:calc(var(--maxh)*var(--k)) auto;align-items:end}
.shelf a{display:contents;color:var(--ink)}
.shelf li:hover .cap{color:var(--rubric)}
.shelf .plate{width:calc(var(--wcm)*var(--k));height:calc(var(--hcm)*var(--k));background:#fff;box-shadow:0 0 0 1px var(--rule)}
.shelf .plate img{width:100%;height:100%;object-fit:contain}
.shelf .cap{margin-top:.5rem;font-family:var(--sans);font-size:.9rem;line-height:1.3;color:var(--ink)}
.shelf .cap small{display:block;color:var(--muted)}
.legend{font-family:var(--sans);font-size:.9rem;color:var(--muted);margin:.4rem 0 0}
.legend i{display:inline-block;width:calc(10*min(8px,var(--avail)/140));height:0;border-top:1px solid var(--muted);vertical-align:middle;margin-right:.5rem}

/* Главная: обложки циклов одного размера */
.covers{display:grid;grid-template-columns:repeat(6,1fr);gap:1.6rem 1.4rem;list-style:none;margin:1.6rem 0 0;padding:0}
.covers li{margin:0}
.covers a{display:block;color:var(--ink)}
.covers a:hover{text-decoration:none;color:var(--rubric)}
.covers .cover{aspect-ratio:4/5;background:#fff;box-shadow:0 0 0 1px var(--rule);display:grid;place-items:center;padding:9%}
.covers .cover img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.covers .cap{margin-top:.55rem;font-family:var(--sans);font-size:.95rem;text-align:center}

/* Цикл */
.section-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:.4rem 1.2rem;margin-bottom:.4rem}
.section-head .n{color:var(--muted);font-family:var(--sans);font-size:1rem}
.section-head h2 a{color:var(--title)}
.section-head h2 a:hover{color:var(--rubric);text-decoration:none}
.season{font-style:italic;color:var(--muted)}
.cycles{margin-top:2.4rem}
.cycles>section{padding:2.2rem 0;border-top:1px solid var(--rule)}
.cycles>section:first-child{border-top:0;padding-top:0}

/* Лист */
.work{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:2rem 3rem;align-items:start}
.work figure{margin:0}
.work figure a{display:inline-block;background:#fff;box-shadow:0 0 0 1px var(--rule)}
.work figure img{max-height:82vh;width:auto;max-width:100%}
.work dl{margin:0;font-family:var(--sans);font-size:.95rem}
.work dt{color:var(--muted);margin-top:.9rem}
.work dd{margin:0}
.work dl dt:first-child{margin-top:0}
.pager{display:flex;justify-content:space-between;gap:1rem;margin-top:2rem;padding-top:1rem;border-top:1px solid var(--rule);font-family:var(--sans);font-size:.95rem}
.pager a{color:var(--ink)}
.pager a:hover{color:var(--rubric)}

/* Книги и тексты — библиографический список */
.biblio{list-style:none;margin:1.5rem 0 0;padding:0;max-width:var(--measure)}
.biblio li{padding:1.1rem 0;border-top:1px solid var(--rule)}
.biblio li:last-child{border-bottom:1px solid var(--rule)}
.biblio .t{font-size:1.35rem;color:var(--title)}
.biblio .t a{color:var(--title)}
.biblio .t a:hover{color:var(--rubric);text-decoration:none}
.biblio .b{font-family:var(--sans);color:var(--muted);margin-top:.2rem}
.biblio .n{margin-top:.5rem}
.biblio .act{font-family:var(--sans);margin-top:.5rem}
.biblio .act a+a{margin-left:1.2rem}

/* Поэзия: оглавление слева, стихи справа */
.reader{display:grid;grid-template-columns:250px minmax(0,1fr);gap:2rem 3.5rem;align-items:start}
.toc{position:sticky;top:1.2rem;max-height:calc(100vh - 2.4rem);overflow:auto;font-family:var(--sans);font-size:.9rem;line-height:1.35;scrollbar-width:thin}
.toc summary{list-style:none;cursor:default;color:var(--muted);margin-bottom:.6rem}
.toc summary::-webkit-details-marker{display:none}
.toc-list{list-style:none;margin:0;padding:0}
.toc-list li{margin:0 0 .45rem}
.toc-list a{color:var(--ink)}
.toc-list a.fl{font-style:italic;color:var(--muted)}
.toc-list a.cur{color:var(--rubric)}
.toc-other{margin-top:1.6rem;padding-top:.9rem;border-top:1px solid var(--rule);color:var(--muted)}
.toc-other ul{list-style:none;margin:.3rem 0 0;padding:0}
.poems h1{margin-bottom:.2rem}
.poems .meta{margin-bottom:2.6rem}
.poem{max-width:38rem;margin:0 0 3.8rem;scroll-margin-top:1.2rem}
.poem h2{font-size:1.05rem;letter-spacing:.08em;margin:0 0 1.1rem;color:var(--title)}
.poem h2.stars,.poem .stars{letter-spacing:.35em;font-size:1rem;color:var(--muted)}
.poem .stars{margin:1.6rem 0 .9rem}
.poem .dedic{font-style:italic;color:var(--muted);text-align:right;margin:-.4rem 0 1.1rem}
.poem .stanza{margin:0 0 1.1em;white-space:pre-wrap;line-height:1.5}
.poem .part{margin-bottom:.4rem}

/* Об авторе */
.about{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:2rem 4rem;align-items:start}
.about figure{margin:0;grid-row:1;grid-column:2}
.about figure img{box-shadow:0 0 0 1px var(--rule)}
.about figcaption{margin-top:.5rem;color:var(--muted)}
.awards{margin:2.2rem 0 0;padding:1.2rem 0 0;border-top:1px solid var(--rule);max-width:var(--measure)}

@media (max-width:1000px){.covers{grid-template-columns:repeat(3,1fr)}}
@media (max-width:820px){
  .title-page,.work,.about,.reader{grid-template-columns:1fr}
  .toc{position:static;max-height:none;overflow:visible}
  .toc summary{cursor:pointer;color:var(--rubric);list-style:disclosure-closed}
  .toc details[open] summary{list-style:disclosure-open}
  .toc summary::-webkit-details-marker{display:inline}
  .title-page figure{justify-self:start}
  .about figure{grid-row:auto;grid-column:auto;max-width:260px}
  html{font-size:17px}
}
@media (max-width:640px){
  /* на узком экране масштаб не читается — простая сетка в две колонки, пропорции листов сохранены */
  .covers{grid-template-columns:repeat(2,1fr)}
  .legend{display:none}
  .shelf-rows{display:grid;grid-template-columns:1fr 1fr;gap:1.6rem 1.2rem}
  .shelf{display:contents}
  .shelf li{width:auto;display:block}
  .shelf .plate{width:100%;height:auto;aspect-ratio:var(--wcm)/var(--hcm)}
}
@media (prefers-reduced-motion:no-preference){a{transition:color .12s}}
@media print{header.site,footer,.pager,.crumbs{display:none}}
