:root {
  --cream: #faf6ee;
  --cream-dark: #f0e9dc;
  --paper: #fdfbf7;
  --ink: #1a1814;
  --ink-soft: #4a453c;
  --muted: #7a7468;
  --accent: #c41e6b;
  --accent-soft: #f3d9e6;
  --teal: #0d8f7f;
  --border: rgba(26, 24, 20, 0.1);
  --shadow: 0 18px 50px rgba(26, 24, 20, 0.08);
  --radius: 18px;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-ui: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap { width: min(1180px, 92vw); margin: 0 auto; }

.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--ink); }
.logo img {
  height: 72px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(26, 24, 20, 0.12));
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.logo-text strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo-text em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

.mag-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 48px;
  background:
    radial-gradient(circle at 12% 18%, rgba(196, 30, 107, 0.08), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(13, 143, 127, 0.1), transparent 30%),
    linear-gradient(180deg, #fffdf9 0%, var(--paper) 100%);
}
.mag-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 24, 20, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 24, 20, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
  pointer-events: none;
}
.mag-hero-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: floatOrb 12s ease-in-out infinite;
}
.orb-a {
  width: 220px;
  height: 220px;
  background: rgba(196, 30, 107, 0.18);
  top: 8%;
  right: 10%;
}
.orb-b {
  width: 160px;
  height: 160px;
  background: rgba(13, 143, 127, 0.16);
  bottom: 10%;
  left: 6%;
  animation-delay: -4s;
}
.orb-c {
  width: 120px;
  height: 120px;
  background: rgba(240, 180, 41, 0.2);
  top: 42%;
  left: 42%;
  animation-delay: -7s;
}
@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -18px, 0) scale(1.06); }
}

.mag-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}
.mag-kicker {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.mag-kicker-shine {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-soft), #fff8ef, var(--accent-soft));
  background-size: 200% 100%;
  color: var(--accent);
  animation: shine 4s ease-in-out infinite;
}
@keyframes shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.mag-hero-copy h1 {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.mag-hero-excerpt {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 38ch;
}
.mag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(26, 24, 20, 0.14);
}
.mag-btn:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}
.mag-hero-media {
  position: relative;
  display: block;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
}
.mag-hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  animation: heroKenBurns 18s ease-in-out infinite alternate;
}
.mag-hero-placeholder {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--cream-dark), #fff);
}
.mag-hero-frame {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}
@keyframes heroKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.mag-animate-in {
  opacity: 0;
  transform: translateY(24px);
  animation: riseIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mag-animate-delay { animation-delay: 0.15s; }
@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}

.meta {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.mag-layout {
  width: min(1180px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding: 28px 0 56px;
  align-items: stretch;
}
.mag-main { min-width: 0; }
.section { padding: 8px 0 12px; }
.section-head { margin-bottom: 18px; }
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}
.list-meta { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }

.mag-mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.mag-card {
  grid-column: span 4;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 24, 20, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  animation: cardIn 0.7s ease forwards;
  animation-delay: calc(var(--i) * 0.07s);
}
.mag-card:nth-child(1),
.mag-card:nth-child(2) { grid-column: span 6; }
.mag-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.mag-card a { display: block; color: inherit; text-decoration: none; }
.mag-card-media img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--cream-dark);
}
.mag-card:nth-child(1) .mag-card-media img,
.mag-card:nth-child(2) .mag-card-media img { height: 240px; }
.card-copy { padding: 18px 18px 20px; }
.card-copy h3 {
  margin: 8px 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.25;
}
.card-copy p { margin: 0; color: var(--muted); font-size: 0.92rem; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.mag-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar-panel {
  position: sticky;
  top: 118px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: visible;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.sidebar-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}
.sidebar-hint {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}
.search-wrap input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
}
.search-wrap input:focus {
  outline: 2px solid rgba(196, 30, 107, 0.25);
  border-color: rgba(196, 30, 107, 0.45);
}
.search-status {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.sidebar-picks {
  margin-top: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sidebar-picks-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}
.sidebar-picks-list {
  margin-top: 0;
  flex: 1;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding-right: 0;
}
.sidebar-picks-list .archive-item {
  flex: 0 0 auto;
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
}
.sidebar-picks-list .archive-item:hover {
  background: #fff;
  border-color: rgba(196, 30, 107, 0.2);
}
.sidebar-picks-list .archive-item-title {
  line-height: 1.4;
}
.archive-search-results {
  margin-top: 14px;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 4px;
}
.archive-list {
  margin-top: 14px;
  max-height: 68vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 4px;
}
.archive-item {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}
.archive-item:hover {
  background: var(--cream);
  text-decoration: none;
  color: var(--ink);
}
.archive-item-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}
.archive-item-meta {
  display: block;
  margin-top: 3px;
  font-size: 0.74rem;
  color: var(--muted);
}
.archive-empty {
  margin: 0;
  padding: 12px 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.article-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.article-card a { display: block; color: inherit; text-decoration: none; }
.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--cream-dark);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 24px 0 8px;
}
.pagination a.page-link,
.pagination span.page-status {
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.pagination a.page-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.article-page { padding: 40px 0 64px; }
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}
.article-header h1 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.12;
}
.article-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.article-hero { margin: 28px 0; }
.article-hero img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}
.article-body {
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.75;
}
.article-body h2,
.article-body h3 {
  font-family: var(--font-display);
  margin: 1.4em 0 0.6em;
  line-height: 1.3;
}
.article-body p { margin: 0 0 1.15em; }
.article-body img { border-radius: 10px; margin: 1em auto; max-width: 100%; }
.article-embed {
  margin: 1.5em 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 30px rgba(26, 24, 20, 0.12);
}
.article-embed iframe {
  display: block;
  width: 100%;
  border: 0;
}
.article-embed-video {
  aspect-ratio: 16 / 9;
  background: #111;
}
.article-embed-video iframe {
  height: 100%;
  min-height: 220px;
}
.article-embed-audio iframe {
  height: 166px;
  background: #f5f5f5;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--cream);
  padding: 28px 0 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-tagline { margin-top: 6px; font-size: 0.82rem; }

@media (max-width: 980px) {
  .mag-layout { grid-template-columns: 1fr; align-items: start; }
  .mag-sidebar { display: block; }
  .sidebar-panel { position: static; max-height: none; display: block; }
  .sidebar-picks { display: block; }
  .sidebar-panel { height: auto !important; min-height: 0 !important; }
  .sidebar-picks-list {
    justify-content: flex-start;
    gap: 10px;
    overflow: visible;
  }
  .sidebar-picks-list .archive-item {
    flex: none;
    padding: 10px 12px;
  }
  .archive-search-results { max-height: 360px; }
  .mag-hero-inner { grid-template-columns: 1fr; }
  .logo img { height: 58px; }
}

@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .mag-mosaic { grid-template-columns: 1fr; }
  .mag-card,
  .mag-card:nth-child(1),
  .mag-card:nth-child(2) { grid-column: auto; }
  .logo-text em { display: none; }
}

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