/* Articulate Blog — matched to sagarshabbir.com "Warm Graphite" */
:root {
  --bg: #141312;
  --surface: #1e1c1a;
  --elevated: #262421;
  --card: #1e1c1a;
  --card-hover: #262421;
  --border: #2a2826;
  --border-strong: #3d3a36;
  --text: #ece6dd;
  --body: #c4bfb8;
  --muted: #807a72;
  --faint: #5e5952;
  --accent: #c9a86c;
  --accent-hover: #d4b87e;
  --accent-soft: rgba(201, 168, 108, 0.12);
  --accent-line: rgba(201, 168, 108, 0.30);
  --accent-glow: rgba(201, 168, 108, 0.16);
  --maxw: 720px;
  --maxw-wide: 1060px;
  --radius: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-display: var(--font-sans);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 19px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0 0 auto 0; height: 720px;
  background: radial-gradient(70% 100% at 50% -16%, var(--accent-glow), rgba(201, 168, 108, 0) 66%);
  pointer-events: none; z-index: 0;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
::selection { background-color: var(--accent); color: var(--bg); }

.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  z-index: 100; transition: transform 0.1s linear;
}
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px clamp(18px, 5vw, 40px);
  background: rgba(20, 19, 18, 0.72);
  backdrop-filter: saturate(150%) blur(16px); -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.brand:hover { color: var(--accent); }
.back { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.back:hover { color: var(--text); }

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 1; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 6vw, 28px); }
.container-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 clamp(20px, 6vw, 28px); }

.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

/* ---------- index hero ---------- */
.index-hero { padding: clamp(56px, 9vw, 108px) 0 clamp(30px, 5vw, 48px); text-align: center; }
.index-hero h1 { font-family: var(--font-display); font-size: clamp(42px, 7.6vw, 76px); line-height: 1.03; letter-spacing: -0.035em; font-weight: 800; color: var(--text); margin: 20px 0 22px; }
.index-hero .lede { color: var(--muted); font-size: clamp(18px, 2.4vw, 22px); max-width: 640px; margin: 0 auto; }

/* ---------- post cards ---------- */
.posts { padding: clamp(48px, 8vw, 96px) 0 90px; display: grid; gap: 26px; }
@media (min-width: 780px) { .posts { grid-template-columns: 1fr 1fr; } }
.card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease; }
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--card-hover); box-shadow: 0 30px 60px -34px rgba(0,0,0,0.7); }
.card .thumb { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--border); background: #000; position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.5s cubic-bezier(0.2,0.7,0.2,1); }
.card:hover .thumb img { transform: scale(1.045); }
.card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20,19,18,0.5)); pointer-events: none; }
.card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card .tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 4px 11px; border-radius: 999px; }
.card h2 { margin: 0; font-family: var(--font-display); font-size: 26px; line-height: 1.16; letter-spacing: -0.02em; font-weight: 700; }
.card h2 a { color: var(--text); }
.card h2 a::after { content: " \2192"; color: var(--accent); opacity: 0; margin-left: 2px; transition: opacity 0.2s ease, margin-left 0.2s ease; }
.card:hover h2 a::after { opacity: 1; margin-left: 6px; }
.card h2 a:hover { color: var(--accent); }
.card .dek { color: var(--muted); font-size: 16px; line-height: 1.55; margin: 0; }
.card .meta { margin-top: auto; padding-top: 10px; color: var(--faint); font-size: 13.5px; }
@media (min-width: 820px) {
  .card.featured { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
  .card.featured .thumb { width: 60%; aspect-ratio: auto; border-bottom: none; border-right: 1px solid var(--border); }
  .card.featured .body { width: 40%; justify-content: center; padding: 36px 38px; gap: 15px; }
  .card.featured h2 { font-size: 32px; }
  .card.featured .dek { font-size: 17px; }
}

/* ---------- article cover ---------- */
.cover { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 118px) 0 clamp(30px, 5vw, 54px); border-bottom: 1px solid var(--border); background: radial-gradient(78% 130% at 50% -18%, var(--accent-glow), transparent 58%); }
.cover::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: 0.04; mix-blend-mode: overlay; pointer-events: none; }
.cover > .container { position: relative; z-index: 1; }
.cover h1 { font-family: var(--font-display); font-size: clamp(40px, 6.6vw, 66px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; color: var(--text); margin: 16px 0 22px; }
.cover .dek { color: var(--muted); font-size: clamp(19px, 2.4vw, 24px); line-height: 1.5; margin: 0 0 28px; max-width: 640px; }
.byline { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 15px; flex-wrap: wrap; }
.byline .who { color: var(--text); font-weight: 600; }
.byline .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 36px 0 12px; }
.stat { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 20px; }
.stat .num { display: block; font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; color: var(--accent); line-height: 1.02; letter-spacing: -0.02em; }
.stat .lbl { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.4; }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; } .stat { padding: 16px 18px; } }

/* ---------- prose ---------- */
.prose { padding-bottom: 30px; }
.prose p { margin: 0 0 22px; }
.prose > p:first-of-type::first-letter { float: left; font-family: var(--font-display); font-size: 3.4em; line-height: 0.72; font-weight: 800; color: var(--accent); padding: 10px 12px 0 0; }
.prose h2 { font-family: var(--font-display); font-size: clamp(24px, 3.3vw, 32px); line-height: 1.2; letter-spacing: -0.025em; font-weight: 700; color: var(--text); margin: 54px 0 18px; }
.prose h2::before { content: ""; display: block; width: 46px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), rgba(201,168,108,0)); margin-bottom: 18px; }
.prose strong { color: var(--text); font-weight: 700; }
.prose em { color: #ded7cc; }
.prose ul { margin: 6px 0 24px; padding: 0; list-style: none; }
.prose li { position: relative; padding: 14px 0 14px 28px; margin: 0; border-top: 1px solid var(--border); }
.prose li:last-child { border-bottom: 1px solid var(--border); }
.prose li::before { content: ""; position: absolute; left: 2px; top: 23px; width: 9px; height: 9px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.prose li strong { display: block; margin-bottom: 2px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; color: var(--accent-hover); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 2px 7px; border-radius: 6px; white-space: normal; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* pull quote */
.pullquote { position: relative; margin: 50px auto; padding: 10px 8px 10px 34px; max-width: 640px; border-left: 3px solid var(--accent); font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 32px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 700; color: var(--text); }
.pullquote::before { content: "\201C"; position: absolute; left: 12px; top: -6px; font-family: Georgia, serif; font-size: 90px; line-height: 1; color: var(--accent-line); z-index: -1; }

/* callout */
.callout { margin: 40px 0; padding: 24px 26px; border-radius: 16px; border: 1px solid var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), rgba(201,168,108,0.02)); font-size: 18px; line-height: 1.6; color: var(--text); }
.callout .k { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

/* ---------- figures ---------- */
figure { margin: 42px 0; }
figure.wide, figure.phone { position: relative; padding: clamp(18px, 3.2vw, 40px); border-radius: 24px; background: radial-gradient(130% 120% at 50% 0%, var(--accent-soft), rgba(255,255,255,0.015) 42%, transparent 72%); }
figure.wide { width: min(92vw, var(--maxw-wide)); margin-left: calc((100% - min(92vw, var(--maxw-wide))) / 2); }
.frame { position: relative; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--border-strong); box-shadow: 0 44px 90px -42px rgba(0,0,0,0.9), 0 12px 34px -14px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03); transition: transform 0.35s cubic-bezier(0.2,0.7,0.2,1), box-shadow 0.35s ease; }
figure:hover .frame { transform: translateY(-5px); box-shadow: 0 56px 110px -40px rgba(0,0,0,0.9), 0 16px 44px -16px rgba(0,0,0,0.7), 0 0 0 1px var(--accent-line); }
.frame.glow { box-shadow: 0 46px 110px -34px rgba(201,168,108,0.24), 0 20px 60px -30px rgba(0,0,0,0.88), 0 0 0 1px var(--accent-line); }
figure:hover .frame.glow { box-shadow: 0 56px 130px -30px rgba(201,168,108,0.34), 0 20px 60px -30px rgba(0,0,0,0.88), 0 0 0 1px rgba(201,168,108,0.4); }
.frame img { width: 100%; position: relative; z-index: 1; }
figure.wide .frame { padding-top: 38px; }
figure.wide .frame::before { content: "articulatespeech.io"; position: absolute; top: 0; left: 0; right: 0; height: 38px; z-index: 3; display: flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: 0.02em; color: #8a827a; background: radial-gradient(circle at 20px 19px, #ff5f57 4.5px, transparent 5.5px), radial-gradient(circle at 40px 19px, #febc2e 4.5px, transparent 5.5px), radial-gradient(circle at 60px 19px, #28c840 4.5px, transparent 5.5px), #201e1c; background-repeat: no-repeat; border-bottom: 1px solid rgba(255,255,255,0.06); }
figure.phone { display: flex; justify-content: center; }
figure.phone .frame { max-width: 300px; border-radius: 30px; padding: 8px; background: #0c0c0e; border-color: rgba(255,255,255,0.16); }
figure.phone .frame img { border-radius: 22px; }
figcaption { margin: 16px auto 0; color: var(--faint); font-size: 14.5px; text-align: center; font-style: italic; max-width: 620px; }

/* CTA */
.cta { margin: 62px 0 10px; padding: 40px clamp(24px, 5vw, 44px); border: 1px solid var(--accent-line); border-radius: 20px; text-align: center; background: linear-gradient(180deg, var(--accent-soft), rgba(201,168,108,0.02)); }
.cta h3 { font-family: var(--font-display); margin: 0 0 8px; font-size: 28px; letter-spacing: -0.02em; font-weight: 700; color: var(--text); }
.cta p { color: var(--muted); margin: 0 0 22px; }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border-radius: 999px; background: var(--accent); color: var(--bg) !important; font-weight: 700; font-size: 16px; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.btn:hover { transform: translateY(-2px); background: var(--accent-hover); box-shadow: 0 16px 40px -14px rgba(201,168,108,0.5); }
.btn.accent { background: var(--accent); color: var(--bg) !important; }
.btn.accent:hover { background: var(--accent-hover); }

.postnav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 52px 0 10px; padding-top: 26px; border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
.postnav a { font-weight: 600; }

.footer { border-top: 1px solid var(--border); margin-top: 80px; padding: 40px 0 64px; color: var(--faint); font-size: 14.5px; }
.footer .container-wide { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

@media (max-width: 560px) {
  body { font-size: 18px; }
  figure.wide, figure.phone { padding: 12px; border-radius: 18px; }
  .prose > p:first-of-type::first-letter { font-size: 3.1em; }
}
