/* ==========================================================================
   SIDELINE WITH SARAH — Modern Theme
   ========================================================================== */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #e5e7eb;
  --brand: #0b1d3a;
  --accent: #3bb6ff;
  --accent-2: #c5ff41;
  --danger: #e11d48;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
  --shadow-sm: 0 2px 10px rgba(2, 6, 23, 0.06);
  --space: clamp(12px, 2vw, 20px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: min(1100px, 92vw);
  margin: 0 auto;
  padding: var(--space);
}


/* Collapse Nav on smaller screen */
@media (max-width: 1024px) {
  .wrap {
    max-width: min(1100px, 92vw);
    margin: 0 auto;
    padding: var(--space);
    flex-wrap: wrap;
  }
}


/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--brand);
  text-decoration: none;
  font-size: 1.15rem;
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #1f3b6e);
}

.brand-badge span {
  color: #fff;
  font-family: Oswald, Impact, sans-serif;
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav a:hover {
  color: var(--brand);
}

/* Collapse Nav on smaller screen */
@media (max-width: 1024px) {
  .nav {
    gap: 0;
  }
  .brand {
  padding-bottom: .5rem;
}
}


/* ==========================================================================
   GRID + CARDS
   ========================================================================== */

.home-hero {
  font-family: Oswald, Impact, sans-serif;
  letter-spacing: 0.3px;
  margin: 1rem 0 1.25rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.card h3 {
  margin: 10px 0 6px 0;
  font-family: Oswald, Impact, sans-serif;
  font-size: 1.05rem;
}

.excerpt {
  color: var(--muted);
  font-size: 0.96rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #0b1d3a, #132a57);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}




/* Tags index grid */
.tag-grid{
  list-style:none;
  margin: 12px 0 24px;
  padding:0;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:12px;
}
.tag-chip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  background:linear-gradient(180deg,#0b1d3a,#132a57);
  color:#fff;
  text-decoration:none;
  box-shadow:var(--shadow-sm);
}
.tag-chip .name{ font-weight:700; letter-spacing:.2px }
.tag-chip .count{
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.25);
  border-radius:999px;
  padding:2px 8px;
  font-size:.8rem;
}
.tag-chip:hover{ transform:translateY(-1px); box-shadow:var(--shadow) }




.pager{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin:24px 0;
  color:var(--muted);
}
.pager .button{ padding:.55rem .9rem; }



/* ==========================================================================
   BUTTONS
   ========================================================================== */

.button {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(2, 6, 23, 0.08);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button.secondary {
  --btn-bg: #f1f5f9;
  --btn-fg: var(--text);
}

.button.danger {
  --btn-bg: var(--danger);
}

/* ==========================================================================
   NEWSLETTER
   ========================================================================== */

.newsletter {
  margin: 40px 0;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.newsletter h2 {
  margin: 0 0 10px 0;
  font-family: Oswald, Impact, sans-serif;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.newsletter-form input[type="email"]:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.newsletter-form button {
  all: unset;
}

.newsletter .consent {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 6px 2px 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}



.footer-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.social-links a:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.social-links i {
  width: 18px;
  height: 18px;
}



/* ==========================================================================
   ARTICLE LAYOUT — Centered Text & Right Ad Gutter
   ========================================================================== */

.prose-centered {
  position: relative;
  /*padding-right: 280px; /* right gutter for ads */
}

.prose-centered h1 {
  font-family: Oswald, Impact, sans-serif;
  text-align: center;
  margin: 0 0 0.25rem;
}

.prose-centered .meta {
  color: var(--muted);
  text-align: center;
  margin-bottom: 1rem;
}

.prose-centered .content {
  max-width: 760px;
  margin: 0 auto;
}

.prose-centered .content :is(p, h2, h3, h4, blockquote, figcaption) {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.prose-centered .content :is(ul, ol) {
  display: inline-block;
  text-align: left;
  margin: 0.75rem auto;
  padding-left: 1.2rem;
}

/* modern media & images */
.media-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 20px;
}

.modern-media,
.post .content img {
  border-radius: 18px;
  border: 1px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--accent), var(--brand)) border-box;
  box-shadow: var(--shadow);
  margin: 14px auto;
}

.post .content p:has(> img) {
  display: flex;
  justify-content: center;
}

/* Blockquotes & code */
.post .content blockquote {
  margin: 1rem auto;
  padding: 1rem;
  border-left: 4px solid var(--brand);
  background: #f8fafc;
  border-radius: 12px;
  max-width: 720px;
}

.post .content pre {
  max-width: 760px;
  margin: 1rem auto;
  padding: 1rem;
  background: #0b1220;
  color: #e2e8f0;
  border-radius: 14px;
  overflow: auto;
}


/* Markdown figures */
.md-figure {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 16px auto;
  max-width: 760px;
}

.md-figure img.modern-media {
  border-radius: 18px;
  border: 1px solid transparent;
  background:
    linear-gradient(#fff,#fff) padding-box,
    linear-gradient(135deg, var(--accent), var(--brand)) border-box;
  box-shadow: var(--shadow);
}

.md-figure figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  max-width: 70ch;
}

/* ==========================================================================
   AD SLOT PLACEHOLDER
   ========================================================================== */

.ad-slot-placeholder {
  
  top: 20px;
  right: 10px;
  width: 240px;
  height: 600px;
  background: repeating-linear-gradient(
    45deg,
    #f1f5f9,
    #f1f5f9 10px,
    #e2e8f0 10px,
    #e2e8f0 20px
  );
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  line-height: 600px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

/* Hide ad slot on smaller screens */
@media (max-width: 1024px) {
  .prose-centered {
    padding-right: 0;
  }
  .ad-slot-placeholder {
    display: none;
  }
}



/* Top-of-article ad (non-sticky) */
.ad-slot-top {
  grid-column: 1 / -1;         /* span full grid width */
  display: flex;
  justify-content: center;
  margin: 8px 0 16px;
}

/* Visual placeholder box (replace with real ad later) */
.ad-box {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(
    45deg,
    #f8fafc,
    #f8fafc 10px,
    #e5e7eb 10px,
    #e5e7eb 20px
  );
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

/* Default desktop: 970x90 leaderboard */
.ad-box.leaderboard { width: 970px; height: 90px; }

/* Large laptop: 728x90 */
@media (max-width: 1200px) {
  .ad-box.leaderboard { width: 728px; height: 90px; }
}

/* Tablet/phone: 320x100 (or 320x50 if you prefer) */
@media (max-width: 768px) {
  .ad-box.leaderboard { width: 320px; height: 100px; }
}

/* Hide the top ad entirely on very small screens (optional) */
@media (max-width: 380px) {
  .ad-slot-top { display: none; }
}


/* ==========================================================================
   ACCESSIBILITY & MOTION
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* Two-column post layout with right gutter for ads */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 260px; /* content + ad */
  gap: 24px;
  justify-content: center; /* centers the 2-col block */
  align-items: start;
}

/* The ad column */
.ad-slot {
  position: sticky;  /* stays visible while scrolling */
  top: 80px;         /* offset below sticky header */
}

/* Visual placeholder */
.ad-slot-placeholder {
  width: 240px;
  height: 600px;
  background: repeating-linear-gradient(
    45deg,
    #f1f5f9,
    #f1f5f9 10px,
    #e2e8f0 10px,
    #e2e8f0 20px
  );
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  line-height: 600px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  margin-top: 8px;
}

/* Collapse to single column on smaller screens */
@media (max-width: 1024px) {
  .post-layout { display: block; }
  .ad-slot { display: none; }
}

