/* Blog: index and post pages. Builds on the same tokens as product.css. */
:root {
  --bg: #0b1020;
  --bg-2: #0e1528;
  --panel: #121a2e;
  --panel-2: #172038;
  --line: rgba(255,255,255,.09);
  --text: #e8ecf6;
  --muted: #9aa5c0;
  --blue: #1e3a8a;
  --blue-2: #2545a8;
  --blue-3: #4c74e8;
  --sky: #38bdf8;
  --gold: #e8b04b;
  --gold-2: #f3c97a;
  --red: #ff5d7c;
  --display: "Red Hat Display", system-ui, sans-serif;
  --body: "Red Hat Text", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --honey: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }

/* Bilingual content: both languages ship in the page, CSS shows one. */
html[lang="tr"] [data-l="en"], html:not([lang="tr"]) [data-l="tr"] { display: none !important; }

/* ---------- Nav (same as the rest of the site) ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11,16,32,.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, transform .6s var(--honey);
}
.nav.scrolled { border-color: var(--line); }
.nav.hidden { transform: translateY(-100%); }
.wordmark { font: 600 .95rem var(--display); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.nav-right { display: flex; align-items: center; gap: 1.6rem; }
.nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav ul a { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--text); }
.lang {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .7rem .35rem .4rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text);
  font: 600 .78rem var(--display); letter-spacing: .06em; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.lang:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); }
.lang svg { width: 22px; height: 15px; border-radius: 3px; display: block; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.lang .flag-tr { display: none; }
html[lang="tr"] .lang .flag-tr { display: block; }
html[lang="tr"] .lang .flag-gb { display: none; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.2rem; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.4); background: transparent; cursor: pointer;
  font: 600 .88rem var(--display); text-decoration: none; color: #fff;
  transition: background .25s, border-color .25s;
}
.pill:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.pill.solid { background: #fff; color: var(--bg); border-color: #fff; }
.pill.solid:hover { background: #dfe6ff; }
.pill svg { width: 1em; height: 1em; flex: none; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font: 700 .7rem var(--display); letter-spacing: .1em; text-transform: uppercase;
  padding: .26rem .65rem; border-radius: 999px;
  color: var(--gold-2); background: rgba(232,176,75,.1); border: 1px solid rgba(232,176,75,.32);
}
.tag[data-cat="ai"] { color: #9fdcfb; background: rgba(56,189,248,.1); border-color: rgba(56,189,248,.32); }
.meta { color: var(--muted); font-size: .85rem; display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.meta i { display: inline-block; vertical-align: middle; width: 3px; height: 3px; margin: 0 .5rem; border-radius: 50%; background: currentColor; opacity: .6; }
.meta > i { margin: 0; }

/* ---------- Cover art (generated SVG) ---------- */
.cover { position: relative; overflow: hidden; border-radius: 16px; background: #0a1124; aspect-ratio: 16 / 9; border: 1px solid var(--line); }
.cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Blog index ---------- */
.b-hero { padding: clamp(6.5rem, 14vh, 8.5rem) 0 clamp(2rem, 4vw, 3rem); position: relative; overflow: hidden; }
.b-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 320px at 12% 0%, rgba(76,116,232,.22), transparent 65%),
    radial-gradient(500px 300px at 92% 30%, rgba(232,176,75,.09), transparent 65%);
}
.b-hero .wrap { position: relative; }
.eyebrow { font: 700 .75rem var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--blue-3); }
.b-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; letter-spacing: -.03em; margin-top: .6rem; }
.b-hero h1 span { color: var(--gold); }
.b-hero p { color: var(--muted); max-width: 38rem; margin: .9rem 0 0; font-size: 1.05rem; }
.b-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.8rem; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.filters button {
  font: 600 .85rem var(--display); color: var(--muted); cursor: pointer;
  padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  transition: color .2s, background .2s, border-color .2s;
}
.filters button:hover { color: var(--text); }
.filters button[aria-pressed="true"] { color: var(--bg); background: var(--gold); border-color: var(--gold); }
.rss { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .85rem; text-decoration: none; }
.rss:hover { color: var(--gold-2); }
.rss svg { width: 1rem; height: 1rem; }

.featured {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.2rem, 3vw, 2.4rem); align-items: center;
  text-decoration: none; padding: clamp(1rem, 2vw, 1.4rem); border-radius: 22px;
  background: linear-gradient(160deg, rgba(76,116,232,.1), transparent 60%), var(--panel);
  border: 1px solid var(--line); transition: border-color .3s, transform .5s var(--honey);
}
.featured:hover { border-color: rgba(232,176,75,.45); transform: translateY(-3px); }
.featured h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; margin: .8rem 0 .6rem; }
.featured p { color: var(--muted); margin: 0 0 1rem; }
.featured .go { display: inline-flex; gap: .4rem; align-items: center; font: 700 .9rem var(--display); color: var(--gold-2); margin-top: 1rem; }
.featured .go svg { width: 1rem; height: 1rem; transition: transform .4s var(--honey); }
.featured:hover .go svg { transform: translateX(4px); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin: 1.4rem 0 clamp(3rem, 6vw, 5rem); }
.card {
  display: flex; flex-direction: column; gap: .7rem; text-decoration: none;
  padding: .8rem .8rem 1.2rem; border-radius: 20px; background: var(--panel); border: 1px solid var(--line);
  transition: border-color .3s, transform .5s var(--honey), background .3s;
}
.card:hover { border-color: rgba(255,255,255,.22); transform: translateY(-4px); background: var(--panel-2); }
.card .body { padding: 0 .4rem; display: grid; gap: .5rem; }
.card h3 { font-size: 1.15rem; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.card[hidden], .featured[hidden] { display: none; }
.empty { color: var(--muted); }

/* ---------- Post ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 30; background: linear-gradient(90deg, var(--blue-3), var(--gold)); transform-origin: 0 50%; transform: scaleX(0); }
.p-head { padding: clamp(6.5rem, 14vh, 8rem) 0 1.5rem; position: relative; }
.p-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(640px 340px at 50% 0%, rgba(76,116,232,.2), transparent 70%);
}
.p-head .wrap { position: relative; max-width: 780px; }
.back { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); text-decoration: none; font-size: .88rem; margin-bottom: 1.4rem; }
.back:hover { color: var(--text); }
.back svg { width: 1rem; height: 1rem; }
.p-head h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 900; letter-spacing: -.025em; margin: .9rem 0 .8rem; }
.p-head .dek { font-size: 1.15rem; color: #c3cce4; margin: 0 0 1.1rem; }
.p-cover { max-width: 980px; margin: .6rem auto 0; width: min(980px, 100% - 2rem); }
.p-cover .cover { border-radius: 22px; aspect-ratio: 21 / 8; }

.p-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 3.5rem; max-width: 1000px; margin: clamp(2rem, 5vw, 3.2rem) auto 0; width: min(1000px, 100% - 2rem); }
.toc { position: sticky; top: 6rem; align-self: start; font-size: .85rem; border-left: 1px solid var(--line); padding-left: 1rem; }
.toc b { display: block; font: 700 .72rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.toc a { color: var(--muted); text-decoration: none; display: block; line-height: 1.4; transition: color .2s; }
.toc a:hover, .toc a.on { color: var(--gold-2); }

.prose { font-size: 1.06rem; line-height: 1.78; color: #d6dcec; max-width: 70ch; }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; font-weight: 800; color: #fff; margin-top: 2.2em; letter-spacing: -.02em; scroll-margin-top: 5.5rem; }
.prose h3 { font-size: 1.2rem; font-weight: 700; color: #fff; margin-top: 1.8em; }
.prose a { color: var(--gold-2); text-underline-offset: 3px; }
.prose strong { color: #fff; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--blue-3); }
.prose code { font: 500 .88em var(--mono); background: rgba(255,255,255,.07); padding: .12em .4em; border-radius: 6px; }
.prose pre { background: #070b17; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.prose pre code { background: none; padding: 0; }
.prose kbd { font: 600 .82em var(--mono); padding: .1rem .45rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); border-bottom-width: 2px; background: rgba(255,255,255,.05); }
.prose blockquote { margin: 1.6em 0 0; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--gold); color: #fff; font: 500 1.2rem/1.5 var(--display); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font: 700 .8rem var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.note {
  border-radius: 16px; padding: 1rem 1.2rem; font-size: .97rem;
  background: rgba(76,116,232,.1); border: 1px solid rgba(76,116,232,.3);
}
.note.warn { background: rgba(232,176,75,.08); border-color: rgba(232,176,75,.35); }
.note > b:first-child { display: block; font-family: var(--display); color: #fff; margin-bottom: .2rem; }

.p-end { max-width: 1000px; width: min(1000px, 100% - 2rem); margin: clamp(3rem, 6vw, 4.5rem) auto 0; }
.cta-box {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center;
  padding: 1.3rem 1.5rem; border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 0% 0%, rgba(76,116,232,.2), transparent 60%), var(--panel);
}
.cta-box img { width: 52px; height: 52px; }
.cta-box b { font: 800 1.1rem var(--display); color: #fff; display: block; }
.cta-box span { color: var(--muted); font-size: .92rem; }
.more-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 3rem; }
.more-head h2 { font-size: 1.5rem; font-weight: 800; }
.more-head a { color: var(--gold-2); font-size: .9rem; text-decoration: none; }
.p-end .grid { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 2rem 0 2.4rem; color: var(--muted); font-size: .84rem; }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.foot-top ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.foot-top a { text-decoration: none; }
.foot-top a:hover { color: var(--text); }
footer p { margin: .3rem 0; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--honey) var(--d, 0s), transform 1.4s var(--honey) var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 960px) {
  .nav ul { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .p-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .featured { grid-template-columns: 1fr; }
  .p-cover .cover { aspect-ratio: 16 / 9; }
  .cta-box { grid-template-columns: auto 1fr; }
  .cta-box .pill { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .grid, .p-end .grid { grid-template-columns: 1fr; }
  .wordmark { font-size: .82rem; letter-spacing: .1em; }
  .prose { font-size: 1rem; }
}
