:root {
  --paper: #fff;
  --ink: #111;
  --muted: #555;
  --line: #b8b8b8;
  --hairline: #dededb;
  --red: #9e0000;
  --blue: #4287c7;
  --label: #b9c6bc;
}

* { box-sizing: border-box; }

html { background: #eceeed; }

body {
  max-width: 1180px;
  margin: 0 auto 28px;
  background: var(--paper);
  color: var(--ink);
  font-family: Helvetica, Arial, sans-serif;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .035), 0 18px 34px rgba(0, 0, 0, .08);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover { color: var(--red); }

.site-header {
  padding: 26px 26px 0;
  background: #fff;
}

.site-kicker {
  margin: 0 0 22px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.masthead {
  display: grid;
  grid-template-columns: 90px minmax(280px, 1fr) minmax(210px, 250px);
  gap: 24px;
  align-items: center;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.mark img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  display: block;
}

.brand {
  color: var(--red);
  font-family: "Big Caslon", "Libre Caslon Display", "Libre Baskerville", Georgia, serif;
  font-size: clamp(54px, 8vw, 88px);
  line-height: .9;
  font-weight: 400;
  letter-spacing: -.04em;
  white-space: nowrap;
}

.search {
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  background: #f0f1ef;
  border: 1px solid #ececea;
  min-height: 32px;
}

.search input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 7px 8px;
  color: #333;
  font: 13px Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  text-align: center;
}

.search button {
  width: 34px;
  height: 30px;
  border: 0;
  border-left: 1px solid #ddd;
  background: transparent;
  color: #111;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.main-nav, .site-footer nav {
  display: grid;
  grid-template-columns: repeat(7, auto);
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

main {
  padding: 0 26px 46px;
}

.home-intro {
  max-width: 860px;
  padding: 18px 0 8px;
}

.home-intro h1 {
  margin: 0;
  color: #222;
  font-family: "Big Caslon", "Libre Caslon Display", Georgia, serif;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.03;
  font-weight: 400;
  letter-spacing: -.03em;
}

.section-title {
  margin: 18px 0 14px;
  color: var(--red);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.card figure {
  position: relative;
  margin: 0;
  background: #eee;
}

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.22 / 1;
  object-fit: cover;
}

.category {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 7px;
  background: var(--label);
  color: #13201b;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

figure .category,
.featured-image .category {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

.category.is-featured {
  background: var(--red);
  color: #fff;
}

.card h2 {
  margin: 10px 0 1px;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -.04em;
}

.dek {
  margin: 0;
  color: #111;
  font: italic 17px/1.05 Georgia, serif;
}

.card-meta {
  display: grid;
  gap: 2px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.1;
}

.author {
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
}

.featured {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 34px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.featured-image {
  position: relative;
  display: block;
}

.featured img {
  display: block;
  width: 100%;
  aspect-ratio: 2.25 / 1;
  object-fit: cover;
}

.featured-copy {
  padding-top: 10px;
}

.featured h2 {
  margin: 0 0 4px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -.04em;
}

.meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.featured-copy > p:last-of-type {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.25;
}

.more-link {
  display: inline-flex;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.archive-title { margin-top: 24px; }

.reading {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(230px, .9fr);
  gap: 36px;
  padding-top: 24px;
}

.article-hero {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  display: block;
}

.reading > .category,
.reading > h1,
.reading > .byline,
.reading > .article-body,
.reading > .article-actions {
  grid-column: 1;
}

.reading h1,
.directory-preview h1,
.author-page h1 {
  margin: 0;
  color: var(--red);
  font-family: "Big Caslon", "Libre Caslon Display", Georgia, serif;
  font-size: clamp(38px, 5vw, 68px);
  line-height: .95;
  font-weight: 400;
  letter-spacing: -.04em;
}

.byline {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}

.byline img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
}

.article-body {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 19px;
  line-height: 1.35;
}

.article-body p { margin: 0 0 1em; }

.article-actions button,
button {
  border: 0;
  background: var(--red);
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.directory-preview,
.author-page,
.category-page {
  padding-top: 24px;
}

.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.kicker {
  margin: 0;
  color: var(--red);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.author-list,
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
}

.category-list a { color: var(--red); }

.author-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
}

.author-page aside img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
}

.author-page aside {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.article-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 0;
}

.result {
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}

.result h2 {
  margin: 4px 0;
  color: var(--red);
  font-size: 28px;
}

.site-footer {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 28px 26px 34px;
  border-top: 10px solid #eceeed;
  color: #333;
  font-size: 12px;
  line-height: 1.35;
}

.site-footer::before {
  content: "";
  width: 82px;
  height: 82px;
  background: url("/assets/scimmia.png") center / contain no-repeat;
  grid-row: span 3;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 18px;
  padding: 0;
  border: 0;
  font-size: 12px;
}

.site-footer p,
.site-footer small {
  margin: 0;
}

@media (max-width: 900px) {
  body { box-shadow: none; }

  .masthead {
    grid-template-columns: 68px 1fr;
  }

  .search {
    grid-column: 1 / -1;
  }

  .mark img {
    width: 68px;
    height: 68px;
  }

  .brand {
    font-size: clamp(46px, 11vw, 68px);
  }

  .main-nav {
    display: flex;
    overflow-x: auto;
    justify-content: flex-start;
    white-space: nowrap;
  }

  .article-grid,
  .featured,
  .reading,
  .author-page,
  .section-head,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .featured img { aspect-ratio: 1.55 / 1; }
}

@media (max-width: 620px) {
  .site-header,
  main,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .article-grid.compact {
    grid-template-columns: 1fr;
  }

  .card img {
    aspect-ratio: 1.15 / 1;
  }
}
