:root {
  --bg: #f5f1e8;
  --bg-soft: #f8f5ee;
  --ink: #162033;
  --ink-soft: #24324a;
  --muted: #66748a;

  --accent: #2952cc;
  --accent-hover: #1f43ad;
  --accent-soft: rgba(41, 82, 204, 0.09);

  --line: #ddd5c8;
  --line-soft: rgba(22, 32, 51, 0.08);

  --sidebarW: 272px;
  --contentW: 760px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "IBM Plex Sans", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(41, 82, 204, 0.14);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 140ms ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 1px;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebarW) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 36px 28px 32px;
  border-right: 1px solid var(--line);
  font-family: var(--sans);
}

.brand {
  margin-bottom: 28px;
}

.brand a,
.brand a:hover {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.navSection {
  margin-top: 24px;
}

.navHeader {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.navLink {
  display: block;
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.35;
}

.navLink:hover {
  color: var(--accent);
  text-decoration: none;
}

.divider {
  margin: 20px 0;
  border-top: 1px solid var(--line);
  opacity: 0.8;
}

.main {
  padding: 44px 56px 64px;
}

.content {
  max-width: var(--contentW);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(52px, 7vw, 72px);
  line-height: 0.98;
  margin-bottom: 28px;
}

h2 {
  font-size: 31px;
  line-height: 1.14;
  margin-bottom: 10px;
}

h3 {
  font-size: 21px;
  line-height: 1.3;
  margin-bottom: 8px;
}

p {
  margin: 0 0 1.15em;
  max-width: 42em;
}

strong {
  color: var(--ink);
}

em {
  font-style: italic;
}

.section {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.kicker {
  margin-bottom: 12px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.01em;
}

.meta {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

ul,
ol {
  margin: 0 0 1.2em 1.2em;
  padding: 0;
}

li {
  margin-bottom: 0.45em;
}

/* General list-style content blocks */
.list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 12px;
}

.item {
  padding: 0;
}

.item-title {
  margin: 0 0 6px;
  font-size: 25px;
  line-height: 1.18;
}

.item-title a {
  color: var(--ink-soft);
}

.item-title a:hover {
  color: var(--accent);
}

.item-abstract {
  margin: 0;
  max-width: 44em;
  color: var(--muted);
  line-height: 1.58;
}

.item-meta {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Homepage latest essays list */
.section ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.section li {
  margin-bottom: 18px;
}

/* Media */
.media-list {
  display: flex;
  flex-direction: column;
  gap: 34px;
  margin-top: 18px;
}

.media-item {
  padding: 0;
}

.media-title {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.18;
  color: var(--ink-soft);
}

.media-title a {
  color: var(--ink-soft);
}

.media-title a:hover {
  color: var(--accent);
}

.media-type {
  display: inline-block;
  margin-left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.media-abstract {
  margin: 0;
  max-width: 46rem;
  color: var(--muted);
  line-height: 1.58;
}

.media-source {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* Film */
.film-section {
  margin-top: 40px;
}

.film-embed {
  margin-top: 18px;
  max-width: 920px;
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 20px;
}

.film-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.film-card:hover {
  text-decoration: none;
}

.film-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.film-card-text {
  margin-top: 10px;
}

.film-card-text h3 {
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.25;
}

.film-card-text h3 a,
.film-card-text h3 {
  color: var(--ink-soft);
}

.film-card-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Theme pages */
.content > .section ul {
  list-style: disc;
}

.content > .section ul li {
  margin-bottom: 0.8em;
}

.content > .section ul li a {
  color: var(--accent);
}

/* Subtle utility */
.soft {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

/* Mobile */
@media (max-width: 980px) {
  .main {
    padding: 36px 28px 48px;
  }

  .film-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 24px 20px 16px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .main {
    padding: 28px 20px 44px;
  }

  .brand {
    margin-bottom: 18px;
  }

  .navSection {
    margin-top: 18px;
  }

  h1 {
    font-size: 48px;
    line-height: 1;
  }

  h2 {
    font-size: 26px;
  }

  body {
    font-size: 18px;
  }
}