/* ============================================================
   The Annum — Journal Article Styles
   Shared by all /journal/*.html pages
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #1C1C1C;
  --ink-soft: rgba(28, 28, 28, 0.74);
  --ink-quiet: rgba(28, 28, 28, 0.45);
  --ink-line: rgba(28, 28, 28, 0.12);
  --cream: #F5F0E6;
  --paper: #FAF7F1;
  --bone: #E8DDD0;
  --teal: #2C4A47;
  --clay: #B0876A;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.66;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "liga" 1, "kern" 1;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }
cite { font-style: inherit; }

::selection { background: var(--teal); color: var(--cream); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ----------------------------- Top bar */
.article-top {
  padding: 26px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ink-line);
  background: var(--cream);
  position: relative;
  z-index: 5;
}
.article-top .back {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.55em;
  padding-left: 0.55em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.3s ease;
}
.article-top .back:hover { color: var(--clay); }
.article-top .section-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

/* ----------------------------- Article hero */
.article-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bone) center/cover no-repeat;
  max-height: 72vh;
}

/* ----------------------------- Article content */
.article-content {
  padding: 64px 64px 80px;
  background: var(--cream);
  position: relative;
  z-index: 2;
}
.container-narrow { max-width: 740px; margin: 0 auto; }

.article-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 32px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.article-meta time { color: var(--clay); }
.article-meta .dot { color: var(--ink-quiet); }

h1.article-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: 0.002em;
  margin-bottom: 36px;
  color: var(--ink);
}
.article-lead {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.42;
  letter-spacing: 0.005em;
  margin-bottom: 48px;
  color: var(--ink-soft);
  padding-bottom: 36px;
  border-bottom: 1px solid var(--ink-line);
}

.article-body p {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 26px;
}
.article-body p strong {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 22px;
  color: var(--ink);
}
.article-body p em { font-style: italic; }

.article-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.24;
  letter-spacing: 0.002em;
  margin: 56px 0 22px;
  color: var(--ink);
}
.article-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  margin: 40px 0 16px;
  color: var(--ink);
}

.article-body .pull {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.42;
  color: var(--ink-soft);
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  padding: 32px 0;
  margin: 48px 0;
  text-align: center;
}

/* ----------------------------- Marginalia sidenotes
   On wide screens, sidenotes float into the right margin
   (outside the 740px reading column). On narrower screens,
   they fall back inline below the paragraph. */
aside.sidenote {
  float: right;
  clear: right;
  width: 220px;
  margin-right: -252px;
  margin-top: 0.35em;
  margin-bottom: 1.6em;
  margin-left: 24px;
  padding-left: 18px;
  border-left: 1px solid var(--clay);
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  letter-spacing: 0.002em;
}
aside.sidenote strong {
  display: block;
  margin-bottom: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-style: normal;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clay);
}
aside.sidenote em { font-style: italic; }
aside.sidenote cite {
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--ink);
}

@media (max-width: 1180px) {
  aside.sidenote {
    float: none;
    clear: none;
    width: 100%;
    margin: 22px 0;
    padding: 14px 0 14px 18px;
    font-size: 15px;
  }
}

.article-end {
  margin-top: 56px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--ink-quiet);
}
.article-end::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'><g stroke='%23B0876A' stroke-width='0.55' fill='none'><ellipse cx='0' cy='-5.5' rx='2.2' ry='4'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(72)'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(144)'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(216)'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(288)'/><circle r='1' fill='%23B0876A' stroke='none'/></g></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Article body pull-quote — add small ornament above */
.article-body .pull {
  position: relative;
}
.article-body .pull::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto 24px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'><g stroke='%23B0876A' stroke-width='0.55' fill='none'><ellipse cx='0' cy='-5.5' rx='2.2' ry='4'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(72)'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(144)'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(216)'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(288)'/><circle r='1' fill='%23B0876A' stroke='none'/></g></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* ----------------------------- Related articles */
.related {
  padding: 72px 64px;
  background: var(--paper);
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
}
.related-inner { max-width: 1240px; margin: 0 auto; }
.related-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 12px;
}
.related-head .meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.related-head .meta.faint { color: var(--ink-quiet); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.related-entry {
  cursor: pointer;
  color: inherit;
  display: block;
}
.related-entry .img {
  aspect-ratio: 4 / 5;
  background: var(--bone) center/cover no-repeat;
  margin-bottom: 22px;
  overflow: hidden;
  transition: opacity 0.5s ease, transform 1.2s cubic-bezier(.2,.6,.2,1);
}
.related-entry:hover .img { opacity: 0.94; transform: scale(1.012); }
.related-entry .stamp {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}
.related-entry h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.24;
  color: var(--ink);
  letter-spacing: 0.002em;
  transition: color 0.35s ease;
}
.related-entry:hover h4 { color: var(--teal); }

/* ----------------------------- CTA */
.article-cta {
  padding: 96px 64px;
  background: var(--ink);
  color: var(--cream);
  text-align: center;
}
.article-cta .meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.5);
  margin-bottom: 28px;
}
.article-cta::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'><g stroke='%23F5F0E6' stroke-width='0.55' fill='none' opacity='0.55'><ellipse cx='0' cy='-5.5' rx='2.2' ry='4'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(72)'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(144)'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(216)'/><ellipse cx='0' cy='-5.5' rx='2.2' ry='4' transform='rotate(288)'/><circle r='1' fill='%23F5F0E6' stroke='none'/></g></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.article-cta h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.22;
  max-width: 800px;
  margin: 0 auto 40px;
  letter-spacing: 0.002em;
}
.article-cta a.cta {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  padding: 18px 36px;
  padding-left: calc(36px + 0.42em);
  border: 1px solid var(--cream);
  color: var(--cream);
  transition: background 0.4s ease, color 0.4s ease, letter-spacing 0.4s ease;
}
.article-cta a.cta:hover {
  background: var(--cream);
  color: var(--ink);
  letter-spacing: 0.5em;
  padding-left: calc(36px + 0.5em);
}

/* ----------------------------- Footer */
.article-footer {
  padding: 32px 64px;
  background: var(--cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

/* ----------------------------- Mobile */
@media (max-width: 1024px) {
  .article-top { padding: 22px 32px; }
  .article-content { padding: 56px 40px 64px; }
  .related { padding: 56px 40px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .article-cta { padding: 80px 40px; }
  .article-footer { padding: 28px 32px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .article-top {
    padding: 18px 24px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .article-top .back { font-size: 12px; letter-spacing: 0.4em; padding-left: 0.4em; }
  .article-hero { aspect-ratio: 3 / 2; }
  .article-content { padding: 40px 24px 56px; }
  .article-body p { font-size: 17px; }
  .article-body p strong { font-size: 20px; }
  .related { padding: 48px 24px; }
  .related-grid { grid-template-columns: 1fr; gap: 32px; }
  .article-cta { padding: 64px 24px; }
  .article-footer {
    padding: 24px 24px;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .article-top, .related, .article-cta, .article-footer { display: none; }
  .article-content { padding: 0; }
  .article-body p, .article-body h2 { color: #000; }
}
