/* Roj website: https://0xdolan.github.io/roj/ */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&family=Vazirmatn:wght@400;600;800&display=swap");

:root {
  --sun: #f5cd0e;
  --sun-text: #8a6a00;
  --bg: #fbfbfc;
  --surface: #ffffff;
  --surface-2: #f2f2f5;
  --text: #17171c;
  --muted: #5d5d68;
  --line: #e4e4ea;
  --code-bg: #f1f1f4;
  --greg: #1a5fb4;
  --pers: #1f7a4f;
  --isl: #813d9c;
  --radius: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sun-text: #f5cd0e;
    --bg: #111216;
    --surface: #1a1b20;
    --surface-2: #22232a;
    --text: #f1f1f4;
    --muted: #a2a2ad;
    --line: #2c2d35;
    --code-bg: #1f2026;
    --greg: #62a0ea;
    --pers: #57e389;
    --isl: #c061cb;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --sun-text: #f5cd0e;
  --bg: #111216;
  --surface: #1a1b20;
  --surface-2: #22232a;
  --text: #f1f1f4;
  --muted: #a2a2ad;
  --line: #2c2d35;
  --code-bg: #1f2026;
  --greg: #62a0ea;
  --pers: #57e389;
  --isl: #c061cb;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 Manrope, Vazirmatn, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sun-text); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

code, pre { font-family: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", monospace; font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.1em 0.4em; border-radius: 6px; }
pre { background: var(--code-bg); padding: 16px 18px; border-radius: 12px; overflow-x: auto; line-height: 1.55; border: 1px solid var(--line); }
pre code { background: none; padding: 0; }

.rtl { direction: rtl; unicode-bidi: isolate; font-family: Vazirmatn, Manrope, sans-serif; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.top .logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 20px; }
.top .logo img { width: 34px; height: 34px; }
.top nav { margin-inline-start: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--muted); font-weight: 700; font-size: 15px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); text-decoration: none; }
.theme-toggle { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 6px 12px; font: 700 13px Manrope, sans-serif; cursor: pointer; }

/* Hero */
.hero { padding-block: 64px 24px; text-align: center; }
.hero img.mark { width: 112px; height: 112px; margin: 0 auto 18px; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1.05; letter-spacing: -0.03em; margin: 0; }
.hero p.lead { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 680px; margin: 18px auto 0; }
.hero .langs { margin-top: 10px; font-size: 20px; color: var(--muted); }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 99px; font-weight: 800; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.btn.primary { background: var(--sun); color: #141414; border-color: transparent; }
.btn:hover { text-decoration: none; filter: brightness(0.97); }

.showcase { margin: 40px auto 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.18); }

/* Sections */
section { padding: 56px 0; }
section h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; margin: 0 0 8px; }
section > .wrap > p.sub { color: var(--muted); margin: 0 0 28px; max-width: 720px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.tile h3 { margin: 0 0 6px; font-size: 19px; }
.tile p { margin: 0; color: var(--muted); font-size: 15.5px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 99px; background: var(--sun); margin-inline-end: 8px; vertical-align: middle; }

.shots { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.shots figure { margin: 0; }
.shots img { border-radius: 14px; border: 1px solid var(--line); }
.shots figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; text-align: center; }

.steps { counter-reset: s; display: grid; gap: 14px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step h3::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 99px; background: var(--sun); color: #141414; font-size: 14px; margin-inline-end: 10px; }
.step p { margin: 0 0 8px; color: var(--muted); }

/* Guide layout */
.doc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-block: 40px 80px; }
.toc { position: sticky; top: 88px; align-self: start; font-size: 15px; }
.toc a { display: block; color: var(--muted); padding: 4px 0; font-weight: 600; }
.toc a:hover { color: var(--text); text-decoration: none; }
.article h1 { font-size: 44px; letter-spacing: -0.02em; margin: 0 0 8px; }
.article h2 { font-size: 28px; margin: 56px 0 10px; padding-top: 8px; scroll-margin-top: 80px; }
.article h3 { font-size: 20px; margin: 30px 0 8px; scroll-margin-top: 80px; }
.article p, .article li { color: var(--text); }
.article .muted { color: var(--muted); }
.article figure { margin: 22px 0; }
.article figure img { border-radius: 14px; border: 1px solid var(--line); }
.article figure.narrow img { max-width: 440px; }
.article figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.pair { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }

table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 14px 0; display: block; overflow-x: auto; }
th, td { text-align: start; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
td code { white-space: nowrap; }

.note { background: var(--surface-2); border-inline-start: 4px solid var(--sun); padding: 12px 16px; border-radius: 10px; margin: 16px 0; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; }
footer .heart { color: #e01b24; }

@media (max-width: 860px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block-start: 24px; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 20px; }
  .top .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 8px 18px; }
  .top nav { gap: 12px; align-items: center; }
  .top nav a.hide-sm { display: none; }
  .article h1 { font-size: 34px; }
  .article figure.narrow img { max-width: 100%; }
}
