:root {
  --ink: #efe7d6;
  --muted: #b7ad9c;
  --line: rgba(239, 231, 214, 0.14);
  --paper: #070b12;
  --paper-2: #121924;
  --gold: #e4c27a;
  --gold-soft: #8d7344;
  --night: #04070d;
  --cream: #f4ecdc;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Instrument Sans", "Segoe UI", sans-serif;
  --script: "Aref Ruqaa", "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 78% 8%, #172033 0%, transparent 58%),
    radial-gradient(700px 480px at 8% 92%, #101820 0%, transparent 62%),
    var(--night);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 420;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
::selection { background: #3a3120; color: var(--cream); }

.veil {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: var(--night); color: var(--cream);
  font-family: var(--script); font-size: clamp(3rem, 8vw, 6rem);
  animation: veil .85s var(--ease) .28s forwards;
  pointer-events: none;
}
@keyframes veil { to { opacity: 0; visibility: hidden; } }

#field {
  position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%;
  pointer-events: none;
}
body.on-delphinus, body.on-delphinus a, body.on-delphinus button { cursor: pointer; }
.cursor {
  position: fixed; z-index: 70; top: 0; left: 0;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 1px solid var(--gold); border-radius: 50%;
  box-shadow: 0 0 18px rgba(228, 194, 122, .35);
  pointer-events: none;
}
body.touch .cursor { display: none; }

.shell {
  position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column;
  background: transparent;
}
.top {
  position: sticky; top: 0; z-index: 40;
  min-height: 64px;
  display: flex; align-items: center; gap: 1.4rem;
  padding: .65rem 4vw;
  background: color-mix(in srgb, var(--night) 62%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
}
.top.scrolled { border-bottom-color: var(--line); }
.mark { font-family: var(--script); font-size: 1.75rem; text-decoration: none; line-height: 1; }
.top nav { display: flex; gap: .15rem; margin-left: auto; }
.top nav a, .lang {
  text-decoration: none; padding: .5rem .85rem; border-radius: 999px; color: var(--muted);
}
.top nav a[aria-current="page"], .top nav a:hover { color: var(--ink); background: var(--paper-2); }
.tools { display: flex; align-items: center; gap: .55rem; }
.where { margin: 0; color: var(--muted); font-size: .88rem; }
.hour { font-variant-numeric: tabular-nums; color: var(--ink); }
.lang {
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  min-width: 44px; min-height: 44px;
}
.lang:hover { border-color: var(--gold-soft); }
.menu {
  display: none; margin-left: auto; width: 44px; height: 44px;
  border: 0; background: transparent; cursor: pointer; padding: 0;
}
.menu span { display: block; height: 1px; margin: 7px 9px; background: var(--ink); }

main { flex: 1; }
.stage {
  display: grid; grid-template-columns: minmax(0, 46rem); gap: 2rem; align-items: center;
  background: linear-gradient(180deg, transparent 55%, rgba(4, 7, 13, .35) 100%);
  min-height: calc(100vh - 76px);
  padding: 2rem 6vw 3.5rem;
  position: relative; overflow: hidden;
}
.orbit {
  position: absolute; left: 46%; top: 52%; width: 150vmax; margin: 0;
  font-size: .8rem; letter-spacing: .38em; color: rgba(228, 194, 122, .28);
  white-space: nowrap; pointer-events: none;
  animation: spin 90s linear infinite; transform-origin: 0 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.stage-copy { position: relative; max-width: 40rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--gold); }
h1 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(4rem, 7.6vw, 7rem); line-height: .92; letter-spacing: -.03em;
}
h1 span { display: block; }
h1 .script { font-family: var(--script); color: var(--gold); letter-spacing: 0; font-size: .86em; }
.lede { max-width: 34rem; font-size: 1.16rem; color: var(--muted); }
.aside { margin: .35rem 0 0; color: var(--gold); font-style: italic; }
.cta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: .6rem 1.2rem; border-radius: 999px;
  background: var(--cream); color: var(--night); text-decoration: none; border: 1px solid var(--cream);
  transition: transform .35s var(--ease), background .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: rgba(239, 231, 214, .28); }
.btn.ghost:hover { border-color: var(--gold); background: transparent; }

.ledger, .pair, .works-home, .close, .langs, .quad { padding: 4.2rem 6vw; position: relative; z-index: 2; background: linear-gradient(180deg, rgba(7, 11, 18, .55), rgba(7, 11, 18, .78)); }
.ledger header, .works-home header { display: flex; justify-content: space-between; align-items: baseline; }
h2 { margin: 0 0 1.1rem; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); }
.ledger ol, .plain { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: grid; grid-template-columns: 11.5rem 1fr; gap: 1.4rem;
  padding: 1.15rem 0; border-top: 1px solid var(--line);
}
.ledger time { color: var(--gold); padding-top: .2rem; }
.ledger h3, .plain h3 { margin: 0; font-size: 1.12rem; font-weight: 560; }
.ledger p, .plain p { margin: .15rem 0 .25rem; color: var(--muted); }
.ledger span { display: block; max-width: 46rem; }

.pair { display: grid; grid-template-columns: 1.15fr .85fr; gap: 4rem; border-top: 1px solid var(--line); }
.plain li { padding: .95rem 0; border-top: 1px solid var(--line); }
.plain time { display: block; color: var(--gold); font-size: .92rem; }

.post {
  display: block; max-width: 38rem; margin-inline: auto; text-decoration: none; color: var(--cream);
}
.post .plate { display: block; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; }
.post-copy { display: block; padding: .9rem .1rem 0; }
.post small { color: var(--gold-soft); letter-spacing: .01em; }
.post strong { display: block; margin: .2rem 0 .25rem; font-family: var(--serif); font-size: 2.15rem; font-weight: 400; line-height: 1.05; }
.post-copy > span { display: block; max-width: 36rem; color: #cfc6b6; }
.post:hover strong { color: var(--gold); }
.plate {
  background:
    radial-gradient(1.5px 1.5px at 18% 32%, #f4ecdc, transparent 60%),
    radial-gradient(1.2px 1.2px at 27% 48%, #f4ecdc, transparent 60%),
    radial-gradient(1.6px 1.6px at 34% 28%, #fff8ea, transparent 60%),
    radial-gradient(1.1px 1.1px at 46% 58%, #f4ecdc, transparent 60%),
    radial-gradient(2px 2px at 58% 36%, #fff, transparent 60%),
    radial-gradient(1.3px 1.3px at 71% 52%, #f4ecdc, transparent 60%),
    radial-gradient(1.1px 1.1px at 82% 30%, #f4ecdc, transparent 60%),
    radial-gradient(420px 180px at 70% 20%, rgba(228, 194, 122, .16), transparent 70%),
    linear-gradient(160deg, #1a2740 0%, #0c1422 46%, #070b12 100%);
}
.plate.hero {
  position: sticky; top: 4.6rem; z-index: 0;
  height: calc(100vh - 4.6rem); aspect-ratio: auto; margin: 0;
  border-radius: 0;
}

.works-home header a { color: var(--gold); text-decoration: none; }
.works-home > div { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.works-home a {
  display: block; padding: 1.35rem 1.4rem 1.45rem; text-decoration: none;
  background: rgba(16, 23, 34, .72);
  border: 1px solid var(--line); border-radius: 18px;
  transition: border-color .3s var(--ease), transform .4s var(--ease);
}
.works-home a:hover { border-color: var(--gold-soft); transform: translateY(-3px); }
.works-home b { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.works-home span, .works-home small { display: block; }
.works-home span { margin: .35rem 0 .85rem; color: var(--muted); }
.works-home small { color: var(--gold); }

.close { border-top: 1px solid var(--line); }
.mail {
  font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.8rem);
  text-decoration: none; border-bottom: 1px solid var(--gold-soft);
}
.close p { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.close p a { color: var(--muted); }

.inner { padding: 2.6rem 6vw 5rem; max-width: 1080px; margin-inline: auto; }
body:has(.inner) #field { opacity: .72; }
body:has(.inner) .shell { background: rgba(7, 11, 18, .72); }
body:has(.essay) .shell { background: rgba(7, 11, 18, .78); }
.page-head h1 { font-size: clamp(3.2rem, 7vw, 5.6rem); }
.page-head p { max-width: 36rem; color: var(--muted); font-size: 1.14rem; }

.folio { list-style: none; margin: 2.4rem 0 0; padding: 0; }
.folio > li:first-child a {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.4rem; align-items: end;
  padding-bottom: 2.2rem; border-bottom: 1px solid var(--line); text-decoration: none;
}
.folio .plate { aspect-ratio: 16 / 10; margin: 0; }
.folio-copy small, .folio > li:not(:first-child) small {
  color: var(--gold); letter-spacing: .04em;
}
.folio-copy b {
  display: block; margin: .35rem 0 .45rem;
  font-family: var(--serif); font-size: clamp(3rem, 6vw, 5rem); font-weight: 400; line-height: .95;
}
.folio-copy span { display: block; max-width: 34rem; color: var(--muted); font-size: 1.12rem; }
.folio-copy em { display: block; margin-top: 1.1rem; color: var(--gold); font-style: normal; }
.folio > li:first-child a:hover b { color: var(--gold); }
.folio > li:not(:first-child) a {
  display: grid; grid-template-columns: 3.2rem 11rem 1fr auto; gap: 1.4rem; align-items: baseline;
  padding: 1.15rem 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.folio > li:not(:first-child) b { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.folio > li:not(:first-child) span { color: var(--muted); }
.folio > li:not(:first-child) em { color: var(--gold); font-style: normal; }
.folio > li:not(:first-child) a:hover b { color: var(--gold); }
.prose { max-width: 42rem; font-size: 1.12rem; }
.inner .ledger, .inner .langs, .inner .quad { padding: 2.2rem 0; }
.langs ul { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.langs li { padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(16, 23, 34, .7); }
.langs p b { font-weight: 560; }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.quad h2 { grid-column: 1 / -1; }
.quad article {
  padding: 1.25rem 1.3rem 1.35rem; border-radius: 18px;
  background: rgba(16, 23, 34, .72); border: 1px solid var(--line);
  scroll-margin-top: 5.5rem;
}
.quad h3 { margin: 0 0 .35rem; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
.quad p { margin: 0; color: var(--muted); }
.links a { color: var(--gold); }
.links a + a { margin-left: .9rem; }

body:has(.essay) .inner { max-width: none; padding: 0 0 5rem; }
.essay { max-width: none; }
.essay .back, .essay h1, .essay .when, .essay .stand, .essay .body {
  position: relative; z-index: 1;
  width: min(92vw, 78rem); margin-inline: auto;
  background: rgba(7, 11, 18, .9);
}
.essay .back { padding: 1.4rem 4vw .2rem; }
.essay h1 { font-size: clamp(3rem, 6vw, 4.8rem); margin: 0; padding: .3rem 4vw .2rem; }
.essay .when { margin: 0; padding: 0 4vw .6rem; }
.essay .stand { padding: 0 4vw 1rem; }
.essay .body { padding: .2rem 4vw 1rem; }
.back a, .when { color: var(--muted); text-decoration: none; }
.stand { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.4; margin: 0; }
.body { font-size: clamp(1.12rem, 1.5vw, 1.35rem); }
.body p { margin: 0 0 1.15rem; }
blockquote {
  margin: 1.5rem 0; padding: .1rem 0 .1rem 1rem;
  border-left: 2px solid var(--gold);
  font-family: var(--script); font-size: 1.5rem; line-height: 1.55;
}

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
body.halvet {
  background:
    radial-gradient(420px 280px at 50% 18%, rgba(228, 194, 122, .08), transparent 70%),
    var(--night);
}
body.halvet #field { opacity: .92; }
body.halvet .shell { background: rgba(4, 7, 13, .58); }
body.halvet .top, body.halvet footer { display: none; }
.besmele {
  margin: 0; color: var(--gold); text-align: center;
  font-family: "Amiri", var(--script), serif;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.8;
}
.cell, .leaf { position: relative; z-index: 2; padding: 8vh 6vw 12vh; }
.leaf { padding-inline: 2vw; }
.divan-head, .leaf article {
  width: min(76rem, 100%); margin-inline: auto; text-align: center;
  padding: 1.4rem 1.2rem 1.8rem;
  background: radial-gradient(ellipse at 50% 30%, rgba(4, 7, 13, .55), rgba(4, 7, 13, .18) 72%, transparent 100%);
}
.divan-head h1, .leaf h1 {
  margin: .15rem 0 .4rem;
  font-size: clamp(4.2rem, 10vw, 7rem); font-weight: 400; line-height: .92; color: var(--cream);
}
.divan-line { margin: 0 auto; max-width: 26rem; color: #cbbfa8; font-family: var(--script); font-size: 1.3rem; }
.divan {
  list-style: none; width: min(40rem, 100%); margin: 2.4rem auto 0; padding: 0 1.2rem 1rem;
  background: radial-gradient(ellipse at 50% 40%, rgba(4, 7, 13, .5), rgba(4, 7, 13, .12) 78%, transparent 100%);
}
.divan a {
  display: block; padding: 1.35rem 0; text-align: center; text-decoration: none;
  border-top: 1px solid rgba(228, 194, 122, .28);
}
.divan li:last-child a { border-bottom: 1px solid rgba(228, 194, 122, .28); }
.divan small { display: block; color: var(--gold); font-size: .92rem; }
.divan b { display: block; margin: .2rem 0 .25rem; font-family: var(--script); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 400; }
.divan span { display: block; color: #cbbfa8; }
.divan a:hover b { color: var(--gold); }
.levha {
  width: max-content; max-width: 100%; margin: .55rem auto .15rem; padding: 0;
  direction: rtl; text-align: center;
  font-family: "Amiri", var(--script), serif; font-weight: 700;
  font-size: clamp(.82rem, 1.22vw, 1.12rem); line-height: 1.7; color: rgba(243, 234, 216, .82);
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(4, 7, 13, .95);
}
.ithaf {
  margin: 0 0 .35rem; direction: rtl; text-align: center;
  font-family: "Amiri", var(--script), serif;
  font-size: clamp(.95rem, 1.3vw, 1.15rem); color: var(--gold);
  text-shadow: 0 0 16px rgba(4, 7, 13, .9);
}
@media (max-width: 860px) {
  .levha { white-space: normal; font-size: clamp(1.05rem, 4.2vw, 1.3rem); line-height: 1.9; }
}
.leaf .back { margin: 0 0 .6rem; }
.leaf .back a { color: var(--gold); text-decoration: none; }
.leaf .when { margin: 0 0 1.6rem; color: var(--gold); }
.verse { text-align: center; }
.verse p {
  margin: 0 0 1.25rem;
  font-family: var(--script); font-size: clamp(1.28rem, 2vw, 1.55rem); line-height: 1.85; color: #f3ead8;
}
.verse p.hat { font-family: "Levha", "Times New Roman", serif; font-weight: 500; }
.verse blockquote {
  margin: 1.6rem auto; padding: 0; border: 0; max-width: 24rem;
  font-size: clamp(1.55rem, 2.6vw, 1.9rem); color: var(--gold);
}
.hat {
  display: flex; flex-direction: column; align-items: stretch;
  width: max-content; max-width: 100%;
  margin: 2.2rem auto 0; padding: .85rem 1.5rem .7rem;
  overflow: hidden;
  direction: rtl;
  font-family: "Levha", "Times New Roman", serif; font-weight: 500;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem); line-height: 1.9;
  color: #f6edd8;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(228, 194, 122, .07), transparent 68%),
    linear-gradient(180deg, rgba(8, 12, 20, .2), rgba(8, 12, 20, .55));
  border: 1px solid rgba(228, 194, 122, .34);
  box-shadow:
    inset 0 0 0 6px rgba(4, 7, 13, .55),
    inset 0 0 0 7px rgba(228, 194, 122, .22),
    0 18px 50px rgba(0, 0, 0, .28);
  text-shadow: 0 0 22px rgba(4, 7, 13, .85);
}
.hat .misra { display: block; text-align: center; white-space: nowrap; }
.hat .imza {
  display: block; margin-top: .15rem;
  text-align: right;
  color: var(--gold);
  font-weight: 400;
  font-size: .78em;
}
@media (max-width: 860px) {
  .hat { font-size: clamp(1.4rem, 5.4vw, 1.7rem); line-height: 2; }
  .hat .misra { white-space: normal; }
}
.leaf .when { direction: rtl; font-family: "Levha", "Times New Roman", serif; font-size: 1.45rem; }

footer {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 6vw 1.6rem; color: var(--muted); border-top: 1px solid var(--line);
}
footer a { color: var(--muted); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 860px) {
  .stage-copy, .ledger, .pair, .works-home, .close {
    background: linear-gradient(180deg, rgba(4, 7, 13, .78), rgba(4, 7, 13, .55) 18%, rgba(4, 7, 13, .55) 82%, rgba(4, 7, 13, .2));
    border-radius: 18px;
  }
  .stage-copy {
    max-width: none;
    padding: 1.35rem 1.15rem 1.55rem;
    border-radius: 0;
  }
  .menu { display: block; }
  .top nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; margin: 0; padding: .3rem 4vw 1rem;
    background: rgba(4, 7, 13, .94); border-bottom: 1px solid var(--line);
  }
  .top.open nav { display: flex; }
  .top nav a { padding: .85rem .3rem; border-radius: 10px; }
  .where { display: none; }
  .stage, .pair, .works-home > div, .quad, .ledger li, .folio > li:first-child a { grid-template-columns: 1fr; }
  .folio > li:not(:first-child) a { grid-template-columns: 2.4rem 1fr; }
  .folio > li:not(:first-child) span, .folio > li:not(:first-child) em { grid-column: 2; }
  .stage { min-height: auto; padding: 0; }
  .orbit { display: none; }
  .compass a { border-right: 0; border-bottom: 1px solid var(--line); }
  .ledger li { gap: .15rem; }
  .pair { gap: 2.2rem; }
  h1 { font-size: clamp(3.2rem, 13vw, 4.4rem); }
  .inner, .ledger, .pair, .works-home, .close { padding-left: 5vw; padding-right: 5vw; }
}
@media (hover: none) {
  .btn:hover, .works-home a:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .veil { display: none; }
  html { scroll-behavior: auto; }
}
