/* ============================================================
   Notes from an AE — Shared Stylesheet
   notesfromae.com
   ============================================================ */

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

/* ── DESIGN TOKENS ── */
:root {
  /* Backgrounds */
  --bg:           #ffffff;
  --bg-soft:      #f7f5f0;
  --bg-nav:       #faf8f4;

  /* Text */
  --ink:          #1a1a18;
  --ink-muted:    #6b6860;
  --ink-faint:    #b0ada8;

  /* Rules / borders */
  --rule:         #ebe8e2;
  --rule-mid:     #d6d2cb;
  --rule-strong:  #cac6be;

  /* Category: Deal Reviews */
  --peach:        #fde8d8;
  --peach-text:   #7a3a18;
  --peach-accent: #c46a42;

  /* Category: Methodology */
  --lavender:     #e4deff;
  --lav-text:     #3a2a8a;
  --lav-accent:   #6b5fc7;

  /* Category: Leadership */
  --mint:         #d4f0e4;
  --mint-text:    #0f5c38;
  --mint-accent:  #2a9d6e;

  /* Category: Cheat Sheet */
  --sky:          #daeeff;
  --sky-text:     #0d3d5c;

  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-body:    'Sora', system-ui, sans-serif;

  /* Radii */
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    12px;
  --radius-xl:    20px;
  --radius-pill:  999px;

  /* Layout */
  --col-left:     264px;
  --col-right:    264px;
  --col-max:      1200px;
  --col-content:  680px;  /* max-width for single-column post content */
  --nav-h:        52px;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg-soft);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── GRAPH PAPER CANVAS ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, #c8c4bc 1px, transparent 1px),
    linear-gradient(to bottom, #c8c4bc 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}

/* ── TOPBAR / NAV ── */
.topbar {
  background: var(--bg-nav);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.1px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.btn-subscribe {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--bg-nav);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-subscribe:hover { opacity: 0.8; }

/* ── HAMBURGER (mobile only) ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: var(--nav-h);
  right: -24px;
  background: var(--bg-soft);
  border: 1px solid var(--rule-mid);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  min-width: 200px;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 12px 20px;
  border-bottom: 1px solid var(--rule);
  display: block;
  transition: color 0.1s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--ink); }

/* ── THREE-COLUMN LAYOUT (homepage) ── */
.layout {
  max-width: var(--col-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--col-left) minmax(0, 1fr) var(--col-right);
  align-items: start;
  position: relative;
  z-index: 1;
}

/* ── LEFT SIDEBAR ── */
.sidebar-left {
  padding: 28px 16px 28px 24px;
  border-right: 1px solid var(--rule-strong);
  min-height: calc(100vh - var(--nav-h));
  background: linear-gradient(to right, transparent 0%, rgba(250,248,244,0.5) 55%, rgba(250,248,244,0.75) 100%);
  position: sticky;
  top: var(--nav-h);
}

.sb-section { margin-bottom: 20px; }

.sb-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
  padding-left: 0;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1.3;
  text-decoration: none;
  margin-bottom: 2px;
  transition: background 0.1s;
}
.sb-link:hover { background: rgba(26,26,24,0.05); }
.sb-link.active { font-weight: 500; background: rgba(26,26,24,0.07); }
.sb-link.plain { padding-left: 0; }

.cat-swatch { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

.sb-divider { border: none; border-top: 1px solid var(--rule-mid); margin: 14px 0; }

/* ── MAIN FEED ── */
.feed {
  background: var(--bg);
  border-left: 1px solid var(--rule-strong);
  border-right: 1px solid var(--rule-strong);
  min-height: calc(100vh - var(--nav-h));
}

/* ── RIGHT SIDEBAR ── */
.sidebar-right {
  padding: 28px 0 28px 24px;
  border-left: 1px solid var(--rule-strong);
  background: linear-gradient(to left, transparent 0%, rgba(250,248,244,0.5) 55%, rgba(250,248,244,0.75) 100%);
  position: sticky;
  top: var(--nav-h);
}

/* ── SIDEBAR CARDS (right panel) ── */
.r-card {
  background: var(--bg);
  border: 1px solid var(--rule-mid);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.r-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.r-head {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin: 0 0 5px;
}

.r-sub {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0 0 13px;
}

.r-input {
  width: 100%;
  border: 1px solid var(--rule-mid);
  border-radius: 7px;
  padding: 9px 11px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--ink-faint);
  margin-bottom: 8px;
  background: var(--bg-soft);
  outline: none;
  transition: border-color 0.15s;
}
.r-input:focus { border-color: var(--ink-faint); color: var(--ink); }

.r-btn {
  width: 100%;
  background: var(--ink);
  color: var(--bg-nav);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 0;
  font-size: 12px;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  display: block;
  transition: opacity 0.15s;
}
.r-btn:hover { opacity: 0.8; }

.r-note { font-size: 10px; color: var(--ink-faint); text-align: center; margin-top: 7px; }

/* ── CHEAT SHEET CARD ── */
.cheat-card {
  background: var(--sky-text);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.cheat-ey {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(218,238,255,0.5);
  margin-bottom: 7px;
}

.cheat-h {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sky);
  margin: 0 0 11px;
  line-height: 1.35;
}

.cheat-pill {
  display: inline-block;
  background: rgba(218,238,255,0.1);
  color: var(--sky);
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(218,238,255,0.18);
  margin: 2px 2px 2px 0;
  text-decoration: none;
  transition: background 0.12s;
}
.cheat-pill:hover { background: rgba(218,238,255,0.2); }

/* ── CATEGORY PILLS (used across post headers, feed rows, cheat sheet) ── */
.cat-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}
.cat-pill.deal   { background: var(--peach);    color: var(--peach-text); }
.cat-pill.method { background: var(--lavender);  color: var(--lav-text); }
.cat-pill.leader { background: var(--mint);      color: var(--mint-text); }
.cat-pill.cheat  { background: var(--sky);       color: var(--sky-text); }

/* ── POST BYLINE PILL ── */
.post-byline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  padding: 5px 12px 5px 5px;
  border-radius: var(--radius-pill);
}

.post-byline-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--bg-nav);
  font-weight: 500;
  flex-shrink: 0;
}
.post-byline-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-byline-text { font-size: 12px; color: var(--ink-muted); }
.post-byline-text strong { font-weight: 500; color: var(--ink); }

/* ── AUDIO PLAYER ── */
.audio-player {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  padding: 7px 16px 7px 7px;
  margin: 1.5rem 0;
}

.play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}
.play-btn:hover { opacity: 0.75; }

.play-icon {
  width: 0; height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #fff;
  margin-left: 2px;
}
.pause-icon { display: none; gap: 2px; }
.pause-icon span { display: block; width: 2px; height: 8px; background: #fff; border-radius: 2px; }
.playing .play-icon { display: none; }
.playing .pause-icon { display: flex; }

.player-right { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.player-label { font-size: 10px; color: var(--ink-muted); font-weight: 500; }
.progress-row { display: flex; align-items: center; gap: 6px; }
.progress-bar { flex: 1; height: 3px; background: var(--rule); border-radius: 2px; cursor: pointer; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--ink); border-radius: 2px; transition: width 0.1s linear; }
.time-display { font-size: 10px; color: var(--ink-faint); min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }

/* ── SHARE / ACTION BUTTONS ── */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.action-btn:hover { border-color: var(--ink-faint); color: var(--ink); }
.action-btn svg { width: 12px; height: 12px; }
.action-btn.copied { background: var(--mint); border-color: var(--mint); color: var(--mint-text); }

/* ── SUBSCRIBE MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg);
  border: 0.5px solid var(--rule);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  position: relative;
}

.modal-header {
  background: var(--sky);
  padding: 24px 28px 20px;
  position: relative;
  overflow: hidden;
}
.modal-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #0d3d5c22 1px, transparent 1px);
  background-size: 16px 16px;
}
.modal-header-content { position: relative; z-index: 1; }

.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  font-size: 14px; color: var(--sky-text);
  cursor: pointer; padding: 4px 8px;
  border-radius: 6px; z-index: 2; opacity: 0.7;
}
.modal-close:hover { opacity: 1; }

.modal-pill {
  display: inline-block;
  background: var(--sky-text);
  color: var(--sky);
  font-size: 10px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.modal-headline {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 500;
  color: var(--sky-text); margin: 0;
}

.modal-body { padding: 20px 28px 28px; }

.modal-sub {
  font-size: 13.5px; color: var(--ink-muted);
  line-height: 1.65; margin: 0 0 18px;
}

.modal-form { display: flex; gap: 8px; margin-bottom: 10px; }

.modal-input {
  flex: 1; padding: 9px 13px;
  border: 1px solid var(--rule-mid);
  border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 13px;
  background: var(--bg-soft); color: var(--ink); outline: none;
}
.modal-input:focus { border-color: var(--ink-faint); }

.modal-btn {
  background: var(--ink); color: var(--bg-nav);
  border: none; border-radius: var(--radius-pill);
  padding: 9px 18px; font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: opacity 0.15s;
}
.modal-btn:hover { opacity: 0.8; }

.modal-disclaimer { font-size: 11.5px; color: var(--ink-faint); text-align: center; }

.modal-success { display: none; text-align: center; padding: 32px 28px; }
.modal-success-head { font-size: 22px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.modal-success-sub { font-size: 14px; color: var(--ink-muted); }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--rule-strong);
  background: var(--bg-nav);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-faint);
}

.footer-logo {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 12px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.footer-disclaimer {
  font-size: 11px;
  color: var(--ink-faint);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar-left, .sidebar-right { display: none; }
  .layout { grid-template-columns: 1fr; }
  .feed { border-left: none; border-right: none; }
  .hamburger { display: flex; }
}

@media (max-width: 520px) {
  .topbar-inner { padding: 0 16px; }
  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
  .footer-right { align-items: center; }
}
