/* =========================================================
   Redwan Rahat — Journal (blog list + posts)
   Standalone and light: no intro, no heavy scripts.
   ========================================================= */
:root {
  --bg: #f7f9ff; --card: #fff; --ink: #070b1f; --ink-2: #26304f; --ink-dim: #4f5878; --muted: #8b93b3;
  --line: rgba(7, 11, 31, 0.09); --line-strong: rgba(7, 11, 31, 0.18);
  --blue: #2f6bff; --blue-2: #1a3dff; --cyan: #5fd4ff; --ice: #cfe4ff;
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
em { font-style: normal; color: var(--blue-2); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---- nav: the shared navbar lives in nav.css; it is fixed, so leave room above the page */
body.blog #main { padding-top: 76px; }

/* ---- list page */
.bhead { width: min(1100px, calc(100% - 2 * var(--gutter))); margin: clamp(48px, 9vw, 110px) auto clamp(28px, 5vw, 56px); }
.eyebrow { color: var(--blue); }
.bhead__title { margin: 12px 0 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(40px, 8.5vw, 112px); line-height: 0.92; letter-spacing: -0.055em; text-transform: uppercase; }
.bhead__lede { max-width: 56ch; margin: 22px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-dim); }
.plist { width: min(1100px, calc(100% - 2 * var(--gutter))); margin: 0 auto clamp(64px, 10vw, 120px); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.empty { grid-column: 1 / -1; padding: 48px 32px; border: 1px dashed var(--line-strong); border-radius: 22px; text-align: center; }
.empty .mono { color: var(--blue); }
.empty p { color: var(--ink-dim); margin: 10px 0 0; }

/* ---- post card (also used on the homepage) */
.pcard { position: relative; border-radius: 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s; }
.pcard:hover { transform: translateY(-4px); border-color: rgba(47, 107, 255, 0.35); box-shadow: 0 24px 60px -28px rgba(26, 61, 255, 0.45); }
.pcard__link { display: flex; flex-direction: column; height: 100%; padding: 24px; text-decoration: none; }
.pcard__cover { margin: -24px -24px 20px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ice); }
.pcard__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.pcard:hover .pcard__cover img { transform: scale(1.04); }
.pcard__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); }
.pcard__draft { color: #b45309; }
.pcard__title { margin: 14px 0 0; font-family: var(--f-display); font-weight: 700; font-size: 21px; line-height: 1.18; letter-spacing: -0.03em; }
.pcard__desc { margin: 10px 0 0; color: var(--ink-dim); font-size: 15px; line-height: 1.55; }
.pcard__foot { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag { padding: 5px 9px; border-radius: 999px; background: rgba(47, 107, 255, 0.08); color: var(--blue-2); font-size: 10px; }
.pcard__go { margin-left: auto; font-weight: 600; font-size: 14px; color: var(--blue-2); transition: transform 0.3s var(--ease); }
.pcard:hover .pcard__go { transform: translateX(4px); }

/* ---- post */
.post { width: min(1100px, calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.post__head { max-width: 820px; margin: clamp(40px, 8vw, 96px) auto 0; }
.post__back { display: inline-block; color: var(--blue); text-decoration: none; margin-bottom: 26px; }
.post__back:hover { text-decoration: underline; }
.post__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); }
.post__title { margin: 16px 0 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(32px, 5.6vw, 64px); line-height: 1.02; letter-spacing: -0.05em; }
.post__lede { margin: 20px 0 0; font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: var(--ink-2); }
.post__by { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.post__by img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--ice); }
.post__by span { display: grid; line-height: 1.3; }
.post__by small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.post__cover { margin: 36px 0 0; border-radius: 22px; overflow: hidden; }
.post__grid { display: grid; grid-template-columns: 200px minmax(0, 720px); justify-content: center; gap: 56px; margin-top: clamp(36px, 6vw, 64px); }
.post__toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.post__toc .mono { color: var(--blue); }
.post__toc ol { list-style: none; margin: 14px 0 0; padding: 0; border-left: 1px solid var(--line-strong); }
.post__toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-dim); text-decoration: none; line-height: 1.35; }
.post__toc a:hover { color: var(--ink); border-left-color: var(--blue); }
@media (max-width: 900px) { .post__grid { grid-template-columns: minmax(0, 1fr); gap: 0; } .post__toc, .post__grid > span:first-child { display: none; } }

/* ---- article body */
.prose { min-width: 0; color: var(--ink-2); }
.prose > * + * { margin-top: 1.15em; }
.prose p, .prose li { font-size: clamp(17px, 1.3vw, 18.5px); }
.prose h2, .prose h3, .prose h4 { position: relative; color: var(--ink); font-family: var(--f-display); letter-spacing: -0.035em; line-height: 1.15; scroll-margin-top: 96px; }
.prose h2 { margin-top: 2.2em; font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
.prose h3 { margin-top: 1.8em; font-size: clamp(19px, 2.2vw, 23px); font-weight: 600; }
.prose h4 { margin-top: 1.6em; font-size: 18px; font-weight: 600; }
.prose .anchor { position: absolute; left: -0.9em; color: var(--blue); text-decoration: none; opacity: 0; transition: opacity 0.2s; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 0.6; }
.prose a { color: var(--blue-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--blue); }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 18px 22px; border-left: 3px solid var(--blue); border-radius: 0 16px 16px 0; background: rgba(47, 107, 255, 0.06); color: var(--ink); }
.prose blockquote > :first-child { margin-top: 0; }
.prose :not(pre) > code { padding: 0.15em 0.4em; border-radius: 6px; background: rgba(7, 11, 31, 0.06); font-family: var(--f-mono); font-size: 0.88em; color: var(--ink); }
.prose pre { position: relative; overflow-x: auto; padding: 22px; border-radius: 16px; background: #0b1024; color: #dbe2ff; font-family: var(--f-mono); font-size: 14px; line-height: 1.6; }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 12px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #6c78b0; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figure img, .prose > p img { border-radius: 16px; }
.prose figcaption { margin-top: 10px; text-align: center; font-size: 14px; color: var(--muted); }
.prose hr { border: 0; height: 1px; background: var(--line-strong); margin: 2.4em 0; }
.prose .table { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }

/* ---- post footer */
.post__foot { max-width: 720px; margin: 56px auto clamp(64px, 10vw, 110px); }
.post__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post__share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); }
.post__share a { color: var(--ink); text-decoration: none; }
.post__share a:hover { color: var(--blue); }
.post__cta { margin-top: 32px; padding: clamp(24px, 4vw, 36px); border-radius: 24px; background: linear-gradient(135deg, var(--blue-2), #0c1a9e); color: #fff; }
.post__cta p { margin: 0 0 18px; font-family: var(--f-display); font-weight: 700; font-size: clamp(20px, 2.6vw, 28px); letter-spacing: -0.03em; line-height: 1.15; }
.btn { display: inline-flex; align-items: center; height: 46px; padding: 0 20px; margin: 4px 8px 0 0; border-radius: 999px; background: #fff; color: var(--blue-2); font-weight: 600; font-size: 15px; text-decoration: none; transition: transform 0.3s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn--wa { background: #25d366; color: #fff; }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.post__nav a { display: grid; gap: 6px; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 600; line-height: 1.3; transition: border-color 0.3s; }
.post__nav a:hover { border-color: var(--blue); }
.post__nav .mono { color: var(--blue); font-weight: 500; }
.post__nav .is-older { text-align: right; }
@media (max-width: 560px) { .post__nav { grid-template-columns: 1fr; } .post__nav .is-older { text-align: left; } }

/* ---- footer */
.bfoot { padding: clamp(40px, 7vw, 72px) var(--gutter) 28px; background: var(--ink); color: #fff; }
.bfoot__cta { display: grid; gap: 14px; max-width: 1100px; margin: 0 auto; }
.bfoot__cta .mono { color: var(--cyan); }
.bfoot__cta a { font-family: var(--f-display); font-weight: 800; font-size: clamp(28px, 5.4vw, 64px); line-height: 1; letter-spacing: -0.05em; text-transform: uppercase; text-decoration: none; }
.bfoot__cta em { color: var(--cyan); }
.bfoot__row { display: flex; flex-wrap: wrap; gap: 10px 24px; max-width: 1100px; margin: 40px auto 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.55); }
.bfoot__row a { text-decoration: none; }
.bfoot__row a:hover { color: #fff; }
.bfoot__row span { margin-right: auto; }

/* ---- breadcrumbs, answer block, buttons */
.crumbs { width: min(1100px, calc(100% - 2 * var(--gutter))); margin: 28px auto 0; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--blue); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.answer { margin: 22px 0 0; padding: 20px 22px; border-radius: 18px; background: #fff; border: 1px solid rgba(47, 107, 255, 0.25); box-shadow: 0 18px 40px -30px rgba(26, 61, 255, 0.5); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--ink); }
.answer a { color: var(--blue-2); }
.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); }
.bhead .btn--ghost, .nf .btn--ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; background: var(--blue-2); color: #fff; margin: 0; }
.nf__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.nf .btn { background: var(--blue-2); color: #fff; }
.nf .btn--ghost { background: transparent; color: var(--ink); }
.nf .btn--wa { background: #25d366; }
.facts { margin-top: 26px; }
.facts table { width: 100%; border-collapse: collapse; font-size: 15px; }
.facts th, .facts td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.facts th { width: 130px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }
.facts a { color: var(--blue-2); }

/* ---- work index */
.wlist { width: min(1100px, calc(100% - 2 * var(--gutter))); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); gap: 16px; }
.wcard { border-radius: 22px; overflow: hidden; background: var(--card); border: 1px solid var(--line); transition: border-color 0.3s, box-shadow 0.45s var(--ease); }
.wcard:hover { border-color: rgba(47, 107, 255, 0.35); box-shadow: 0 24px 60px -28px rgba(26, 61, 255, 0.45); }
.wcard__media { display: block; aspect-ratio: 2 / 1; overflow: hidden; background: var(--ice); }
.wcard__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.8s var(--ease); }
.wcard:hover .wcard__media img { transform: scale(1.03); }
.wcard__body { padding: 22px 24px 24px; }
.wcard__body .mono { color: var(--blue); }
.wcard__title { margin: 10px 0 0; font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: -0.03em; }
.wcard__body p { margin: 8px 0 0; color: var(--ink-dim); font-size: 15px; }
.wcard__links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }
.wcard__live { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.wcard__live:hover { color: var(--blue); }

/* ---- footer columns */
.bfoot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: 1100px; margin: 40px auto 0; }
.bfoot__cols > div { display: grid; gap: 8px; align-content: start; }
.bfoot__cols .mono { color: rgba(255, 255, 255, 0.45); margin-bottom: 4px; }
.bfoot__cols a { color: rgba(255, 255, 255, 0.85); text-decoration: none; width: fit-content; }
.bfoot__cols a:hover { color: var(--cyan); }
.bfoot__cols p { margin: 0; color: rgba(255, 255, 255, 0.7); }
@media (max-width: 640px) { .bfoot__cols { grid-template-columns: 1fr 1fr; } .bfoot__cols > div:last-child { grid-column: 1 / -1; } }
