:root {
  color-scheme: dark;
  --night: #030711;
  --navy: #07111f;
  --blue: #10294d;
  --blue-light: #7891b0;
  --moon: #eef4fb;
  --silver: #a6b3c4;
  --line: rgba(238, 244, 251, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--moon);
  background: var(--night);
  font-family: "Noto Naskh Arabic", serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a, p, h1, h2, h3, dd { overflow-wrap: anywhere; }
button, a { touch-action: manipulation; }
#site-header nav a { white-space: nowrap; }
::selection { color: var(--night); background: var(--moon); }

.page-sky {
  background-image:
    linear-gradient(90deg, rgba(3,7,17,.88), rgba(7,17,31,.52)),
    url("star-sky4.jpg"),
    linear-gradient(180deg, var(--night), var(--blue));
  background-position: center;
  background-size: cover;
}

.surface { background: var(--navy); }
.surface-alt { background: #0b1d38; }
.panel {
  background: rgba(16, 41, 77, 0.7);
  border: 1px solid var(--line);
}
.panel-solid {
  background: var(--blue);
  border: 1px solid var(--line);
}
.muted { color: var(--silver); }
.eyebrow {
  color: #9fb3cc;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  margin-left: .7rem;
  vertical-align: middle;
  background: currentColor;
}
.card-hover { transition: transform .25s ease, background-color .25s ease, border-color .25s ease; }
.card-hover:hover {
  transform: translateY(-3px);
  background: #15345f;
  border-color: rgba(238, 244, 251, .18);
}
.source-link { color: #bacce2; text-decoration: underline; text-underline-offset: 4px; }
.source-link:hover { color: white; }
.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .75rem;
  color: #cbd7e6;
  background: rgba(255,255,255,.035);
  font-size: .75rem;
}
.timeline-rail {
  background: linear-gradient(to bottom, transparent, var(--blue-light) 8%, var(--blue-light) 92%, transparent);
}
.timeline-dot {
  background: var(--moon);
  box-shadow: 0 0 0 5px var(--navy), 0 0 0 6px var(--blue-light);
}
.book-cover {
  background: #dbe5f2;
  color: #07111f;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.input-dark {
  color: white;
  background: rgba(3,7,17,.58);
  border: 1px solid var(--line);
}
.input-dark::placeholder { color: #748399; }
.input-dark:focus { outline: 2px solid #7891b0; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-hover { transition: none; }
}

@media (max-width: 639px) {
  .page-sky {
    padding-top: 7.5rem !important;
    padding-bottom: 4rem !important;
    background-position: 62% center;
  }
  .page-sky h1 {
    font-size: clamp(2.55rem, 13vw, 3.5rem) !important;
    line-height: 1.18 !important;
  }
  .page-sky p {
    font-size: 1rem;
    line-height: 1.85;
  }
  .panel,
  .panel-solid {
    border-radius: 1.25rem;
  }
  .book-cover {
    max-width: 220px;
  }
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}
