

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: dark;

  --bg: #070b12;
  --bg-soft: #0a101b;
  --surface: #0f1624;
  --surface-2: #131c2e;
  --surface-3: #182238;

  --text: #e8ecf4;
  --text-soft: #c3cbd9;
  --muted: #94a3b8;
  --muted-2: #6b7a90;

  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.24);

  --accent: #8b9dff;
  --accent-strong: #a5b4fc;
  --accent-2: #5eead4;
  --accent-soft: rgba(124, 140, 248, 0.12);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --maxw: 1180px;
  --header-h: 68px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.32);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
  background: var(--bg);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 42% at 50% -12%, rgba(99, 102, 241, 0.16), transparent 62%),
    radial-gradient(ellipse 48% 36% at 92% 18%, rgba(45, 212, 191, 0.07), transparent 62%),
    radial-gradient(ellipse 42% 32% at 4% 76%, rgba(139, 157, 255, 0.05), transparent 66%);
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--accent);
  color: #070b12;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #06101f;
  font-size: 14px;
  font-weight: 700;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 12px;
  color: #06101f;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 18, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: box-shadow var(--transition), background var(--transition);
}

.site-header.scrolled {
  background: rgba(7, 11, 18, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  width: 100%;
  max-width: var(--maxw);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(139, 157, 255, 0.25);
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.05);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.lang-menu[open] summary {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

.lang-menu .icon {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: 0.8;
}

.lang-menu .chev {
  width: 12px;
  height: 12px;
  transition: transform var(--transition);
}

.lang-menu[open] .chev {
  transform: rotate(180deg);
}

.lang-code {
  letter-spacing: 0.08em;
}

.lang-list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 10px);
  z-index: 60;
  display: grid;
  gap: 2px;
  width: 240px;
  max-height: min(70vh, 460px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.lang-list a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
}

.lang-list a:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.lang-list a[aria-current='true'] {
  background: rgba(94, 234, 212, 0.08);
  color: var(--accent-2);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.04);
}

.menu-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.site-header.nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(760px, 86vh);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 24px clamp(52px, 7vw, 88px);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 58% 44%, #000 18%, transparent 76%);
  mask-image: radial-gradient(ellipse 72% 68% at 58% 44%, #000 18%, transparent 76%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(30px, 5vw, 56px);
  align-items: center;
  width: 100%;
}

.hero-copy {
  max-width: 610px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.05);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}

.hero-title {
  margin: 22px 0 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 104px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title {
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 46%, #7dd3fc 76%, #5eead4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero-subtitle {
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition), background var(--transition), color var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06101f;
  box-shadow: 0 10px 30px rgba(94, 234, 212, 0.14);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(94, 234, 212, 0.22);
  color: #06101f;
}

.btn-ghost {
  border-color: var(--border-strong);
  background: rgba(148, 163, 184, 0.04);
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.btn-icon {
  font-size: 16px;
  line-height: 1;
  transition: transform var(--transition);
}

.btn:hover .btn-icon {
  transform: translateY(2px);
}

.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-svg {
  width: min(100%, 560px);
  height: auto;
  filter: drop-shadow(0 34px 70px rgba(0, 0, 0, 0.4));
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(54px, 7vw, 92px) 24px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
  margin-bottom: 34px;
}

.section-kicker {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-desc {
  color: var(--muted);
  font-size: 16px;
}

.shape-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.shape-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition), background var(--transition);
}

.shape-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(139, 157, 255, 0.11), transparent 66%);
  opacity: 0;
  transition: opacity var(--transition);
}

.shape-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 157, 255, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.shape-card:hover::before {
  opacity: 1;
}

.shape-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 157, 255, 0.2), var(--shadow-card);
}

.card-index {
  position: absolute;
  top: 18px;
  inset-inline-end: 20px;
  z-index: 1;
  color: var(--muted-2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.card-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin-bottom: 16px;
  color: var(--accent);
}

.card-art svg {
  width: 132px;
  height: 132px;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(139, 157, 255, 0.12));
}

.card-title {
  margin-bottom: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.card-title a {
  color: inherit;
}

.card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.card-title a:focus-visible {
  outline: none;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.formula-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 16px;
}

.formula-text {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid rgba(139, 157, 255, 0.22);
  border-radius: 10px;
  background: rgba(139, 157, 255, 0.08);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.formula-text .katex {
  color: inherit;
  font-size: 1.05em;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  transition: gap var(--transition), color var(--transition);
}

.shape-card:hover .card-cta {
  gap: 9px;
  color: var(--accent-2);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(30px, 5vw, 52px);
  align-items: center;
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(139, 157, 255, 0.09), rgba(94, 234, 212, 0.045) 55%, transparent);
}

.about-copy .section-title {
  margin: 8px 0 16px;
}

.about-text {
  max-width: 54ch;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.about-art svg {
  width: min(100%, 380px);
  height: auto;
  margin-inline: auto;
}

.shape-draw {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shape-draw-fill {
  fill: var(--accent-soft);
  stroke: none;
  fill-opacity: 0.9;
}

.art-dim {
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 1.4;
  stroke-dasharray: 5 5;
  opacity: 0.5;
}

.art-label {
  fill: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}

.art-dot {
  fill: var(--accent-2);
}

.art-accent-2 {
  stroke: var(--accent-2);
}

.shape-draw-fill.art-accent-2 {
  fill: rgba(94, 234, 212, 0.1);
  stroke: none;
}

.hero-svg .shape-draw,
.about-art .shape-draw {
  stroke-width: 2.2;
}

.hero-svg .art-dim,
.about-art .art-dim {
  stroke-width: 1;
}

.hero-svg .art-label,
.about-art .art-label {
  fill: var(--text-soft);
  font-size: 14px;
}

.art-panel {
  fill: rgba(139, 157, 255, 0.06);
  stroke: rgba(139, 157, 255, 0.24);
  stroke-width: 1;
}

.art-symbol {
  fill: var(--accent);
  font-family: var(--font-display);
  font-size: 116px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  background: rgba(10, 16, 27, 0.82);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-ai {
  color: var(--muted-2);
  font-size: 12px;
}

.footer-nav {
  display: flex;
  gap: 22px;
}

.footer-nav a {
  color: var(--muted);
  font-size: 14px;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-soft);
  font-size: 16px;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.to-top:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.noscript-note {
  max-width: var(--maxw);
  margin: 0 auto 32px;
  padding: 18px 20px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 14px;
  line-height: 1.7;
}

.noscript-note a {
  color: #fde68a;
  text-decoration: underline;
}

.noscript-note p + p {
  margin-top: 8px;
}

.article-topbar .header-inner {
  gap: 16px;
}

.article-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.back-link-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.04);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.back-link-top:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.article-page {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) 24px 72px;
}

.article-page > h1 {
  margin-bottom: 12px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.article-page .article-subtitle {
  max-width: 64ch;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.article-visual {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse 62% 72% at 50% 42%, rgba(139, 157, 255, 0.11), rgba(15, 22, 36, 0.35));
}

.article-visual svg {
  width: min(100%, 300px);
  height: auto;
  overflow: visible;
}

.article-visual text {
  font-family: var(--font-body);
}

.article-section {
  margin-bottom: 44px;
}

.article-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.article-section h2::before {
  content: '';
  width: 4px;
  height: 22px;
  flex: none;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.article-section p {
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.8;
}

.formulas-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.formulas-section h2 {
  grid-column: 1 / -1;
}

.formula-block {
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.formula-block:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 157, 255, 0.4);
}

.formula-block .formula-text {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 22px;
  white-space: normal;
}

.formula-block .formula-text .katex {
  font-size: 1.1em;
}

.formula-block .formula-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.example-box {
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-inline-start: 3px solid var(--accent-2);
  border-radius: 0 16px 16px 0;
  background: rgba(94, 234, 212, 0.055);
}

[dir='rtl'] .example-box {
  border-radius: 16px 0 0 16px;
}

.example-box h3 {
  margin-bottom: 10px;
  color: var(--accent-2);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.example-box p {
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.7;
}

.example-box strong {
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: start;
  text-transform: uppercase;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  text-align: start;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table .formula-text {
  padding: 2px 8px;
  border: 0;
  border-radius: 6px;
  background: rgba(139, 157, 255, 0.08);
  font-size: 13px;
}

.article-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 11px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.04);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  transition: border-color var(--transition), color var(--transition),
    background var(--transition), transform var(--transition);
}

.article-page .back-link:hover {
  transform: translateX(-3px);
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

[dir='rtl'] .article-page .back-link:hover {
  transform: translateX(3px);
}

.article-footer {
  margin-top: 0;
}

.article-footer .footer-inner {
  padding-top: 28px;
  padding-bottom: 28px;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js [data-reveal].in-view {
  opacity: 1;
  transform: none;
}

.js .shape-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.js .shape-draw-fill {
  fill-opacity: 0;
  transition: fill-opacity 0.8s ease 0.35s;
}

.in-view .shape-draw {
  stroke-dashoffset: 0;
}

.in-view .shape-draw-fill {
  fill-opacity: 0.9;
}

@media (max-width: 1100px) {
  .shape-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-art {
    order: 2;
  }

  .hero-svg {
    width: min(100%, 460px);
  }

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

  .about-art {
    order: -1;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 12px 24px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 16, 27, 0.98);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    font-size: 15px;
  }

  .header-inner {
    gap: 12px;
  }

  .shape-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .hero,
  .section {
    padding-inline: 18px;
  }

  .header-inner {
    padding-inline: 18px;
  }

  .footer-inner {
    padding-inline: 18px;
  }

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

  .card-art {
    height: 138px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .article-page {
    padding-inline: 18px;
  }

  .article-topbar .back-label {
    display: none;
  }

  .article-actions .back-link-top {
    padding: 8px 10px;
  }

  .table-wrap {
    border: 0;
    background: none;
    overflow: visible;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .data-table tr {
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
  }

  .data-table td {
    padding: 0;
    border: 0;
  }

  .data-table td:first-child {
    margin-bottom: 4px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
  }

  .data-table td:nth-child(2) {
    margin-bottom: 6px;
  }

  .data-table td:last-child {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
  }

  .data-table .formula-text {
    display: inline-block;
  }
}

@media (max-width: 540px) {
  .hero-title {
    font-size: clamp(46px, 14vw, 72px);
  }

  .eyebrow {
    font-size: 12px;
  }

  .lang-list {
    width: min(80vw, 260px);
  }

  .formulas-section {
    grid-template-columns: 1fr;
  }

  .article-section h2 {
    font-size: 21px;
  }

  .article-page > h1 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .article-page .article-subtitle {
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .brand-name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .js .shape-draw {
    stroke-dashoffset: 0;
  }

  .js .shape-draw-fill {
    fill-opacity: 0.9;
  }
}
