/*
Theme Name: MirJournal Editorial
Theme URI: https://mirjournal.com/
Author: MirJournal
Description: A quiet, lightweight editorial theme for an independent swimming journal.
Version: 2.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mirjournal-editorial
*/

:root {
  --ink: #0a1820;
  --ink-soft: #25343a;
  --paper: #f4f0e7;
  --paper-deep: #e8e1d5;
  --white: #fffdf8;
  --brass: #a7834c;
  --brass-light: #c9ae82;
  --sea: #58756f;
  --line: rgba(10, 24, 32, 0.18);
  --muted: #6e756f;
  --serif: Georgia, "Times New Roman", "Noto Serif KR", Batang, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  --container: 1240px;
  --reading: 760px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brass); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  clip: auto !important;
  width: auto;
  height: auto;
  padding: 12px 18px;
  margin: 12px;
  background: var(--white);
  color: var(--ink);
  z-index: 9999;
}

.site-shell { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.site-main { min-height: 65vh; }

.site-header {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 240, 231, 0.96);
}

.header-row {
  min-height: 96px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}

.edition-note,
.header-tools {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.edition-note { color: var(--muted); }
.header-tools { justify-self: end; }

.brand { text-align: center; line-height: 1; }
.brand-mark {
  display: block;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: 0.12em;
}
.brand-sub {
  display: block;
  margin-top: 10px;
  color: var(--brass);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.nav-bar { border-top: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: center; min-height: 54px; }
.primary-nav ul { display: flex; align-items: center; gap: 44px; margin: 0; padding: 0; list-style: none; }
.primary-nav a {
  display: block;
  padding: 17px 2px 15px;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--ink); border-bottom-color: var(--brass); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 1px; margin: 5px auto; background: currentColor; }

.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(440px, 1.14fr);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 88px max(7vw, 48px) 88px max(4vw, 32px);
  background: var(--ink);
  color: var(--paper);
}

.kicker {
  margin: 0 0 30px;
  color: var(--brass-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(52px, 5.6vw, 82px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero h1 span { display: block; white-space: nowrap; }

.hero-lead { max-width: 520px; margin: 34px 0 0; color: #c9d0cf; font-size: 18px; }
.hero-rule { width: 62px; height: 1px; margin: 40px 0 22px; background: var(--brass); }
.hero-signature { margin: 0; color: var(--brass-light); font-family: var(--serif); font-size: 14px; font-style: italic; }

.cover-story {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: #d8d4ca;
}
.cover-story img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.cover-story:hover img { transform: scale(1.025); }
.cover-story::after { content: ""; position: absolute; inset: 32% 0 0; background: linear-gradient(transparent, rgba(6, 15, 19, 0.88)); }
.cover-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 70% 25%, rgba(255,255,255,.18), transparent 30%), linear-gradient(145deg, var(--sea), #182c35 72%);
  color: rgba(255,255,255,.18);
  font-family: var(--serif);
  font-size: min(38vw, 420px);
}
.cover-meta { position: absolute; z-index: 2; right: 52px; bottom: 52px; left: 52px; color: var(--white); }
.cover-meta .kicker { margin-bottom: 14px; }
.cover-meta h2 { max-width: 760px; margin: 0; font-family: var(--serif); font-size: clamp(34px, 4vw, 58px); font-weight: 400; line-height: 1.12; }
.cover-meta p { max-width: 650px; margin: 18px 0 0; color: #e2e5e2; font-size: 15px; }

.section { padding: 110px 0; }
.section--plain { background: var(--white); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 46px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.section-head p { margin: 0 0 8px; color: var(--brass); font-size: 10px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: clamp(38px, 5vw, 64px); font-weight: 400; line-height: 1; }
.section-link { padding-bottom: 5px; border-bottom: 1px solid currentColor; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

.story-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px 28px; }
.story-card { grid-column: span 4; }
.story-card:first-child { grid-column: span 6; }
.story-card:nth-child(2) { grid-column: span 6; }
.story-image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-deep); }
.story-card:first-child .story-image,
.story-card:nth-child(2) .story-image { aspect-ratio: 16 / 10; }
.story-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .6s ease; }
.story-card:hover .story-image img { transform: scale(1.025); filter: saturate(.82); }
.story-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #d7d0c3, #aab9b4); color: rgba(10,24,32,.34); font-family: var(--serif); font-size: 84px; }
.story-meta { display: flex; gap: 12px; align-items: center; margin: 18px 0 10px; color: var(--brass); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.story-meta span + span::before { content: "·"; margin-right: 12px; color: var(--muted); }
.story-card h3 { margin: 0; font-family: var(--serif); font-size: clamp(25px, 2.7vw, 37px); font-weight: 400; line-height: 1.16; }
.story-card p { margin: 13px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.desks { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.desk { min-height: 330px; padding: 42px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .3s ease, color .3s ease; }
.desk:hover { background: var(--ink); color: var(--paper); }
.desk-no { display: block; margin-bottom: 72px; color: var(--brass); font-family: var(--serif); font-size: 16px; font-style: italic; }
.desk h3 { margin: 0; font-family: var(--serif); font-size: 40px; font-weight: 400; }
.desk p { max-width: 300px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.desk:hover p { color: #bfc8c5; }
.desk b { display: block; margin-top: 34px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }

.manifesto { display: grid; grid-template-columns: .7fr 1.3fr; gap: 70px; align-items: start; padding: 110px 0; border-top: 1px solid var(--line); }
.manifesto-label { color: var(--brass); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.manifesto blockquote { margin: 0; font-family: var(--serif); font-size: clamp(32px, 4vw, 56px); font-weight: 400; line-height: 1.18; }
.manifesto p { max-width: 720px; margin: 30px 0 0; color: var(--muted); }

.archive-hero { padding: 100px 0 74px; border-bottom: 1px solid var(--line); }
.archive-hero h1 { max-width: 900px; margin: 0; font-family: var(--serif); font-size: clamp(58px, 8vw, 104px); font-weight: 400; line-height: .95; }
.archive-hero p { max-width: 650px; margin: 28px 0 0; color: var(--muted); }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 28px; padding: 80px 0 110px; }
.archive-note { grid-column: 1 / -1; display: grid; grid-template-columns: .72fr 1.28fr; gap: 64px; padding: 68px; border: 1px solid var(--line); background: var(--white); }
.archive-note-label { color: var(--brass); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.archive-note h2 { max-width: 720px; margin: 0; font-family: var(--serif); font-size: clamp(34px, 4vw, 54px); font-weight: 400; line-height: 1.16; }
.archive-note p { max-width: 680px; margin: 24px 0 0; color: var(--muted); }
.archive-note-topics { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.archive-note-topics span { padding: 8px 12px; border: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; letter-spacing: .04em; }
.archive-note-link { display: inline-block; margin-top: 34px; padding-bottom: 4px; border-bottom: 1px solid currentColor; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pagination-wrap { grid-column: 1 / -1; padding-top: 40px; border-top: 1px solid var(--line); }
.pagination .nav-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 42px; padding: 8px 13px; border: 1px solid var(--line); text-align: center; }
.pagination .current { background: var(--ink); color: var(--paper); }

.article-header { width: min(calc(100% - 48px), 1000px); margin: 0 auto; padding: 100px 0 70px; text-align: center; }
.article-header .kicker { margin-bottom: 24px; color: var(--brass); }
.article-header h1 { margin: 0; font-family: var(--serif); font-size: clamp(48px, 7vw, 88px); font-weight: 400; line-height: 1.04; text-wrap: balance; }
.article-deck { max-width: 760px; margin: 28px auto 0; color: var(--muted); font-family: var(--serif); font-size: 22px; line-height: 1.5; }
.article-byline { margin-top: 30px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.article-hero-image { width: min(calc(100% - 48px), 1280px); margin: 0 auto 72px; }
.article-hero-image img { width: 100%; max-height: 780px; object-fit: cover; }
.article-content { width: min(calc(100% - 48px), var(--reading)); margin: 0 auto; padding-bottom: 110px; font-size: 18px; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2,
.article-content h3 { margin: 2.3em 0 .7em; font-family: var(--serif); font-weight: 400; line-height: 1.25; }
.article-content h2 { font-size: 40px; }
.article-content h3 { font-size: 30px; }
.article-content p { margin: 0 0 1.55em; }
.article-content a { color: var(--sea); border-bottom: 1px solid currentColor; }
.article-content blockquote { margin: 2.5em -70px; padding: 14px 0 14px 36px; border-left: 2px solid var(--brass); color: var(--ink-soft); font-family: var(--serif); font-size: 29px; line-height: 1.5; }
.article-content figure { margin: 2.4em -100px; }
.article-content figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.article-content ul,
.article-content ol { margin-bottom: 1.8em; padding-left: 1.3em; }

.related { padding: 90px 0 110px; background: var(--white); border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.page-wrap { width: min(calc(100% - 48px), 900px); margin: 0 auto; padding: 100px 0 120px; }
.page-wrap h1 { margin: 0 0 56px; font-family: var(--serif); font-size: clamp(52px, 8vw, 92px); font-weight: 400; line-height: 1; }
.about-lead { max-width: 780px; margin: -20px 0 76px; color: var(--ink-soft); font-family: var(--serif); font-size: clamp(25px, 3vw, 38px); line-height: 1.5; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.about-item { min-height: 260px; padding: 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-item span { color: var(--brass); font-family: var(--serif); font-style: italic; }
.about-item h2 { margin: 54px 0 14px; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.about-item p { margin: 0; color: var(--muted); font-size: 14px; }

.journal-empty { padding: 58px; border: 1px solid var(--line); background: var(--paper); }
.journal-empty p { max-width: 700px; margin: 0; color: var(--muted); font-family: var(--serif); font-size: clamp(24px, 3vw, 38px); line-height: 1.45; }

.pool-map-page { background: #f6f2e9; }
.pool-map-page .site-header,
.pool-map-page .site-footer { display: none; }
.pool-map-frame { display: block; width: 100%; height: 100vh; border: 0; }

.empty-state { padding: 120px 0; text-align: center; }
.empty-state h1 { margin: 0; font-family: var(--serif); font-size: 64px; font-weight: 400; }
.empty-state p { color: var(--muted); }

.site-footer { padding: 76px 0 42px; background: var(--ink); color: var(--paper); }
.footer-main { display: grid; grid-template-columns: 1.3fr .7fr; gap: 80px; padding-bottom: 62px; }
.footer-brand { font-family: var(--serif); font-size: 40px; letter-spacing: .08em; }
.footer-note { max-width: 560px; margin: 18px 0 0; color: #aeb9b6; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; align-content: start; }
.footer-links a { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.16); font-size: 12px; letter-spacing: .08em; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.16); color: #82908e; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 980px) {
  .header-row { grid-template-columns: 1fr auto; }
  .edition-note { display: none; }
  .brand { text-align: left; }
  .brand-sub { display: none; }
  .nav-toggle { display: block; justify-self: end; }
  .header-tools { display: none; }
  .nav-bar { position: fixed; inset: 96px 0 0; display: none; background: var(--paper); }
  .nav-open .nav-bar { display: block; }
  .nav-inner { align-items: start; justify-content: start; padding: 44px 24px; }
  .primary-nav ul { width: 100%; display: block; }
  .primary-nav li { border-bottom: 1px solid var(--line); }
  .primary-nav a { padding: 20px 0; font-family: var(--serif); font-size: 32px; font-weight: 400; letter-spacing: 0; text-transform: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: 560px; }
  .cover-story { min-height: 610px; }
  .story-card,
  .story-card:first-child,
  .story-card:nth-child(2) { grid-column: span 6; }
  .desks { grid-template-columns: 1fr; }
  .desk { min-height: 250px; }
  .desk-no { margin-bottom: 42px; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-note { grid-template-columns: 1fr; gap: 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .manifesto { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-shell { width: min(calc(100% - 32px), var(--container)); }
  .header-row { min-height: 78px; }
  .nav-bar { top: 78px; }
  .brand-mark { font-size: 24px; }
  .hero-copy { min-height: 500px; padding: 68px 24px; }
  .hero h1 { font-size: clamp(39px, 11.2vw, 58px); }
  .hero-lead { font-size: 16px; }
  .cover-story { min-height: 520px; }
  .cover-meta { right: 24px; bottom: 30px; left: 24px; }
  .cover-meta h2 { font-size: 34px; }
  .section { padding: 78px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .story-grid { display: block; }
  .story-card { margin-bottom: 52px; }
  .story-card:last-child { margin-bottom: 0; }
  .story-card h3 { font-size: 30px; }
  .desks { display: block; border-top: 0; }
  .desk { min-height: 260px; }
  .manifesto { padding: 76px 0; }
  .archive-hero { padding: 70px 0 52px; }
  .archive-grid { display: block; padding: 58px 0 80px; }
  .archive-grid .story-card { margin-bottom: 48px; }
  .archive-note { display: block; padding: 34px 24px; }
  .archive-note-label { display: block; margin-bottom: 24px; }
  .article-header { width: min(calc(100% - 32px), 1000px); padding: 70px 0 50px; }
  .article-header h1 { font-size: 46px; }
  .article-deck { font-size: 19px; }
  .article-hero-image { width: 100%; margin-bottom: 52px; }
  .article-content { width: min(calc(100% - 32px), var(--reading)); font-size: 17px; }
  .article-content h2 { font-size: 34px; }
  .article-content blockquote,
  .article-content figure { margin-right: 0; margin-left: 0; }
  .related-grid { display: block; }
  .footer-main { grid-template-columns: 1fr; gap: 44px; }
  .footer-links { grid-template-columns: 1fr; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: 8px; }
}
