/* ============================================================
   JOLIE HUANG — ELLIPSUS-INSPIRED
   Dark charcoal · Warm off-white · Instrument Serif · Inter
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

/* --- Variables --- */
:root {
  --dark:        #18181f;
  --dark-card:   #22222c;
  --offwhite:    #f0efe8;
  --offwhite-2:  #e8e7df;
  --white:       #ffffff;
  --ink:         #18181f;
  --on-dark:     #f0efe8;
  --on-dark-dim: rgba(240, 239, 232, 0.5);
  --on-light:    #2a2a34;
  --on-light-dim:#7a7a72;
  --font-d:      'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-b:      'Inter', system-ui, -apple-system, sans-serif;
  --max-w:       1160px;
  --col-w:       680px;
  --r-pill:      100px;
}

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

/* --- Global scale: 1rem = 16.8px (16px × 1.05) so all rem values increase 5% --- */
html { font-size: 16.8px; }

/* --- Font size audit (all non-header sizes bumped for readability) ---
   html base: 16.8px · nav logo: 1.05rem · nav links: 1rem
   dropdown items: 0.95rem · section labels/tags/eyebrow: 0.875rem
   hero sub: 1.05rem · body/mag-body: 1.05rem · btn: 1rem
   blog header p: 1.05rem · post/essay dates: 0.875rem
   post excerpt: 1rem · post read/essay read: 0.9rem
   post meta: 0.9rem · article p/li: 1.125rem
   blockquote: 1.3rem · pullquote: 1.5rem
   post-nav: 0.9rem · footer brand: 0.95rem · footer copy: 0.88rem
   footer links: 0.9rem · caret: 13px (above 12px minimum)         --- */

body {
  font-family: var(--font-b) !important;
  color: var(--ink) !important;
  background: var(--dark) !important;
  margin: 0 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.mag-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  padding: 0;
  transition: background 0.3s;
}

/* Scrolled state — filled by JS */
.mag-nav.scrolled {
  background: var(--dark);
}

.mag-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.mag-nav-logo {
  font-family: var(--font-b) !important;
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--on-dark) !important;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mag-nav-logo img {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.9;
  filter: invert(1);
}

.mag-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mag-nav-links li { position: relative; }

.mag-nav-links a {
  font-family: var(--font-b) !important;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--on-dark-dim) !important;
  text-decoration: none !important;
  padding: 7px 14px;
  min-height: 44px;
  border-radius: var(--r-pill);
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  position: relative;
}

.mag-nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 250ms ease;
}

.mag-nav-links a:hover {
  color: var(--on-dark) !important;
}

.mag-nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.mag-nav-links a.active {
  color: var(--on-dark) !important;
}

.mag-nav-links a.active::after {
  transform: scaleX(1);
}

/* Contact CTA in nav */

/* Dropdown */
.mag-dropdown { position: relative; }
.mag-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-card);
  border: 1px solid rgba(240,239,232,0.1);
  border-radius: 12px;
  min-width: 280px;
  z-index: 999;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  overflow: hidden;
}
.mag-dropdown:hover .mag-dropdown-menu,
.mag-dropdown:focus-within .mag-dropdown-menu { display: block; }
.mag-dropdown-menu a {
  display: block !important;
  padding: 10px 16px !important;
  font-size: 0.95rem !important;
  color: var(--on-dark-dim) !important;
  border-radius: 8px !important;
  border-bottom: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}
.mag-dropdown-menu a:hover {
  background: rgba(240,239,232,0.08) !important;
  color: var(--on-dark) !important;
}
.mag-dropdown-caret { margin-left: 3px; font-size: 13px; opacity: 0.6; }

/* Mobile toggle */
.mag-nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(240,239,232,0.2);
  color: var(--on-dark);
  padding: 6px 12px;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .mag-nav-inner { padding: 0 20px; }
  .mag-nav-toggle { display: block; }
  .mag-nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--dark);
    border-bottom: 1px solid rgba(240,239,232,0.08);
    padding: 16px 20px 24px;
    gap: 2px;
  }
  .mag-nav-links.open { display: flex; }
  .mag-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 1px solid rgba(240,239,232,0.1);
    padding: 4px 0 4px 12px;
    margin: 4px 0;
    background: transparent;
    border-radius: 0;
  }
}

/* Hide old Mobirise nav */
section[id^="dropdown-menu"] { display: none !important; }

/* ============================================================
   HERO — FULL-WIDTH DARK (About page)
   ============================================================ */

.mag-hero {
  background: var(--dark);
  min-height: 100svh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 40px 60px;
  position: relative;
  overflow: hidden;
}

.mag-hero-network {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 55%;
  max-width: 700px;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}

/* Subtle noise texture overlay */
.mag-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

.mag-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.mag-hero-eyebrow {
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: var(--on-dark-dim);
  margin-bottom: 20px;
}

.mag-hero-headline {
  font-family: var(--font-d) !important;
  font-style: italic;
  font-weight: 400 !important;
  font-size: clamp(2.8rem, 5.5vw, 5.5rem) !important;
  line-height: 1.15 !important;
  color: var(--on-dark) !important;
  margin: 0 0 24px 0 !important;
  letter-spacing: 0.03em;
  max-width: 900px;
}

.mag-hero-sub {
  font-family: var(--font-b);
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--on-dark-dim);
  line-height: 1.53;
  max-width: 420px;
  margin-bottom: 28px;
}

.mag-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 36px;
}

.mag-tag {
  font-family: var(--font-b);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-dim);
  background: transparent;
  border: none;
  padding: 0;
}

.mag-tag + .mag-tag::before {
  content: '|';
  margin: 0 10px;
  opacity: 0.4;
}

@media (max-width: 768px) {
  .mag-hero { padding: 100px 20px 60px; min-height: auto; }
  .mag-hero-headline { font-size: clamp(2.2rem, 9vw, 3.5rem) !important; }
}

/* ============================================================
   SECTIONS — ALTERNATING DARK / OFF-WHITE
   ============================================================ */

.mag-section {
  padding: clamp(64px, 9vw, 120px) clamp(20px, 5vw, 40px);
}

.mag-section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Off-white (light) section */
.mag-section.light {
  background: var(--offwhite);
  color: var(--on-light);
}

/* White section */
.mag-section.white {
  background: var(--white);
  color: var(--on-light);
}

/* Dark section */
.mag-section.dark {
  background: var(--dark);
  color: var(--on-dark);
}

/* Keep old class names working */
.mag-section.cream { background: var(--offwhite); color: var(--on-light); }
.mag-section.ink   { background: var(--dark);     color: var(--on-dark);  }
.mag-section.rust  { background: var(--dark-card); color: var(--on-dark); }

/* Section label — subtle, not uppercase-heavy */
.mag-section-label {
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--on-light-dim);
  margin-bottom: 20px;
  display: block;
}
.mag-section.dark .mag-section-label,
.mag-section.ink .mag-section-label { color: var(--on-dark-dim); }

/* Section title — italic Instrument Serif, elegant */
.mag-section-title {
  font-family: var(--font-d) !important;
  font-style: italic;
  font-weight: 400 !important;
  font-size: clamp(2rem, 4.5vw, 3.8rem) !important;
  line-height: 1.15 !important;
  color: var(--on-light) !important;
  margin: 0 0 36px 0 !important;
  letter-spacing: 0.03em;
}
.mag-section.dark .mag-section-title,
.mag-section.ink .mag-section-title  { color: var(--on-dark) !important; }
.mag-section.rust .mag-section-title { color: var(--on-dark) !important; }

/* Company wordmarks */
.mag-wordmarks {
  margin-top: 40px;
}

.mag-wordmarks-label {
  display: block;
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-light-dim, #888);
  margin-bottom: 20px;
}

.mag-wordmarks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  align-items: center;
  max-width: 480px;
}
@media (max-width: 768px) {
  .mag-wordmarks-list { gap: 24px 36px; }
}

.mag-wordmarks-list img {
  width: 110px;
  height: auto;
  object-fit: contain;
  opacity: 0.4;
  filter: grayscale(1);
  transition: opacity 0.2s, filter 0.2s;
}

.mag-wordmarks-list img:hover {
  opacity: 1;
  filter: grayscale(0);
}

/* Body text */
.mag-body {
  font-family: var(--font-b);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.62;
  color: var(--on-light-dim);
  max-width: var(--col-w);
}
.mag-section.dark .mag-body,
.mag-section.ink  .mag-body { color: var(--on-dark-dim); }

.mag-body p { margin: 0 0 1.3em 0; }
.mag-body p:last-child { margin-bottom: 0; }
.mag-body strong { color: var(--on-light); font-weight: 500; }
.mag-section.dark .mag-body strong { color: var(--on-dark); }

/* ============================================================
   EXPERTISE CARDS
   ============================================================ */

.mag-expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(240,239,232,0.08);
  margin-top: 48px;
  border-radius: 12px;
  overflow: hidden;
}
@media (max-width: 900px) {
  .mag-expertise-grid { grid-template-columns: 1fr; }
}

.mag-expertise-card {
  background: var(--dark-card);
  padding: 36px 32px;
  transition: background 0.25s;
}
.mag-expertise-card:hover { background: #2a2a36; }

.mag-expertise-card h3 {
  font-family: var(--font-d) !important;
  font-style: normal;
  font-weight: 400 !important;
  font-size: 1.8rem !important;
  color: var(--on-dark) !important;
  margin: 0 0 14px 0 !important;
  line-height: 1.15;
  letter-spacing: 0.03em;
}

.mag-expertise-card p {
  font-size: 1rem !important;
  font-weight: 300;
  line-height: 1.58;
  color: var(--on-dark-dim) !important;
  margin: 0 !important;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.mag-btn {
  display: inline-block;
  font-family: var(--font-b) !important;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  padding: 12px 28px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(240,239,232,0.25);
  color: var(--on-dark) !important;
  background: rgba(240,239,232,0.08);
  transition: all 0.2s;
  cursor: pointer;
}
.mag-btn:hover {
  background: rgba(240,239,232,0.15);
  border-color: rgba(240,239,232,0.4);
  text-decoration: none !important;
}

/* Primary button (on dark) */
.mag-btn.sig,
.mag-btn.primary {
  background: var(--on-dark);
  border-color: var(--on-dark);
  color: var(--dark) !important;
}
.mag-btn.sig:hover,
.mag-btn.primary:hover {
  background: rgba(240,239,232,0.85);
}

/* On light backgrounds */
.mag-btn.on-light {
  border-color: rgba(24,24,31,0.2);
  color: var(--on-light) !important;
  background: transparent;
}
.mag-btn.on-light:hover {
  background: var(--on-light);
  color: var(--white) !important;
}

/* White outline (on dark) */
.mag-btn.white-outline {
  border-color: rgba(240,239,232,0.25);
  color: var(--on-dark-dim) !important;
  background: transparent;
}
.mag-btn.white-outline:hover {
  border-color: rgba(240,239,232,0.5);
  color: var(--on-dark) !important;
}

/* ============================================================
   BLOG INDEX
   ============================================================ */

.mag-blog-header {
  background: var(--dark);
  padding: 140px 40px 80px;
}
.mag-blog-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.mag-blog-header .mag-section-label { color: var(--on-dark-dim); }
.mag-blog-header h1 {
  font-family: var(--font-d) !important;
  font-style: italic;
  font-weight: 400 !important;
  font-size: clamp(3.2rem, 8vw, 7.5rem) !important;
  line-height: 1.02 !important;
  color: var(--on-dark) !important;
  margin: 0 0 20px 0 !important;
  letter-spacing: 0.03em;
}
.mag-blog-header p {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--on-dark-dim);
  max-width: 480px;
  margin: 0;
  line-height: 1.58;
}

@media (max-width: 768px) {
  .mag-blog-header { padding: 110px 20px 60px; }
}

/* Post grid */
.mag-post-grid {
  background: var(--offwhite);
  padding: clamp(48px, 6vw, 80px) clamp(20px, 5vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 100%;
}

.mag-post-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none !important;
  color: inherit !important;
  border: 1px solid rgba(24,24,31,0.06);
}
.mag-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(24,24,31,0.1);
}

.mag-post-date {
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--on-light-dim);
  margin-bottom: 14px;
}

.mag-post-title {
  font-family: var(--font-d) !important;
  font-style: normal;
  font-weight: 400 !important;
  font-size: 1.8rem !important;
  line-height: 1.15 !important;
  color: var(--on-light) !important;
  margin: 0 0 14px 0 !important;
  letter-spacing: 0.03em;
  flex: 1;
}

.mag-post-excerpt {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.53;
  color: var(--on-light-dim);
  margin: 0 0 24px 0;
}

.mag-post-read {
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--on-light-dim);
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  transition: color 0.2s;
}
.mag-post-read::after { content: '→'; transition: transform 0.2s; }
.mag-post-card:hover .mag-post-read { color: var(--on-light); }
.mag-post-card:hover .mag-post-read::after { transform: translateX(3px); }

/* ============================================================
   FEED LAYOUT — Think index (year-grouped vertical feed)
   ============================================================ */

.mag-feed {
  background: var(--offwhite);
  padding: clamp(48px, 6vw, 80px) 40px clamp(80px, 10vw, 140px);
}
.mag-feed-inner {
  max-width: 780px;
  margin: 0 auto;
}

/* Year marker — giant faded numeral with hairline */
.mag-year-marker {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 56px;
  margin-bottom: 8px;
}
.mag-year-marker:first-child { padding-top: 0; }
.mag-year-marker span {
  font-family: var(--font-d);
  font-style: italic;
  font-size: 3.8rem;
  color: rgba(42,42,52,0.07);
  line-height: 1;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.mag-year-marker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(42,42,52,0.07);
}

/* Article entry row */
.mag-feed-entry {
  display: flex;
  align-items: baseline;
  gap: 16px;
  text-decoration: none !important;
  color: inherit !important;
  padding: 24px 0;
  border-bottom: 1px solid rgba(42,42,52,0.06);
  transition: background 0.2s;
  position: relative;
}
.mag-feed-entry:hover {
  background: rgba(42,42,52,0.02);
}
.mag-feed-entry:last-child {
  border-bottom: none;
}

.mag-feed-entry-body {
  flex: 1;
  min-width: 0;
}

.mag-feed-entry-title {
  font-family: var(--font-d) !important;
  font-weight: 400 !important;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem) !important;
  line-height: 1.2 !important;
  color: var(--on-light) !important;
  margin: 0 0 10px 0 !important;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.mag-feed-entry:hover .mag-feed-entry-title {
  color: var(--ink) !important;
}

.mag-feed-entry-excerpt {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--on-light-dim);
  margin: 0 0 14px 0;
  max-width: 620px;
}

.mag-feed-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(122,122,114,0.7);
  letter-spacing: 0.01em;
}
.mag-feed-entry-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(122,122,114,0.35);
}

/* Arrow slides in on hover */
.mag-feed-entry-arrow {
  font-size: 1.05rem;
  color: var(--on-light-dim);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s, transform 0.25s;
  flex-shrink: 0;
  align-self: center;
}
.mag-feed-entry:hover .mag-feed-entry-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Entrance animation for feed entries */
.mag-feed-entry.will-animate {
  transform: translateY(16px);
}

@media (max-width: 768px) {
  .mag-feed { padding: 40px 20px 80px; }
  .mag-feed-entry { padding: 20px 0; }
  .mag-feed-entry-arrow { display: none; }
  .mag-year-marker { padding-top: 40px; }
  .mag-year-marker span { font-size: 2.8rem; }
}

/* ============================================================
   ESSAY CAROUSEL — About page (CSS-only, scroll-snap)
   ============================================================ */

.essay-carousel {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

.essay-carousel__viewport {
  display: flex;
  overflow-x: scroll;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.essay-carousel__viewport::-webkit-scrollbar { display: none; }

.essay-carousel__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  padding: 0 52px;
}

/* Snapper: scroll-snap target only */
.essay-carousel__snapper {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  scroll-snap-align: start;
  pointer-events: none;
  z-index: 0;
}

/* Prev/next arrow buttons — visual + click target are the same element */
.essay-carousel__prev,
.essay-carousel__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(240,239,232,0.08);
  border: 1px solid rgba(240,239,232,0.18);
  background-size: 11px 11px;
  background-repeat: no-repeat;
  background-position: center;
  font-size: 0;
  z-index: 10;
  cursor: pointer;
  transition: background 0.2s;
}
.essay-carousel__prev:hover,
.essay-carousel__next:hover {
  background: rgba(240,239,232,0.18);
}
.essay-carousel__prev {
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,50 75,100 75,0' fill='%23f0efe8'/%3E%3C/svg%3E");
}
.essay-carousel__next {
  right: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='100,50 25,100 25,0' fill='%23f0efe8'/%3E%3C/svg%3E");
}

/* Dot navigation */
.essay-carousel__nav {
  margin-top: 20px;
  text-align: center;
  list-style: none;
}
.essay-carousel__nav-list {
  display: inline-flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.essay-carousel__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  font-size: 0;
  text-decoration: none;
}
.essay-carousel__dot::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(240,239,232,0.45);
  transition: background 0.2s, transform 0.2s;
}
.essay-carousel__dot:hover::before {
  background: rgba(240,239,232,0.8);
  transform: scale(1.2);
}
.essay-carousel__dot[aria-current="true"]::before {
  background: var(--on-dark);
}

/* 2-up pair layout inside each slide */
.essay-carousel__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-radius: 12px;
}
@media (max-width: 600px) {
  .essay-carousel__pair { grid-template-columns: 1fr; }
}

/* Individual essay card (dark-themed tile) */
.essay-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  min-height: 180px;
  background: var(--dark-card);
  text-decoration: none !important;
  color: inherit !important;
  border-radius: 12px;
  transition: background 0.2s;
}
.essay-card:hover { background: #2a2a36; }

.essay-card__date {
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--on-dark-dim);
  margin-bottom: 14px;
}
.essay-card__title {
  font-family: var(--font-d);
  font-style: normal;
  font-size: 1.8rem;
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--on-dark);
  margin-bottom: 20px;
  flex: 1;
}
.essay-card__read {
  font-size: 0.9rem;
  color: var(--on-dark-dim);
  font-family: var(--font-b);
}
.essay-card--cta {
  justify-content: center;
  align-items: center;
  background: rgba(240,239,232,0.04);
  border: 1px solid rgba(240,239,232,0.1);
}
.essay-card--cta .essay-card__title {
  font-family: var(--font-b) !important;
  font-style: normal !important;
  font-size: 1rem !important;
  color: var(--on-dark-dim) !important;
  margin-bottom: 0 !important;
  flex: 0;
  letter-spacing: 0.02em;
}
.essay-card--cta:hover { background: rgba(240,239,232,0.08); }

/* ============================================================
   BLOG POST PAGE
   ============================================================ */

.mag-post-header {
  background: var(--dark);
  padding: 130px 40px 72px;
}
.mag-post-header-inner {
  max-width: var(--col-w);
  margin: 0 auto;
}
.mag-post-header .mag-section-label { color: var(--on-dark-dim); margin-bottom: 24px; }
.mag-post-header h1 {
  font-family: var(--font-d) !important;
  font-style: italic;
  font-weight: 400 !important;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem) !important;
  line-height: 1.15 !important;
  color: var(--on-dark) !important;
  margin: 0 0 24px 0 !important;
  letter-spacing: 0.03em;
}
.mag-post-header .mag-post-meta {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--on-dark-dim);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .mag-post-header { padding: 100px 20px 56px; }
}

/* Article body */
body:has(.mag-article) {
  background: var(--offwhite) !important;
}

.mag-article {
  max-width: var(--col-w);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 40px);
  background: var(--offwhite);
}

.mag-article p {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--on-light);
  margin: 0 0 1.6em 0;
}

.mag-article h2 {
  font-family: var(--font-d) !important;
  font-style: italic;
  font-weight: 400 !important;
  font-size: clamp(1.5rem, 3vw, 2rem) !important;
  color: var(--on-light) !important;
  margin: 2.8em 0 0.8em 0 !important;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.mag-article h3 {
  font-family: var(--font-d) !important;
  font-style: italic;
  font-weight: 400 !important;
  font-size: 1.2rem !important;
  color: var(--on-light) !important;
  margin: 2em 0 0.6em 0 !important;
}

.mag-article strong { color: var(--on-light); font-weight: 500; }
.mag-article em { font-style: italic; color: var(--on-light); }

.mag-article ul, .mag-article ol {
  padding-left: 1.4em;
  margin: 0 0 1.6em 0;
}
.mag-article li {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--on-light);
  margin-bottom: 0.5em;
}

.mag-article blockquote {
  border-left: 2px solid rgba(24,24,31,0.2);
  margin: 2.5em 0;
  padding: 4px 28px;
  font-family: var(--font-d);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--on-light);
  line-height: 1.55;
}

/* Article figures / images */
.mag-article figure {
  margin: 2.5em 0;
  padding: 0;
}
.mag-article figure img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}
.mag-article figure figcaption {
  font-family: var(--font-b);
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--on-light-dim);
  margin-top: 10px;
  line-height: 1.5;
}
.mag-article figure figcaption a {
  color: var(--on-light-dim) !important;
  text-decoration: underline !important;
}

.mag-post-nav {
  border-top: 1px solid rgba(24,24,31,0.1);
  margin-top: 56px;
  padding-top: 36px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.mag-post-nav a {
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--on-light-dim) !important;
  text-decoration: none !important;
  transition: color 0.2s;
}
.mag-post-nav a:hover { color: var(--on-light) !important; }

/* ============================================================
   TWO COLUMN LAYOUT
   ============================================================ */

.mag-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 768px) {
  .mag-two-col { grid-template-columns: 1fr; gap: 36px; }
}

/* ============================================================
   FOOTER
   ============================================================ */

.mag-footer {
  background: var(--dark);
  border-top: 1px solid rgba(240,239,232,0.07);
  padding: 44px clamp(20px, 5vw, 40px);
}
.mag-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.mag-footer-brand {
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--on-dark);
}
.mag-footer-copy {
  font-family: var(--font-b);
  font-size: 0.88rem;
  color: var(--on-dark-dim);
}
.mag-footer-links { display: flex; gap: 4px; flex-wrap: wrap; }
.mag-footer-links a {
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--on-dark-dim) !important;
  text-decoration: none !important;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  transition: color 0.2s, background 0.2s;
}
.mag-footer-links a:hover {
  color: var(--on-dark) !important;
}

/* Hide old Mobirise footer */
footer[id^="footer"] { display: none !important; }

/* ============================================================
   HIDE OLD MOBIRISE NAV & CRUFT
   ============================================================ */

.engine { display: none !important; }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */

#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--on-dark);
  z-index: 1001;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ============================================================
   SCROLL ENTRANCE ANIMATIONS
   ============================================================ */

.will-animate {
  opacity: 0;
  transform: translateY(28px);
}

.did-animate {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Cards get a slightly smaller vertical travel */
.mag-post-card.will-animate,
.essay-card.will-animate,
.mag-expertise-card.will-animate {
  transform: translateY(20px);
}

/* ============================================================
   UPGRADED CARD HOVER
   ============================================================ */

.mag-post-card {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.mag-post-card:hover {
  transform: translateY(-4px) scale(1.01) !important;
  box-shadow: 0 20px 48px rgba(24,24,31,0.14) !important;
}
.mag-post-card:hover .mag-post-title {
  color: var(--on-light) !important;
  transition: color 0.25s ease;
}

.essay-card {
  transition: background 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* ============================================================
   ANIMATED LINK UNDERLINES (article body + post nav + footer)
   ============================================================ */

.mag-article a,
.mag-post-nav a,
.mag-footer-links a {
  position: relative;
  text-decoration: none !important;
}

.mag-article a::after,
.mag-post-nav a::after,
.mag-footer-links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 250ms ease;
}

.mag-article a:hover::after,
.mag-post-nav a:hover::after,
.mag-footer-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* ============================================================
   UTILITIES
   ============================================================ */

/* Hero headline constrain */
.mag-hero-headline--narrow { max-width: 750px; }

/* Connect section narrow */
.mag-connect-inner { max-width: 640px; }

/* Flex row for CTAs */
.mag-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Writing section header layout */
.mag-writing-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}
.mag-writing-header .mag-section-title { margin-bottom: 0 !important; }

/* Divider */
.mag-divider {
  width: 40px;
  height: 1px;
  background: rgba(240,239,232,0.2);
  margin: 24px 0;
}
.mag-section.light .mag-divider { background: rgba(24,24,31,0.15); }

/* Accent strip — now very subtle */
.mag-accent-strip {
  height: 1px;
  background: rgba(240,239,232,0.08);
  width: 100%;
}

/* Pull quote */
.mag-pullquote {
  margin: 2.5em 0;
  padding: 28px 0;
  border-top: 1px solid rgba(24,24,31,0.12);
  border-bottom: 1px solid rgba(24,24,31,0.12);
  font-family: var(--font-d);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--on-light);
  line-height: 1.45;
}

/* ============================================================
   FOCUS STYLES — WCAG AA keyboard navigation
   ============================================================ */

/* Base: suppress default only where we provide a custom style */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 3px; border-radius: 3px; }

/* Nav links — pill-shaped ring */
.mag-nav-links a:focus-visible,
.mag-nav-links .nav-cta a:focus-visible {
  outline: 2px solid var(--on-dark);
  outline-offset: 2px;
  border-radius: var(--r-pill);
}

/* Mobile nav toggle */
.mag-nav-toggle:focus-visible {
  outline: 2px solid var(--on-dark);
  outline-offset: 3px;
}

/* Buttons */
.mag-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: var(--r-pill);
}

/* Carousel arrows */
.essay-carousel__prev:focus-visible,
.essay-carousel__next:focus-visible {
  outline: 2px solid var(--on-dark);
  outline-offset: 3px;
  border-radius: 50%;
}

/* Carousel dots */
.essay-carousel__dot:focus-visible {
  outline: 2px solid var(--on-dark);
  outline-offset: 3px;
  border-radius: 50%;
}

/* Essay and post cards */
.essay-card:focus-visible,
.mag-post-card:focus-visible {
  outline: 2px solid var(--on-dark);
  outline-offset: 3px;
  border-radius: 12px;
}

/* Light-section focus rings use dark color */
.mag-section.light .mag-btn:focus-visible,
.mag-section.white .mag-btn:focus-visible,
.mag-post-grid .mag-post-card:focus-visible,
.mag-post-nav a:focus-visible,
.mag-footer-links a:focus-visible {
  outline-color: var(--on-light);
}

/* Article links */
.mag-article a:focus-visible {
  outline: 2px solid var(--on-light);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================================
   REDUCED MOTION — respect user preference
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  /* Disable entrance animations entirely */
  .will-animate {
    opacity: 1 !important;
    transform: none !important;
  }
  .did-animate {
    transition: none !important;
  }

  /* Shorten all transitions and animations to near-instant */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Disable smooth scroll on carousel */
  .essay-carousel__viewport {
    scroll-behavior: auto;
  }
}
