/* =========================================================
   cotrax.ai — AI Blog Theme (Blue & White)
   Pure HTML + CSS + vanilla JS. No frameworks.
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  --blue-900: #0a1f44;
  --blue-800: #0f2d63;
  --blue-700: #123c8a;
  --blue-600: #1652d9;
  --blue-500: #2563eb;
  --blue-400: #4f8bff;
  --blue-300: #8db4ff;
  --blue-100: #e6efff;
  --blue-50:  #f3f7ff;
  --white: #ffffff;
  --ink: #0b1630;
  --text: #36425c;
  --muted: #6b7690;
  --line: #e3e9f5;
  --bg: #ffffff;
  --bg-soft: #f6f9ff;

  --grad: linear-gradient(135deg, #1652d9 0%, #2563eb 45%, #4f8bff 100%);
  --grad-dark: linear-gradient(135deg, #0a1f44 0%, #123c8a 100%);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(16, 42, 100, .06);
  --shadow: 0 10px 30px rgba(16, 42, 100, .08);
  --shadow-lg: 0 24px 60px rgba(16, 42, 100, .14);

  --container: 1200px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; letter-spacing: -.02em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue-600); background: var(--blue-100);
  padding: 6px 14px; border-radius: 999px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-500); animation: pulse 2s infinite; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 14px; }
.section-head p { color: var(--muted); max-width: 520px; margin-top: 10px; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 12px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
  position: relative; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(37, 99, 235, .3); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(37, 99, 235, .38); }
.btn--primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .7s var(--ease);
}
.btn--primary:hover::after { transform: translateX(100%); }
.btn--ghost { background: var(--white); color: var(--blue-700); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--blue-300); background: var(--blue-50); transform: translateY(-2px); }
.btn--white { background: #fff; color: var(--blue-700); }
.btn--white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-600); font-weight: 600; font-size: 15px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- 4. Page loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9999; background: #fff;
  display: grid; place-items: center; transition: opacity .5s var(--ease), visibility .5s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__mark { width: 54px; height: 54px; border-radius: 14px; background: var(--grad); display: grid; place-items: center; animation: loaderSpin 1.2s var(--ease) infinite; }
.loader__mark span { width: 18px; height: 18px; border: 3px solid #fff; border-radius: 50%; }

/* ---------- 5. Header ---------- */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 100;
  background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header__inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--ink); }
.logo__mark { width: 38px; height: 38px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(37,99,235,.35); }
.logo__mark svg { width: 22px; height: 22px; color: #fff; }
.logo b { color: var(--blue-600); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative; padding: 10px 14px; font-weight: 500; font-size: 15px; color: var(--text); border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px; transition: color .25s, background .25s;
}
.nav__link svg { width: 14px; height: 14px; transition: transform .3s; }
.nav__link:hover, .nav__link.is-active { color: var(--blue-600); }
.nav__link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--blue-500); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.dropdown { position: relative; }
.dropdown:hover .nav__link svg { transform: rotate(180deg); }
.dropdown__menu {
  position: absolute; top: calc(100% + 10px); left: 50%; width: 560px;
  transform: translate(-50%, 10px); opacity: 0; visibility: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.dropdown__menu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.dropdown:hover .dropdown__menu, .dropdown:focus-within .dropdown__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dropdown__item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; transition: background .25s; }
.dropdown__item:hover { background: var(--blue-50); }
.dropdown__item .ico { width: 38px; height: 38px; flex: none; }
.dropdown__item strong { display: block; font-size: 14px; color: var(--ink); }
.dropdown__item small { font-size: 12px; color: var(--muted); }

.header__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: all .25s;
}
.icon-btn:hover { border-color: var(--blue-300); color: var(--blue-600); background: var(--blue-50); }
.icon-btn svg { width: 19px; height: 19px; }
.burger { display: none; }

/* Mobile nav */
.mobile-nav {
  position: fixed; inset: 76px 0 0 0; z-index: 99; background: #fff; padding: 24px;
  transform: translateX(100%); transition: transform .45s var(--ease); overflow-y: auto;
}
.mobile-nav.is-open { transform: none; }
.mobile-nav a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 500; color: var(--ink); }
.mobile-nav h4 { margin: 24px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* Search overlay */
.search {
  position: fixed; inset: 0; z-index: 200; background: rgba(10, 31, 68, .55); backdrop-filter: blur(6px);
  display: grid; place-items: start center; padding-top: 14vh; opacity: 0; visibility: hidden; transition: all .3s;
}
.search.is-open { opacity: 1; visibility: visible; }
.search__box {
  width: min(680px, 92vw); background: #fff; border-radius: var(--radius-lg); padding: 10px; box-shadow: var(--shadow-lg);
  transform: translateY(-20px) scale(.98); transition: transform .4s var(--ease);
}
.search.is-open .search__box { transform: none; }
.search__box form { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.search__box svg { width: 22px; height: 22px; color: var(--blue-500); flex: none; }
.search__box input { flex: 1; border: 0; outline: 0; font-size: 18px; padding: 10px 0; color: var(--ink); }
.search__hint { padding: 10px 14px 14px; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); }

/* ---------- 6. Chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500; background: #fff; border: 1px solid var(--line); color: var(--text);
  transition: all .25s var(--ease); cursor: pointer;
}
.chip:hover, .chip.is-active { background: var(--blue-600); border-color: var(--blue-600); color: #fff; transform: translateY(-2px); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .03em;
  color: var(--blue-600); background: var(--blue-100); padding: 4px 10px; border-radius: 6px;
}
.tag--white { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(6px); }

/* ---------- 7. Hero ---------- */
.hero { position: relative; padding: 88px 0 110px; overflow: hidden; background: linear-gradient(180deg, #f3f7ff 0%, #ffffff 100%); }
.hero__grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%); opacity: .7;
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; pointer-events: none; animation: float 14s ease-in-out infinite; }
.blob--1 { width: 420px; height: 420px; background: #8db4ff; top: -120px; right: -80px; }
.blob--2 { width: 320px; height: 320px; background: #c7dbff; bottom: -100px; left: -80px; animation-delay: -6s; }

.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); margin: 20px 0 20px; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 540px; }
.hero__search {
  margin-top: 32px; display: flex; align-items: center; gap: 8px; max-width: 540px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 18px; box-shadow: var(--shadow);
  transition: box-shadow .3s, border-color .3s;
}
.hero__search:focus-within { border-color: var(--blue-400); box-shadow: 0 0 0 5px rgba(37, 99, 235, .12), var(--shadow); }
.hero__search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.hero__search input { flex: 1; border: 0; outline: 0; padding: 10px 4px; color: var(--ink); min-width: 0; background: transparent; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; align-items: center; }
.hero__chips span { font-size: 14px; color: var(--muted); margin-right: 4px; }

/* Hero visual — stacked article cards */
.hero__visual { position: relative; height: 480px; }
.hcard {
  position: absolute; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); overflow: hidden;
}
.hcard--main { width: 78%; left: 11%; top: 30px; animation: bob 7s ease-in-out infinite; }
.hcard--main .thumb { height: 220px; border-radius: 0; }
.hcard__body { padding: 20px 22px 22px; }
.hcard__body h3 { font-size: 19px; margin: 10px 0 12px; }
.hcard--mini { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; }
.hcard--mini .ico { width: 42px; height: 42px; }
.hcard--mini strong { display: block; font-size: 14px; color: var(--ink); }
.hcard--mini small { color: var(--muted); font-size: 12px; }
.hcard--a { left: -2%; bottom: -10px; animation: bob 6s ease-in-out infinite -2s; }
.hcard--b { right: -2%; top: 0; animation: bob 8s ease-in-out infinite -4s; }
.hcard--c { right: -6%; top: 160px; animation: bob 7s ease-in-out infinite -1s; }

.meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; background: var(--grad); flex: none; }

/* ---------- 8. Stats strip ---------- */
.stats { margin-top: -48px; position: relative; z-index: 2; }
.stats__inner {
  display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden;
}
.stat { padding: 30px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { font-family: var(--font-head); font-size: 36px; color: var(--ink); display: block; }
.stat strong em { font-style: normal; color: var(--blue-500); }
.stat > span { color: var(--muted); font-size: 14px; }

/* ---------- 9. Thumbnails (gradient art — swap with real images) ---------- */
.thumb {
  position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10;
  background: var(--grad); display: grid; place-items: center; isolation: isolate;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .8s var(--ease); }
.thumb::before { /* dotted network pattern */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.5px); background-size: 22px 22px;
  transition: transform .8s var(--ease);
}
.thumb::after { /* glow */
  content: ""; position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255,255,255,.45), transparent 65%); top: -15%; right: -10%;
  transition: transform .8s var(--ease);
}
.thumb > svg { width: 30%; max-width: 92px; height: auto; color: #fff; opacity: .95; filter: drop-shadow(0 8px 18px rgba(0,0,0,.18)); transition: transform .6s var(--ease); }
.thumb .tag { position: absolute; left: 14px; top: 14px; }

.t-ml     { background: linear-gradient(135deg, #0f2d63, #2563eb); }
.t-gen    { background: linear-gradient(135deg, #1652d9, #6aa5ff); }
.t-agents { background: linear-gradient(135deg, #0a1f44, #1e6bff); }
.t-nlp    { background: linear-gradient(135deg, #1d4ed8, #38bdf8); }
.t-cv     { background: linear-gradient(135deg, #123c8a, #4f8bff); }
.t-robot  { background: linear-gradient(135deg, #0b2a5b, #0ea5e9); }
.t-tools  { background: linear-gradient(135deg, #2563eb, #93c5fd); }
.t-ethics { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }

.ico { border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--grad); flex: none; }
.ico svg { width: 55%; height: 55%; }

/* ---------- 10. Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cat-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.cat-card::before {
  content: ""; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity .45s var(--ease); z-index: 0;
}
.cat-card > * { position: relative; z-index: 1; }
.cat-card .ico { width: 54px; height: 54px; border-radius: 15px; margin-bottom: 22px; transition: background .4s, transform .5s var(--ease); }
.cat-card h3 { font-size: 19px; margin-bottom: 8px; transition: color .4s; }
.cat-card p { font-size: 14px; color: var(--muted); margin-bottom: 20px; transition: color .4s; }
.cat-card__foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--blue-600); transition: color .4s; }
.cat-card__foot svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.cat-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat-card:hover::before { opacity: 1; }
.cat-card:hover h3, .cat-card:hover p, .cat-card:hover .cat-card__foot { color: #fff; }
.cat-card:hover .ico { background: rgba(255,255,255,.2); transform: rotate(-8deg) scale(1.06); }
.cat-card:hover .cat-card__foot svg { transform: translateX(6px); }

/* ---------- 11. Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--line); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.post .thumb { border-radius: 0; }
.post:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.post:hover .thumb > svg { transform: scale(1.12) rotate(-4deg); }
.post:hover .thumb::before, .post:hover .thumb img { transform: scale(1.08); }
.post:hover .thumb::after { transform: translate(-20%, 20%); }
.post__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.post__body h3 { font-size: 19px; margin: 12px 0 10px; transition: color .25s; }
.post:hover h3 { color: var(--blue-600); }
.post__body p { font-size: 15px; color: var(--muted); margin-bottom: 18px; flex: 1; }
.post.is-hidden { display: none; }

/* Featured */
.featured { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; }
.featured__main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 500px; display: flex; align-items: flex-end;
  color: #fff; box-shadow: var(--shadow);
}
.featured__main .thumb { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.featured__main .thumb > svg { width: 22%; max-width: 140px; transform: translateY(-50px); }
.featured__main:hover .thumb > svg { transform: translateY(-60px) scale(1.08); }
.featured__overlay { position: relative; padding: 36px; width: 100%; background: linear-gradient(0deg, rgba(10,31,68,.92) 0%, rgba(10,31,68,.5) 60%, transparent 100%); }
.featured__overlay h3 { color: #fff; font-size: clamp(24px, 2.8vw, 34px); margin: 14px 0 12px; }
.featured__overlay p { color: rgba(255,255,255,.82); margin-bottom: 18px; max-width: 560px; }
.featured__overlay .meta { color: rgba(255,255,255,.8); }
.featured__list { display: flex; flex-direction: column; gap: 18px; }
.mini-post {
  display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: center; padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: all .35s var(--ease);
}
.mini-post .thumb { aspect-ratio: 1 / .8; border-radius: 12px; }
.mini-post .thumb > svg { width: 38%; }
.mini-post h4 { font-size: 16px; margin: 6px 0 8px; line-height: 1.35; transition: color .25s; }
.mini-post:hover { transform: translateX(6px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.mini-post:hover h4 { color: var(--blue-600); }

/* Filter tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 12. Trending ---------- */
.trend-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 48px; counter-reset: trend; }
.trend {
  display: flex; gap: 22px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--line); counter-increment: trend;
}
.trend::before {
  content: counter(trend, decimal-leading-zero); font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--blue-300); transition: all .35s; min-width: 58px;
}
.trend:hover::before { color: var(--blue-500); -webkit-text-stroke-color: var(--blue-500); }
.trend h4 { font-size: 18px; margin: 6px 0 8px; transition: color .25s; }
.trend:hover h4 { color: var(--blue-600); }

/* ---------- 13. Topics marquee ---------- */
.marquee { overflow: hidden; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.marquee__track { display: flex; gap: 48px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 48px; white-space: nowrap; opacity: .85; }
.marquee__track span::after { content: "✦"; color: var(--blue-400); font-size: 18px; }

/* ---------- 14. Newsletter ---------- */
.newsletter {
  position: relative; overflow: hidden; border-radius: 32px; padding: 72px 64px; color: #fff;
  background: var(--grad-dark); display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
}
.newsletter::before, .newsletter::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.newsletter::before { width: 520px; height: 520px; right: -160px; top: -200px; animation: spin 40s linear infinite; border-style: dashed; }
.newsletter::after { width: 340px; height: 340px; right: -60px; top: -100px; background: radial-gradient(circle, rgba(79,139,255,.45), transparent 70%); border: 0; animation: float 10s ease-in-out infinite; }
.newsletter > * { position: relative; z-index: 1; }
.newsletter h2 { color: #fff; font-size: clamp(28px, 3.4vw, 42px); margin: 16px 0 12px; }
.newsletter p { color: rgba(255,255,255,.75); }
.newsletter .eyebrow { background: rgba(255,255,255,.12); color: #fff; }
.newsletter .eyebrow::before { background: #8db4ff; }
.nl-form { display: flex; gap: 10px; background: rgba(255,255,255,.1); padding: 8px; border-radius: 16px; border: 1px solid rgba(255,255,255,.18); }
.nl-form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; padding: 0 14px; }
.nl-form input::placeholder { color: rgba(255,255,255,.6); }
.nl-note { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 12px; }
.nl-success { display: none; margin-top: 12px; color: #a7f3d0; font-weight: 600; font-size: 14px; }
.nl-success.is-shown { display: block; animation: fadeUp .5s var(--ease); }

/* ---------- 15. Footer ---------- */
.footer { background: var(--blue-900); color: rgba(255,255,255,.7); padding: 80px 0 0; margin-top: 96px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 56px; }
.footer .logo { color: #fff; }
.footer .logo b { color: var(--blue-300); }
.footer p { margin: 18px 0 22px; font-size: 15px; max-width: 320px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 18px; }
.footer li { margin-bottom: 10px; }
.footer li a { font-size: 15px; transition: color .25s, padding .25s; }
.footer li a:hover { color: #fff; padding-left: 6px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); transition: all .3s var(--ease); }
.socials a:hover { background: var(--blue-500); color: #fff; transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 24px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.footer__bottom a:hover { color: #fff; }
.footer__bottom nav { display: flex; gap: 22px; }

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; width: 48px; height: 48px; border-radius: 14px; border: 0;
  background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 24px rgba(37,99,235,.35);
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: all .35s var(--ease);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 150; transition: width .1s linear; }

/* ---------- 16. Category page ---------- */
.cat-hero { position: relative; padding: 64px 0 80px; color: #fff; overflow: hidden; background: var(--grad-dark); }
.cat-hero::before {
  content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(rgba(255,255,255,.7) 1px, transparent 1.5px); background-size: 26px 26px;
  mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.cat-hero .blob--1 { background: #2563eb; opacity: .55; }
.cat-hero__inner { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: rgba(255,255,255,.7); margin-bottom: 22px; flex-wrap: wrap; }
.crumbs a:hover { color: #fff; }
.crumbs svg { width: 14px; height: 14px; }
.cat-hero h1 { color: #fff; font-size: clamp(36px, 5vw, 56px); margin: 16px 0 14px; }
.cat-hero p { color: rgba(255,255,255,.78); font-size: 18px; max-width: 640px; }
.cat-hero__stats { display: flex; gap: 32px; margin-top: 28px; flex-wrap: wrap; }
.cat-hero__stats div strong { display: block; font-family: var(--font-head); font-size: 26px; color: #fff; }
.cat-hero__stats div span { font-size: 13px; color: rgba(255,255,255,.65); }
.cat-hero__icon {
  width: 200px; height: 200px; border-radius: 48px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  display: grid; place-items: center; backdrop-filter: blur(10px); animation: bob 6s ease-in-out infinite; position: relative;
}
.cat-hero__icon::after { content: ""; position: absolute; inset: -18px; border-radius: 60px; border: 1px dashed rgba(255,255,255,.2); animation: spin 30s linear infinite; }
.cat-hero__icon svg { width: 90px; height: 90px; color: #fff; }

.subnav { position: sticky; top: 76px; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.subnav__inner { display: flex; gap: 8px; overflow-x: auto; padding: 14px 24px; scrollbar-width: none; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav .chip { white-space: nowrap; }

.layout { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.layout .post-grid { grid-template-columns: repeat(2, 1fr); }
.list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.list-head h2 { font-size: 26px; }
.select { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; }

.post--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
.post--wide .thumb { aspect-ratio: auto; min-height: 300px; height: 100%; }
.post--wide .post__body { padding: 32px; justify-content: center; }
.post--wide h3 { font-size: 26px; }

.sidebar { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 24px; }
.widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.widget h4 { font-size: 17px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.widget h4::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--grad); }
.pop { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pop:last-child { border-bottom: 0; padding-bottom: 0; }
.pop .thumb { width: 72px; flex: none; aspect-ratio: 1; border-radius: 12px; }
.pop .thumb > svg { width: 45%; }
.pop strong { display: block; font-size: 14px; line-height: 1.4; color: var(--ink); transition: color .25s; }
.pop:hover strong { color: var(--blue-600); }
.pop small { color: var(--muted); font-size: 12px; }
.cat-list a { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 15px; transition: color .25s, padding .25s; }
.cat-list a:last-child { border-bottom: 0; }
.cat-list a:hover, .cat-list a.is-active { color: var(--blue-600); padding-left: 6px; }
.cat-list a span { font-size: 12px; background: var(--blue-50); color: var(--blue-600); padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.widget--cta { background: var(--grad); color: #fff; border: 0; position: relative; overflow: hidden; }
.widget--cta h4 { color: #fff; }
.widget--cta h4::before { background: #fff; }
.widget--cta p { font-size: 14px; color: rgba(255,255,255,.85); margin-bottom: 16px; }
.widget--cta input { width: 100%; border: 0; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; outline: 0; }
.widget--cta .btn { width: 100%; justify-content: center; }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination a { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); font-weight: 600; transition: all .25s; }
.pagination a:hover, .pagination a.is-active { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.pagination svg { width: 18px; height: 18px; }

.empty { display: none; text-align: center; padding: 48px; border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); grid-column: 1 / -1; }
.empty.is-shown { display: block; }

/* All categories page */
.cat-grid--big .cat-card { padding: 34px; }
.cat-grid--big { grid-template-columns: repeat(3, 1fr); }

/* ---------- 17. Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal--left { transform: translateX(-40px); }
.reveal--right { transform: translateX(40px); }
.reveal--zoom { transform: scale(.94); }
.reveal.is-in { opacity: 1; transform: none; }
.hero .reveal { transition-duration: 1s; }

/* ---------- 18. Keyframes ---------- */
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 30px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.5); } 70% { box-shadow: 0 0 0 8px rgba(37,99,235,0); } 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes loaderSpin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(.88); } 100% { transform: rotate(360deg) scale(1); } }

/* ---------- 19. Responsive ---------- */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { height: 440px; max-width: 560px; width: 100%; margin: 0 auto; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .nav, .header__actions .btn { display: none; }
  .burger { display: grid; }
  .post-grid, .cat-grid--big { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
  .stats__inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .trend-wrap { grid-template-columns: 1fr; }
  .newsletter { grid-template-columns: 1fr; padding: 56px 40px; }
  .cat-hero__inner { grid-template-columns: 1fr; }
  .cat-hero__icon { display: none; }
  .post--wide { grid-template-columns: 1fr; }
  .post--wide .thumb { min-height: 240px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 96px; }
  .hero__visual { height: 380px; }
  .hcard--main { width: 88%; left: 6%; }
  .hcard--main .thumb { height: 170px; }
  .hcard--b { right: 0; top: -10px; }

  .hcard--c, .hcard--a { display: none; }
  .hero__visual { height: auto; padding-top: 40px; }
  .hcard--main { position: relative; top: 0; left: 0; width: 100%; }
  .hcard--b { top: 0; }
  .cat-grid, .post-grid, .layout .post-grid, .cat-grid--big, .sidebar { grid-template-columns: 1fr; }
  .stat { padding: 22px 18px; }
  .stat strong { font-size: 28px; }
  .featured__main { min-height: 420px; }
  .featured__overlay { padding: 24px; }
  .mini-post { grid-template-columns: 96px 1fr; gap: 14px; }
  .newsletter { padding: 44px 22px; border-radius: 24px; }
  .nl-form { flex-direction: column; background: transparent; border: 0; padding: 0; }
  .nl-form input { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 14px; }
  .nl-form .btn { justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .trend::before { font-size: 32px; min-width: 46px; }
  .subnav__inner { padding: 12px 16px; }
  .subnav { top: 76px; }
  .hero__search .btn span { display: none; }
  .hero__search .btn { padding: 12px 14px; }
}

/* Respect reduced-motion users */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   20. Single article (blog post) page
   ========================================================= */
.art-hero { background: linear-gradient(180deg, var(--blue-50) 0%, #fff 100%); padding: 56px 0 40px; position: relative; overflow: hidden; }
.art-hero .crumbs { color: var(--muted); }
.art-hero .crumbs a:hover { color: var(--blue-600); }
.art-hero__inner { max-width: 860px; }
.art-hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 18px 0 18px; text-wrap: balance; }
.art-hero__lead { font-size: 19px; color: var(--muted); max-width: 720px; }
.art-meta { display: flex; align-items: center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }
.art-meta__author { display: flex; align-items: center; gap: 12px; }
.art-meta__author .avatar { width: 46px; height: 46px; font-size: 15px; }
.art-meta__author strong { display: block; color: var(--ink); font-size: 15px; }
.art-meta__author small { color: var(--muted); font-size: 13px; }
.art-meta__facts { display: flex; gap: 18px; color: var(--muted); font-size: 14px; flex-wrap: wrap; padding-left: 18px; border-left: 1px solid var(--line); }
.art-cover { margin-top: 8px; }
.art-cover .thumb { aspect-ratio: 21 / 9; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.art-cover .thumb > svg { width: 14%; max-width: 120px; }
.art-cover figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }

.art-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-block: 56px 24px; }
.toc { position: sticky; top: 110px; }
.toc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.toc ol { list-style: none; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; font-size: 14px; color: var(--muted); line-height: 1.45; transition: all .25s; }
.toc a:hover { color: var(--blue-600); }
.toc a.is-active { color: var(--blue-600); border-left-color: var(--blue-500); font-weight: 600; }
.share { margin-top: 28px; }
.share h4 { margin-bottom: 12px; }
.share .socials a { background: var(--blue-50); color: var(--blue-700); }
.share .socials a:hover { background: var(--blue-600); color: #fff; }

/* Article typography */
.prose { font-size: 18px; line-height: 1.8; color: var(--text); max-width: 720px; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 30px; margin-top: 2.2em; scroll-margin-top: 100px; text-wrap: balance; }
.prose h3 { font-size: 22px; margin-top: 1.8em; scroll-margin-top: 100px; }
.prose p a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 28px; }
.prose ul li + li, .prose ol li + li { margin-top: .55em; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-500); box-shadow: 0 0 0 4px var(--blue-100); }
.prose ol { list-style: decimal; }
.prose ol li::marker { color: var(--blue-600); font-weight: 700; }
.prose strong { color: var(--ink); }

/* Key takeaways */
.takeaways { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius-lg); padding: 28px 30px; }
.takeaways__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.takeaways__head .ico { width: 40px; height: 40px; border-radius: 12px; }
.takeaways__head h3 { margin: 0; font-size: 20px; }
.takeaways ul { list-style: none; padding: 0; margin: 0; }
.prose .takeaways li { position: relative; padding-left: 34px; font-size: 16px; line-height: 1.6; }
.takeaways li + li { margin-top: 12px; }
.prose .takeaways li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-600) no-repeat center / 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
  box-shadow: none;
}

/* Quotations */
.quote { position: relative; margin: 2em 0; padding: 30px 32px 28px 76px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.quote::before { content: "\201C"; position: absolute; left: 22px; top: 6px; font-family: Georgia, serif; font-size: 90px; line-height: 1; color: var(--blue-500); }
.quote p { font-family: var(--font-head); font-size: 21px; line-height: 1.5; color: var(--ink); font-weight: 600; margin: 0; }
.quote cite { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-style: normal; font-size: 14px; color: var(--muted); }
.quote cite strong { color: var(--ink); }
.quote cite::before { content: ""; width: 24px; height: 2px; background: var(--blue-500); }
.pullquote { margin: 2.2em 0; padding: 4px 0 4px 26px; border-left: 4px solid var(--blue-500); }
.pullquote p { font-family: var(--font-head); font-size: 26px; line-height: 1.4; font-weight: 700; color: var(--blue-700); margin: 0; text-wrap: balance; }

/* Info / stat callout */
.callout { display: flex; gap: 16px; padding: 20px 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue-500); font-size: 16px; }
.callout .ico { width: 36px; height: 36px; border-radius: 10px; }
.callout strong { display: block; margin-bottom: 4px; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.prose th { background: var(--blue-900); color: #fff; text-align: left; padding: 14px 16px; font-weight: 600; }
.prose td { padding: 13px 16px; border-top: 1px solid var(--line); }
.prose tr:nth-child(even) td { background: var(--blue-50); }

/* CTA blocks */
.cta-inline { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 26px 28px; border-radius: var(--radius-lg); background: var(--grad); color: #fff; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-inline::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -60px; top: -90px; background: radial-gradient(circle, rgba(255,255,255,.3), transparent 70%); }
.cta-inline > * { position: relative; z-index: 1; }
.cta-inline h4 { color: #fff; font-size: 20px; margin-bottom: 4px; }
.cta-inline p { color: rgba(255,255,255,.85); font-size: 15px; margin: 0; }
.cta-big { text-align: center; padding: 48px 32px; border-radius: 28px; background: var(--grad-dark); color: #fff; position: relative; overflow: hidden; }
.cta-big::before { content: ""; position: absolute; inset: 0; opacity: .2; background-image: radial-gradient(rgba(255,255,255,.8) 1px, transparent 1.5px); background-size: 24px 24px; }
.cta-big > * { position: relative; }
.cta-big h3 { color: #fff; font-size: 28px; margin: 0 0 10px; }
.cta-big p { color: rgba(255,255,255,.78); max-width: 520px; margin: 0 auto 24px; }
.cta-big .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn--outline-white { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn--outline-white:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }

/* FAQ accordion */
.faq { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 17px; position: relative; transition: background .25s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--blue-50); }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 8px; background: var(--blue-100); color: var(--blue-600); display: grid; place-items: center; font-size: 20px; font-weight: 500; transition: transform .3s var(--ease), background .3s, color .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--blue-600); color: #fff; }
.faq details > div { padding: 0 22px 20px; font-size: 16px; color: var(--text); animation: fadeUp .4s var(--ease); }

/* Tags + author */
.art-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.art-tags span { font-weight: 600; color: var(--ink); margin-right: 4px; font-size: 15px; }
.author-box { display: flex; gap: 22px; padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; }
.author-box .avatar { width: 76px; height: 76px; font-size: 24px; }
.author-box h4 { font-size: 19px; }
.author-box small { color: var(--blue-600); font-weight: 600; font-size: 13px; }
.author-box p { font-size: 15px; color: var(--muted); margin: 10px 0 12px; }
.art-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.art-nav a { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); transition: all .3s var(--ease); }
.art-nav a:hover { border-color: var(--blue-300); background: var(--blue-50); transform: translateY(-3px); }
.art-nav small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.art-nav small svg { width: 14px; height: 14px; }
.art-nav strong { display: block; margin-top: 6px; color: var(--ink); font-family: var(--font-head); line-height: 1.4; }
.art-nav a:last-child { text-align: right; }
.art-nav a:last-child small { justify-content: flex-end; }

.art-side { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 1200px) {
  .art-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .art-side { display: none; }
}
@media (max-width: 900px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); padding-block-start: 36px; }
  .toc { position: static; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
  .toc .share { display: none; }
  .prose { max-width: none; }
}
@media (max-width: 640px) {
  .art-hero { padding: 36px 0 28px; }
  .art-hero__lead { font-size: 17px; }
  .art-meta__facts { border-left: 0; padding-left: 0; }
  .art-cover .thumb { aspect-ratio: 16 / 10; border-radius: var(--radius); }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 25px; }
  .quote { padding: 56px 22px 22px; }
  .quote::before { left: 18px; top: 0; font-size: 72px; }
  .quote p { font-size: 18px; }
  .pullquote p { font-size: 21px; }
  .takeaways { padding: 22px; }
  .author-box { flex-direction: column; }
  .art-nav { grid-template-columns: 1fr; }
  .art-nav a:last-child { text-align: left; }
  .art-nav a:last-child small { justify-content: flex-start; }
}

/* ---------- 21. Real featured images in thumbnails ---------- */
.thumb.has-img { background: var(--blue-100); }
.thumb.has-img::before, .thumb.has-img::after { display: none; }
.thumb.has-img img { z-index: 0; }
.thumb.has-img .tag { z-index: 1; background: rgba(10, 31, 68, .55); }
.post:hover .thumb.has-img img { transform: scale(1.06); }
.meta > span { white-space: nowrap; }

/* =========================================================
   22. Inner pages (Latest, Trending, About, Contact, Write for Us,
       Newsletter, Privacy, Terms, Search)
   ========================================================= */
.page-hero { position: relative; overflow: hidden; padding: 64px 0 56px; background: linear-gradient(180deg, var(--blue-50) 0%, #fff 100%); }
.page-hero .crumbs { color: var(--muted); }
.page-hero .crumbs a:hover { color: var(--blue-600); }
.page-hero h1 { font-size: clamp(34px, 4.8vw, 54px); margin: 16px 0 14px; text-wrap: balance; }
.page-hero p { font-size: 18px; color: var(--muted); max-width: 640px; }
.page-hero--center { text-align: center; }
.page-hero--center .crumbs { justify-content: center; }
.page-hero--center p { margin: 0 auto; }

/* Trending ranked list */
.rank-list { display: flex; flex-direction: column; gap: 18px; }
.rank { display: grid; grid-template-columns: 70px 220px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); transition: all .35s var(--ease); }
.rank:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.rank__num { font-family: var(--font-head); font-size: 44px; font-weight: 800; color: transparent; -webkit-text-stroke: 1.5px var(--blue-400); text-align: center; transition: all .3s; }
.rank:hover .rank__num { color: var(--blue-500); -webkit-text-stroke-color: var(--blue-500); }
.rank .thumb { aspect-ratio: 16 / 10; border-radius: 14px; }
.rank .thumb > svg { width: 30%; }
.rank h3 { font-size: 20px; margin: 8px 0 8px; transition: color .25s; }
.rank:hover h3 { color: var(--blue-600); }
.rank p { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.rank__views { text-align: right; padding-right: 10px; }
.rank__views strong { display: block; font-family: var(--font-head); font-size: 22px; color: var(--ink); }
.rank__views small { color: var(--muted); font-size: 13px; }
.rank__trend { display: inline-flex; align-items: center; gap: 4px; color: #0f9f6e; font-size: 13px; font-weight: 600; }

/* About */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 14px 0 16px; }
.split p { color: var(--text); margin-bottom: 14px; }
.about-visual { position: relative; border-radius: 28px; background: var(--grad-dark); aspect-ratio: 1 / .85; overflow: hidden; display: grid; place-items: center; }
.about-visual::before { content: ""; position: absolute; inset: 0; opacity: .25; background-image: radial-gradient(rgba(255,255,255,.8) 1px, transparent 1.5px); background-size: 24px 24px; }
.about-visual .logo__mark { width: 120px; height: 120px; border-radius: 34px; animation: bob 6s ease-in-out infinite; }
.about-visual .logo__mark svg { width: 64px; height: 64px; }
.about-visual .hcard { position: absolute; }
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.value { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); transition: all .35s var(--ease); }
.value:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.value .ico { width: 50px; height: 50px; border-radius: 14px; margin-bottom: 18px; }
.value h3 { font-size: 18px; margin-bottom: 8px; }
.value p { font-size: 15px; color: var(--muted); }
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.member { text-align: center; padding: 32px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); transition: all .35s var(--ease); }
.member:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.member .avatar { width: 84px; height: 84px; font-size: 26px; margin: 0 auto 16px; box-shadow: 0 10px 24px rgba(37,99,235,.3); }
.member h3 { font-size: 19px; }
.member small { color: var(--blue-600); font-weight: 600; font-size: 13px; }
.member p { color: var(--muted); font-size: 14px; margin: 12px 0 16px; }
.member .socials { justify-content: center; }
.member .socials a { background: var(--blue-50); color: var(--blue-700); }
.member .socials a:hover { background: var(--blue-600); color: #fff; }

/* Forms (contact, write for us) */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.info-cards { display: flex; flex-direction: column; gap: 16px; }
.info-card { display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: all .3s var(--ease); }
.info-card:hover { border-color: var(--blue-300); transform: translateX(6px); }
.info-card .ico { width: 46px; height: 46px; border-radius: 13px; }
.info-card h3 { font-size: 16px; margin-bottom: 4px; }
.info-card p { font-size: 15px; color: var(--muted); }
.info-card .sel { user-select: all; color: var(--blue-600); font-weight: 600; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.form-card h2 { font-size: 26px; margin-bottom: 6px; }
.form-card > p { color: var(--muted); margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; font-size: 15px; color: var(--ink); background: var(--bg-soft); outline: 0; transition: border-color .25s, box-shadow .25s, background .25s; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-400); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue-600); flex: none; }
.form-success { display: none; margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: #ecfdf5; color: #065f46; font-weight: 600; font-size: 15px; }
.form-success.is-shown { display: block; animation: fadeUp .5s var(--ease); }

/* Write for us */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); counter-increment: step; }
.step::before { content: counter(step); width: 42px; height: 42px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; margin-bottom: 18px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.guide { padding: 30px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; }
.guide h3 { font-size: 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.guide li { position: relative; padding-left: 30px; margin-bottom: 12px; font-size: 15px; }
.guide li::before { position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.guide--do li::before { content: "✓"; background: var(--blue-100); color: var(--blue-600); }
.guide--dont li::before { content: "✕"; background: #fee2e2; color: #b91c1c; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 10px; }

/* Newsletter page */
.nl-hero { position: relative; overflow: hidden; padding: 80px 0; background: var(--grad-dark); color: #fff; }
.nl-hero::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: radial-gradient(rgba(255,255,255,.8) 1px, transparent 1.5px); background-size: 26px 26px; }
.nl-hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.nl-hero h1 { color: #fff; font-size: clamp(34px, 4.8vw, 56px); margin: 18px 0 16px; text-wrap: balance; }
.nl-hero p { color: rgba(255,255,255,.78); font-size: 18px; margin-bottom: 26px; }
.nl-hero .eyebrow { background: rgba(255,255,255,.12); color: #fff; }
.nl-proof { display: flex; align-items: center; gap: 14px; margin-top: 22px; font-size: 14px; color: rgba(255,255,255,.75); }
.nl-proof .faces { display: flex; }
.nl-proof .faces .avatar { border: 2px solid var(--blue-900); margin-left: -8px; }
.nl-proof .faces .avatar:first-child { margin-left: 0; }
.mail-mock { background: #fff; color: var(--text); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-lg); animation: bob 7s ease-in-out infinite; }
.mail-mock__top { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.mail-mock__top strong { display: block; color: var(--ink); font-size: 15px; }
.mail-mock__top small { color: var(--muted); font-size: 12px; }
.mail-mock h4 { font-size: 18px; margin-bottom: 12px; }
.mail-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.mail-item .ico { width: 34px; height: 34px; border-radius: 10px; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* Legal pages */
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding-block: 56px 24px; }
.legal-note { font-size: 14px; color: var(--muted); padding: 14px 18px; background: var(--bg-soft); border-radius: 12px; border: 1px solid var(--line); }

/* Search page */
.search-big { max-width: 680px; margin: 26px auto 0; }

@media (max-width: 1100px) {
  .values, .steps { grid-template-columns: repeat(2, 1fr); }
  .rank { grid-template-columns: 56px 180px minmax(0, 1fr); }
  .rank__views { display: none; }
}
@media (max-width: 960px) {
  .split, .contact-grid, .nl-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .team, .perks { grid-template-columns: repeat(2, 1fr); }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block-start: 36px; }
  .legal-layout .toc { position: static; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-hero { padding: 44px 0 36px; }
  .page-hero p { font-size: 16px; }
  .values, .steps, .team, .perks, .form-grid { grid-template-columns: 1fr; }
  .rank { grid-template-columns: 1fr; gap: 14px; }
  .rank__num { text-align: left; font-size: 34px; }
  .form-card { padding: 24px 20px; }
  .nl-hero { padding: 56px 0; }
}

/* ---------- 23. Prevent sideways scroll from slide-in animations ---------- */
html, body { overflow-x: clip; }
@media (max-width: 960px) {
  .reveal--left, .reveal--right { transform: translateY(32px); }
}

/* ---------- 24. Mobile polish ---------- */
.hcard--main .thumb { aspect-ratio: auto; width: 100%; }
@media (max-width: 640px) {
  .about-visual { aspect-ratio: 1 / 1.05; }
  .about-visual .logo__mark { width: 96px; height: 96px; }
  .about-visual .hcard { transform: scale(.92); }
  .about-visual .hcard:first-of-type { top: 6% !important; left: 5% !important; }
  .about-visual .hcard:last-of-type { bottom: 6% !important; right: 5% !important; }
}
