@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@300;400;500;700&display=swap');

:root {
  --ink: #192617;
  --ink-2: #101c0f;
  --ink-3: #0a1409;
  --neon: #87ff71;
  --sun: #ffce5c;
  --paper: #e9f6e1;
  --mute: rgba(233, 246, 225, 0.72);
  --line: rgba(135, 255, 113, 0.3);
  --glass: rgba(233, 246, 225, 0.07);
  --r: 18px;
  --sans: 'Noto Sans Arabic', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --serif: 'Noto Naskh Arabic', 'Songti SC', 'Noto Serif SC', Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(rgba(135, 255, 113, 0.1) 1px, transparent 1.7px),
    radial-gradient(rgba(255, 206, 92, 0.07) 1px, transparent 1.7px);
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
  color: var(--paper);
  font: 400 17px/1.72 var(--sans);
  word-break: break-word;
}

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

a {
  color: var(--neon);
}

::selection {
  background: var(--neon);
  color: var(--ink-3);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px dashed var(--sun);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px clamp(12px, 4vw, 34px);
  background: rgba(25, 38, 23, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 2px dotted var(--line);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 2px;
  color: var(--paper);
  text-decoration: none;
  font: 700 clamp(17px, 3vw, 21px) / 1.2 var(--serif);
  letter-spacing: 0.02em;
}

.brand::before {
  content: "";
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  background: var(--neon);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(18deg);
}

.brand:hover {
  color: var(--neon);
}

.top-end {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
}

.touch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px dashed rgba(255, 206, 92, 0.6);
  border-radius: 999px;
  color: var(--sun);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.2;
}

.touch:hover {
  background: var(--sun);
  color: var(--ink-3);
  border-color: var(--sun);
}

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 52px;
  height: 46px;
  padding: 0 15px;
  background: var(--sun);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.burger:hover {
  background: var(--neon);
  transform: rotate(-3deg);
}

.burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-3);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

body.menu-open .burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .burger span:nth-child(2) {
  opacity: 0;
}

body.menu-open .burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- overlay menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  align-content: center;
  padding: 88px clamp(16px, 6vw, 60px) 40px;
  background-color: var(--ink-3);
  background-image:
    repeating-linear-gradient(45deg, rgba(135, 255, 113, 0.07) 0 11px, transparent 11px 22px),
    radial-gradient(rgba(255, 206, 92, 0.12) 1.5px, transparent 1.8px);
  background-size: auto, 22px 22px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.26s ease, transform 0.26s ease, visibility 0.26s;
  overflow-y: auto;
}

body.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

body.menu-open {
  overflow: hidden;
}

.menu p {
  counter-reset: m;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.menu a {
  position: relative;
  display: block;
  min-height: 48px;
  padding: 11px 10px 11px 52px;
  color: var(--paper);
  text-decoration: none;
  font: 600 clamp(19px, 4.4vw, 30px) / 1.35 var(--serif);
  border-bottom: 1px dotted rgba(135, 255, 113, 0.28);
  transition: color 0.18s ease, transform 0.18s ease;
}

.menu a::before {
  counter-increment: m;
  content: counter(m, decimal-leading-zero);
  position: absolute;
  left: 6px;
  top: 19px;
  font: 500 13px / 1 var(--sans);
  letter-spacing: 0.06em;
  color: var(--neon);
}

.menu a:hover {
  color: var(--sun);
  transform: translateX(6px);
}

/* ---------- layout ---------- */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: clamp(18px, 3vw, 46px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(12px, 4vw, 34px) 60px;
}

article {
  min-width: 0;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(14px, 3vw, 36px);
  align-items: center;
  min-height: 70vh;
  padding: clamp(18px, 4vw, 48px) 0 clamp(14px, 3vw, 34px);
  border-bottom: 2px dotted var(--line);
}

.hero-art {
  margin: 0;
  min-height: 260px;
  height: 100%;
}

.hero-art:empty {
  border: 2px dashed var(--line);
  border-radius: var(--r);
  background: repeating-linear-gradient(45deg, rgba(135, 255, 113, 0.08) 0 10px, transparent 10px 20px);
}

.hero-img {
  width: 100%;
  height: 100%;
  max-height: 62vh;
  object-fit: cover;
  border-radius: var(--r);
  border: 2px solid rgba(135, 255, 113, 0.35);
}

.hero-copy {
  text-align: right;
}

.hero-title {
  margin: 0 0 14px;
  font: 700 clamp(29px, 5.6vw, 56px) / 1.1 var(--serif);
  letter-spacing: 0.01em;
  text-wrap: balance;
  color: var(--paper);
  background: linear-gradient(96deg, var(--paper) 52%, var(--neon) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-note {
  max-width: 36ch;
  margin: 0 0 0 auto;
  color: var(--mute);
  font-size: 16px;
}

/* ---------- prose ---------- */
.prose {
  padding: clamp(22px, 4vw, 46px) 0 30px;
}

.prose > section {
  padding: clamp(18px, 3vw, 32px) 0;
  border-top: 1px dashed var(--line);
  scroll-margin-top: 92px;
}

.prose > section:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose > section:last-child {
  padding-bottom: 0;
}

.prose h2 {
  position: relative;
  margin: 0 0 4px;
  padding-left: 26px;
  font: 700 clamp(21px, 3vw, 29px) / 1.3 var(--serif);
  color: var(--paper);
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.34em;
  width: 14px;
  height: 14px;
  background: var(--neon);
  clip-path: polygon(0 0, 100% 32%, 42% 100%);
  transform: rotate(-8deg);
}

.prose h3 {
  margin: 22px 0 6px;
  font: 700 19px / 1.4 var(--serif);
  color: var(--sun);
}

.prose p {
  margin: 0 0 14px;
}

.prose :is(.subtitle, .subhead, .desc, .lead) {
  margin: 0 0 16px;
  color: var(--sun);
  font-size: 16px;
  line-height: 1.6;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.35em;
}

.prose li {
  margin: 0.35em 0;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--neon);
}

.prose a {
  color: var(--neon);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--sun);
  text-decoration-style: solid;
}

.prose strong,
.prose b {
  color: var(--sun);
}

.prose blockquote {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-left: 4px solid var(--sun);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--glass);
  color: var(--paper);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose img {
  margin: 16px 0;
  border-radius: var(--r);
  border: 2px solid rgba(135, 255, 113, 0.3);
}

.prose table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 9px 11px;
  border: 1px dashed var(--line);
  text-align: left;
}

.prose th {
  background: rgba(135, 255, 113, 0.12);
  color: var(--sun);
}

.prose > section > :last-child {
  margin-bottom: 0;
}

/* ---------- aside rail ---------- */
.rail {
  position: sticky;
  top: 90px;
  margin: clamp(22px, 4vw, 44px) 0 0;
  padding-bottom: 10px;
}

.rail h2 {
  position: relative;
  margin: 0;
  padding-left: 22px;
  font: 700 19px / 1.35 var(--serif);
}

.rail h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.36em;
  width: 12px;
  height: 12px;
  background: var(--sun);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.rail .subtitle {
  margin: 2px 0 14px;
  padding-left: 22px;
  color: var(--mute);
  font-size: 16px;
}

.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rail li a {
  display: block;
  min-height: 44px;
  padding: 12px 15px;
  border: 1px dashed rgba(255, 206, 92, 0.36);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(8px);
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.rail li a:hover {
  transform: translate(-3px, -2px) rotate(-0.7deg);
  border-color: var(--neon);
  background: rgba(135, 255, 113, 0.13);
  color: var(--neon);
}

/* ---------- footer ---------- */
footer {
  margin-top: 40px;
  padding: clamp(24px, 4vw, 46px) clamp(12px, 4vw, 34px) 22px;
  background-color: var(--ink-2);
  background-image: repeating-linear-gradient(-45deg, rgba(255, 206, 92, 0.05) 0 10px, transparent 10px 20px);
  border-top: 2px dashed var(--line);
}

.foot-head,
.foot-cols,
.foot-end {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.foot-head {
  margin-bottom: 20px;
}

.foot-brand {
  margin: 0;
  font: 700 clamp(19px, 3vw, 23px) / 1.3 var(--serif);
  color: var(--neon);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.foot-cols dl {
  margin: 0;
  padding: 15px;
  border: 1px dashed rgba(135, 255, 113, 0.28);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(8px);
}

.foot-cols dt {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--sun);
}

.foot-cols dd {
  margin: 0;
}

.foot-cols dd a {
  display: inline-block;
  min-height: 40px;
  padding: 8px 0;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.5;
}

.foot-cols dd a:hover {
  color: var(--neon);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.sub input {
  flex: 1 1 118px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--paper);
  font: 400 16px / 1.4 var(--sans);
}

.sub input::placeholder {
  color: rgba(233, 246, 225, 0.5);
}

.sub button {
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-radius: 12px;
  background: var(--neon);
  color: var(--ink-3);
  font: 700 16px / 1.3 var(--sans);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.sub button:hover {
  background: var(--sun);
  transform: rotate(-2deg);
}

.foot-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dotted var(--line);
  font-size: 16px;
}

.copy {
  margin: 0;
  color: var(--mute);
}

.top-link {
  margin: 0;
}

.top-link a {
  display: inline-block;
  min-height: 40px;
  padding: 8px 0;
  color: var(--paper);
  text-decoration: none;
}

.top-link a:hover {
  color: var(--sun);
}

/* ---------- motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.js .rail li:nth-child(2) {
  transition-delay: 0.06s;
}

.js .rail li:nth-child(3) {
  transition-delay: 0.12s;
}

.js .rail li:nth-child(4) {
  transition-delay: 0.18s;
}

.js .rail li:nth-child(5) {
  transition-delay: 0.24s;
}

.js .rail li:nth-child(6) {
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- breakpoints ---------- */
@media (max-width: 900px) {
  main {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 40px;
  }

  .rail {
    position: static;
    margin-top: 0;
    border-top: 2px dotted var(--line);
    padding-top: 18px;
  }

  .rail ul {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: 14px;
  }

  .hero-art {
    min-height: 210px;
  }

  .hero-img {
    max-height: 38vh;
  }

  .hero-note {
    max-width: none;
  }

  .hero-title {
    font-size: clamp(27px, 8.2vw, 38px);
  }

  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-end {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  body {
    font-size: 16px;
  }

  .touch {
    padding: 10px 12px;
  }

  .prose h2 {
    padding-left: 22px;
  }

  .menu a {
    padding-left: 44px;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
