/* jerzeem.com: one stylesheet for the English and Arabic pages. Logical properties (inline, block)
   follow the page's direction, so the same rules lay the Arabic page out from right to left. */
:root {
  color-scheme: light dark;
  --text: #172b4d;
  --muted: #5e6c84;
  --background: #ffffff;
  --surface: #f4f5f7;
  --border: #dfe1e6;
  --accent: #0b6b5d;
  --accent-soft: #e3f4f0;
  --accent-text: #0b5a4e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #dee4ea;
    --muted: #9fadbc;
    --background: #1d2125;
    --surface: #22272b;
    --border: #384048;
    --accent: #5cc8b4;
    --accent-soft: #163a35;
    --accent-text: #8fe0cf;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font:
    17px/1.6 system-ui,
    -apple-system,
    'Segoe UI',
    'Noto Sans',
    'Noto Sans Arabic',
    Tahoma,
    sans-serif;
}

body:lang(ar) {
  font-size: 18px;
  line-height: 1.8;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

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

header.site,
main,
footer.site {
  max-width: 44rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.language {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.language:hover {
  border-color: var(--muted);
  color: var(--text);
}

main {
  padding-block: 2.5rem 4rem;
}

h1 {
  margin-block: 0 1rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Letter spacing would pull Arabic letters apart. */
h1:lang(ar) {
  line-height: 1.4;
  letter-spacing: normal;
}

/* Keeps "right-to-left" on one line on phones. */
.nowrap {
  white-space: nowrap;
}

.intro p {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

h2 {
  margin-block: 3rem 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.app {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.app img {
  display: block;
}

.app h3 {
  margin-block: 0 0.4rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.app p {
  margin-block: 0 0.75rem;
}

.status {
  display: inline-block;
  border-radius: 0.5rem;
  padding: 0.15rem 0.7rem;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.links a {
  font-weight: 600;
}

/* The arrow points the way the page reads; screen readers skip it. */
.links a::after {
  content: ' →';
  content: ' →' / '';
}

[dir='rtl'] .links a::after {
  content: ' ←';
  content: ' ←' / '';
}

.contact-note {
  margin-block: 0 1rem;
}

.contact {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0;
}

.contact dt {
  color: var(--muted);
}

.contact dd {
  margin: 0;
}

footer.site {
  padding-block: 1.5rem 2.5rem;
  border-block-start: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.missing h1 + p {
  margin-block-end: 2.5rem;
}

@media (max-width: 30rem) {
  .app {
    grid-template-columns: 1fr;
  }

  .contact {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact dd {
    margin-block-end: 0.75rem;
  }
}
