:root {
  --porcelain: #f7f4ee;
  --graphite: #10141a;
  --copper: #c98263;
  --cobalt: #2457ff;
  --lime: #a3e635;
  --slate: #7e8a96;
  --plum: #2a1725;
  --surface: #fffdf8;
  --line: rgba(16, 20, 26, 0.13);
  --soft-shadow: 0 28px 90px rgba(16, 20, 26, 0.12);
  --max-width: 1180px;
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-arabic: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, sans-serif;
  font-family: var(--font-display);
  color: var(--graphite);
  background: var(--porcelain);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 24%, rgba(36, 87, 255, 0.055), transparent 30%),
    radial-gradient(circle at 12% 75%, rgba(201, 130, 99, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(247, 244, 238, 0.96), rgba(247, 244, 238, 1)),
    var(--porcelain);
  color: var(--graphite);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 238, 0.88);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.language-switcher,
.hero-actions,
.social-links,
.course-strip {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-links {
  justify-content: center;
  gap: clamp(16px, 3vw, 36px);
  color: rgba(16, 20, 26, 0.68);
  font-size: 0.93rem;
  font-weight: 700;
}

.nav-links a:hover,
.social-links a:hover {
  color: var(--cobalt);
}

.language-switcher {
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.48);
}

.lang-button {
  min-width: 42px;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  background: transparent;
  color: var(--graphite);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.lang-button.is-active {
  background: var(--graphite);
  color: var(--porcelain);
}

.section-band {
  width: min(var(--max-width), calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(64px, 10vw, 116px) 0;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(320px, 0.82fr);
  gap: clamp(42px, 8vw, 118px);
  align-items: center;
  padding-top: clamp(56px, 8vw, 94px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  overflow-wrap: normal;
  text-wrap: balance;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.95;
}

h1 {
  max-width: 720px;
  font-size: clamp(3.9rem, 7.2vw, 6.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2.6rem, 5.8vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h1 span,
h2 span {
  display: block;
}

em {
  display: inline-block;
  color: var(--copper);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
}

h1 em {
  display: block;
  max-width: 760px;
  font-size: clamp(2.9rem, 5.2vw, 4.65rem);
  line-height: 1.02;
}

.hero-text,
.split p,
.section-heading > p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(16, 20, 26, 0.68);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.75;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--graphite);
  color: var(--porcelain);
}

.button-primary::after {
  content: "→";
  margin-left: 10px;
  color: var(--lime);
}

.button-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.34);
}

.button-ghost:hover {
  border-color: rgba(36, 87, 255, 0.42);
}

.hero-visual {
  min-height: 560px;
  display: grid;
  place-items: center;
}

.visual-frame {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 4 / 5;
  padding: 30px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(201, 130, 99, 0.55), rgba(247, 244, 238, 0.92) 45%, rgba(126, 138, 150, 0.32)),
    var(--porcelain);
  box-shadow: var(--soft-shadow);
}

.visual-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(16, 20, 26, 0.08);
  border-radius: inherit;
  pointer-events: none;
}

.visual-topline,
.visual-signal,
.prompt-card,
.mini-grid {
  position: relative;
  z-index: 1;
}

.visual-topline {
  display: flex;
  justify-content: space-between;
  color: var(--graphite);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.visual-signal {
  display: grid;
  gap: 8px;
  margin-top: 88px;
  max-width: 138px;
}

.visual-signal span {
  width: max-content;
  border: 1px solid rgba(16, 20, 26, 0.12);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 253, 248, 0.5);
  color: rgba(16, 20, 26, 0.62);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.visual-signal span:nth-child(2) {
  color: var(--cobalt);
}

.prompt-card {
  margin-top: 54px;
  border-left: 5px solid var(--copper);
  padding: 24px;
  background: rgba(16, 20, 26, 0.95);
  color: var(--porcelain);
}

.prompt-card strong {
  display: block;
  margin-top: 18px;
  font-size: 2rem;
  line-height: 1.05;
}

.prompt-card p {
  margin-bottom: 0;
  color: rgba(247, 244, 238, 0.74);
  line-height: 1.55;
}

.prompt-chip {
  color: var(--cobalt);
  font-size: 0.78rem;
  font-weight: 800;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.mini-grid span {
  height: 8px;
  border-radius: 999px;
  background: rgba(126, 138, 150, 0.32);
}

.mini-grid span:first-child {
  background: var(--lime);
}

.section-heading {
  margin-bottom: 34px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.guide-card {
  display: block;
  min-height: 255px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--copper);
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 253, 248, 0.58);
}

.guide-card:nth-child(3) {
  border-top-color: var(--cobalt);
}

.guide-card:nth-child(4) {
  border-top-color: var(--lime);
}

.guide-card-featured {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 64px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
  min-height: 0;
  border-top-color: var(--cobalt);
  padding: 18px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.guide-card-featured:hover {
  border-color: rgba(36, 87, 255, 0.34);
  background: rgba(255, 253, 248, 0.76);
  transform: translateY(-2px);
}

.guide-card-featured img {
  width: 100%;
  max-height: 360px;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  object-fit: cover;
}

.guide-card.guide-card-featured h3 {
  margin-top: 0;
  max-width: 680px;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.guide-card-featured p:not(.eyebrow) {
  max-width: 680px;
  font-size: 1.05rem;
}

.text-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--cobalt);
  font-weight: 800;
}

.text-link::after {
  content: "->";
  margin-left: 8px;
}

.card-number {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: var(--graphite);
  color: var(--porcelain);
  font-size: 0.82rem;
  font-weight: 800;
}

.guide-card h3 {
  margin: 52px 0 12px;
  font-size: 1.35rem;
}

.guide-card p {
  margin: 0;
  color: rgba(16, 20, 26, 0.66);
  line-height: 1.65;
}

.split,
.connect {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
  border-top: 1px solid var(--line);
}

.courses {
  width: 100%;
  max-width: none;
  border-top: 1px solid rgba(247, 244, 238, 0.12);
  border-bottom: 1px solid rgba(247, 244, 238, 0.12);
  background:
    radial-gradient(circle at 82% 18%, rgba(36, 87, 255, 0.18), transparent 28%),
    linear-gradient(135deg, var(--graphite), var(--plum));
  color: var(--porcelain);
}

.courses > * {
  width: min(var(--max-width), calc(100% - 36px));
  margin-inline: auto;
}

.courses em,
.courses .eyebrow {
  color: var(--lime);
}

.courses .section-heading > p:not(.eyebrow) {
  color: rgba(247, 244, 238, 0.72);
}

.course-strip {
  flex-wrap: wrap;
  gap: 10px;
}

.course-strip span {
  border: 1px solid rgba(247, 244, 238, 0.16);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(247, 244, 238, 0.07);
  font-weight: 800;
}

.social-links {
  flex-wrap: wrap;
  gap: 12px;
}

.social-links a {
  min-width: 148px;
  border-bottom: 2px solid var(--copper);
  padding: 16px 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: rgba(16, 20, 26, 0.64);
  font-size: 0.92rem;
}

.guide-page {
  background:
    linear-gradient(180deg, rgba(247, 244, 238, 0.96), rgba(255, 253, 248, 0.94)),
    var(--porcelain);
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
  padding-bottom: clamp(48px, 8vw, 86px);
}

.guide-hero > div {
  min-width: 0;
}

.guide-hero h1 {
  font-size: clamp(3rem, 6vw, 5.8rem);
  overflow-wrap: anywhere;
}

.guide-hero h1 span,
.guide-hero h1 em {
  overflow-wrap: anywhere;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.guide-meta li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 253, 248, 0.55);
  color: rgba(16, 20, 26, 0.68);
  font-size: 0.86rem;
  font-weight: 800;
}

.guide-cover {
  width: min(100%, 420px);
  max-width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--soft-shadow);
}

.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: clamp(44px, 7vw, 76px);
}

.guide-toc {
  position: sticky;
  top: 112px;
  border-left: 4px solid var(--copper);
  padding-left: 18px;
}

.guide-toc strong {
  display: block;
  margin-bottom: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-toc a {
  display: block;
  margin: 10px 0;
  color: rgba(16, 20, 26, 0.66);
  font-weight: 700;
}

.guide-toc a:hover {
  color: var(--cobalt);
}

.guide-article {
  min-width: 0;
  font-size: 1.04rem;
  line-height: 1.82;
}

.guide-article h2 {
  margin: 0 0 22px;
  padding-top: 18px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.guide-article h3 {
  margin: 34px 0 10px;
  font-size: 1.25rem;
}

.guide-article p,
.guide-article li {
  color: rgba(16, 20, 26, 0.74);
}

.guide-article ul,
.guide-article ol {
  padding-left: 1.25rem;
}

.guide-article a {
  color: var(--cobalt);
  font-weight: 800;
}

.guide-article section {
  margin-bottom: clamp(44px, 7vw, 78px);
}

.guide-article pre {
  direction: ltr;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(16, 20, 26, 0.12);
  border-radius: 8px;
  padding: 18px;
  background: rgba(16, 20, 26, 0.94);
  color: var(--porcelain);
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.guide-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 253, 248, 0.58);
}

.detail-grid strong {
  display: block;
  margin-bottom: 8px;
}

.detail-grid p {
  margin: 0;
}

.callout {
  border-left: 5px solid var(--cobalt);
  margin: 28px 0;
  padding: 22px 24px;
  background: rgba(36, 87, 255, 0.07);
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 20px 0 28px;
}

.checklist label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(16, 20, 26, 0.74);
  font-weight: 700;
}

.checklist input {
  margin-top: 7px;
  accent-color: var(--cobalt);
}

.workflow-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.workflow-line span {
  border-radius: 999px;
  padding: 9px 12px;
  background: var(--graphite);
  color: var(--porcelain);
  font-size: 0.86rem;
  font-weight: 800;
}

.resource-list a {
  color: var(--cobalt);
  font-weight: 800;
}

body[dir="rtl"] .prompt-card {
  border-right: 5px solid var(--copper);
  border-left: 0;
}

body[dir="rtl"] .guide-toc,
body[dir="rtl"] .callout {
  border-right: 4px solid var(--copper);
  border-left: 0;
  padding-right: 18px;
  padding-left: 0;
}

body[dir="rtl"] .callout {
  border-right-width: 5px;
  padding-right: 24px;
}

body[dir="rtl"] .guide-article ul,
body[dir="rtl"] .guide-article ol {
  padding-right: 1.25rem;
  padding-left: 0;
}

body[dir="rtl"] {
  font-family: var(--font-arabic);
}

body[dir="rtl"] h1 {
  max-width: 760px;
  font-family: var(--font-arabic);
  font-size: clamp(3.2rem, 5.4vw, 5.15rem);
  line-height: 1.12;
  letter-spacing: 0;
}

body[dir="rtl"] h1 em {
  font-family: inherit;
  font-size: clamp(2.7rem, 4.7vw, 4.25rem);
  font-style: normal;
  line-height: 1.18;
}

body[dir="rtl"] .hero-text {
  line-height: 1.95;
}

body[dir="rtl"] .button-primary::after {
  content: "←";
  margin-right: 10px;
  margin-left: 0;
}

@media (max-width: 880px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .split,
  .connect {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: auto;
  }

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

  .guide-card-featured,
  .guide-hero,
  .article-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .guide-toc {
    position: static;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 16px;
  }

  .brand span {
    display: inline;
  }

  .section-band {
    width: min(100% - 28px, var(--max-width));
  }

  h1 {
    font-size: clamp(3.2rem, 15vw, 4.8rem);
  }

  .visual-frame {
    padding: 20px;
  }

  .prompt-card {
    margin-top: 105px;
  }

  .site-footer {
    flex-direction: column;
  }

  .guide-card-featured {
    padding: 14px;
  }
}
