* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --surface: #131318;
  --surface-lowest: #0e0e13;
  --surface-low: #1b1b20;
  --surface-high: #24242a;
  --text: #e4e1e9;
  --muted: #b9cacb;
  --quiet: #849495;
  --line: rgba(58, 73, 75, 0.35);
  --cyan: #00f3ff;
  --purple: #ccc0ed;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

h1,
h2,
h3,
.font-headline {
  font-family: "Space Grotesk", sans-serif;
}

a {
  color: var(--cyan);
}

.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 60px 60px;
}

.nav-scrolled {
  background-color: rgba(19, 19, 24, 0.85) !important;
  border-bottom: 1px solid rgba(58, 73, 75, 0.3) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-glyph {
  width: 28px;
  height: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  flex-shrink: 0;
}

.brand-glyph span {
  display: block;
  background: var(--cyan);
}

.brand-glyph span:nth-child(1),
.brand-glyph span:nth-child(3),
.brand-glyph span:nth-child(7),
.brand-glyph span:nth-child(9) {
  opacity: 0.35;
}

.brand-glyph span:nth-child(2),
.brand-glyph span:nth-child(4),
.brand-glyph span:nth-child(6),
.brand-glyph span:nth-child(8) {
  opacity: 0.7;
}

.brand-glyph span:nth-child(5) {
  opacity: 1;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1;
  flex-shrink: 0;
}

.brand-name strong {
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-name small {
  margin-top: 5px;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease;
}

.site-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 32px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  direction: ltr;
  align-items: center;
  gap: 24px;
}

.site-header .brand-lockup {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.site-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-language-toggle,
.mobile-language-toggle {
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.site-language-toggle {
  display: none;
}

.site-language-toggle .material-symbols-outlined,
.mobile-language-toggle .material-symbols-outlined {
  font-size: 17px;
  line-height: 1;
}

.site-language-toggle:hover,
.mobile-language-toggle:hover,
.site-language-toggle.is-active,
.mobile-language-toggle.is-active {
  color: var(--text);
}

.site-nav {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  display: none;
  align-items: center;
  gap: 40px;
}

html[dir="rtl"] .site-header .brand-lockup {
  grid-column: 3;
  justify-self: end;
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .site-header .site-actions {
  grid-column: 1;
  justify-self: start;
  flex-direction: row-reverse;
}

html[dir="rtl"] .site-header .site-nav {
  grid-column: 2;
  direction: ltr;
}

.site-nav a,
.footer-link {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active,
.footer-link:hover {
  color: var(--cyan);
}

.btn-primary {
  background: linear-gradient(135deg, #19f3ff 0%, #75e7f2 52%, #b8fbff 100%);
  color: #05282d;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 2px;
  box-shadow: 0 0 18px rgba(0, 243, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: box-shadow 0.3s ease, filter 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  text-decoration: none;
}

.site-actions > .btn-primary {
  display: none;
}

.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.52), 0 0 70px rgba(117, 231, 242, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(132, 148, 149, 0.35);
  border-radius: 2px;
  padding: 14px 28px;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.btn-ghost:hover {
  border-color: rgba(0, 243, 255, 0.5);
  color: var(--cyan);
}

.mobile-toggle {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: 0;
  background: transparent;
}

html[dir="rtl"] .site-header .mobile-toggle {
  grid-column: 1;
  justify-self: start;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(14, 14, 19, 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 36px;
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.mobile-menu.open {
  transform: translateY(0);
  pointer-events: all;
}

.mobile-menu a {
  color: var(--quiet);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.mobile-language-toggle {
  display: inline-flex;
  color: var(--quiet);
  font-size: clamp(20px, 4.6vw, 30px);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--cyan);
}

.hub-hero {
  min-height: 62vh;
  padding: 144px 24px 96px;
  display: flex;
  align-items: end;
  border-bottom: 1px solid rgba(58, 73, 75, 0.25);
  background-color: var(--surface-lowest);
}

.hub-hero-inner {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.hub-title {
  max-width: 860px;
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.94;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hub-copy {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.case-list {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.case-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.case-row:hover h2 {
  color: var(--cyan);
}

.case-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--quiet);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-row h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
  transition: color 0.25s ease;
  overflow-wrap: anywhere;
}

.case-row p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.article-shell {
  padding-top: 132px;
}

.article-header,
.article-body {
  width: min(calc(100% - 40px), 700px);
  margin: 0 auto;
}

.article-kicker {
  margin: 0 0 18px;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.article-title {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(34px, 3.8vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.article-subtitle {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  color: var(--quiet);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-header[data-active-language="ar"] {
  direction: rtl;
  text-align: right;
}

.article-header[data-active-language="ar"] .article-byline {
  justify-content: flex-start;
}

.cover-frame,
.wide-media {
  width: min(calc(100% - 28px), 1040px);
  margin: 58px auto;
}

.cover-frame {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
}

.cover-frame img {
  display: block;
  max-width: min(46vw, 260px);
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(0, 243, 255, 0.14));
}

.article-body {
  padding-bottom: 18px;
}

.language-switch {
  width: max-content;
  margin: 0 auto 44px;
  padding: 4px;
  display: flex;
  gap: 4px;
  border: 1px solid rgba(58, 73, 75, 0.45);
  background: rgba(14, 14, 19, 0.72);
}

.language-switch button {
  min-width: 54px;
  border: 0;
  padding: 10px 16px;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.language-switch button:hover,
.language-switch button.is-active {
  background: rgba(0, 243, 255, 0.1);
  color: var(--cyan);
}

.article-language-panel:not(.is-active) {
  display: none;
}

.article-body p {
  margin: 0 0 28px;
  color: #d8dde0;
  font-size: 19px;
  line-height: 1.86;
}

.article-body h2 {
  margin: 58px 0 18px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.18;
}

.article-body h3 {
  margin: 42px 0 16px;
  color: var(--purple);
  font-size: 22px;
  line-height: 1.25;
}

.article-body ul {
  margin: 0 0 32px;
  padding-left: 22px;
  color: #d8dde0;
  font-size: 18px;
  line-height: 1.8;
}

.article-body li {
  margin-bottom: 12px;
}

.article-body li::marker {
  color: var(--cyan);
}

.article-body strong {
  color: var(--text);
  font-weight: 700;
}

.article-body em {
  color: var(--purple);
  font-style: italic;
}

.article-body code {
  padding: 0.08em 0.28em;
  border: 1px solid rgba(0, 243, 255, 0.18);
  border-radius: 2px;
  background: rgba(0, 243, 255, 0.06);
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88em;
}

.article-body .rtl-block {
  direction: rtl;
  text-align: right;
}

.article-body ul.rtl-block {
  padding-left: 0;
  padding-right: 24px;
}

.article-body blockquote {
  margin: 48px 0;
  padding: 6px 0 6px 24px;
  border-left: 2px solid var(--cyan);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  line-height: 1.45;
}

.article-divider {
  width: min(100%, 180px);
  height: 1px;
  margin: 64px auto;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.4), transparent);
}

.image-placeholder {
  width: min(calc(100% - 28px), 920px);
  margin: 52px auto;
}

.image-placeholder div {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  border: 1px dashed rgba(0, 243, 255, 0.35);
  background:
    repeating-linear-gradient(45deg, rgba(0, 243, 255, 0.018) 0, rgba(0, 243, 255, 0.018) 1px, transparent 1px, transparent 28px),
    linear-gradient(135deg, #0e0e13, #1b1b20);
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  line-height: 1.6;
  text-align: center;
  text-transform: uppercase;
}

.image-placeholder figcaption {
  margin-top: 12px;
  color: var(--quiet);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.article-cta-grid {
  margin: 72px 0 8px;
  width: min(100%, 620px);
  display: grid;
  direction: ltr;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  justify-items: stretch;
  gap: 10px;
}

.article-cta-grid > a.article-icon-cta {
  width: 100% !important;
  min-width: 0;
  height: 54px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(132, 148, 149, 0.32) !important;
  border-bottom: 1px solid rgba(132, 148, 149, 0.32) !important;
  border-radius: 4px;
  background: #211b22 !important;
  color: var(--text) !important;
  text-decoration: none !important;
  overflow: hidden;
  transition:
    border-color 0.22s ease,
    background-color 0.22s ease,
    transform 0.22s ease;
}

.article-cta-grid > a.article-icon-cta:hover {
  border-color: rgba(0, 243, 255, 0.45) !important;
  background: #2a222b !important;
  transform: translateY(-2px);
}

.article-icon-cta--brandfit {
  padding: 0 12px;
}

.article-icon-cta--brandfit img {
  width: 32px;
  height: 32px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(204, 192, 237, 0.18));
}

.article-icon-cta-label {
  min-width: 0;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.article-icon-cta--github {
  padding: 0 14px;
  color: #fff;
}

html[dir="rtl"] .article-icon-cta--brandfit,
html[dir="rtl"] .article-icon-cta--github {
  flex-direction: row;
  direction: rtl;
}

.article-icon-cta--github svg {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}

.article-icon-cta--github span {
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid rgba(0, 243, 255, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

html[dir="rtl"] .article-icon-cta--github span {
  letter-spacing: 0;
}

.article-icon-cta--product-hunt {
  padding: 0;
}

.article-icon-cta--product-hunt:hover {
  background: #2a222b;
}

.article-icon-cta--product-hunt img {
  width: 100%;
  height: 54px;
  display: block;
  object-fit: contain;
  background: transparent;
}

.article-icon-cta img,
.article-icon-cta svg {
  max-width: 100%;
  max-height: 100%;
}

@media (max-width: 620px) {
  .article-cta-grid {
    grid-template-columns: 1fr;
  }
}

.wide-media img {
  width: 100%;
  min-height: 280px;
  display: block;
  object-fit: contain;
  padding: 72px 32px;
  background:
    repeating-linear-gradient(45deg, rgba(204, 192, 237, 0.018) 0, rgba(204, 192, 237, 0.018) 1px, transparent 1px, transparent 38px),
    linear-gradient(135deg, #0e0e13, #1f1f25);
}

.wide-media--screenshot img {
  min-height: 0;
  padding: 0;
  background: transparent;
}

.wide-media figcaption {
  margin-top: 12px;
  color: var(--quiet);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.article-footer {
  width: min(calc(100% - 40px), 700px);
  margin: 0 auto 96px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.site-footer {
  padding: 64px 32px;
  background: var(--surface-lowest);
  border-top: 1px solid rgba(58, 73, 75, 0.25);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.footer-heading {
  margin: 0 0 20px;
  color: var(--quiet);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer-copy {
  max-width: 260px;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 64px auto 0;
  padding-top: 32px;
  border-top: 1px solid rgba(58, 73, 75, 0.2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: #3a494b;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (min-width: 860px) {
  .site-nav {
    display: flex;
  }

  .site-language-toggle {
    display: inline-flex;
  }

  .site-actions > .btn-primary {
    display: inline-flex;
  }

  .mobile-toggle {
    display: none;
  }

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

@media (max-width: 620px) {
  .site-header-inner {
    grid-template-columns: 1fr auto;
    padding: 18px 20px;
  }

  .site-actions {
    display: none;
  }

  .site-header .brand-lockup {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .mobile-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  html[dir="rtl"] .site-header .brand-lockup {
    grid-column: 2;
    justify-self: end;
  }

  html[dir="rtl"] .site-header .mobile-toggle {
    grid-column: 1;
    justify-self: start;
  }

  .hub-hero {
    min-height: 58vh;
    padding-top: 120px;
  }

  .case-list {
    padding-top: 44px;
  }

  .article-shell {
    padding-top: 116px;
  }

  .article-title {
    font-size: clamp(28px, 7.4vw, 32px);
    line-height: 1.14;
  }

  .article-body p,
  .article-body ul {
    font-size: 17px;
    line-height: 1.78;
  }

  .cover-frame {
    margin: 44px auto 50px;
  }

  .cover-frame img {
    max-width: min(62vw, 220px);
  }
}
