:root {
  --ink: #4c4c4c;
  --ink-soft: #6b6b6b;
  --accent: #2f87aa;
  --accent-2: #4ba7cc;
  --accent-deep: #2a7ea0;
  --paper: #ffffff;
  --paper-deep: #f4f8fb;
  --line: #d8e2e8;
  --card: #ffffff;
  --shadow: 0 12px 30px rgba(24, 52, 76, 0.12);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #eef5fa 0, #f7fbfd 190px, #ffffff 420px),
    repeating-linear-gradient(90deg, rgba(47, 135, 170, 0.04) 0 1px, transparent 1px 120px);
  min-height: 100vh;
}

.texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: linear-gradient(rgba(47, 135, 170, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 135, 170, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-2);
}

.shell {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.6rem;
  margin: 0.8rem auto;
  width: min(1200px, 96vw);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  display: inline-block;
  width: min(248px, 52vw);
  line-height: 0;
  text-decoration: none;
}

.brand-mark img {
  width: 100%;
  height: auto;
  display: block;
}

.brand-copy {
  display: grid;
  gap: 0.08rem;
}

.brand-title {
  font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', serif;
  color: var(--accent-deep);
  text-decoration: none;
  font-size: 1.02rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-variant: small-caps;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.74rem;
  color: #7c7c7c;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.site-nav a {
  text-decoration: none;
  color: #7c7c7c;
  padding: 0.45rem 0.7rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(47, 135, 170, 0.08);
  color: var(--accent-deep);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  font-weight: 600;
}

main {
  padding: 1rem 0 2rem;
}

.hero,
.sub-hero {
  margin-top: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(128deg, rgba(47, 135, 170, 0.18), transparent 46%),
    linear-gradient(220deg, rgba(102, 138, 166, 0.13), transparent 56%),
    var(--card);
  box-shadow: var(--shadow);
  padding: clamp(1.3rem, 2.2vw, 2rem);
}

.eyebrow {
  margin: 0;
  color: var(--accent-deep);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.sub-hero h1,
.content h1,
.content h2,
.content h3 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: #3e3e3e;
}

.hero h1,
.sub-hero h1 {
  margin: 0.3rem 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.97;
}

.hero p,
.sub-hero p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.03rem;
  max-width: 70ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.btn {
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--line);
  padding: 0.58rem 0.9rem;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-color: transparent;
  color: #fff;
}

.content {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: clamp(1.05rem, 1.9vw, 1.65rem);
}

.content h2 {
  margin-top: 1.3rem;
  margin-bottom: 0.45rem;
  font-size: 1.65rem;
}

.content h3 {
  margin-top: 1.1rem;
  margin-bottom: 0.4rem;
  font-size: 1.3rem;
}

.content p,
.content li,
.content blockquote {
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
}

.content ul,
.content ol {
  padding-left: 1.2rem;
}

.content blockquote {
  margin: 1.1rem 0;
  border-left: 4px solid var(--accent);
  background: rgba(47, 135, 170, 0.1);
  border-radius: 0 10px 10px 0;
  padding: 0.65rem 0.85rem;
}

pre {
  overflow-x: auto;
  background: #102131;
  color: #f2f7ff;
  border-radius: 10px;
  padding: 0.8rem;
}

code {
  font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.92em;
}

.archive-box {
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 12px;
  padding: 0.8rem;
}

.archive-lazy-content {
  margin-top: 0.6rem;
}

.archive-lazy-content:empty {
  display: none;
}

.archive-list {
  display: grid;
  gap: 0.45rem;
  max-height: 550px;
  overflow-y: auto;
  padding-right: 0.45rem;
}

.archive-list li {
  border-bottom: 1px dashed #cad7e0;
  padding-bottom: 0.35rem;
}

.archive-url {
  display: block;
  font-size: 0.79rem;
  color: #5d6f80;
}

.press-entry-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.press-entry {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
}

.press-entry summary {
  cursor: pointer;
  font-weight: 700;
  color: #2a7ea0;
}

.press-entry summary .summary-line-ar {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #3b5e73;
  line-height: 1.35;
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

.archive-url-ar {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

.press-header-ar {
  margin: 0.45rem 0 0.3rem;
  color: #3b5e73;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.press-entry-body p {
  margin: 0.55rem 0;
  line-height: 1.55;
}

.press-entry-body p.rtl-text {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}

.task-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.task-card,
.blog-card,
.post-entry {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdfa;
  padding: 0.85rem;
}

.task-card h3,
.blog-card h2,
.post-entry h1 {
  margin-top: 0;
}

.post-date {
  margin: 0.1rem 0 0.45rem;
  color: #5b6f80;
  font-size: 0.89rem;
  font-weight: 600;
}

.read-link {
  font-weight: 700;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags span {
  background: rgba(47, 135, 170, 0.14);
  color: #235f79;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.23rem 0.58rem;
}

.legacy-note {
  color: #5f6f80;
  font-size: 0.92rem;
}

.gutenberg-callout {
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #b7d2e1;
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(47, 135, 170, 0.14), rgba(255, 255, 255, 0.98));
  color: #2b4f67;
  font-weight: 600;
}

.gutenberg-callout a {
  font-weight: 700;
}

.legacy-banner {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  margin: 0.6rem 0 1rem;
  box-shadow: var(--shadow);
}

.legacy-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  margin: 0.7rem 0 1rem;
}

.legacy-thumb {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.legacy-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.legacy-thumb figcaption {
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
  color: #5f6f80;
}

.edition-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem;
  margin: 0.7rem 0 1rem;
}

.edition-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.edition-card img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #eef2f6;
  display: block;
}

.edition-card figcaption {
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
  color: #4d6276;
  line-height: 1.45;
}

.site-footer {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
  background: #223c50;
  color: #edf2f9;
  padding-top: 1.2rem;
}

.footer-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', Times, serif;
}

.footer-grid p {
  margin: 0.25rem 0 0;
  color: #d6e1ef;
}

.site-footer a {
  color: #f0d6aa;
}

.copyright {
  margin: 1rem 0 0;
  text-align: center;
  color: #c7d5e7;
  font-size: 0.82rem;
  padding: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

[data-reveal].visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .brand-wrap {
    width: 100%;
  }

  .brand-mark {
    width: min(210px, 66vw);
  }

  .brand-subtitle {
    display: none;
  }

  .nav-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-top: 0.3rem;
  }

  .site-nav.open {
    display: flex;
  }
}
