/* pekelman.com */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-garamond-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-garamond-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-garamond-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-garamond-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Heebo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/heebo-hebrew.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/heebo-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Heebo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/heebo-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #111;
  --paper: #f5f5f2;   /* the page, a shade of grey */
  --block: #fff;      /* blocks are lighter than the page */
  --filet: #e2e2dd;
  --gap: 1rem;          /* one gutter, used everywhere */
  --pad: 1.6rem;        /* inside a block */
}

html {
  font-family: "Cormorant Garamond", Garamond, "Hoefler Text", Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
:lang(he) {
  font-family: "Heebo", "Arial Hebrew", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}
/* Heebo runs large next to Cormorant: scale it once, on the element that carries lang="he"
   (not on every descendant, which would compound). */
[lang="he"] { font-size: 0.92em; }
[lang="he"] [lang="he"] { font-size: 1em; }
body {
  max-width: 52rem;
  margin: 0 auto;
  padding: 3rem var(--gap) 2rem;
}
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; text-decoration-color: #999; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0 0 1rem; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; font-style: italic; margin-top: 1.5rem; }
:lang(he) h1, :lang(he) h2, :lang(he) h3 { font-weight: 400; font-style: normal; }
p, ul, ol { margin: 0 0 1rem; }
p:last-child, ul:last-child, ol:last-child, div:last-child { margin-bottom: 0; }
em { font-style: italic; }
:lang(he) em { font-style: normal; font-weight: 500; }
img { max-width: 100%; height: auto; display: block; --physics: rigid; }
hr { border: 0; border-top: 1px solid var(--filet); margin: var(--gap) 0; }
small { font-size: 0.85em; }

/* Everything on a page is a stack of blocks separated by one gutter. */
main, main > article { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.block {
  background: var(--block);
  border: 1px solid var(--filet);
  padding: var(--pad);
}
.block.tight { padding: calc(var(--pad) * 0.6) var(--pad); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }   /* equal heights by default */

/* Bottom menu, justified across the measure. */
nav.bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--gap);
  flex-wrap: wrap;
  border-top: 1px solid var(--filet);
  padding-top: 0.8rem;
  margin-top: calc(var(--gap) * 2);
  font-size: 0.9rem;
}
nav.bottom a { text-decoration: none; }
nav.bottom a:hover { text-decoration: underline; }

/* Lists of notes and poems. */
ul.notes, ul.plain, ul.talks { list-style: none; padding: 0; }
ul.notes li { display: grid; grid-template-columns: 9rem 1fr; gap: var(--gap); margin-bottom: 0.3rem; }
ul.notes time { font-size: 0.85rem; padding-top: 0.2rem; font-variant-numeric: tabular-nums; }
ul.notes li[dir=rtl] { grid-template-columns: 1fr 9rem; }
ul.notes li[dir=rtl] time { order: 2; text-align: end; }
ul.plain li { margin-bottom: 0.3rem; }
ul.plain .first { font-style: italic; }
ul.talks li { margin-bottom: 0.8rem; }
ul.talks small { display: block; }
.filters, .prevnext, .when { font-size: 0.9rem; }
.prevnext .label { font-style: italic; }
:lang(he) .prevnext .label { font-style: normal; }
.dedication { font-style: italic; margin-top: -0.6rem; }
:lang(he) .dedication { font-style: normal; }
.source, .notes { font-size: 0.9rem; }

/* Verse: line breaks are the poet's; wrapped lines hang. */
.verse p { white-space: pre-line; padding-inline-start: 2em; text-indent: -2em; margin-bottom: 1.2rem; hyphens: manual; }
.verse.inset { margin-inline-start: 2.5rem; }

/* The scanned poems, at their own pixel size, never enlarged. */
.scans { display: flex; flex-wrap: wrap; gap: var(--gap); justify-content: center; align-items: flex-start; margin-top: var(--pad); }
.scans img { max-width: 100%; }
.scans a { text-decoration: none; }

@media (max-width: 44rem) {
  html { font-size: 18px; }
  body { padding-top: 1.5rem; }
  .cols { grid-template-columns: 1fr; }
  .block { padding: 1.1rem; }
  ul.notes li, ul.notes li[dir=rtl] { grid-template-columns: 1fr; gap: 0; margin-bottom: 0.8rem; }
  ul.notes li[dir=rtl] time { order: 0; text-align: start; }
}
@media print {
  nav.bottom, .prevnext, .filters { display: none; }
  .block { background: none; border: 0; padding: 0; }
  body { max-width: none; padding: 0; }
}
