@font-face {
  font-family: Manrope;
  src: url('/work/mezhdu-delom/assets/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url('/work/mezhdu-delom/assets/inter.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #eef0e8;
  --ink: #20372e;
  --muted: #506158;
  --line: #b7c3b5;
  --accent: #704652;
  --panel: #e2e8dd;
  --thumb: #738579;
  --track: #e1e8dd;
  --thumb-hover: #536b5d;
  --thumb-active: #40594b;
  --display: Manrope, sans-serif;
  --serif: Georgia, serif;
  --gutter: clamp(18px, 5vw, 76px);
  scrollbar-gutter: stable;
  scroll-padding-top: 24px;
}

* { box-sizing: border-box; scrollbar-color: var(--thumb) var(--track); scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--track); }
*::-webkit-scrollbar-thumb { background: var(--thumb); }
*::-webkit-scrollbar-thumb:hover { background: var(--thumb-hover); }
*::-webkit-scrollbar-thumb:active { background: var(--thumb-active); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
button, a { cursor: pointer; }
button:active, a:active { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
p, figure, h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
.wrap { width: min(calc(100% - var(--gutter) * 2), 1280px); margin-inline: auto; }

.skip {
  position: absolute;
  top: 12px;
  left: var(--gutter);
  z-index: 5;
  padding: 12px 18px;
  background: var(--paper);
  transform: translateY(calc(-100% - 16px));
}

.skip:focus { transform: none; }

.site-header {
  min-height: 73px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 21px/1.2 var(--display);
  letter-spacing: -.045em;
  white-space: nowrap;
}

.wordmark span { color: var(--accent); font-size: 24px; }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 44px); font-size: 14px; }
.site-nav a { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.site-nav a:hover, .wordmark:hover { color: var(--accent); }
.menu-toggle { display: none; }

.cover {
  display: grid;
  grid-template-columns: minmax(0, .73fr) minmax(0, 1.27fr);
  align-items: center;
  gap: clamp(25px, 5vw, 88px);
  padding-block: clamp(26px, 3.4vw, 56px) clamp(24px, 3.2vw, 46px);
}

.cover-copy { padding-bottom: 24px; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.cover-label { color: var(--accent); margin-bottom: 16px; }

h1 {
  font: 500 clamp(54px, 7vw, 113px)/.91 var(--display);
  letter-spacing: -.07em;
}

h1 em {
  display: block;
  margin-left: .33em;
  color: var(--accent);
  font: italic 400 .99em/.97 var(--serif);
  letter-spacing: -.055em;
}

.cover-description {
  max-width: 34ch;
  margin: clamp(18px, 2.5vw, 32px) 0 12px;
  color: var(--muted);
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.62;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font: 700 14px/1.3 var(--display);
}

.text-link span { color: var(--accent); }
.text-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }

.cover-image img, .card-image img, .reader-image img { width: 100%; object-fit: cover; background: var(--panel); }
.cover-image img { height: auto; aspect-ratio: 2; object-position: 64% 47%; }

figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 12px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
}

.journal { padding-block: 24px clamp(52px, 7vw, 100px); border-top: 1px solid var(--ink); }
.journal-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

h2 {
  font: 600 clamp(34px, 4.4vw, 66px)/1.08 var(--display);
  letter-spacing: -.055em;
}

.entry-count { flex-shrink: 0; color: var(--muted); font-size: 13px; }

.filters {
  display: flex;
  gap: 6px clamp(10px, 2vw, 28px);
  flex-wrap: wrap;
  margin: 12px 0 23px;
}

.filters button {
  padding: 6px 0 4px;
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.filters button:hover, .filters button.active { color: var(--ink); border-color: var(--accent); }

.articles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 38px); }

.article-link {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  height: 100%;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.card-image { overflow: hidden; }
.card-image img { height: auto; aspect-ratio: 1.72; transition: transform .32s ease-out; }
.article-link:hover img { transform: scale(1.035); }
.article-link:hover h3, .article-link:hover .article-action { color: var(--accent); }
.article-link:hover .article-action { text-decoration: underline; text-underline-offset: 4px; }

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 15px 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.article-meta span { color: var(--accent); font-weight: 600; }

h3 {
  font: 650 clamp(24px, 2.45vw, 39px)/1.14 var(--display);
  letter-spacing: -.045em;
}

.card p { max-width: 42ch; margin: 10px 0 5px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.article-action { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; font: 700 13px/1.4 var(--display); }
.article-action span { color: var(--accent); }

.about {
  display: grid;
  grid-template-columns: minmax(0, .73fr) minmax(0, 1.27fr);
  gap: clamp(25px, 5vw, 88px);
  padding: clamp(28px, 5.4vw, 78px);
  background: var(--panel);
}

.about-copy { max-width: 64ch; }
.about-lead { margin: 0 0 16px; font: 500 clamp(20px, 2.25vw, 31px)/1.37 var(--display); letter-spacing: -.035em; }
.about-copy p + p { color: var(--muted); }
.about-copy .text-link { margin-top: 12px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-block: 30px;
}

.site-footer small { color: var(--muted); font-size: 12px; }
.site-footer small a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer small a:hover { color: var(--accent); }

dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  overscroll-behavior: contain;
  scroll-padding-top: 78px;
}

.reader-bar {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.reader-bar button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  font: 700 14px/1 var(--display);
}

.reader-bar button span { color: var(--accent); font-size: 22px; }
.reader-bar button:hover { color: var(--accent); }
.reader-content { width: min(calc(100% - var(--gutter) * 2), 760px); margin-inline: auto; padding-block: clamp(28px, 5vw, 68px); }
.reader-content .label { color: var(--accent); margin-bottom: 14px; }
.reader-lead { margin: 19px 0 22px; color: var(--muted); font: 500 clamp(18px, 2.6vw, 24px)/1.48 var(--display); }
.reader-image { margin-bottom: 25px; }
.reader-image img { height: auto; aspect-ratio: 2.1; }
#reader-body { max-width: 64ch; }
#reader-body p { margin: 18px 0; font-size: 16px; line-height: 1.8; }
#reader-body h3 { margin: 30px 0 12px; font-size: 26px; }
.reader-end { margin-top: 16px; border-top: 1px solid var(--line); width: 100%; }

@media (max-width: 760px) {
  .site-header { position: relative; min-height: 61px; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    font-size: 14px;
  }

  .menu-toggle span { color: var(--accent); font-size: 19px; }
  .menu-toggle:hover { color: var(--accent); }

  .site-nav {
    position: absolute;
    z-index: 2;
    inset: calc(100% + 1px) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 5px 15px;
    border: 1px solid var(--line);
    background: var(--paper);
  }

  .site-nav.open { display: flex; }
  .site-nav a + a { border-top: 1px solid var(--line); }

  .cover {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding-block: 20px 21px;
  }

  .cover-copy { padding-bottom: 0; }
  .cover-label { margin-bottom: 10px; }
  h1 { font-size: clamp(47px, 10vw, 75px); letter-spacing: -.064em; }
  h1 em { display: inline; margin-left: .03em; }
  .cover-description { margin: 14px 0 1px; }
  .cover-image img { aspect-ratio: 2.04; object-position: 60% center; }
  .journal { padding-top: 17px; }
  .filters { margin-block: 5px 12px; }
  .articles { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .card-image img { aspect-ratio: 2; }
  .article-meta { margin-top: 11px; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .site-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .site-footer small { grid-row: 2; grid-column: 1 / -1; }
  .reader-image img { aspect-ratio: 1.65; }
}

@media (prefers-reduced-motion: reduce) {
  .card-image img { transition: none; }
  .article-link:hover img { transform: none; }
}

@media (forced-colors: active) {
  * { scrollbar-color: auto; scrollbar-width: auto; }
  :focus-visible { outline-color: Highlight; }
  .filters button.active { border-color: Highlight; }
}

/* The journal opens as a landscape, before the readable editorial feed. */
.site-header { position: absolute; inset: 0 0 auto; z-index: 3; color: #fff; border-color: #ffffff60; }
.site-header .wordmark span, .site-header a:hover { color: #e5c6d1; }
.site-header .menu-toggle span { color: #e5c6d1; }
.cover { position: relative; isolation: isolate; min-height: 100svh; display: flex; align-items: flex-end; padding: 140px var(--gutter) clamp(44px, 9vh, 100px); background: #293c39; color: #fff; }
.cover-copy { width: min(100%, 1280px); margin-inline: auto; padding: 0; position: relative; z-index: 1; }
.cover-label { color: #f0dce4; }
.cover h1 { font-size: clamp(72px, min(10vw, 17vh), 160px); max-width: 9ch; }
.cover h1 em { color: #f1d6df; }
.cover-description { max-width: 37ch; color: #fff; margin-block: 26px 15px; }
.cover .text-link, .cover .text-link span { color: #fff; }
.cover-image { position: absolute; inset: 0; z-index: -1; }
.cover-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #102a2b91, #102a2b08 80%), linear-gradient(0deg, #102a2b9e, transparent 70%, #102a2b33); }
.cover-image img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: 65% 50%; }
.journal { margin-top: clamp(38px, 6vw, 90px); }
.cover :focus-visible, .site-header :focus-visible { outline-color: #fff; }
@media (max-width: 760px) {
  .cover { padding-top: 120px; padding-bottom: 44px; }
  .cover h1 { font-size: clamp(70px, 19vw, 110px); }
  .cover-description { max-width: 30ch; }
  .cover-image img { object-position: 70% 50%; }
  .site-nav { background: var(--paper); color: var(--ink); }
  .site-nav a:hover { color: var(--accent); }
}
