/* ============================================================
   CyberPulse public site
   Palette, glow and circuit motifs follow the CP neon logo.
   Persian: B Koodak, RTL. English: Times New Roman, LTR.
   ============================================================ */

@font-face {
  font-family: "B Koodak";
  src: url("fonts/BKoodakBold.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  /* Arabic/Persian glyphs and punctuation only. Latin letters fall through
     to Times New Roman, so an English word inside a Persian sentence keeps
     its own typeface instead of borrowing a Persian glyph. */
  unicode-range:
    U+0020-0040, U+005B-0060, U+007B-007E, U+00A0-00BF,
    U+0600-06FF, U+0750-077F, U+08A0-08FF,
    U+200C-200D, U+2010-2027, U+2030-205E, U+20AC,
    U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --bg: #030811;
  --bg-soft: #04101c;
  --surface: #071523;
  --surface-2: #0a1c2e;
  --surface-3: #0d253a;
  --text: #e9fbff;
  --muted: #8fb3c7;
  --faint: #5f8197;
  --border: #12354a;
  --border-soft: rgba(34, 230, 255, 0.14);
  --accent: #22e6ff;
  --accent-2: #19f0c8;
  --accent-3: #7df9ff;
  --danger: #ff6b8a;
  --success: #3dffb5;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  --glow: 0 0 26px rgba(34, 230, 255, 0.22);
  --radius: 16px;
  --radius-sm: 11px;
  --max: 1200px;
  --font-fa: "B Koodak", "Times New Roman", Times, "Liberation Serif", serif;
  --font-en: "Times New Roman", Times, "Liberation Serif", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-fa);
  font-size: 17px;
  line-height: 1.95;
  direction: rtl;
  text-align: right;
  background:
    linear-gradient(rgba(34, 230, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 230, 255, 0.026) 1px, transparent 1px),
    radial-gradient(1100px 620px at 82% -10%, rgba(34, 230, 255, 0.13), transparent 62%),
    radial-gradient(900px 520px at 4% 8%, rgba(25, 240, 200, 0.08), transparent 58%),
    linear-gradient(180deg, #030811 0%, #04101c 55%, #030811 100%);
  background-size: 54px 54px, 54px 54px, auto, auto, auto;
  background-attachment: fixed;
}

/* English-dominant blocks: left-to-right Times New Roman. */
[data-bidi="ltr"],
.source {
  font-family: var(--font-en);
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
  letter-spacing: 0;
}

[data-bidi="rtl"] {
  direction: rtl;
  text-align: right;
}

[data-bidi="auto"] {
  unicode-bidi: isolate;
}

.news-card__title[data-bidi="ltr"],
.article h1[data-bidi="ltr"],
.hero h1[data-bidi="ltr"] {
  line-height: 1.3;
}

.news-card__summary[data-bidi="ltr"],
.article__summary[data-bidi="ltr"],
.hero__summary[data-bidi="ltr"] {
  line-height: 1.6;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--accent);
}

::selection {
  background: rgba(34, 230, 255, 0.3);
  color: #fff;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 0 0 12px 12px;
  background: var(--accent);
  color: #021018;
  font-weight: 800;
}

.skip-link:focus {
  top: 0;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(34, 230, 255, 0.18);
  background: rgba(3, 8, 17, 0.84);
  backdrop-filter: blur(18px) saturate(140%);
}

.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 230, 255, 0.65), rgba(25, 240, 200, 0.3), transparent);
  opacity: 0.7;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--text);
}

.brand__logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.brand__logo-wrap::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 19px;
  background: radial-gradient(circle, rgba(34, 230, 255, 0.25), transparent 70%);
  filter: blur(8px);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.brand__logo {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(34, 230, 255, 0.38);
  object-fit: cover;
  background: #030811;
  box-shadow:
    0 0 0 1px rgba(3, 8, 17, 0.85),
    0 0 22px rgba(34, 230, 255, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover .brand__logo {
  border-color: rgba(34, 230, 255, 0.72);
  box-shadow:
    0 0 0 1px rgba(3, 8, 17, 0.85),
    0 0 32px rgba(34, 230, 255, 0.38);
}

.brand:hover .brand__logo-wrap::before {
  opacity: 1;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.45;
}

.brand__text strong {
  font-size: 21px;
  letter-spacing: 0;
}

.brand__text small {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}

.nav a {
  position: relative;
  color: var(--muted);
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 400;
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 13px;
  bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(34, 230, 255, 0.045);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0;
  width: 225px;
  border: 1px solid rgba(34, 230, 255, 0.2);
  border-radius: 12px;
  background: rgba(6, 16, 28, 0.75);
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(34, 230, 255, 0.025);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search:focus-within {
  border-color: rgba(34, 230, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 230, 255, 0.08), inset 0 0 20px rgba(34, 230, 255, 0.04);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
}

.header-search input::placeholder {
  color: var(--faint);
}

.header-search button {
  border: 0;
  border-inline-start: 1px solid rgba(34, 230, 255, 0.16);
  background: transparent;
  color: var(--muted);
  padding: 9px 13px;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.header-search button:hover {
  color: var(--accent);
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(280px, 0.52fr);
  gap: 24px;
  margin-top: 36px;
  padding: 34px;
  border: 1px solid rgba(34, 230, 255, 0.2);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(135deg, rgba(34, 230, 255, 0.09), transparent 42%),
    linear-gradient(315deg, rgba(25, 240, 200, 0.07), transparent 50%),
    linear-gradient(180deg, rgba(8, 24, 38, 0.92), rgba(4, 12, 22, 0.97));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 230, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 230, 255, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at 82% 18%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse at 82% 18%, #000, transparent 72%);
  pointer-events: none;
}

.hero__pulse {
  position: absolute;
  inset-inline: -2%;
  bottom: 10px;
  width: 104%;
  height: 92px;
  opacity: 0.32;
  pointer-events: none;
}

.hero__pulse path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(34, 230, 255, 0.55));
}

.hero__text[dir="ltr"] {
  text-align: left;
}

.hero__text[dir="ltr"] .eyebrow {
  text-align: left;
}

.hero__text[dir="ltr"] .hero__meta {
  justify-content: flex-start;
}

.hero__text[dir="ltr"] .hero__actions {
  justify-content: flex-start;
}

.hero__text,
.hero__panel {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(27px, 3.4vw, 42px);
  line-height: 1.65;
  letter-spacing: 0;
}

.hero h1 a {
  color: var(--text);
}

.hero h1 a:hover {
  color: var(--accent);
}

.hero__summary {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 2;
  max-width: 70ch;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 18px;
  color: var(--faint);
  font-size: 13px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(34, 230, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(3, 8, 17, 0.5), rgba(6, 16, 28, 0.72));
  box-shadow: inset 0 0 34px rgba(34, 230, 255, 0.035);
}

.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(34, 230, 255, 0.16);
}

.stat:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.stat strong {
  color: var(--accent);
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 0 20px rgba(34, 230, 255, 0.45);
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.hero__note {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.8;
}

/* ---------- sections and cards ---------- */
.section {
  margin-top: 46px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section__head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.section__head a,
.section__head .muted {
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(34, 230, 255, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(8, 24, 38, 0.92), rgba(4, 12, 22, 0.97));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.news-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 230, 255, 0.65), transparent);
  opacity: 0.45;
}

.news-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -60px;
  top: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(34, 230, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 230, 255, 0.42);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.34),
    0 0 30px rgba(34, 230, 255, 0.08);
}

.news-card--featured {
  border-color: rgba(34, 230, 255, 0.3);
}

.news-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 12.5px;
}

.news-card__top time {
  white-space: normal;
  line-height: 1.6;
}

.source {
  display: inline-block;
  color: var(--accent-2);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0.2px;
}

.news-card__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.75;
  letter-spacing: 0;
}

.news-card__title a {
  color: var(--text);
}

.news-card__title a:hover {
  color: var(--accent);
}

.news-card__summary {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.95;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid rgba(34, 230, 255, 0.18);
  border-radius: 999px;
  background: rgba(34, 230, 255, 0.045);
  color: #a9cfdd;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.7;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(34, 230, 255, 0.5);
  background: rgba(34, 230, 255, 0.09);
}

.chip span {
  color: var(--faint);
  font-size: 10px;
}

.chip--large {
  padding: 8px 13px;
  font-size: 13px;
}

.source-link {
  flex: 0 0 auto;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.source-link:hover {
  color: var(--accent);
}

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.empty {
  padding: 26px;
  border: 1px dashed rgba(34, 230, 255, 0.2);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* ---------- buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #021018;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(34, 230, 255, 0.16);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  color: #021018;
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 14px 34px rgba(34, 230, 255, 0.24);
}

.button--ghost {
  background: rgba(3, 8, 17, 0.35);
  border-color: rgba(34, 230, 255, 0.24);
  color: var(--muted);
  box-shadow: none;
}

.button--ghost:hover {
  color: var(--text);
  border-color: rgba(34, 230, 255, 0.55);
  background: rgba(34, 230, 255, 0.06);
}

/* ---------- page head / archive ---------- */
.page-head {
  margin-top: 36px;
  padding: 28px 30px;
  border: 1px solid rgba(34, 230, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 230, 255, 0.06), transparent 55%),
    linear-gradient(180deg, rgba(8, 24, 38, 0.9), rgba(4, 12, 22, 0.96));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.page-head--narrow {
  max-width: 820px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(27px, 3.2vw, 38px);
  line-height: 1.6;
  letter-spacing: 0;
}

.page-head .muted,
.page-head .lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.lead {
  font-size: 16px !important;
  line-height: 2;
}

.archive-search {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  max-width: 620px;
}

.archive-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid rgba(34, 230, 255, 0.2);
  border-radius: 12px;
  background: rgba(3, 8, 17, 0.45);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.archive-search input:focus {
  border-color: rgba(34, 230, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 230, 255, 0.08);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- article ---------- */
.article {
  max-width: 880px;
  margin: 36px auto 0;
  padding: 32px;
  border: 1px solid rgba(34, 230, 255, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(8, 24, 38, 0.88), rgba(4, 12, 22, 0.97));
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-size: 12px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 18px;
  color: var(--faint);
  font-size: 13px;
}

.article h1 {
  margin: 12px 0 0;
  font-size: clamp(27px, 3.4vw, 40px);
  line-height: 1.65;
  letter-spacing: 0;
}

.article__summary {
  margin: 18px 0 0;
  padding: 18px 20px;
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: linear-gradient(90deg, rgba(34, 230, 255, 0.08), rgba(34, 230, 255, 0.02));
  color: #d7f3fb;
  font-size: 16.5px;
  line-height: 2;
  box-shadow: inset 0 0 30px rgba(34, 230, 255, 0.03);
}

.article__summary--empty {
  border-inline-start-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 14px;
}

.article__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.article__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.article__note {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px dashed rgba(34, 230, 255, 0.16);
  color: var(--faint);
  font-size: 12px;
  line-height: 1.9;
}

.prose {
  max-width: 820px;
  margin: 36px auto 0;
  padding: 30px;
  border: 1px solid rgba(34, 230, 255, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(8, 24, 38, 0.88), rgba(4, 12, 22, 0.96));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.prose h2 {
  margin: 28px 0 10px;
  font-size: 21px;
  line-height: 1.6;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 15px;
  line-height: 2.05;
}

.prose ul {
  padding-inline-start: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose a {
  font-weight: 400;
  color: var(--accent-2);
}

/* ---------- form ---------- */
.form-card {
  max-width: 720px;
  margin: 28px auto 0;
  padding: 28px;
  border: 1px solid rgba(34, 230, 255, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(8, 24, 38, 0.9), rgba(4, 12, 22, 0.97));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.form-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-card label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
}

.form-card input,
.form-card textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(34, 230, 255, 0.18);
  border-radius: 12px;
  background: rgba(3, 8, 17, 0.45);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: 0;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-card input:focus,
.form-card textarea:focus {
  border-color: rgba(34, 230, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 230, 255, 0.08);
}

.required {
  color: var(--danger);
}

.hp {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.9;
}

.alert--success {
  border: 1px solid rgba(61, 255, 181, 0.35);
  background: rgba(61, 255, 181, 0.07);
  color: var(--success);
}

.alert--error {
  border: 1px solid rgba(255, 107, 138, 0.35);
  background: rgba(255, 107, 138, 0.07);
  color: var(--danger);
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: 70px;
  border-top: 1px solid rgba(34, 230, 255, 0.16);
  background: linear-gradient(180deg, rgba(3, 8, 17, 0.35), rgba(3, 8, 17, 0.94));
}

.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 230, 255, 0.55), transparent);
  opacity: 0.7;
  pointer-events: none;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 24px;
  padding: 32px 0 24px;
}

.footer-brand strong {
  font-size: 20px;
}

.footer-brand p {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 2;
  max-width: 60ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.copyright {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding-top: 16px;
  border-top: 1px dashed rgba(34, 230, 255, 0.14);
  color: var(--faint);
  font-size: 11px;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 14px 0;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .header-search {
    width: 190px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .hero__panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    border-bottom: 0;
    padding-bottom: 0;
  }

  .hero__note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--max), calc(100% - 24px));
  }

  .brand__logo-wrap {
    width: 46px;
    height: 46px;
  }

  .brand__logo {
    width: 43px;
    height: 43px;
    border-radius: 12px;
  }

  .brand__text strong {
    font-size: 18px;
  }

  .brand__text small {
    display: none;
  }

  .header-search {
    flex: 1 1 100%;
    width: 100%;
  }

  .hero {
    margin-top: 22px;
    padding: 22px;
    border-radius: var(--radius);
  }

  .hero h1 {
    font-size: 25px;
  }

  .hero__pulse {
    height: 70px;
    opacity: 0.24;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .article,
  .prose,
  .form-card,
  .page-head {
    padding: 21px;
  }

  .article__summary {
    padding: 15px 17px;
    font-size: 15px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .hero__panel {
    grid-template-columns: 1fr;
  }

  .stat {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(34, 230, 255, 0.16);
    padding-bottom: 10px;
  }

  .stat:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .hero__note {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
