/* Topdar theme — chrome + blog (clean rebuild) */

:root {
  --bg: #0B131B;
  --bg-soft: #101822;
  --bg-card: #131C26;
  --bg-elev: #1A2330;
  --bg-elev-2: #222C3A;
  --hair: rgba(255, 255, 255, 0.06);
  --hair-strong: rgba(255, 255, 255, 0.1);
  --cyan-border: rgba(93, 206, 247, 0.25);
  --cyan-bg: rgba(93, 206, 247, 0.08);
  --cyan: #5DCEF7;
  --cyan-bright: #7FDAFA;
  --cyan-soft: #A8E3FB;
  --cyan-deep: #2A9FCC;
  --green: #5DD491;
  --text: #FFFFFF;
  --text-soft: #D9DFE6;
  --text-mid: #8B98A8;
  --text-dim: #6A7280;
  --r-pill: 999px;
  --r-card: 22px;
  --r-card-lg: 28px;
  --gold: #E5C97F;
}

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

html {
  background-color: #02060B;
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

html,
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #080F16 0%, #02060B 100%);
  background-attachment: fixed;
  background-color: #02060B;
  color: var(--text);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="ar"] body,
html[dir="rtl"] body {
  font-family: "Cairo", sans-serif;
}

html[dir="rtl"] {
  direction: rtl;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(1000px 600px at 50% -200px, rgba(93, 206, 247, 0.1), transparent 60%),
    radial-gradient(900px 700px at 100% 30%, rgba(93, 206, 247, 0.06), transparent 60%);
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  position: relative;
  z-index: 5;
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 16px 40px;
}

@media (min-width: 900px) {
  .shell {
    max-width: 860px;
    padding: 24px 24px 56px;
  }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 14px;
  z-index: 50;
  margin-bottom: 18px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 14px 22px;
  background: rgba(19, 28, 38, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-card-lg);
  box-shadow: 0 12px 40px -16px rgba(0, 0, 0, 0.6);
}

html[dir="rtl"] .nav-inner {
  padding: 14px 22px 14px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.hl-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1;
}

.hl-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.hl-logo img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 200px;
}

@media (min-width: 768px) {
  .hl-logo img {
    height: 44px;
  }
}

.hl-by {
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text-mid);
  white-space: nowrap;
  padding-inline-start: 2px;
}

html[lang="ar"] .hl-by,
html[dir="rtl"] .hl-by {
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

.nav-dropdown-wrap {
  position: relative;
}

.menu-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--text);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, background 0.25s ease;
}

.menu-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.06);
}

.menu-btn.open {
  background: rgba(93, 206, 247, 0.12);
  color: var(--cyan);
}

.menu-btn svg {
  width: 28px;
  height: 28px;
  display: block;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 240px;
  background: rgba(19, 28, 38, 0.97);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--hair-strong);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 50;
}

.nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  color: var(--text-soft);
  font-family: "Cairo", sans-serif;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

html[lang="en"] .nav-dropdown a {
  font-family: "Manrope", sans-serif;
  font-size: 14.5px;
}

.nav-dropdown a:hover {
  background: rgba(93, 206, 247, 0.08);
  color: var(--cyan);
}

.nav-dropdown a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-mid);
  display: block;
}

.nav-dropdown a:hover svg {
  color: var(--cyan);
}

/* ---------- Lang pill ---------- */
.lang {
  display: flex;
  justify-content: flex-start;
  margin: 8px 0 18px;
  padding: 0 4px;
}

.lang-pill {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--hair);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
  direction: ltr;
}

.lang-pill button {
  padding: 8px 21px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c9d2dc;
  transition: all 0.3s ease;
  font-family: "Manrope", sans-serif;
}

.lang-pill button[aria-pressed="true"] {
  background: var(--cyan);
  color: var(--bg);
  font-weight: 700;
  box-shadow: 0 6px 18px -4px rgba(93, 206, 247, 0.55);
}

.lang-pill button[data-lang="ar"] {
  font-family: "Cairo", sans-serif;
  font-size: 12px;
}

/* ---------- Typography helpers ---------- */
.display {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--text);
  font-size: clamp(26px, 5vw, 40px);
  margin: 0;
}

html[lang="ar"] .display,
html[dir="rtl"] .display {
  font-family: "Cairo", sans-serif;
  letter-spacing: 0;
  line-height: 1.4;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--cyan-border);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--cyan-soft);
  margin: 0;
}

html[lang="ar"] .eyebrow,
html[dir="rtl"] .eyebrow {
  font-family: "Cairo", sans-serif;
  font-size: 14px;
}

.site-main {
  min-height: 40vh;
  padding: 8px 4px 48px;
  color: var(--text-soft);
  position: relative;
  z-index: 2;
}

.site-main a {
  color: var(--cyan);
}

/* ---------- Footer ---------- */
footer {
  background: #000000;
  margin: 40px -16px 0;
  padding: 48px 24px 32px;
  color: var(--text-mid);
  font-size: 14px;
  line-height: 1.7;
  border-top: 1px solid var(--hair-strong);
}

@media (min-width: 900px) {
  footer {
    margin-left: -24px;
    margin-right: -24px;
  }
}

html[lang="ar"] footer,
html[dir="rtl"] footer {
  font-size: 15px;
}

.foot-inner {
  max-width: 1100px;
  margin-inline: auto;
}

.foot-top {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}

@media (min-width: 760px) {
  .foot-top {
    grid-template-columns: 1.5fr 2fr;
  }
}

.foot-brand .tag {
  margin-top: 12px;
  color: var(--text-mid);
  font-size: 14px;
  line-height: 1.75;
  max-width: 30em;
}

.foot-brand .socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.foot-brand .socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--hair-strong);
  display: grid;
  place-items: center;
  color: var(--text-mid);
  transition: all 0.25s;
}

.foot-brand .socials a:hover {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
}

.foot-brand .socials svg {
  width: 15px;
  height: 15px;
  display: block;
}

.foot-brand .hl-logo img {
  height: 32px;
}

.foot-sitemap {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 660px) {
  .foot-sitemap {
    grid-template-columns: repeat(3, 1fr);
  }
}

.foot-col h4 {
  font-family: "Manrope", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

html[lang="ar"] .foot-col h4,
html[dir="rtl"] .foot-col h4 {
  font-family: "Cairo", sans-serif;
  font-size: 13.5px;
  letter-spacing: 0;
  text-transform: none;
}

.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.foot-col a {
  color: var(--text-mid);
  font-size: 14px;
  transition: color 0.2s;
}

.foot-col a:hover {
  color: var(--cyan);
}

.foot-divider {
  height: 1px;
  background: var(--hair);
  margin: 24px 0;
}

.foot-bottom .licenses {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-dim);
  font-size: 12.5px;
}

/* ---------- Blog list ---------- */
.topdar-blog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.topdar-blog-card {
  background: var(--bg-card);
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-card-lg);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.topdar-blog-card:hover {
  border-color: var(--cyan-border);
  transform: translateY(-2px);
}

.topdar-blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.topdar-blog-card-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.topdar-blog-card-body {
  padding: 22px 24px;
}

.topdar-blog-card-date {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0 0 8px;
}

.topdar-blog-card-title {
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  font-size: 22px;
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.35;
}

html[lang="en"] .topdar-blog-card-title {
  font-family: "Manrope", sans-serif;
}

.topdar-blog-card-excerpt {
  margin: 0;
  color: var(--text-mid);
  line-height: 1.7;
  font-size: 15px;
}

.topdar-blog-pagination {
  margin-top: 28px;
}

.topdar-blog-pagination a {
  color: var(--cyan);
}

/* ---------- Single post ---------- */
.topdar-article {
  max-width: 100%;
}

.topdar-article-head {
  margin-bottom: 28px;
}

.topdar-article-head .eyebrow {
  margin-bottom: 14px;
}

.topdar-article-head .display {
  margin-bottom: 8px;
}

.topdar-article-thumb {
  margin-top: 22px;
  border-radius: var(--r-card-lg);
  overflow: hidden;
  border: 1px solid var(--hair-strong);
  background: var(--bg-card);
}

.topdar-article-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.topdar-article-body {
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.85;
}

html[lang="ar"] .topdar-article-body,
html[dir="rtl"] .topdar-article-body {
  font-family: "Cairo", sans-serif;
  font-size: 18px;
  line-height: 2;
}

.topdar-article-body > *:first-child {
  margin-top: 0;
}

.topdar-article-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.topdar-article-body h2,
.topdar-article-body h3 {
  color: var(--text);
  margin: 1.6em 0 0.65em;
  line-height: 1.35;
  font-family: "Cairo", sans-serif;
  font-weight: 800;
}

html[lang="en"] .topdar-article-body h2,
html[lang="en"] .topdar-article-body h3 {
  font-family: "Manrope", sans-serif;
}

.topdar-article-body h2 {
  font-size: clamp(22px, 4vw, 28px);
}

.topdar-article-body h3 {
  font-size: clamp(18px, 3vw, 22px);
}

.topdar-article-body p {
  margin: 0 0 1em;
}

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

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

.topdar-article-body ul,
.topdar-article-body ol {
  margin: 0 0 1.2em;
  padding-inline-start: 1.35em;
  color: var(--text-soft);
}

.topdar-article-body li {
  margin-bottom: 0.45em;
  line-height: 1.75;
}

.topdar-article-body figure {
  margin: 1.6em 0;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--hair-strong);
  background: var(--bg-card);
}

.topdar-article-body figure img {
  width: 100%;
  height: auto;
  display: block;
}

.topdar-article-body figcaption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
  border-top: 1px solid var(--hair);
}

.topdar-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 15px;
  overflow-x: auto;
  display: block;
}

.topdar-article-body thead,
.topdar-article-body tbody,
.topdar-article-body tr {
  width: 100%;
}

.topdar-article-body table {
  display: table;
}

.topdar-article-body th,
.topdar-article-body td {
  border: 1px solid var(--hair-strong);
  padding: 12px 14px;
  text-align: start;
}

.topdar-article-body th {
  background: var(--bg-elev);
  color: var(--cyan);
  font-weight: 700;
}

.topdar-article-body td {
  background: var(--bg-card);
  color: var(--text-soft);
}

.section-head {
  margin-bottom: 28px;
}

.section-head p {
  color: var(--text-mid);
  max-width: 36em;
  line-height: 1.7;
}
