/* Dr. Raghda Raafat — site styles */
:root {
  --paper: #F6F7F4;
  --paper-2: #ECEFEA;
  --ink: #17211D;
  --muted: #56645E;
  --line: #D5DBD5;
  --green: #1E3A32;
  --green-2: #2B5245;
  --brass: #A8844C;
  --brass-soft: #D8C39C;

  --f-ar-display: "Amiri", "Times New Roman", serif;
  --f-en-display: "Source Serif 4", Georgia, serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-2); text-underline-offset: 3px; }
a:hover { color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

/* ---- language switching ---- */
html[lang="ar"] .en { display: none !important; }
html[lang="en"] .ar { display: none !important; }
html[lang="en"] body { line-height: 1.65; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { top: 12px; }

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.3; }
h2 {
  font-family: var(--f-ar-display);
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  color: var(--green);
  margin-bottom: 28px;
}
html[lang="en"] h2 { font-family: var(--f-en-display); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.0625rem; font-weight: 600; }
p { margin: 0; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 247, 244, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
  font-family: var(--f-ar-display); font-size: 1.35rem; font-weight: 700;
  color: var(--green); text-decoration: none; white-space: nowrap;
}
html[lang="en"] .brand { font-family: var(--f-en-display); font-weight: 600; font-size: 1.2rem; }
.nav { display: flex; gap: 18px; margin-inline-start: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { color: var(--green); border-bottom-color: var(--brass); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-btn {
  text-decoration: none; display: inline-block;
  font: inherit; font-size: 0.875rem; cursor: pointer;
  background: transparent; color: var(--green);
  border: 1px solid var(--green); border-radius: 999px; padding: 4px 14px;
}
.lang-btn:hover { background: var(--green); color: var(--paper); }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); padding: 6px; cursor: pointer; }

/* ---- hero ---- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--green); color: var(--paper);
  min-height: min(92vh, 820px); display: flex; align-items: center;
}
.hero-media {
  position: absolute; inset-block: 0; inset-inline-end: 0; width: 54%; margin: 0; z-index: -1; overflow: hidden;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.hero-media::after { /* blend photo into the green */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to left, rgba(30,58,50,0) 45%, rgba(30,58,50,.75) 82%, var(--green) 100%),
    linear-gradient(to top, rgba(30,58,50,.55), rgba(30,58,50,0) 30%);
}
html[dir="rtl"] .hero-media::after {
  background:
    linear-gradient(to right, rgba(30,58,50,0) 45%, rgba(30,58,50,.75) 82%, var(--green) 100%),
    linear-gradient(to top, rgba(30,58,50,.55), rgba(30,58,50,0) 30%);
}
.hero-media figcaption {
  position: absolute; bottom: 18px; inset-inline-end: 22px; z-index: 1;
  font-size: 0.78rem; color: rgba(246,247,244,.8); letter-spacing: .01em;
}
.hero-inner { width: 100%; padding-block: 72px 64px; }
.hero-text { max-width: min(600px, 48%); }
.kicker {
  display: inline-block; font-size: 0.875rem; color: var(--brass-soft);
  padding: 6px 14px; border: 1px solid rgba(216,195,156,.4); border-radius: 999px;
  margin-bottom: 26px;
}
.name {
  font-family: var(--f-ar-display);
  font-size: clamp(3rem, 6.2vw, 5.75rem);
  font-weight: 700; line-height: 1.05; color: #fff; white-space: nowrap;
}
html[lang="en"] .name { font-family: var(--f-en-display); font-weight: 600; letter-spacing: -0.025em; font-size: clamp(2.6rem, 5vw, 4.75rem); }
.name-alt { font-family: var(--f-en-display); font-size: 1.3rem; color: var(--brass-soft); margin-top: 8px; }
html[lang="en"] .name-alt { font-family: var(--f-ar-display); font-size: 1.55rem; }
.hero-summary { margin-top: 26px; color: rgba(246,247,244,.88); font-size: 1.05rem; max-width: 48ch; }
.inst { color: var(--brass-soft); margin-top: 14px; font-weight: 500; }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-block; text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 11px 22px; border-radius: 999px;
  color: var(--paper); border: 1px solid rgba(246, 247, 244, 0.4);
  backdrop-filter: blur(4px);
}
.btn:hover { border-color: var(--brass-soft); color: var(--brass-soft); }
.btn-solid { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn-solid:hover { background: #B8955B; border-color: #B8955B; color: #fff; }
.hero-stats { list-style: none; margin: 36px 0 0; padding: 22px 0 0; display: flex; gap: 40px; border-top: 1px solid rgba(246,247,244,.16); }
.hero-stats li { display: flex; flex-direction: column; font-size: 0.85rem; color: rgba(246,247,244,.7); }
.hero-stats b { font-family: var(--f-en-display); font-size: 2rem; font-weight: 600; color: #fff; line-height: 1.1; }

/* ---- sections ---- */
.section { padding-block: 88px; }
.section-tint { background: var(--paper-2); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 40px; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 0; }
.lead { color: var(--muted); max-width: 52ch; }
.mt { margin-top: 56px; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.prose p { max-width: 68ch; }
.prose p + p { margin-top: 1em; }
.facts dl { margin: 0; border-top: 2px solid var(--green); }
.facts dl > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.85rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }

/* interests */
.interests { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.interests article { padding: 24px 24px 8px; border-inline-start: 1px solid var(--line); }
.interests article:first-child { border-inline-start: 0; padding-inline-start: 0; }
.interests h3 { color: var(--green); margin-bottom: 10px; font-size: 1.125rem; }
.interests p { color: var(--muted); font-size: 0.975rem; }

/* career */
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 72px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 5px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding-inline-start: 32px; padding-bottom: 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 8px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--green-2);
}
.timeline li.current::before { background: var(--brass); border-color: var(--brass); }
.when { font-size: 0.85rem; color: var(--brass); font-weight: 600; }
.timeline h3 { margin-top: 2px; }
.where { color: var(--green-2); font-weight: 500; font-size: 0.975rem; }
.timeline li p:last-child:not(.where):not(.when) { color: var(--muted); font-size: 0.95rem; margin-top: 8px; max-width: 62ch; }

.edu { list-style: none; margin: 0; padding: 0; }
.edu li { padding: 0 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.edu li:last-child { border-bottom: 0; margin-bottom: 0; }
.edu p { color: var(--muted); font-size: 0.95rem; }
.edu .thesis { color: var(--ink); font-size: 0.925rem; margin-top: 4px; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 0.875rem; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }

/* publications */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tabs button {
  font: inherit; font-size: 0.95rem; cursor: pointer; background: none; color: var(--muted);
  border: 0; border-bottom: 2px solid transparent; padding: 10px 16px; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--green); border-bottom-color: var(--brass); font-weight: 600; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li {
  display: grid; grid-template-columns: 64px 1fr; column-gap: 20px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.pubs .y { grid-row: span 2; font-family: var(--f-en-display); color: var(--brass); font-weight: 600; padding-top: 1px; }
.pubs .t { font-weight: 500; max-width: 80ch; }
.pubs[lang="en"] .t { font-family: var(--f-en-display); font-size: 1.05rem; line-height: 1.5; }
.pubs .j { color: var(--muted); font-size: 0.9rem; font-style: italic; }
html[lang="ar"] .pubs:not([lang="en"]) .j { font-style: normal; }
.profiles { margin-top: 24px; color: var(--muted); font-size: 0.95rem; display: flex; gap: 16px; flex-wrap: wrap; }

/* conferences */
.confs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.confs li { padding: 22px 0; border-top: 1px solid var(--line); }
.place { font-size: 0.85rem; color: var(--brass); font-weight: 600; }
.confs h3 { margin: 4px 0 6px; font-weight: 500; }
.confs h3[lang="en"] { font-family: var(--f-en-display); font-size: 1.05rem; line-height: 1.45; }
.org { color: var(--muted); font-size: 0.9rem; }

/* details */
.details-group { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; color: var(--green);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--f-en-display); font-size: 1.5rem; font-weight: 400; color: var(--brass); line-height: 1; transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
.plain { margin: 0 0 24px; padding-inline-start: 1.4em; color: var(--ink); }
.plain li { padding: 4px 0; max-width: 80ch; }
.plain li::marker { color: var(--brass); }

/* contact */
.contact { background: var(--green); color: var(--paper); padding-block: 80px; }
.contact h2 { color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px 64px; }
.contact-note { color: var(--brass-soft); max-width: 40ch; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(246, 247, 244, 0.16); }
.contact-list .k { color: rgba(246, 247, 244, 0.65); font-size: 0.9rem; }
.contact-list a { color: #fff; text-decoration: none; }
.contact-list a:hover { color: var(--brass-soft); }
html[dir="rtl"] .contact-list a[dir="ltr"] { text-align: right; }
.social { grid-column: 2; list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social a { display: inline-block; padding: 6px 14px; border: 1px solid rgba(246, 247, 244, 0.35); border-radius: 999px; color: var(--paper); text-decoration: none; font-size: 0.9rem; }
.social a:hover { border-color: var(--brass-soft); color: var(--brass-soft); }



/* ---- responsive ---- */
@media (max-width: 980px) {
  .interests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .interests article:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .two-col, .about-grid { grid-template-columns: 1fr; gap: 56px; }
}
@media (max-width: 900px) {
  .hero { display: block; min-height: 0; }
  .hero-media { position: relative; width: 100%; height: 68vh; max-height: 620px; min-height: 380px; }
  .hero-media img { object-position: 50% 30%; }
  .hero-media::after, html[dir="rtl"] .hero-media::after {
    background: linear-gradient(to bottom, rgba(30,58,50,0) 50%, rgba(30,58,50,.7) 82%, var(--green) 100%);
  }
  .hero-media figcaption { display: none; }
  .hero-inner { margin-top: -120px; position: relative; padding-block: 0 56px; }
  .hero-text { max-width: 100%; }
}
@media (max-width: 1080px) {
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; inset-inline: 0;
    flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hero-stats { gap: 24px; }
  .hero-stats b { font-size: 1.6rem; }
  .section { padding-block: 64px; }
  .interests { grid-template-columns: 1fr; }
  .interests article { border-inline-start: 0; padding-inline-start: 0; padding-inline-end: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .confs { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .social { grid-column: 1; }
  .pubs li { grid-template-columns: 52px 1fr; column-gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .hero-links, .lang-btn, .social { display: none; }
  .hero, .contact { background: none; color: var(--ink); }
  .name, .role, .contact h2 { color: var(--ink); }
  details { display: block; }
}

/* ===== multi-page additions ===== */
.page-band { background: var(--green); color: var(--paper); padding-block: 64px 56px; position: relative; overflow: hidden; }
.page-band::after { content: ""; position: absolute; inset-block: -40%; inset-inline-end: -8%; width: 420px; border: 1px solid rgba(216,195,156,.16); border-radius: 50%; }
.page-band h1 { font-family: var(--f-ar-display); font-size: clamp(2.2rem, 5vw, 3.4rem); color: #fff; }
html[lang="en"] .page-band h1 { font-family: var(--f-en-display); font-weight: 600; letter-spacing: -0.015em; }
.page-band p { color: var(--brass-soft); margin-top: 10px; max-width: 62ch; }
.contact-page h1 { font-family: var(--f-ar-display); font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; margin-bottom: 20px; }
html[lang="en"] .contact-page h1 { font-family: var(--f-en-display); font-weight: 600; }
.contact-page { min-height: 52vh; display: flex; align-items: center; }

.text-link { font-weight: 600; color: var(--green-2); text-decoration: none; border-bottom: 1px solid var(--brass); padding-bottom: 2px; }
.text-link:hover { color: var(--brass); }
.btn-outline { color: var(--green); border-color: var(--green); backdrop-filter: none; }
.btn-outline:hover { background: var(--green); color: #fff; border-color: var(--green); }
.more { margin-top: 24px; }
.section-head .text-link { white-space: nowrap; }

/* home */
.home-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.lead-lg { font-size: 1.15rem; line-height: 1.85; max-width: 60ch; margin-bottom: 20px; }
.home-areas { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--green); }
.home-areas li { padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--green); font-size: 1.05rem; }
.two-col-home { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; }
.presence { list-style: none; margin: 0; padding: 0; }
.presence li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.presence b { font-weight: 600; margin-inline-end: 6px; }
.cta { background: var(--green); color: #fff; padding-block: 56px; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta h2 { color: #fff; margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }

/* flags */
.flag { width: 24px; height: 18px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); object-fit: cover; flex: none; display: inline-block; vertical-align: -3px; margin-inline-end: 6px; }
.place .flag { margin-inline-end: 8px; }

/* books */
.books-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.book-card { display: grid; grid-template-rows: auto auto auto; gap: 10px; text-decoration: none; color: var(--ink); }
.book-thumb { display: block; aspect-ratio: 600 / 1050; max-height: 360px; overflow: hidden; border-radius: 3px; box-shadow: 0 18px 30px -18px rgba(23,33,29,.6), 0 2px 6px rgba(23,33,29,.12); transition: transform .25s ease; }
.book-thumb img { width: 100%; height: 100%; object-fit: cover; }
.book-card:hover .book-thumb { transform: translateY(-4px); }
.book-card-t { font-weight: 600; font-size: 1.05rem; line-height: 1.45; }
.book-card-y { color: var(--brass); font-weight: 600; font-size: .9rem; }
.books-full { display: grid; gap: 72px; }
.book-full { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; scroll-margin-top: 90px; }
.book-cover { display: block; border-radius: 3px; overflow: hidden; box-shadow: 0 24px 40px -20px rgba(23,33,29,.6), 0 2px 8px rgba(23,33,29,.12); }
.book-meta { color: var(--brass); font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.book-full h2 { margin-bottom: 6px; }
.book-sub { color: var(--green-2); font-weight: 500; margin-bottom: 18px; }
.book-desc { max-width: 68ch; margin-bottom: 22px; }

/* certificates */
.cert-summary { display: flex; flex-wrap: wrap; gap: 48px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.cert-summary p { display: flex; flex-direction: column; color: var(--muted); font-size: .9rem; }
.cert-summary b { font-family: var(--f-en-display); font-size: 2.2rem; font-weight: 600; color: var(--green); line-height: 1.1; }
.filters { display: grid; gap: 12px; margin-bottom: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .9rem; cursor: pointer; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; display: inline-flex; align-items: center; gap: 6px; }
.chip b { font-weight: 600; color: var(--muted); font-size: .8rem; }
.chip:hover { border-color: var(--green-2); }
.chip[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.chip[aria-pressed="true"] b { color: var(--brass-soft); }
.chip-flag .flag { margin: 0; }
.certs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.cert { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.cert[hidden] { display: none; }
.cert-img { display: block; aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; border-bottom: 1px solid var(--line); }
.cert-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .3s ease; }
.cert-img:hover img { transform: scale(1.03); }
.cert-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cert-top { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: .85rem; color: var(--muted); }
.cert-top .flag { margin-inline-end: 4px; }
.country { margin-inline-end: auto; padding-inline-start: 4px; }
.cert-year { font-family: var(--f-en-display); font-weight: 600; color: var(--brass); }
.cert-cat { font-size: .78rem; color: var(--green-2); font-weight: 600; }
.cert h3 { font-size: 1rem; line-height: 1.5; }
.cert-issuer { font-size: .88rem; color: var(--green-2); }
.cert-desc { font-size: .9rem; color: var(--muted); line-height: 1.65; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(14, 26, 22, .86); }
.lightbox img { max-width: 100%; max-height: 84vh; display: block; margin: 0 auto; border-radius: 4px; background: #fff; }
.lb-cap { color: #fff; text-align: center; margin-top: 12px; font-size: .95rem; }
.lb-close { position: absolute; top: -44px; inset-inline-end: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }

/* footer */
.site-footer { background: #142923; color: rgba(246, 247, 244, 0.7); font-size: 0.9rem; padding: 40px 0 20px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid rgba(246,247,244,.12); }
.footer-name { color: #fff; font-family: var(--f-ar-display); font-size: 1.3rem; font-weight: 700; }
html[lang="en"] .footer-name { font-family: var(--f-en-display); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.footer-links a { color: rgba(246,247,244,.85); text-decoration: none; }
.footer-links a:hover { color: var(--brass-soft); }
.footer-copy { padding-top: 16px; font-size: .8rem; color: rgba(246,247,244,.5); }

@media (max-width: 980px) {
  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-intro, .two-col-home { grid-template-columns: 1fr; gap: 40px; }
  .book-full { grid-template-columns: 220px 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .certs { grid-template-columns: 1fr; }
  .books-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .book-card-t { font-size: .85rem; }
  .book-full { grid-template-columns: 1fr; }
  .book-cover { max-width: 240px; }
  .cert-summary { gap: 28px; }
  .page-band { padding-block: 44px 40px; }
}

/* ===== animated band art + academic page ===== */
.band-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; position: relative; z-index: 1; }
.band-text { max-width: 640px; }
.band-art { width: 250px; height: auto; flex: none; color: var(--brass-soft); opacity: .95; animation: float 7s ease-in-out 2.4s infinite; }
.band-art path { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1.8s cubic-bezier(.6,.1,.3,1) forwards; }
.band-art path:nth-child(2) { animation-delay: .15s; } .band-art path:nth-child(3) { animation-delay: .3s; }
.band-art path:nth-child(4) { animation-delay: .45s; } .band-art path:nth-child(5) { animation-delay: .6s; }
.band-art path:nth-child(6) { animation-delay: .75s; } .band-art path:nth-child(n+7) { animation-delay: .9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.ico { width: 24px; height: 24px; flex: none; }
.ico-sm { width: 18px; height: 18px; }
.ico-lg { width: 44px; height: 44px; color: var(--brass); }
.ico path { stroke-dasharray: 80; stroke-dashoffset: 0; }
.js [data-reveal] .ico path, .js [data-reveal].ico path { stroke-dashoffset: 80; }
.js [data-reveal].in .ico path { animation: draw 1.1s cubic-bezier(.6,.1,.3,1) .1s forwards; }
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js [data-reveal].in { opacity: 1; transform: none; }

/* stats bar overlapping the band */
.stats-wrap { margin-top: -38px; position: relative; z-index: 2; }
.stats-bar { list-style: none; margin: 0; padding: 22px 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border-radius: 10px; box-shadow: 0 18px 40px -24px rgba(23,33,29,.45), 0 1px 3px rgba(23,33,29,.08); }
.stats-bar li { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 12px; color: var(--muted); font-size: .9rem; }
.stats-bar li + li { border-inline-start: 1px solid var(--line); }
.stats-bar b { font-family: var(--f-en-display); font-size: 2.4rem; font-weight: 600; color: var(--green); line-height: 1.1; }

.sec-title { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 32px; }
.sec-title h2 { margin-bottom: 6px; }
.sec-title .ico-lg { margin-top: 4px; }

/* theses */
.theme-legend { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.theme-legend li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: .9rem; background: var(--th-bg); color: var(--th-fg); }
.theme-legend b { font-family: var(--f-en-display); font-weight: 600; }
.th-admin { --th-fg: #1E3A32; --th-bg: #E2EBE6; }
.th-env { --th-fg: #3D6B2F; --th-bg: #E7F0DF; }
.th-contract { --th-fg: #8A5A1F; --th-bg: #F5EBDB; }
.th-const { --th-fg: #6B2F2A; --th-bg: #F3E2DF; }
.theses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.thesis { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 4px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; border-inline-start: 3px solid var(--th-fg); transition: box-shadow .25s ease, transform .25s ease; }
.thesis:hover { box-shadow: 0 14px 28px -20px rgba(23,33,29,.45); }
.js .thesis.in:hover { transform: translateY(-2px); }
.thesis-ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--th-bg); color: var(--th-fg); }
.thesis-theme { font-size: .78rem; font-weight: 600; color: var(--th-fg); }
.thesis-t { font-weight: 500; line-height: 1.55; }

/* exams */
.exams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.exam { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.exam header { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.exam h3 { flex: 1; font-size: 1rem; color: var(--green); }
.exam-mono { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: var(--brass-soft); display: grid; place-items: center; flex: none; }
.exam-n { font-family: var(--f-en-display); font-weight: 600; font-size: 1.3rem; color: var(--brass); }
.exam ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.exam li { padding-inline-start: 16px; position: relative; line-height: 1.6; font-size: .95rem; }
.exam li::before { content: ""; position: absolute; inset-inline-start: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }

/* development */
.devs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.dev { padding: 18px 0; border-top: 1px solid var(--line); }
.dev-where { display: flex; align-items: center; font-weight: 600; color: var(--green); font-size: .95rem; }
.dev-what { color: var(--ink); margin-top: 4px; padding-inline-start: 30px; }

/* service */
.svcs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.svc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px 22px; }
.svc-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--green); color: var(--brass-soft); display: grid; place-items: center; margin-bottom: 16px; }
.svc-ico .ico { width: 26px; height: 26px; }
.svc h3 { font-size: 1.05rem; color: var(--green); margin-bottom: 8px; }
.svc p { font-size: .92rem; color: var(--muted); line-height: 1.7; }

@media (max-width: 980px) {
  .theses, .exams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-art { width: 150px; }
}
@media (max-width: 640px) {
  .band-art:not(.band-globe) { display: none; }
  .stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .stats-bar li:nth-child(3) { border-inline-start: 0; }
  .theses, .exams, .svcs, .devs { grid-template-columns: 1fr; }
  .sec-title .ico-lg { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .band-art, .band-art path, .js [data-reveal].in .ico path { animation: none !important; stroke-dashoffset: 0 !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js [data-reveal] .ico path { stroke-dashoffset: 0 !important; }
}

/* webmail access */
.mail-btn { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--green); text-decoration: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; }
.mail-btn:hover { border-color: var(--green); color: var(--green); }
.webmail-card { display: flex; align-items: center; gap: 20px; padding: 24px 28px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: box-shadow .2s ease, border-color .2s ease; }
.webmail-card:hover { border-color: var(--green-2); box-shadow: 0 16px 30px -22px rgba(23,33,29,.5); color: var(--ink); }
.webmail-ico { width: 56px; height: 56px; border-radius: 14px; background: var(--green); color: var(--brass-soft); display: grid; place-items: center; flex: none; }
.webmail-t { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.webmail-t b { font-size: 1.15rem; color: var(--green); }
.webmail-t > span { color: var(--muted); font-size: .92rem; }
.webmail-go { background: var(--brass); color: #fff; border-radius: 999px; padding: 10px 20px; font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .mail-btn span { display: none; }
  .mail-btn { padding: 6px 8px; }
  .webmail-card { flex-wrap: wrap; }
}

/* ===== publications actions ===== */
.pubs .t a { color: inherit; text-decoration: none; background-image: linear-gradient(var(--brass), var(--brass)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s ease; }
.pubs .t a:hover { background-size: 100% 1px; color: var(--green); }
.pub-acts { grid-column: 2; display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pub-act { font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .02em; cursor: pointer; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--green-2); text-decoration: none; font-family: var(--f-body); font-style: normal; }
.pub-act:hover { border-color: var(--green-2); color: var(--green); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--green); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 60; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== profile page ===== */
.about-intro { padding-top: 64px; }
.jobs { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 20px; }
.jobs::before { content: ""; position: absolute; inset-block: 24px; inset-inline-start: 23px; width: 2px; background: linear-gradient(var(--brass), var(--line)); }
.job { display: grid; grid-template-columns: 48px 1fr; gap: 20px; position: relative; }
.job-ico { width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 2px solid var(--line); color: var(--green-2); display: grid; place-items: center; z-index: 1; }
.job-now .job-ico { background: var(--green); border-color: var(--green); color: var(--brass-soft); }
.job-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px 24px; }
.job-now .job-card { border-color: var(--brass); box-shadow: 0 14px 30px -24px rgba(168,132,76,.8); }
.job-when { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--brass); font-weight: 600; font-size: .88rem; }
.job-badge { background: var(--green); color: #fff; font-size: .72rem; padding: 2px 10px; border-radius: 999px; }
.job-card h3 { font-size: 1.1rem; margin-top: 4px; }
.job-org { color: var(--green-2); font-weight: 500; }
.job-card ul { margin: 10px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: .94rem; display: grid; gap: 4px; }
.job-card li::marker { color: var(--brass); }
.edus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.edu-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px; position: relative; overflow: hidden; }
.edu-card::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--paper-2); }
.edu-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--green); color: var(--brass-soft); display: grid; place-items: center; margin-bottom: 14px; position: relative; z-index: 1; }
.edu-years { font-family: var(--f-en-display); color: var(--brass); font-weight: 600; }
.edu-card h3 { font-size: 1.05rem; margin: 4px 0; }
.edu-uni { color: var(--green-2); font-size: .92rem; }
.edu-thesis { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .9rem; color: var(--muted); }
.tags-lg li { padding: 8px 16px; font-size: .92rem; }
.cv-cta { display: inline-flex; align-items: center; gap: 16px; margin-top: 36px; padding: 16px 24px 16px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
html[dir="rtl"] .cv-cta { padding: 16px 16px 16px 24px; }
.cv-cta .svc-ico { margin: 0; }
.cv-cta b { display: block; color: var(--green); }
.cv-cta span span { color: var(--muted); font-size: .85rem; }
.cv-cta:hover { border-color: var(--green-2); color: var(--ink); }

/* ===== media page ===== */
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.video { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.video-frame, .video-iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #000; position: relative; cursor: pointer; }
.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: opacity .25s ease, transform .4s ease; }
.video-frame:hover img { opacity: 1; transform: scale(1.03); }
.video-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; background: rgba(30,58,50,.92); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: transform .2s ease, background .2s ease; }
.video-play .ico { width: 28px; height: 28px; margin-inline-start: 4px; }
html[dir="rtl"] .video-play .ico { margin-inline-start: 0; margin-inline-end: -4px; }
.video-frame:hover .video-play { transform: scale(1.08); background: var(--brass); }
.video-body { padding: 18px 22px 22px; }
.video-cat { color: var(--brass); font-weight: 600; font-size: .82rem; }
.video h3 { font-size: 1.05rem; line-height: 1.5; margin-top: 4px; }

/* ===== contact form ===== */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 56px; align-items: start; }
.cform { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: grid; gap: 16px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fld { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--green); }
.fld em { font-style: normal; font-weight: 400; color: var(--muted); }
.fld input, .fld textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(43,82,69,.15); background: #fff; }
.fld textarea { resize: vertical; min-height: 140px; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.factions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.factions .btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.factions .btn[disabled] { opacity: .6; cursor: wait; }
.fmsg { font-size: .92rem; margin: 0; }
.fmsg.good { color: #2E6B3F; font-weight: 600; }
.fmsg.bad { color: #9A3B32; }

@media (max-width: 980px) {
  .edus { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 1180px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; inset-inline: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 640px) {
  .videos, .frow { grid-template-columns: 1fr; }
  .cform { padding: 20px; }
  .job { grid-template-columns: 40px 1fr; gap: 12px; }
  .job-ico { width: 40px; height: 40px; }
  .jobs::before { inset-inline-start: 19px; }
}

/* CV chooser */
.cvdlg { border: 0; border-radius: 14px; padding: 28px; width: min(420px, 92vw); text-align: center; overflow: visible; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
.cvdlg::backdrop { background: rgba(14,26,22,.7); }
.cvdlg h2 { margin: 0 0 6px; }
.cvdlg p { color: var(--muted); margin-bottom: 20px; }
.cvdlg .lb-close { top: 10px; inset-inline-end: 10px; color: var(--ink); border-color: var(--line); width: 32px; height: 32px; font-size: 1.2rem; }
.cv-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cv-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--green); background: var(--paper); transition: border-color .2s ease, background .2s ease; }
.cv-opt b { font-size: 1.2rem; }
.cv-opt b[lang="ar"] { font-family: var(--f-ar-display); font-size: 1.4rem; }
.cv-opt span { font-size: .8rem; color: var(--muted); }
.cv-opt:hover { border-color: var(--green); background: #fff; color: var(--green); }

/* ===== homepage brief + teaching areas ===== */
.home-brief { position: relative; overflow: hidden; }
.brief-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: start; }
.brief-card { position: relative; background: var(--green); color: #fff; border-radius: 16px; padding: 40px 36px 36px; overflow: hidden; isolation: isolate; }
.brief-card::before { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; inset-inline-end: -140px; top: -160px; background: radial-gradient(circle, rgba(216,195,156,.28), rgba(216,195,156,0) 70%); z-index: -1; animation: glow 9s ease-in-out infinite alternate; }
@keyframes glow { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, 40px) scale(1.15); } }
.brief-card h2 { color: #fff; margin-bottom: 14px; }
.brief-card .lead-lg { color: rgba(246,247,244,.9); margin-bottom: 22px; }
.brief-quote { display: block; font-family: 'Source Serif 4', Georgia, serif; font-size: 6rem; line-height: .6; height: 44px; color: var(--brass); opacity: .9; margin-bottom: 10px; }
html[dir="rtl"] .brief-quote { transform: scaleX(-1); text-align: left; }
.brief-rule { display: block; height: 2px; width: 0; background: linear-gradient(90deg, var(--brass), var(--brass-soft)); margin-bottom: 24px; transition: width 1.2s cubic-bezier(.6,.1,.3,1) .4s; }
.brief-card.in .brief-rule, html:not(.js) .brief-rule { width: 96px; }
.brief-card .btn-solid { box-shadow: 0 10px 24px -12px rgba(168,132,76,.9); }

.areas-head { margin-bottom: 20px; }
.areas-head h2 { margin-bottom: 4px; }
.areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.area { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.area::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(216,195,156,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .9s ease; pointer-events: none; }
html[dir="rtl"] .area::after { transform: translateX(120%); }
.area:hover { transform: translateY(-4px); border-color: var(--brass); box-shadow: 0 18px 32px -22px rgba(23,33,29,.55); }
.area:hover::after { transform: translateX(120%); }
html[dir="rtl"] .area:hover::after { transform: translateX(-120%); }
.area-ico { grid-row: span 2; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--green); transition: background .3s ease, color .3s ease, transform .3s ease; }
.area:hover .area-ico { background: var(--green); color: var(--brass-soft); transform: rotate(-6deg) scale(1.05); }
.area-t { font-weight: 600; color: var(--ink); line-height: 1.4; }
.area-lvl { font-size: .78rem; color: var(--brass); font-weight: 600; }
.area:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* livelier homepage cards */
.book-card:hover .book-thumb { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 0 28px 40px -22px rgba(23,33,29,.7); }
html[dir="rtl"] .book-card:hover .book-thumb { transform: translateY(-6px) rotate(1.5deg); }
.presence li { transition: padding .25s ease, background .25s ease; border-radius: 6px; }
.presence li:hover { background: #fff; padding-inline: 10px; }
.presence .flag { transition: transform .25s ease; }
.presence li:hover .flag { transform: scale(1.15); }
.hero .btn-solid { position: relative; overflow: hidden; }
.hero .btn-solid::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%); transform: translateX(-130%); animation: sheen 4.5s ease-in-out 2s infinite; }
@keyframes sheen { 0%, 70% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.hero-media img { animation: kenburns 22s ease-in-out infinite alternate; transform-origin: 50% 35%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-text > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-text > *:nth-child(2) { animation-delay: .12s; } .hero-text > *:nth-child(3) { animation-delay: .22s; }
.hero-text > *:nth-child(4) { animation-delay: .32s; } .hero-text > *:nth-child(5) { animation-delay: .42s; }
.hero-text > *:nth-child(6) { animation-delay: .52s; } .hero-text > *:nth-child(n+7) { animation-delay: .62s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .brief-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 520px) {
  .areas { grid-template-columns: 1fr; gap: 10px; }
  .area { padding: 14px; }
  .area-ico { width: 42px; height: 42px; }
  .brief-card { padding: 30px 22px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .brief-card::before, .hero .btn-solid::after, .hero-media img, .hero-text > * { animation: none !important; }
  .brief-rule { width: 96px; transition: none; }
}

/* ===== world map ===== */
.world { position: relative; background: radial-gradient(120% 90% at 70% 10%, #24463c 0%, var(--green) 55%, #16302a 100%); color: #fff; padding-block: 88px; overflow: hidden; isolation: isolate; }
.world::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(216,195,156,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(216,195,156,.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); z-index: -1; }
.world-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 36px; max-width: 760px; }
.world-head h2 { color: #fff; margin-bottom: 6px; }
.world-head p { color: rgba(246,247,244,.78); }
.world-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(216,195,156,.12); color: var(--brass-soft); flex: none; }
.world-ico .ico { width: 30px; height: 30px; }
.world-body { display: grid; gap: 36px; }
.world-map { position: relative; }
.wm { width: 100%; height: auto; display: block; overflow: visible; }
.wm-land { stroke: rgba(216,195,156,.34); stroke-width: 4.2px; stroke-linecap: round; fill: none; vector-effect: non-scaling-stroke; }
.wm-arc { fill: none; stroke: var(--brass-soft); stroke-width: 1.3px; vector-effect: non-scaling-stroke; stroke-dasharray: 4 5; opacity: .0; animation: arcIn 1.2s ease forwards; animation-delay: calc(var(--d) + .6s); }
@keyframes arcIn { from { opacity: 0; stroke-dashoffset: 120; } to { opacity: .55; stroke-dashoffset: 0; } }
.wm-arc { animation: arcIn 1.2s ease forwards, arcFlow 6s linear infinite; animation-delay: calc(var(--d) + .6s), calc(var(--d) + 1.8s); }
@keyframes arcFlow { to { stroke-dashoffset: -90; } }
.wm-pt .wm-core { fill: #F3D9A4; filter: drop-shadow(0 0 4px rgba(243,217,164,.9)); animation: blink 7.2s ease-in-out infinite; animation-delay: var(--d); }
.wm-pt .wm-ring { fill: none; stroke: #F3D9A4; stroke-width: 1.4; transform-box: fill-box; transform-origin: center; animation: ping 7.2s cubic-bezier(.2,.6,.3,1) infinite; animation-delay: var(--d); opacity: 0; }
.wm-pt .wm-ring2 { animation-delay: calc(var(--d) + .5s); }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 18% { transform: scale(4.2); opacity: 0; } 100% { transform: scale(4.2); opacity: 0; } }
@keyframes blink { 0%, 100% { opacity: .55; } 6% { opacity: 1; } 22% { opacity: 1; } 40% { opacity: .55; } }
.wm-pt { cursor: default; }
.wm-pt.hl .wm-core { opacity: 1 !important; animation: none; r: 5px; }
.wm-home circle { fill: var(--brass); }
.wm-home .wm-home-ring { fill: none; stroke: var(--brass); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: homePulse 2.4s ease-out infinite; }
@keyframes homePulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.wm-lbl { font: 600 14px var(--f-body); fill: rgba(255,255,255,.88); paint-order: stroke; stroke: rgba(22,48,42,.85); stroke-width: 4px; opacity: 0; animation: lblIn .8s ease forwards; animation-delay: calc(var(--d) + 1.2s); }
.wm-lbl-home { fill: var(--brass-soft); animation-delay: .3s; font-size: 14px; }
@keyframes lblIn { to { opacity: 1; } }

.world-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 24px; align-items: start; }
.world-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.world-stats li { background: rgba(255,255,255,.06); border: 1px solid rgba(216,195,156,.18); border-radius: 12px; padding: 12px 10px; text-align: center; display: flex; flex-direction: column; font-size: .8rem; color: rgba(246,247,244,.75); }
.world-stats b { font-family: var(--f-en-display); font-size: 2rem; font-weight: 600; color: var(--brass-soft); line-height: 1.1; }
.world-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.world-list li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px; row-gap: 1px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid rgba(216,195,156,.14); background: rgba(255,255,255,.03); transition: background .25s ease, border-color .25s ease, transform .25s ease; cursor: default; }
.world-list li:hover, .world-list li.hl { transform: translateY(-2px); border-color: rgba(216,195,156,.45); }
.world-list li:hover, .world-list li.hl { background: rgba(255,255,255,.08); }
.world-list .flag { grid-row: span 3; margin: 0; width: 26px; height: 19px; align-self: start; margin-top: 3px; }
.wl-city { font-weight: 600; color: #fff; }
.wl-what { grid-column: 2; font-size: .82rem; color: rgba(246,247,244,.65); }
.wl-yr { grid-column: 2; font-family: var(--f-en-display); color: var(--brass-soft); font-weight: 600; font-size: .85rem; }
.world-list li.hl .flag { transform: scale(1.12); }

@media (max-width: 980px) {
  .world-side { grid-template-columns: 1fr; }
  .world-stats { grid-template-columns: repeat(3, 1fr); }
  .world-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .world { padding-block: 64px; }
  .wm-lbl { font-size: 27px; stroke-width: 7px; }
  .wm-lbl-home { font-size: 28px; }
  .wm-lbl[x] { letter-spacing: 0; }
  .wm-land { stroke-width: 2.6px; }
  .wm-pt .wm-core { r: 6.5px; }
  .wm-home circle { r: 7px; }
  .world-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .world-list li { padding: 10px; }
  .world-map { margin-inline: -16px; }
}
@media (prefers-reduced-motion: reduce) {
  .wm-arc { animation: none; opacity: .5; }
  .wm-pt .wm-core, .wm-pt .wm-ring, .wm-home .wm-home-ring { animation: none; }
  .wm-pt .wm-core { opacity: 1; }
  .wm-lbl { animation: none; opacity: 1; }
}

/* ===== legal motifs ===== */
.hero-scales { position: absolute; z-index: 0; width: min(520px, 40vw); height: auto; top: 50%; inset-inline-start: 2%; transform: translateY(-46%); color: var(--brass-soft); opacity: .1; pointer-events: none; }
.hero-scales path, .hero-scales circle { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.6s cubic-bezier(.6,.1,.3,1) .3s forwards; }
.hs-beam { transform-box: view-box; transform-origin: 150px 76px; animation: sway 9s ease-in-out 3s infinite; }
.hs-pan { transform-box: view-box; animation: counter 9s ease-in-out 3s infinite; }
.hs-l { transform-origin: 68px 76px; } .hs-r { transform-origin: 232px 76px; }
@keyframes sway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(3deg); } 75% { transform: rotate(-3deg); } }
@keyframes counter { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.hero-inner { position: relative; z-index: 1; }

/* columns frieze on inner page headers */
.page-band { padding-bottom: 92px; }
.page-band::before { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 58px; opacity: .14; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='58' viewBox='0 0 72 58' fill='none' stroke='%23D8C39C' stroke-width='1.3'%3E%3Cpath d='M0 6h72M0 10h72M0 52h72M0 56h72'/%3E%3Cpath d='M24 14h24v4H24zM24 46h24v4H24z'/%3E%3Cpath d='M27 18v28M31 18v28M36 18v28M41 18v28M45 18v28'/%3E%3C/svg%3E") repeat-x left bottom / 72px 58px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  animation: friezeIn 1.6s ease .2s both; }
@keyframes friezeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: .14; transform: none; } }

@media (max-width: 900px) {
  .hero-scales { width: 280px; top: auto; bottom: 40px; transform: none; inset-inline-start: auto; inset-inline-end: -40px; opacity: .1; }
}
@media (max-width: 640px) {
  .page-band { padding-bottom: 72px; }
  .page-band::before { height: 44px; background-size: 54px 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scales path, .hero-scales circle { animation: none; stroke-dashoffset: 0; }
  .hs-beam, .hs-pan, .page-band::before { animation: none; }
}

/* calligraphy logo */
.header-inner { height: 72px; }
html { scroll-padding-top: 84px; }
.brand { display: flex; align-items: center; }
.brand-logo { height: 58px; width: auto; transition: transform .3s ease; }
.brand:hover .brand-logo { transform: scale(1.03); }
.footer-logo { height: 76px; width: auto; margin-bottom: 8px; opacity: .95; }
@media (max-width: 1180px) { .nav { top: 72px; } }
@media (max-width: 640px) {
  .header-inner { height: 64px; }
  .brand-logo { height: 50px; }
  .nav { top: 64px; }
}

/* ===== map stories ===== */
.world-map { position: relative; border-radius: 18px; }
.wm-hint { position: absolute; inset-inline-start: 0; bottom: -6px; font-size: .82rem; color: var(--brass-soft); display: inline-flex; align-items: center; gap: 8px; opacity: .85; transition: opacity .4s ease; }
.wm-hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brass-soft); box-shadow: 0 0 0 0 rgba(216,195,156,.7); animation: hintPing 2s ease-out infinite; }
@keyframes hintPing { to { box-shadow: 0 0 0 10px rgba(216,195,156,0); } }
.world-map.zoomed .wm-hint { opacity: 0; }
.world-map.zoomed .wm-land { stroke: rgba(216,195,156,.24); }
.world-map.zoomed .wm-lbl { opacity: 0 !important; transition: opacity .3s; }
.world-map.zoomed .wm-pt:not(.active) { opacity: .35; }
.world-map.zoomed .wm-arc:not(.active) { opacity: .12 !important; }
.wm-arc.active { stroke: #F3D9A4; stroke-width: 2.6px; stroke-dasharray: 6 5; opacity: 1 !important; filter: drop-shadow(0 0 3px rgba(243,217,164,.7)); }
.wm-pt.active .wm-core { opacity: 1; animation: none; filter: drop-shadow(0 0 8px rgba(243,217,164,1)); }
.wm-pt.active .wm-ring { animation-duration: 1.8s; animation-delay: 0s; }
.wm-pt.active .wm-ring2 { animation-delay: .6s; }

.wm-panel { position: absolute; top: 4%; bottom: 4%; inset-inline-start: 0; width: min(390px, 40%); z-index: 3;
  background: rgba(246,247,244,.97); color: var(--ink); border-radius: 16px; padding: 14px 20px 20px; overflow-y: auto;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(216,195,156,.4);
  opacity: 0; visibility: hidden; transform: translateX(40px) scale(.97); transition: opacity .45s ease, transform .55s cubic-bezier(.2,.8,.2,1), visibility 0s .55s; }
html[dir="rtl"] .wm-panel { transform: translateX(-40px) scale(.97); }
html[dir="rtl"] .wm-panel { transform: translateX(40px) scale(.97); }
html[dir="ltr"] .wm-panel { transform: translateX(-40px) scale(.97); }
.wm-panel.open { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .55s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.wm-panel:focus { outline: none; }
.wm-pbody { transition: opacity .22s ease, transform .22s ease; }
.wm-panel.swap .wm-pbody { opacity: 0; transform: translateY(8px); }
.wm-panel.open .wm-pbody > * { animation: wmIn .55s cubic-bezier(.2,.8,.2,1) both; }
.wm-panel.open .wm-pbody > *:nth-child(2) { animation-delay: .06s; } .wm-panel.open .wm-pbody > *:nth-child(3) { animation-delay: .12s; }
.wm-panel.open .wm-pbody > *:nth-child(4) { animation-delay: .18s; } .wm-panel.open .wm-pbody > *:nth-child(5) { animation-delay: .24s; }
.wm-panel.open .wm-pbody > *:nth-child(n+6) { animation-delay: .3s; }
@keyframes wmIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.wm-grab { display: none; }
.wm-pnav { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.wm-count { font-size: .78rem; color: var(--muted); margin-inline-end: auto; padding-inline-start: 4px; order: 2; }
.wm-prev { order: 0; } .wm-next { order: 1; } .wm-close { order: 3; }
html[dir="ltr"] .wm-prev svg, html[dir="ltr"] .wm-next svg { transform: scaleX(-1); }
.wm-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--green); display: grid; place-items: center; cursor: pointer; font-size: 1.3rem; line-height: 1; transition: background .2s, color .2s, border-color .2s; }
.wm-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.wm-p-head { display: flex; align-items: center; gap: 12px; }
.wm-p-flag { width: 44px; height: 33px; border-radius: 4px; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.wm-p-head h3 { font-family: var(--f-ar-display); font-size: 1.7rem; color: var(--green); line-height: 1.1; }
html[lang="en"] .wm-p-head h3 { font-family: var(--f-en-display); font-weight: 600; font-size: 1.5rem; }
.wm-p-head p { color: var(--muted); font-size: .85rem; }
.wm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.wm-chip { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--green-2); font-weight: 600; }
.wm-chip-role { background: var(--green); color: var(--brass-soft); }
.wm-event { font-weight: 700; color: var(--ink); line-height: 1.5; }
.wm-host { color: var(--green-2); font-size: .9rem; margin-top: 2px; }
.wm-title { margin: 14px 0 0; padding: 12px 14px; border-inline-start: 3px solid var(--brass); background: #fff; border-radius: 8px; font-family: var(--f-en-display); font-size: .98rem; line-height: 1.5; color: var(--ink); }
.wm-title[dir="ltr"] { border-left: 3px solid var(--brass); border-right: 0; text-align: left; }
.wm-title span { display: block; font-family: var(--f-body); font-size: .72rem; font-weight: 600; color: var(--brass); margin-bottom: 2px; }
.wm-note { margin-top: 12px; color: var(--muted); font-size: .92rem; line-height: 1.75; }
.wm-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.wm-cert, .wm-vid { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--green); transition: transform .25s ease, box-shadow .25s ease; }
.wm-cert:hover, .wm-vid:hover { transform: translateY(-3px); box-shadow: 0 14px 24px -16px rgba(0,0,0,.5); color: var(--green); }
.wm-cert img, .wm-vid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-2); }
.wm-cert img { object-fit: contain; padding: 6px; }
.wm-cert span, .wm-vid span { display: block; padding: 7px 10px; font-size: .8rem; font-weight: 600; }
.world-list li { cursor: pointer; }
.world-list li:focus-visible { outline: 2px solid var(--brass-soft); outline-offset: 2px; }
.world-list li.sel { background: rgba(216,195,156,.16); border-color: var(--brass-soft); }
.world-list li.sel .wl-city::after { content: " ●"; color: #F3D9A4; font-size: .7em; vertical-align: middle; }

@media (max-width: 760px) {
  .wm-hint { position: static; margin-top: 8px; padding-inline: 16px; }
  .wm-panel { position: fixed; top: auto; bottom: 0; inset-inline: 0; width: auto; max-height: 72vh; border-radius: 20px 20px 0 0; padding: 8px 18px 24px; z-index: 40;
    transform: translateY(105%) !important; box-shadow: 0 -20px 50px -10px rgba(0,0,0,.45); }
  .wm-panel.open { transform: none !important; }
  .wm-grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .wm-panel, .wm-panel.open, .wm-pbody { transition: none; }
  .wm-panel.open .wm-pbody > * { animation: none; }
}

.world-map.zoomed .wm-pt { transition: opacity .4s; }
.wm-pt .wm-core, .wm-pt .wm-ring { transition: r .5s ease; }
.world-map.zoomed .wm-pt .wm-core { r: 2.2px; }
.world-map.zoomed .wm-pt.active .wm-core { r: 2.8px; }
.world-map.zoomed .wm-pt .wm-ring { r: 3px; }
.world-map.zoomed .wm-home circle:not(.wm-home-ring) { r: 3px; }

/* ===== law-library shelf ===== */
.shelf { list-style: none; margin: 0; padding: 0 0 14px; display: grid; gap: 7px; position: relative; perspective: 900px; }
.shelf::after { content: ""; position: absolute; inset-inline: -10px; bottom: 0; height: 12px; border-radius: 3px; background: linear-gradient(#8a6a44, #5c4329); box-shadow: 0 10px 18px -8px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.25); }
.vol { position: relative; }
.js .vol[data-reveal] { opacity: 0; transform: translateY(-46px) rotate(-2.5deg); transition: opacity .5s ease, transform .75s cubic-bezier(.25,1.5,.45,1); }
.js .vol[data-reveal]:nth-child(even) { transform: translateY(-46px) rotate(2deg); }
.js .vol[data-reveal].in { opacity: 1; transform: none; }
.vol-spine { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 10px 40px 1fr auto 10px; align-items: center; gap: 14px;
  min-height: 60px; padding: 0 14px; border-radius: 4px 9px 9px 4px; color: #E9D3A0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 35%, rgba(0,0,0,.18)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 5px),
    var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), inset 6px 0 10px -6px rgba(0,0,0,.6), 0 6px 14px -8px rgba(0,0,0,.55);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease; }
html[dir="rtl"] .vol-spine { border-radius: 9px 4px 4px 9px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), inset -6px 0 10px -6px rgba(0,0,0,.6), 0 6px 14px -8px rgba(0,0,0,.55); }
.vol-spine:hover, .vol.open .vol-spine { transform: translateX(14px); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), 0 16px 26px -12px rgba(0,0,0,.6); }
html[dir="rtl"] .vol-spine:hover, html[dir="rtl"] .vol.open .vol-spine { transform: translateX(-14px); }
.vol-spine:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.vol-band { align-self: stretch; margin-block: 9px; border-inline: 2px solid rgba(233,211,160,.75); border-radius: 1px; }
.vol-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(233,211,160,.55); background: rgba(0,0,0,.12); }
.vol-ico .ico { width: 20px; height: 20px; }
.vol-t { font-family: var(--f-ar-display); font-weight: 700; font-size: 1.22rem; line-height: 1.25; text-shadow: 0 1px 0 rgba(0,0,0,.45), 0 0 1px rgba(233,211,160,.4); letter-spacing: .01em; }
html[lang="en"] .vol-t, .vol-t [lang="en"] { font-family: var(--f-en-display); font-weight: 600; font-size: 1.08rem; }
.vol-no { font-family: var(--f-en-display); font-size: .82rem; font-weight: 600; opacity: .8; padding: 2px 8px; border: 1px solid rgba(233,211,160,.45); border-radius: 3px; }
.vol-spine:hover .vol-ico { animation: icoTurn .6s ease; }
@keyframes icoTurn { 40% { transform: rotate(-12deg) scale(1.08); } 100% { transform: none; } }
.vol-spine::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(110deg, transparent 35%, rgba(255,240,200,.28) 50%, transparent 65%); transform: translateX(-120%); transition: transform .9s ease; pointer-events: none; }
.vol-spine { position: relative; overflow: hidden; }
.vol-spine:hover::after { transform: translateX(120%); }

.vol-page { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s cubic-bezier(.2,.8,.2,1); }
.vol.open .vol-page { grid-template-rows: 1fr; }
.vol-page-in { overflow: hidden; margin-inline: 18px; background: #FBF7EC; border: 1px solid #E6DCC4; border-top: 0; border-radius: 0 0 10px 10px; box-shadow: inset 0 8px 10px -8px rgba(0,0,0,.25); padding: 0 18px; display: flex; gap: 14px; align-items: center; transition: padding .45s ease; }
.vol.open .vol-page-in { padding: 14px 18px; }
.vol-page p { color: #4a4436; font-size: .95rem; line-height: 1.7; margin: 0; }
.vol-page-in { position: relative; }
.vol-page p { padding-inline-end: 96px; }
.vol-seal { position: absolute; top: 0; inset-inline-end: 18px; z-index: 1; min-width: 78px; text-align: center;
  padding: 7px 10px 15px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1.2; color: #4a3612;
  background: linear-gradient(180deg, #F3DDA5, #D6B46A 55%, #BE9649);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.18));
  transform-origin: 50% 0; transform: translateY(-110%); opacity: 0;
  transition: transform .6s cubic-bezier(.3,1.5,.5,1) .2s, opacity .2s ease .2s; }
.vol-seal::before { content: ""; position: absolute; inset: 3px 4px 10px; border: 1px dashed rgba(90,64,20,.35); border-bottom: 0; pointer-events: none; }
.vol.open .vol-seal { transform: none; opacity: 1; animation: ribbonSway 1.4s ease .75s; }
@keyframes ribbonSway { 25% { transform: rotate(3deg); } 55% { transform: rotate(-2deg); } 80% { transform: rotate(1deg); } 100% { transform: none; } }

@media (max-width: 520px) {
  .vol-spine { grid-template-columns: 8px 34px 1fr auto 8px; gap: 10px; min-height: 56px; padding: 0 10px; }
  .vol-ico { width: 34px; height: 34px; }
  .vol-t { font-size: 1.08rem; }
  .vol-page-in { margin-inline: 10px; }
  .vol-page p { padding-inline-end: 86px; font-size: .9rem; }
  .vol-seal { inset-inline-end: 12px; min-width: 70px; }
  .vol-spine:hover, .vol.open .vol-spine { transform: translateX(8px); }
  html[dir="rtl"] .vol-spine:hover, html[dir="rtl"] .vol.open .vol-spine { transform: translateX(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .js .vol[data-reveal] { transform: none !important; opacity: 1 !important; transition: none; }
  .vol-spine, .vol-page, .vol-seal { transition: none; }
  .vol.open .vol-seal { animation: none; }
}

/* ===== rotating globe (profile band) ===== */
.band-globe { width: 300px; height: 300px; flex: none; overflow: visible; color: #F0DDB0; animation: globeIn 1.2s cubic-bezier(.2,.8,.2,1) .2s both; }
@keyframes globeIn { from { opacity: 0; transform: scale(.85) rotate(-8deg); } to { opacity: 1; transform: none; } }
.g-outline { fill: rgba(216,195,156,.05); stroke: rgba(216,195,156,.55); stroke-width: 1.2; }
.g-par line, .g-mer ellipse { fill: none; stroke: rgba(216,195,156,.42); stroke-width: .9; }
.g-par .g-eq { stroke: rgba(216,195,156,.7); stroke-dasharray: 3 4; }
.g-orbit { fill: none; stroke: rgba(216,195,156,.45); stroke-width: 1; stroke-dasharray: 2 5; animation: orbitDash 20s linear infinite; }
@keyframes orbitDash { to { stroke-dashoffset: -140; } }
.g-medal { fill: #1E3A32; stroke: #C9A35A; stroke-width: 1.6; filter: drop-shadow(0 0 10px rgba(216,195,156,.35)); }
.g-medal-ring { fill: none; stroke: rgba(216,195,156,.45); stroke-width: .8; stroke-dasharray: 2 3; }
.g-beam { transform-box: view-box; transform-origin: 150px 96px; animation: sway 7s ease-in-out infinite; }
.g-tok-ring { fill: #1E3A32; stroke: #E9D3A0; stroke-width: 1.4; }
.g-tok { filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }

@media (max-width: 640px) {
  .band-inner:has(.band-globe) { flex-direction: column; align-items: stretch; gap: 8px; }
  .band-globe { display: block; width: 240px; height: 240px; margin: 0 auto -10px; }
  .page-band:has(.band-globe) { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .band-globe, .g-orbit, .g-beam { animation: none; }
}

/* ===== academic credential card (profile) ===== */
.idcard { perspective: 1000px; }
.idc-in { position: relative; overflow: hidden; border-radius: 18px; padding: 22px 22px 18px; color: #fff;
  background: radial-gradient(120% 90% at 85% 0%, #2f5a4c 0%, #1E3A32 55%, #15302a 100%);
  box-shadow: 0 30px 50px -28px rgba(15,35,30,.7), inset 0 0 0 1px rgba(216,195,156,.35);
  transform-style: preserve-3d; transition: transform .25s ease, box-shadow .25s ease; }
.idc-in::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08;
  background-image: repeating-linear-gradient(45deg, #D8C39C 0 1px, transparent 1px 9px), repeating-linear-gradient(-45deg, #D8C39C 0 1px, transparent 1px 9px); }
.idc-in::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255,240,200,.18), transparent 45%); }
.idc-top { position: relative; display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.idc-top b { display: block; font-size: .78rem; color: var(--brass-soft); font-weight: 600; letter-spacing: .02em; }
.idc-top span { font-family: var(--f-ar-display); font-size: 1.35rem; font-weight: 700; }
html[lang="en"] .idc-top span { font-family: var(--f-en-display); font-weight: 600; font-size: 1.2rem; }
.idc-seal { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #4a3612; flex: none;
  background: radial-gradient(circle at 35% 30%, #F6E2AE, #D8B66E 60%, #B08A45); box-shadow: 0 0 0 3px rgba(216,195,156,.25); animation: sealSpin 14s linear infinite; }
.idc-seal .ico { width: 26px; height: 26px; animation: sealSpin 14s linear infinite reverse; }
@keyframes sealSpin { to { transform: rotate(360deg); } }
.idc-foil { position: relative; display: block; height: 3px; border-radius: 2px; margin-bottom: 6px;
  background: linear-gradient(90deg, #9a7a3e, #F3DDA5, #b48f4c, #fff3d0, #a8844c); background-size: 300% 100%; animation: foil 5s linear infinite; }
@keyframes foil { to { background-position: 300% 0; } }
.idcard dl { position: relative; margin: 0; }
.idcard dl > div { padding: 12px 0; border-bottom: 1px solid rgba(216,195,156,.16); }
.idcard dl > div:last-child { border-bottom: 0; }
.idcard dt { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--brass-soft); }
.idcard dt .ico { width: 18px; height: 18px; }
.idcard dd { margin: 4px 0 0; font-weight: 600; font-size: .98rem; line-height: 1.5; padding-inline-start: 26px; }
.idc-num { font-family: var(--f-en-display); color: #F3DDA5; font-size: 1.15rem; }
.idc-foot { position: relative; display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 12px; border-top: 1px dashed rgba(216,195,156,.3);
  font-size: .72rem; color: rgba(246,247,244,.6); direction: ltr; font-family: var(--f-en-display); letter-spacing: .04em; }
.idc-chip { width: 34px; height: 26px; border-radius: 5px; background: linear-gradient(135deg, #F3DDA5, #b48f4c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2);
  background-image: linear-gradient(135deg, #F3DDA5, #b48f4c), linear-gradient(90deg, transparent 45%, rgba(0,0,0,.25) 45% 55%, transparent 55%); background-blend-mode: multiply; }
/* entrance: rows slide in one by one */
.js .idcard[data-reveal] { opacity: 1; transform: none; }
.js .idcard .idc-in { opacity: 0; transform: rotateY(-14deg) translateY(16px); transition: opacity .7s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.js .idcard.in .idc-in { opacity: 1; transform: none; }
.js .idcard dl > div { opacity: 0; transform: translateX(-14px); transition: opacity .5s ease, transform .5s ease; }
html[dir="rtl"].js .idcard dl > div { transform: translateX(14px); }
.js .idcard.in dl > div { opacity: 1; transform: none; }
.js .idcard.in dl > div:nth-child(1) { transition-delay: .35s; } .js .idcard.in dl > div:nth-child(2) { transition-delay: .5s; }
.js .idcard.in dl > div:nth-child(3) { transition-delay: .65s; } .js .idcard.in dl > div:nth-child(4) { transition-delay: .8s; }
.js .idcard.in dt .ico path { animation: draw 1s ease .6s both; stroke-dasharray: 80; }
@media (prefers-reduced-motion: reduce) {
  .idc-seal, .idc-seal .ico, .idc-foil { animation: none; }
  .js .idcard .idc-in, .js .idcard dl > div { opacity: 1; transform: none; transition: none; }
}

/* ===== profile intro ===== */
.about-intro .about-grid { align-items: start; }
.about-main { display: grid; gap: 26px; }
.about-lead { font-family: var(--f-ar-display); font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.7; color: var(--ink); margin: 0;
  padding-inline-start: 20px; border-inline-start: 3px solid var(--brass); }
html[lang="en"] .about-lead { font-family: var(--f-en-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.55; }
.about-lead mark { background: linear-gradient(transparent 62%, rgba(216,195,156,.55) 62%) no-repeat; background-size: 0% 100%; color: var(--green); padding: 0 2px; transition: background-size 1.1s cubic-bezier(.6,.1,.3,1) .5s; }
html[dir="rtl"] .about-lead mark { background-position: 100% 0; }
.about-lead.in mark, html:not(.js) .about-lead mark { background-size: 100% 100%; }
.about-lead.in mark + mark { transition-delay: .9s; }
.about-pts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.about-pts li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; position: relative; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.about-pts li::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; background: var(--brass); transform: scaleY(0); transform-origin: top; transition: transform .4s ease; }
.about-pts li:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -22px rgba(23,33,29,.55); border-color: rgba(168,132,76,.5); }
.about-pts li:hover::before { transform: scaleY(1); }
.ap-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--green); transition: background .3s, color .3s, transform .3s; }
.about-pts li:hover .ap-ico { background: var(--green); color: var(--brass-soft); transform: rotate(-6deg); }
.about-pts b { display: block; color: var(--green); margin-bottom: 3px; }
.about-pts p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.65; }
.about-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.at-label { font-size: .82rem; font-weight: 700; color: var(--brass); margin-inline-end: 4px; }
.about-topics ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.about-topics li { font-size: .88rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: background .25s, color .25s, border-color .25s, transform .25s; }
.about-topics li:hover { background: var(--green); color: #fff; border-color: var(--green); transform: translateY(-2px); }
.js .about-topics li { opacity: 0; transform: scale(.85); transition: opacity .4s ease, transform .4s cubic-bezier(.3,1.5,.5,1), background .25s, color .25s; }
.js .about-topics.in li { opacity: 1; transform: none; }
.about-topics.in li:nth-child(2) { transition-delay: .08s; } .about-topics.in li:nth-child(3) { transition-delay: .16s; }
.about-topics.in li:nth-child(4) { transition-delay: .24s; } .about-topics.in li:nth-child(5) { transition-delay: .32s; }
@media (max-width: 640px) {
  .about-pts { grid-template-columns: 1fr; gap: 10px; }
  .about-pts li { padding: 14px; }
  .about-lead { font-size: 1.35rem; padding-inline-start: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .about-lead mark { background-size: 100% 100%; transition: none; }
  .js .about-topics li { opacity: 1; transform: none; }
}

.shelf-wrap { max-width: 760px; }
.shelf-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.shelf-wrap { max-width: none; }
.shelf-sum { position: sticky; top: 100px; background: var(--green); color: #fff; border-radius: 18px; padding: 28px; overflow: hidden; isolation: isolate; }
.shelf-sum::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; inset-inline-end: -110px; top: -110px; background: radial-gradient(circle, rgba(216,195,156,.25), transparent 70%); z-index: -1; animation: glow 9s ease-in-out infinite alternate; }
.ss-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgba(216,195,156,.14); color: var(--brass-soft); }
.ss-ico .ico { width: 28px; height: 28px; }
.ss-total { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 18px; color: rgba(246,247,244,.8); }
.ss-total b { font-family: var(--f-en-display); font-size: 3.4rem; line-height: 1; color: var(--brass-soft); font-weight: 600; }
.ss-levels { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.ss-levels li { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto 6px; column-gap: 10px; align-items: center; }
.ss-levels b { grid-row: span 2; font-family: var(--f-en-display); font-size: 1.6rem; color: #fff; font-weight: 600; }
.ss-levels span { font-size: .92rem; color: rgba(246,247,244,.85); }
.ss-levels i { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); position: relative; overflow: hidden; }
.ss-levels i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brass), var(--brass-soft)); transition: width 1.2s cubic-bezier(.6,.1,.3,1) .4s; }
.shelf-sum.in .ss-levels i::after, html:not(.js) .ss-levels i::after { width: var(--w); }
.ss-note { margin: 0; font-size: .88rem; color: rgba(246,247,244,.7); line-height: 1.7; padding-top: 14px; border-top: 1px solid rgba(216,195,156,.2); }
@media (max-width: 980px) { .shelf-grid { grid-template-columns: 1fr; gap: 28px; } .shelf-sum { position: static; } }

/* ===== scroll performance ===== */
.site-header { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(246,247,244,.985); }
.btn { backdrop-filter: none !important; }
.hero-media img { will-change: transform; backface-visibility: hidden; }
.wm-pt .wm-core { filter: none; }
.wm-pt.active .wm-core { filter: drop-shadow(0 0 6px rgba(243,217,164,1)); }
.wm-arc.active { filter: none; }
.g-tok { filter: none; }
.g-medal { filter: none; }
.world::before { -webkit-mask-image: none; mask-image: none; opacity: .5; }
.brief-card::before, .shelf-sum::before { will-change: transform; }
/* pause every looping animation while its section is off-screen */
.anim-off, .anim-off *, .anim-off *::before, .anim-off *::after { animation-play-state: paused !important; }
@media (max-width: 900px) {
  .hero-media img { animation: none; }               /* no slow zoom on phones */
  .brief-card::before, .shelf-sum::before { animation: none; }
  .wm-arc { animation: arcIn 1.2s ease forwards; }   /* draw once, no continuous flow */
  .hero .btn-solid::after { animation: none; }
}

/* ===== 3D standing books (profile page) ===== */
.bk-grid { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }
.bk-wrap { position: relative; min-width: 0; }
.bk-row { list-style: none; margin: 0; padding: 26px 6px 34px; display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; perspective: 1400px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.bk-row::-webkit-scrollbar { display: none; }
.bk { flex: 0 0 auto; scroll-snap-align: center; }
.js .bk[data-reveal] { transform: translateY(30px) rotateX(18deg); }
.js .bk[data-reveal].in { transform: none; }
.bk-3d { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: block; width: 196px; height: 270px; transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.bk-3d:focus-visible { outline: 2px solid var(--brass); outline-offset: 6px; border-radius: 6px; }
.bk-3d:hover { transform: translateY(-8px) rotateY(-14deg); }
html[dir="rtl"] .bk-3d:hover { transform: translateY(-8px) rotateY(14deg); }
.bk.open .bk-3d { transform: translateY(-4px); }
/* page block (thickness) */
.bk-block { position: absolute; inset: 4px 0 4px 0; inset-inline-end: -10px; border-radius: 3px 6px 6px 3px; background: repeating-linear-gradient(0deg, #f6efdc 0 2px, #e3d6b6 2px 3px); box-shadow: 0 22px 30px -18px rgba(0,0,0,.55); }
/* inner page */
.bk-page { position: absolute; inset: 0; border-radius: 3px 8px 8px 3px; background: #FBF7EC; border: 1px solid #E6DCC4; padding: 34px 16px 16px; display: flex; flex-direction: column; gap: 8px; overflow: hidden;
  box-shadow: inset 10px 0 18px -12px rgba(0,0,0,.35); }
html[dir="rtl"] .bk-page { border-radius: 8px 3px 3px 8px; box-shadow: inset -10px 0 18px -12px rgba(0,0,0,.35); }
.bk-page .vol-seal { inset-inline-end: 12px; transform: none; opacity: 1; animation: none; }
.bk-page-t { font-family: var(--f-ar-display); font-weight: 700; font-size: 1.12rem; color: var(--green); line-height: 1.3; padding-inline-end: 70px; }
html[lang="en"] .bk-page-t { font-family: var(--f-en-display); font-weight: 600; font-size: 1rem; }
.bk-page-d { font-size: .86rem; line-height: 1.65; color: #4a4436; }
/* lid = cover front + back, hinged on the spine */
.bk-lid { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: left center; transition: transform 1s cubic-bezier(.6,.05,.2,1); }
html[dir="rtl"] .bk-lid { transform-origin: right center; }
.bk.open .bk-lid { transform: translateZ(2px) rotateY(-158deg); }
html[dir="rtl"] .bk.open .bk-lid { transform: translateZ(2px) rotateY(158deg); }
.bk-cover, .bk-cover-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 3px 8px 8px 3px; }
html[dir="rtl"] .bk-cover, html[dir="rtl"] .bk-cover-back { border-radius: 8px 3px 3px 8px; }
.bk-cover { padding: 12px; color: #E9D3A0;
  background: linear-gradient(90deg, rgba(0,0,0,.35) 0 9px, rgba(255,255,255,.08) 9px 11px, transparent 11px), linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.2)), repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 6px), var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.3), 0 18px 30px -16px rgba(0,0,0,.6); overflow: hidden; }
html[dir="rtl"] .bk-cover { background: linear-gradient(270deg, rgba(0,0,0,.35) 0 9px, rgba(255,255,255,.08) 9px 11px, transparent 11px), linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.2)), repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 6px), var(--c); }
.bk-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,240,200,.25) 48%, transparent 62%); transform: translateX(-120%); transition: transform .9s ease; }
.bk-3d:hover .bk-cover::after { transform: translateX(120%); }
.bk-cover-back { transform: rotateY(180deg); background: #efe6cf; box-shadow: inset 0 0 0 1px #d8caa6; }
.bk-frame { position: relative; height: 100%; margin-inline-start: 8px; border: 1px solid rgba(233,211,160,.6); border-radius: 3px; outline: 1px solid rgba(233,211,160,.25); outline-offset: -6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 18px 12px; }
.bk-no { position: absolute; top: 12px; font-family: var(--f-en-display); font-size: .78rem; letter-spacing: .1em; opacity: .85; }
.bk-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(233,211,160,.6); background: rgba(0,0,0,.14); }
.bk-ico .ico { width: 26px; height: 26px; }
.bk-t { font-family: var(--f-ar-display); font-weight: 700; font-size: 1.22rem; line-height: 1.35; text-shadow: 0 1px 0 rgba(0,0,0,.45); }
html[lang="en"] .bk-t, .bk-t [lang="en"] { font-family: var(--f-en-display); font-weight: 600; font-size: 1.08rem; }
.bk-orn { width: 54px; height: 8px; background: radial-gradient(circle, #E9D3A0 2px, transparent 2.5px) center / 12px 8px repeat-x; opacity: .8; }
.bk-cta { position: absolute; bottom: 12px; font-size: .72rem; font-weight: 600; opacity: .75; letter-spacing: .02em; }
.bk.open .bk-cta { opacity: 0; }
/* nav */
.bk-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; }
.bk-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--green); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.bk-arrow:hover { background: var(--green); color: #fff; transform: scale(1.06); }
html[dir="ltr"] .bk-arrow svg { transform: scaleX(-1); }
.bk-dots { display: flex; gap: 6px; }
.bk-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: width .3s, background .3s; }
.bk-dots i.on { width: 22px; border-radius: 4px; background: var(--brass); }
@media (max-width: 980px) { .bk-grid { grid-template-columns: minmax(0, 1fr); } .bk-grid > * { min-width: 0; } }
@media (max-width: 520px) {
  .bk-row { gap: 18px; padding-inline: calc(50% - 88px); }
  .bk-3d { width: 176px; height: 248px; }
  .bk-t { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { .bk-lid, .bk-3d { transition: none; } }
.bk-lid { transform: translateZ(2px); }
.bk-page { transform: translateZ(0); }
.bk .bk-page .vol-seal { opacity: 0; transform: translateY(-100%); transition: opacity .2s ease, transform .5s cubic-bezier(.3,1.5,.5,1); }
.bk.open .bk-page .vol-seal { opacity: 1; transform: none; transition-delay: .55s; }
.bk .bk-page > *:not(.vol-seal) { opacity: 0; transition: opacity .4s ease; }
.bk.open .bk-page > *:not(.vol-seal) { opacity: 1; transition-delay: .45s; }
.bk-row { padding-inline: calc(50% - 98px); scroll-padding-inline: 0; }
@media (max-width: 520px) { .bk-row { padding-inline: calc(50% - 88px); } }
html, body { overflow-x: clip; } .bk-row { contain: paint; }
.bk-grid .shelf-wrap { overflow: hidden; }
.shelf-sum, .brief-card { contain: paint; }
.bk-row.has-open { scroll-snap-type: none; }

/* ===== individual publication pages ===== */
.paper { padding: 120px 0 80px; background: radial-gradient(1200px 400px at 50% -120px, rgba(168,132,76,.10), transparent 70%), var(--paper, #F6F5F2); }
.paper-wrap { max-width: 860px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--green-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.paper-kind { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--brass); border: 1px solid rgba(168,132,76,.4); border-radius: 999px; padding: 3px 12px; margin: 0 0 16px; }
.paper-title { font-family: var(--f-en-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.25; color: var(--green); margin: 0 0 18px; text-align: start; }
html[dir="rtl"] .paper-title, html[dir="rtl"] .paper-auth, html[dir="rtl"] .paper-src, html[dir="rtl"] .paper-cite, html[dir="rtl"] .paper-doi { text-align: left; }
.paper-auth { font-size: 1.02rem; margin: 0 0 6px; color: var(--ink, #1f2a26); }
.paper-auth b { color: var(--green); }
.paper-src { color: var(--muted); font-size: .95rem; margin: 0 0 26px; }
.paper-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.paper-acts .btn { font-size: .9rem; padding: 10px 18px; }
.paper-h { font-size: 1.25rem; color: var(--green); margin: 34px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.paper-abs { background: #fff; border: 1px solid var(--line); border-inline-start: 3px solid var(--brass); border-radius: 14px; padding: 22px 26px; font-family: var(--f-en-display); font-size: 1.04rem; line-height: 1.75; color: #2a3430; }
html[dir="rtl"] .paper-abs { border-inline-start: 1px solid var(--line); border-left: 3px solid var(--brass); text-align: left; }
.paper-abs p { margin: 0; }
.paper-noabs { color: var(--muted); }
.paper-cite { background: rgba(30,58,50,.05); border-radius: 12px; padding: 16px 20px; font-size: .95rem; line-height: 1.7; word-break: break-word; }
.paper-cite a, .paper-doi a { color: var(--green-2); }
.paper-doi { font-size: .9rem; color: var(--muted); margin-top: 18px; }
.paper-back { display: inline-block; margin-top: 30px; color: var(--green-2); text-decoration: none; font-weight: 600; }
.paper-back:hover { text-decoration: underline; }
.pub-act-main { background: var(--green); border-color: var(--green); color: #fff; }
.pub-act-main:hover { background: var(--green-2); color: #fff; }
@media (max-width: 600px) { .paper { padding: 96px 0 60px; } .paper-abs { padding: 18px; font-size: .98rem; } .paper-acts .btn { flex: 1 1 auto; text-align: center; } }
.paper-acts button.btn { font: inherit; font-size: .9rem; font-weight: 600; background: transparent; cursor: pointer; } .paper { padding-top: 96px; }
.wm-backdrop { display: none; }
@media (max-width: 760px) {
  .wm-panel { background: #F6F7F4; }
  .wm-backdrop { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(12,24,20,.45); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s .3s; }
  .wm-backdrop.on { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
}
.wm-panel { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.wm-backdrop { touch-action: none; }
/* contact form: keep every field inside the card */
.frow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cform, .fld { min-width: 0; }
.fld input, .fld textarea { width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 640px) { .frow { grid-template-columns: minmax(0, 1fr); } }

/* ===== contact: the letter IS the form ===== */
.lt-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr); gap: 64px; align-items: center; }
.form-intro { align-self: start; }
.lt-stage { position: relative; perspective: 1600px; }
.lt-paper { position: relative; display: block; background: #FBF8F1; border: 1px solid #E6DCC8; border-radius: 4px 4px 10px 10px; padding: 30px 34px 26px;
  box-shadow: 0 1px 0 #fff inset, 0 30px 60px -30px rgba(30,58,50,.55), 0 2px 6px rgba(0,0,0,.05);
  background-image: radial-gradient(120% 80% at 100% 0, rgba(168,132,76,.08), transparent 60%);
  transform: rotate(-1deg); transform-origin: 50% 0;
  transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .5s ease .45s; }
html[dir="ltr"] .lt-paper { transform: rotate(1deg); }
.lt-paper:focus-within, html[dir="ltr"] .lt-paper:focus-within { transform: rotate(0); }
.lt-paper::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(168,132,76,.3); border-radius: 3px 3px 8px 8px; pointer-events: none; }
.lt-paper > * { position: relative; }
.lt-paper .hp { position: absolute !important; }
.lt-head { display: flex; align-items: center; gap: 14px; }
.lt-emb { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: var(--brass); border: 1px solid rgba(168,132,76,.45); flex: none; }
.lt-emb svg { width: 30px; height: 30px; }
.lt-to { display: grid; line-height: 1.25; }
.lt-to small { font-size: .8rem; color: var(--muted); }
.lt-to b { font-family: var(--f-ar-display); font-size: 1.5rem; color: var(--green); }
html[lang="en"] .lt-to b { font-family: var(--f-en-display); font-size: 1.25rem; }
.lt-date { margin-inline-start: auto; font-size: .82rem; color: var(--muted); }
.lt-rule { height: 4px; margin: 16px 0 14px; border-top: 1.5px solid var(--brass); border-bottom: 1px solid rgba(168,132,76,.45); }
.lt-row { display: flex; gap: 14px; align-items: baseline; margin: 0 0 4px; cursor: text; }
.lt-row i { font-style: normal; color: var(--brass); font-weight: 700; font-size: .9rem; min-width: 64px; }
.lt-row input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1.5px dotted rgba(30,58,50,.28); border-radius: 0; padding: 8px 2px 6px; outline: none; transition: border-color .25s ease; }
.lt-row input:focus { border-bottom: 1.5px solid var(--brass); }
.lt-row input::placeholder, .lt-body textarea::placeholder { color: rgba(30,58,50,.32); }
.lt-row input[dir="ltr"] { text-align: left; }
.lt-body { display: block; margin-top: 18px; }
.lt-body textarea { display: block; width: 100%; box-sizing: border-box; min-height: 224px; resize: vertical; border: 0; outline: none; padding: 0 4px; color: #2b3a35;
  font-family: var(--f-ar-display); font-size: 1.15rem; line-height: 32px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(30,58,50,.11) 31px, rgba(30,58,50,.11) 32px); background-attachment: local; }
html[lang="en"] .lt-body textarea { font-family: var(--f-en-display); font-style: italic; font-size: 1.05rem; }
.lt-quill { position: absolute; width: 40px; height: 40px; color: var(--brass); inset-inline-end: 34px; bottom: 120px; transform-origin: 20% 90%; opacity: .5; pointer-events: none; transition: opacity .3s; }
.letter.writing .lt-quill { opacity: 1; animation: quill .5s ease-in-out infinite; }
@keyframes quill { 0%,100% { transform: rotate(0) translate(0,0); } 30% { transform: rotate(-8deg) translate(-3px,1px); } 65% { transform: rotate(6deg) translate(3px,-1px); } }
.lt-foot { display: flex; align-items: center; gap: 22px; margin-top: 18px; }
.lt-send { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.lt-send .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 12px 26px; }
.lt-send .btn[disabled] { opacity: .6; cursor: wait; }
.lt-send .fmsg { flex-basis: 100%; text-align: end; }
/* wax seal */
.lt-seal { flex: none; width: 70px; height: 70px; border-radius: 50%; border: 1.5px dashed rgba(122,46,59,.35); display: grid; place-items: center; }
.lt-wax { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; color: #E9CF97;
  background: radial-gradient(circle at 35% 30%, #A2475A, #7A2E3B 55%, #5A1F2B);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.25), inset 0 -4px 8px rgba(0,0,0,.35), 0 6px 12px -4px rgba(90,31,43,.6);
  clip-path: polygon(50% 0, 61% 4%, 72% 2%, 79% 10%, 90% 13%, 92% 24%, 99% 33%, 96% 45%, 100% 55%, 95% 66%, 97% 77%, 88% 84%, 83% 95%, 71% 95%, 61% 100%, 50% 96%, 39% 100%, 29% 95%, 17% 95%, 12% 84%, 3% 77%, 5% 66%, 0 55%, 4% 45%, 1% 33%, 8% 24%, 10% 13%, 21% 10%, 28% 2%, 39% 4%);
  opacity: 0; transform: scale(1.9) rotate(-25deg); }
.lt-wax svg { width: 38px; height: 38px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); }
.letter.sealed .lt-seal { border-color: transparent; }
.letter.sealed .lt-wax { animation: stamp .55s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.9) rotate(-25deg); } 60% { opacity: 1; transform: scale(.92) rotate(3deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
.letter.sealed .lt-send .btn { animation: readyPulse 2s ease-in-out infinite; }
@keyframes readyPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(168,132,76,.45); } 50% { box-shadow: 0 0 0 10px rgba(168,132,76,0); } }
/* sent: the letter folds away into an envelope */
.lt-env { position: absolute; left: 50%; top: 50%; width: 220px; transform: translate(-50%, -30%) scale(.7); opacity: 0; color: var(--green); text-align: center; transition: opacity .5s ease .7s, transform .7s cubic-bezier(.2,.8,.2,1) .7s; pointer-events: none; }
.lt-env svg { width: 150px; height: auto; display: block; margin: 0 auto 10px; }
.lt-env b { font-family: var(--f-ar-display); font-size: 1.4rem; color: var(--green); }
.letter.sent .lt-paper { transform: rotateX(80deg) scale(.5) translateY(-40px); opacity: 0; pointer-events: none; }
.letter.sent .lt-env { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.letter.sent .lt-env svg { animation: envFly 1.6s ease 1.8s forwards; }
@keyframes envFly { 40% { transform: translateY(6px); } 100% { transform: translate(60px, -90px) rotate(-12deg) scale(.6); opacity: 0; } }
.lt-perks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; font-size: .95rem; color: var(--green-2); }
.lt-perks li { position: relative; padding-inline-start: 26px; }
.lt-perks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(-45deg); }
.lt-perks a { color: var(--green); font-weight: 600; }
@media (max-width: 980px) {
  .lt-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lt-paper, html[dir="ltr"] .lt-paper { transform: none; }
}
@media (max-width: 560px) {
  .lt-paper { padding: 22px 18px 20px; }
  .lt-paper::before { inset: 6px; }
  .lt-to b { font-size: 1.25rem; }
  .lt-emb { width: 42px; height: 42px; } .lt-emb svg { width: 26px; height: 26px; }
  .lt-date { display: none; }
  .lt-row i { min-width: 54px; font-size: .82rem; }
  .lt-row input { font-size: 16px; }
  .lt-body textarea { font-size: 17px; }
  .lt-foot { gap: 14px; }
  .lt-seal, .lt-wax { width: 56px; height: 56px; } .lt-wax svg { width: 30px; height: 30px; }
  .lt-quill { bottom: 104px; inset-inline-end: 18px; width: 32px; height: 32px; }
  .lt-send .btn { padding: 11px 20px; }
}
@media (prefers-reduced-motion: reduce) { .lt-paper, .lt-env, .lt-wax, .letter.writing .lt-quill, .letter.sealed .lt-send .btn { transition: none !important; animation: none !important; } .letter.sealed .lt-wax { opacity: 1; transform: none; } }
.lt-env small { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; }
/* Arabic-language publication pages */
.paper-ar .paper-title-ar, html[dir] .paper-ar .paper-title-ar { font-family: var(--f-ar-display); font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.45; text-align: right; }
.paper-title-en { font-family: var(--f-en-display); font-style: italic; color: var(--muted); font-size: 1.05rem; margin: -6px 0 18px; text-align: left; }
html[dir] .paper-ar .paper-auth, html[dir] .paper-ar .paper-src, html[dir] .paper-ar .paper-cite { text-align: right; }
.paper-ar .paper-src i { font-style: normal; font-weight: 600; color: var(--green-2); }
.paper-abs-ar, html[dir] .paper-abs-ar { font-family: var(--f-body); font-size: 1.05rem; line-height: 2; text-align: right; border-left: 1px solid var(--line); border-right: 3px solid var(--brass); }
.paper-abs-lbl { margin: 22px 0 8px; font-size: .85rem; font-weight: 600; color: var(--brass); text-align: left; }
.paper-ar .paper-cite i { font-style: normal; font-weight: 600; }

/* ===== news & archive items (PHP pages) ===== */
.nw-band h1 { margin-top: 6px; }
.nw-band .kicker { color: var(--brass-soft); }
.nw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.nw-chip { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--green); text-decoration: none; font-weight: 600; font-size: .9rem; }
.nw-chip small { color: var(--brass); margin-inline-start: 4px; }
.nw-chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.nw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.nw-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.nw-card:hover { transform: translateY(-5px); box-shadow: 0 26px 44px -30px rgba(30,58,50,.6); }
.nw-img { position: relative; aspect-ratio: 16 / 10; background: var(--green); overflow: hidden; display: block; }
.nw-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.nw-card:hover .nw-img img { transform: scale(1.05); }
.nw-ph { position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, rgba(216,195,156,.25), transparent 60%), var(--green); }
.nw-type { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(30,58,50,.88); color: var(--brass-soft); font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.nw-b { display: grid; gap: 6px; padding: 16px 18px 18px; align-content: start; flex: 1; }
.nw-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted); }
.nw-meta span { display: inline-flex; align-items: center; gap: 6px; }
.nw-meta .flag { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.nw-b b { font-family: var(--f-ar-display); font-size: 1.25rem; line-height: 1.45; color: var(--green); }
html[lang="en"] .nw-b b { font-family: var(--f-en-display); font-size: 1.12rem; }
.nw-ex { color: var(--muted); font-size: .92rem; line-height: 1.75; }
.nw-more { color: var(--brass); font-weight: 700; font-size: .88rem; margin-top: 4px; }
.nw-pages { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.nw-pg { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--green); font-weight: 600; }
.nw-pg.on { background: var(--green); color: #fff; }
.news-empty { text-align: center; padding: 50px 0; color: var(--muted); }
.latest-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.it-band .crumbs a, .it-band .crumbs { color: var(--brass-soft); }
.it-band h1 { max-width: 30ch; line-height: 1.35; }
.it-band .kicker { color: var(--brass-soft); }
.it-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.it-gal { display: grid; gap: 8px; margin-bottom: 28px; border-radius: 16px; overflow: hidden; }
.it-gal a { position: relative; display: block; overflow: hidden; background: var(--paper-2); }
.it-gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; display: block; }
.it-gal a:hover img { transform: scale(1.04); }
.it-gal-1 a { aspect-ratio: 16 / 9; }
.it-gal-2 { grid-template-columns: 1fr 1fr; } .it-gal-2 a { aspect-ratio: 4 / 3; }
.it-gal-3, .it-gal-4, .it-gal-5 { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; }
.it-gal-3 a:first-child, .it-gal-4 a:first-child, .it-gal-5 a:first-child { grid-column: span 4; grid-row: span 2; }
.it-gal-3 a:not(:first-child) { grid-column: span 2; }
.it-gal-4 a:not(:first-child) { grid-column: span 4; } .it-gal-4 { grid-template-columns: repeat(3, 1fr); } .it-gal-4 a:first-child { grid-column: span 3; } .it-gal-4 a:not(:first-child) { grid-column: span 1; }
.it-plus { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(30,58,50,.6); color: #fff; font-size: 1.6rem; font-weight: 700; }
.it-body p { font-size: 1.08rem; line-height: 2; margin: 0 0 16px; }
html[lang="en"] .it-body p { line-height: 1.8; }
.it-video { margin: 20px 0; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; }
.it-video .video-thumb, .it-video iframe { width: 100%; height: 100%; border: 0; }
.it-dl { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.it-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .9rem; }
.it-share span { color: var(--muted); font-weight: 600; margin-inline-end: 4px; }
.it-share a { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--green); background: #fff; font-weight: 600; }
.it-share a:hover { border-color: var(--brass); }
.it-side { position: sticky; top: 96px; }
.it-meta { margin: 0; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brass); border-radius: 14px; padding: 6px 20px; }
.it-meta div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.it-meta div:last-child { border-bottom: 0; }
.it-meta dt { font-size: .78rem; color: var(--brass); font-weight: 700; margin-bottom: 2px; }
.it-meta dd { margin: 0; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.it-meta .flag { border-radius: 2px; }
.it-back { display: inline-block; margin-top: 16px; color: var(--green-2); font-weight: 600; text-decoration: none; }
.it-rel-h { margin-bottom: 20px; }
@media (max-width: 900px) { .it-grid { grid-template-columns: 1fr; gap: 24px; } .it-side { position: static; } .it-gal-3, .it-gal-4, .it-gal-5 { grid-auto-rows: 110px; } }
.news-empty p { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ===== site assistant ===== */
.ai-chat { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60; font-family: var(--f-body); }
.ai-fab { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 0; border-radius: 999px; background: var(--green); color: #fff; cursor: pointer; font: inherit; font-weight: 700;
  box-shadow: 0 14px 30px -12px rgba(30,58,50,.75), 0 0 0 1px rgba(216,195,156,.35) inset; transition: transform .25s ease, box-shadow .25s ease; }
html[dir="rtl"] .ai-fab { padding: 8px 8px 8px 18px; }
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: #fff; }
.ai-fab-ico svg { width: 24px; height: 24px; }
.ai-fab.ai-hello .ai-fab-ico { animation: aiSwing 1.4s ease 2; }
@keyframes aiSwing { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.ai-chat.open .ai-fab { display: none; }
.ai-panel { position: absolute; inset-inline-end: 0; bottom: 0; width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px)); display: flex; flex-direction: column;
  background: var(--paper, #F6F5F2); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(15,30,25,.55), 0 0 0 1px rgba(30,58,50,.08); animation: aiIn .3s cubic-bezier(.2,.8,.2,1); }
.ai-panel[hidden] { display: none; }
@keyframes aiIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; background: var(--green); color: #fff; border-bottom: 3px solid var(--brass); }
.ai-head b { display: block; font-size: 1rem; }
.ai-head small { color: var(--brass-soft); font-size: .78rem; }
.ai-head > div { flex: 1; min-width: 0; }
.ai-emb { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(216,195,156,.5); color: var(--brass-soft); flex: none; }
.ai-emb svg { width: 22px; height: 22px; }
.ai-x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 1.2rem; cursor: pointer; line-height: 1; }
.ai-x:hover { background: rgba(255,255,255,.2); }
.ai-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ai-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; line-height: 1.75; font-size: .93rem; word-wrap: break-word; }
.ai-bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); color: var(--ink); border-start-start-radius: 4px; }
.ai-user { align-self: flex-end; background: var(--green); color: #fff; border-start-end-radius: 4px; }
.ai-msg a { color: var(--green-2); font-weight: 600; overflow-wrap: anywhere; }
.ai-err { background: #F7E6E3; color: #9A3B32; border-color: transparent; }
.ai-typing { display: flex; gap: 5px; padding: 14px 16px; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brass); animation: aiDot 1.2s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%,80%,100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.ai-sug { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-sug button { font: inherit; font-size: .83rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--brass-soft); background: #FBF8F1; color: var(--green); cursor: pointer; text-align: start; }
.ai-sug button:hover { background: var(--brass); color: #fff; border-color: var(--brass); }
.ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.ai-form textarea { flex: 1; resize: none; font: inherit; font-size: 16px; line-height: 1.5; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper, #F6F5F2); max-height: 110px; outline: none; }
.ai-form textarea:focus { border-color: var(--green-2); background: #fff; }
.ai-form button { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: var(--brass); color: #fff; display: grid; place-items: center; cursor: pointer; }
html[dir="rtl"] .ai-form button svg { transform: scaleX(-1); }
.ai-note { margin: 0; padding: 6px 12px 10px; background: #fff; font-size: .72rem; color: var(--muted); text-align: center; }
.ai-note a { color: inherit; }
@media (max-width: 560px) {
  .ai-chat { inset-inline-end: 14px; bottom: 14px; }
  .ai-fab-t { display: none; } .ai-fab, html[dir="rtl"] .ai-fab { padding: 6px; }
  .ai-chat.open { inset: 0; }
  .ai-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; }
}
@media print { .ai-chat { display: none; } }

/* mobile menu: lock the page behind it, scroll inside the menu only */
html.menu-open .site-header { position: fixed; top: 0; left: 0; right: 0; }
html.menu-open .ai-chat { display: none; }
html.menu-open .site-header::after { content: ""; position: fixed; inset: 64px 0 0; background: rgba(15,30,25,.35); z-index: 0; }
html.menu-open .nav { z-index: 1; }
@media (max-width: 1180px) {
  .nav.open { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-shadow: 0 24px 40px -20px rgba(15,30,25,.35); }
}

/* images can't be dragged out or long-pressed to save */
img { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* ===== interactive CV page (cv.html) ===== */
.page-cv { background: var(--paper, #F6F5F2); }
.cvx-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 80; }
.cvx-progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--brass), #E9D3A8); transform-origin: 0 50%; transform: scaleX(0); }
html[dir="rtl"] .cvx-progress span { transform-origin: 100% 50%; }
.cvx-top { position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: 14px; padding: 10px clamp(14px, 3vw, 32px); background: rgba(22,45,38,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; border-bottom: 1px solid rgba(216,195,156,.18); }
.cvx-back { display: flex; align-items: center; gap: 6px; color: var(--brass-soft); }
html[dir="rtl"] .cvx-back svg { transform: scaleX(-1); }
.cvx-back img { height: 34px; width: auto; }
.cvx-label { font-weight: 600; color: rgba(255,255,255,.75); font-size: .92rem; }
.cvx-acts { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.cvx-lang { color: rgba(255,255,255,.8); text-decoration: none; font-size: .88rem; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); }
.cvx-lang:hover { border-color: var(--brass-soft); color: #fff; }
.cvx-btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: .9rem; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; text-decoration: none; transition: transform .25s, box-shadow .25s, background .25s; }
.cvx-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.16); }
.cvx-dl { background: linear-gradient(135deg, #B8925A, var(--brass)); border-color: transparent; box-shadow: 0 10px 24px -12px rgba(168,132,76,.9); position: relative; overflow: hidden; }
.cvx-dl::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); animation: cvxShine 3.2s ease-in-out infinite 1.2s; }
@keyframes cvxShine { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.cvx-dl:hover { background: linear-gradient(135deg, #C49E64, #B08A50); }
.cvx-btn.big { padding: 13px 24px; font-size: 1rem; }
.cvx-btn.ghost { background: transparent; }
.cvx-sharewrap { position: relative; }
.cvx-menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; min-width: 190px; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 24px 50px -20px rgba(10,25,20,.55); display: grid; animation: cvxPop .22s ease; z-index: 90; }
.cvx-menu[hidden] { display: none; }
@keyframes cvxPop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.cvx-menu a, .cvx-menu button { font: inherit; text-align: start; border: 0; background: none; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 600; font-size: .9rem; }
.cvx-menu a:hover, .cvx-menu button:hover { background: var(--paper-2, #EEEBE4); color: var(--green); }

.cvx-wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.cvx-narrow { width: min(820px, 100% - 32px); }
.cvx-hero { position: relative; overflow: hidden; color: #fff; padding: clamp(40px, 7vw, 90px) 0 70px; background: radial-gradient(1200px 600px at 80% -10%, #2E5A4C 0%, transparent 60%), linear-gradient(160deg, #1B352E 0%, #142822 100%); }
.cvx-glow { position: absolute; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(216,195,156,.22), transparent 65%); top: -160px; inset-inline-start: -120px; filter: blur(10px); animation: cvxFloat 12s ease-in-out infinite alternate; pointer-events: none; }
@keyframes cvxFloat { to { transform: translate(80px, 120px) scale(1.15); } }
.cvx-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(to bottom, #000 30%, transparent 90%); -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 90%); }
.cvx-hero-in { position: relative; display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.cvx-photo { position: relative; margin: 0; width: clamp(170px, 24vw, 270px); aspect-ratio: 1; }
.cvx-photo img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: cover; object-position: 50% 18%; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); opacity: 0; transform: scale(.85); transition: opacity 1s ease .2s, transform 1.2s cubic-bezier(.2,.8,.2,1) .2s; }
.cvx-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--brass) 0 25%, transparent 25% 50%, #E9D3A8 50% 62%, transparent 62%); -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%); mask: radial-gradient(circle, transparent 66%, #000 67%); animation: cvxSpin 14s linear infinite; opacity: 0; transition: opacity 1s ease .6s; }
@keyframes cvxSpin { to { transform: rotate(360deg); } }
.cvx.go .cvx-photo img { opacity: 1; transform: none; } .cvx.go .cvx-ring { opacity: 1; }
.cvx-kicker { margin: 0; color: var(--brass-soft); letter-spacing: .12em; font-weight: 700; font-size: .85rem; text-transform: uppercase; }
.cvx-name { margin: 6px 0 10px; font-family: var(--f-ar-display, 'Amiri', serif); font-size: clamp(2.6rem, 6.5vw, 4.6rem); line-height: 1.15; }
html[lang="en"] .cvx-name { font-family: var(--f-en-display, 'Source Serif 4', serif); }
.cvx-name .w { display: inline-block; opacity: 0; transform: translateY(40%) rotate(4deg); filter: blur(6px); transition: all .9s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i) * 140ms + 250ms); }
.cvx.go .cvx-name .w { opacity: 1; transform: none; filter: none; }
.cvx-title { margin: 0; color: #E9D3A8; font-size: 1.15rem; font-weight: 600; }
.cvx-inst { margin: 4px 0 0; color: rgba(255,255,255,.75); }
.cvx-title, .cvx-inst, .cvx-kicker, .cvx-cta { opacity: 0; transform: translateY(14px); transition: all .8s ease; }
.cvx.go .cvx-kicker { opacity: 1; transform: none; transition-delay: .1s; }
.cvx.go .cvx-title { opacity: 1; transform: none; transition-delay: .7s; }
.cvx.go .cvx-inst { opacity: 1; transform: none; transition-delay: .85s; }
.cvx.go .cvx-cta { opacity: 1; transform: none; transition-delay: 1s; }
.cvx-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.cvx-cta.center { justify-content: center; }
.cvx-other { color: var(--brass-soft); font-size: .88rem; font-weight: 600; }
.cvx-stats { position: relative; list-style: none; padding: 0; margin-top: clamp(36px, 6vw, 60px); display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: rgba(216,195,156,.18); border-radius: 18px; overflow: hidden; }
.cvx-stat { background: rgba(20,40,34,.85); padding: 18px 12px; text-align: center; opacity: 0; transform: translateY(18px); transition: all .7s ease; transition-delay: calc(var(--d) + 1.1s); }
.cvx.go .cvx-stat { opacity: 1; transform: none; }
.cvx-stat b { display: block; font-family: var(--f-en-display, 'Source Serif 4', serif); font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: #E9D3A8; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cvx-stat span { font-size: .82rem; color: rgba(255,255,255,.72); }
.cvx-scroll { position: absolute; bottom: 18px; left: 50%; width: 24px; height: 38px; margin-left: -12px; border: 2px solid rgba(255,255,255,.35); border-radius: 14px; }
.cvx-scroll::after { content: ""; position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--brass-soft); animation: cvxWheel 1.8s ease-in-out infinite; }
@keyframes cvxWheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

.cvx-sec { padding: clamp(50px, 8vw, 90px) 0; }
.cvx-sec.tint { background: #EEF1EC; }
.cvx-sec.dark { background: linear-gradient(160deg, #1B352E, #142822); color: #fff; }
.cvx-sec h2 { font-family: var(--f-ar-display, 'Amiri', serif); color: var(--green); font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0 0 26px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
html[lang="en"] .cvx-sec h2, html[lang="en"] .cvx-end h2 { font-family: var(--f-en-display, 'Source Serif 4', serif); }
.cvx-sec h2::after { content: ""; flex: 1; min-width: 40px; height: 1px; background: linear-gradient(90deg, var(--brass), transparent); }
html[dir="rtl"] .cvx-sec h2::after { background: linear-gradient(270deg, var(--brass), transparent); }
.cvx-sec h2 small { font-family: var(--f-body, inherit); font-size: .9rem; color: var(--brass); font-weight: 700; order: 3; }
.cvx-sec.dark h2 { color: #fff; }
.cvx-sec h2.mt { margin-top: 50px; }
.cvx-lead { font-size: 1.12rem; line-height: 2; color: #2C3833; }
[data-rv] { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
[data-rv].in { opacity: 1; transform: none; }

.cvx-time { position: relative; list-style: none; margin: 0; padding: 0; padding-inline-start: 34px; }
.cvx-line { position: absolute; inset-block: 6px; inset-inline-start: 9px; width: 2px; background: rgba(30,58,50,.12); }
.cvx-line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--brass), var(--green)); transform-origin: top; transform: scaleY(var(--p, 0)); }
.cvx-job { position: relative; background: #fff; border: 1px solid #E2E5DF; border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 12px 30px -24px rgba(20,40,34,.5); }
.cvx-dot { position: absolute; inset-inline-start: -32px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brass); transform: scale(0); transition: transform .5s cubic-bezier(.3,1.6,.5,1) calc(var(--d) + .2s); }
.cvx-job.in .cvx-dot { transform: scale(1); }
.cvx-when { color: var(--brass); font-weight: 700; font-size: .88rem; }
.cvx-job h3 { margin: 4px 0 2px; color: var(--green); font-size: 1.12rem; }
.cvx-org { margin: 0; color: #4F5D57; font-weight: 600; }
.cvx-job ul { margin: 8px 0 0; padding-inline-start: 18px; color: #3F4B46; font-size: .93rem; line-height: 1.8; }
.cvx-job li::marker { color: var(--brass); }

.cvx-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cvx-card { background: #fff; border: 1px solid #E2E5DF; border-radius: 18px; padding: 22px; position: relative; overflow: hidden; }
.cvx-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--brass), var(--green)); }
.cvx-card h3 { margin: 8px 0 4px; color: var(--green); font-size: 1.05rem; line-height: 1.6; }
.cvx-card p { margin: 0; color: #56645E; font-size: .9rem; }
.cvx-card .cvx-sub { margin-top: 8px; color: #3F4B46; font-style: italic; }
.cvx-yr { display: inline-block; color: var(--brass); font-weight: 800; font-variant-numeric: tabular-nums; }
.cvx-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cvx-chips li { padding: 10px 18px; border-radius: 999px; background: #fff; border: 1px solid #DCD3BF; color: var(--green); font-weight: 700; transition: transform .3s, background .3s, color .3s, opacity .8s, transform .9s; }
.cvx-chips li:hover { background: var(--green); color: #fff; }

.cvx-papers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cvx-papers li { display: grid; gap: 4px; padding: 18px 20px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(216,195,156,.2); transition: background .3s, border-color .3s, opacity .8s, transform .9s; }
.cvx-papers li:hover { background: rgba(255,255,255,.1); border-color: var(--brass-soft); }
.cvx-papers li span:not(.cvx-yr) { font-weight: 600; line-height: 1.6; }
.cvx-papers small { color: rgba(255,255,255,.62); }
.cvx-papers .cvx-yr { color: #E9D3A8; }
.cvx-more { color: #E9D3A8; font-weight: 700; display: inline-block; margin-top: 22px; }

.cvx-books { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 4vw, 44px); perspective: 900px; }
.cvx-book { text-align: center; }
.cvx-book img { width: min(220px, 100%); height: auto; border-radius: 4px 10px 10px 4px; box-shadow: -8px 18px 34px -14px rgba(20,40,34,.55); transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .6s; transform: rotateY(-14deg); }
html[dir="rtl"] .cvx-book img { transform: rotateY(14deg); }
.cvx-book:hover img { transform: rotateY(0) translateY(-8px) scale(1.03); box-shadow: 0 26px 40px -16px rgba(20,40,34,.6); }
.cvx-book b { display: block; margin-top: 14px; color: var(--green); line-height: 1.6; }
.cvx-book > span { color: var(--brass); font-weight: 700; }

.cvx-confs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cvx-confs li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: #fff; border-radius: 14px; border: 1px solid #E2E5DF; transition: transform .3s, box-shadow .3s, opacity .8s; }
.cvx-confs li:hover { transform: translateX(-4px); box-shadow: 0 14px 30px -22px rgba(20,40,34,.6); }
html[dir="ltr"] .cvx-confs li:hover { transform: translateX(4px); }
.cvx-confs .flag { margin-top: 4px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); flex: none; }
.cvx-confs b { display: block; color: var(--green); line-height: 1.6; }
.cvx-confs span { color: #56645E; font-size: .9rem; }
.cvx-sup { columns: 2; column-gap: 40px; padding-inline-start: 22px; margin: 0; line-height: 1.9; color: #34413B; }
.cvx-sup li { break-inside: avoid; margin-bottom: 6px; } .cvx-sup li::marker { color: var(--brass); font-weight: 700; }

.cvx-end { padding: 80px 0 40px; text-align: center; color: #fff; background: radial-gradient(800px 400px at 50% 0%, #2E5A4C, transparent 70%), #142822; }
.cvx-end h2 { font-family: var(--f-ar-display, 'Amiri', serif); font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 8px; }
.cvx-end p { color: rgba(255,255,255,.75); }
.cvx-foot { margin-top: 50px; font-size: .85rem; } .cvx-foot a { color: var(--brass-soft); }

@media (max-width: 900px) {
  .cvx-stats { grid-template-columns: repeat(3, 1fr); }
  .cvx-cards, .cvx-papers { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cvx-label { display: none; } .cvx-lang { padding: 6px 10px; font-size: .8rem; }
  .cvx-top .cvx-btn span { display: none; } .cvx-top .cvx-btn { padding: 9px 11px; }
  .cvx-hero-in { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .cvx-cta { justify-content: center; }
  .cvx-stats { grid-template-columns: repeat(2, 1fr); }
  .cvx-books { grid-template-columns: 1fr; } .cvx-book img { width: 170px; }
  .cvx-sup { columns: 1; }
  .cvx-time { padding-inline-start: 26px; } .cvx-dot { inset-inline-start: -25px; }
}
@media (prefers-reduced-motion: reduce) {
  .cvx *, .cvx *::before, .cvx *::after { animation: none !important; transition: none !important; }
  [data-rv], .cvx-stat, .cvx-name .w, .cvx-photo img, .cvx-title, .cvx-inst, .cvx-kicker, .cvx-cta { opacity: 1 !important; transform: none !important; filter: none !important; }
}
@media print { .cvx-top, .cvx-progress, .cvx-scroll { display: none; } }

/* ===== Books: 3D stage ===== */
.bs-sec { background: radial-gradient(900px 420px at 50% 18%, #2E5A4C 0%, transparent 70%), linear-gradient(180deg, #16302A 0%, #1B352E 46%, var(--paper, #F6F5F2) 46.1%); padding-top: 40px; }
.bs-stage { position: relative; height: 470px; perspective: 1600px; user-select: none; touch-action: pan-y; }
.bs-light { position: absolute; left: 50%; top: -40px; width: 520px; height: 520px; margin-left: -260px; background: radial-gradient(circle, rgba(233,211,168,.28), transparent 62%); pointer-events: none; animation: bsPulse 6s ease-in-out infinite; }
@keyframes bsPulse { 50% { opacity: .65; transform: scale(1.08); } }
.bs-floor { position: absolute; left: 10%; right: 10%; bottom: 18px; height: 40px; background: radial-gradient(ellipse at center, rgba(0,0,0,.35), transparent 70%); filter: blur(6px); pointer-events: none; }
.bs-track { position: absolute; inset: 0; transform-style: preserve-3d; }
.bs-item { --w: 210px; position: absolute; left: 50%; top: 40px; width: var(--w); height: calc(var(--w) * 1.75); margin-left: calc(var(--w) / -2); border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2,.8,.2,1), opacity .6s, filter .6s; }
.bs-book { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.bs-item.on .bs-book { animation: bsFloat 5s ease-in-out infinite; }
@keyframes bsFloat { 0%, 100% { transform: translateY(0) rotateY(-24deg) rotateX(4deg); } 50% { transform: translateY(-12px) rotateY(-16deg) rotateX(2deg); } }
html[dir="rtl"] .bs-item.on .bs-book { animation-name: bsFloatR; }
@keyframes bsFloatR { 0%, 100% { transform: translateY(0) rotateY(24deg) rotateX(4deg); } 50% { transform: translateY(-12px) rotateY(16deg) rotateX(2deg); } }
.bs-item.on:hover .bs-book { animation-play-state: paused; }
.bs-front, .bs-back, .bs-spine, .bs-pages { position: absolute; backface-visibility: hidden; }
.bs-front { inset: 0; transform: translateZ(18px); border-radius: 2px 6px 6px 2px; overflow: hidden; box-shadow: inset 4px 0 8px rgba(255,255,255,.2); }
.bs-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bs-gloss { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(255,255,255,.35) 0%, transparent 28%, transparent 70%, rgba(0,0,0,.18) 100%); mix-blend-mode: soft-light; }
.bs-back { inset: 0; transform: rotateY(180deg) translateZ(18px); background: var(--spine); border-radius: 6px 2px 2px 6px; }
.bs-spine { top: 0; bottom: 0; left: 0; width: 36px; margin-left: -18px; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.12) 45%, rgba(0,0,0,.25)), var(--spine); transform: rotateY(-90deg); }
.bs-pages { top: 4px; bottom: 4px; right: 0; width: 32px; margin-right: -16px; background: repeating-linear-gradient(90deg, #fbf8f0 0 2px, #e8e1d1 2px 3px); transform: rotateY(90deg); }
.bs-shadow { position: absolute; left: 8%; right: 8%; bottom: -26px; height: 24px; background: radial-gradient(ellipse, rgba(0,0,0,.45), transparent 70%); filter: blur(4px); transform: translateZ(-30px); }
.bs-item:not(.on) { filter: brightness(.62) saturate(.8); }
.bs-item:not(.on):hover { filter: brightness(.8); }
.bs-nav { position: absolute; top: 50%; z-index: 5; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.bs-nav:hover { background: var(--brass); transform: scale(1.06); }
.bs-prev { inset-inline-start: 2%; } .bs-next { inset-inline-end: 2%; }
html[dir="rtl"] .bs-nav { transform: scaleX(-1); } html[dir="rtl"] .bs-nav:hover { transform: scaleX(-1) scale(1.06); }
.bs-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.bs-dot { width: 10px; height: 10px; border-radius: 999px; border: 0; background: #C9C2B2; cursor: pointer; transition: width .35s, background .35s; padding: 0; }
.bs-dot.on { width: 30px; background: var(--brass); }
.bs-hint { text-align: center; color: var(--muted); font-size: .85rem; margin: 10px 0 0; }
.bs-info { max-width: 760px; margin: 26px auto 0; text-align: center; min-height: 280px; }
.bs-panel { animation: bsIn .7s cubic-bezier(.2,.8,.2,1); }
@keyframes bsIn { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.bs-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.bs-meta span { padding: 4px 12px; border-radius: 999px; background: #EEF1EC; color: var(--green); font-size: .82rem; font-weight: 700; }
.bs-meta .bs-year { background: var(--brass); color: #fff; }
.bs-panel h2 { margin: 0 0 6px; font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.bs-sub { color: var(--brass); font-weight: 700; margin: 0 0 14px; }
.bs-desc { color: #3F4B46; line-height: 2; }
.bs-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 700px) {
  .bs-stage { height: 380px; } .bs-item { --w: 170px; top: 30px; }
  .bs-nav { width: 40px; height: 40px; font-size: 1.5rem; margin-top: -20px; }
  .bs-sec { background: radial-gradient(500px 300px at 50% 15%, #2E5A4C 0%, transparent 70%), linear-gradient(180deg, #16302A 0%, #1B352E 52%, var(--paper, #F6F5F2) 52.1%); }
}
@media (prefers-reduced-motion: reduce) { .bs-item, .bs-book { transition: none; } .bs-item.on .bs-book { animation: none; transform: rotateY(-18deg); } }

/* ===== Certificates: a gallery wall of framed, smaller certificates ===== */
.certs { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 30px 22px; perspective: 1200px; }
.cert { background: none; border: 0; border-radius: 0; overflow: visible; --r: 0deg; }
.cert:nth-child(4n+1) { --r: -1.6deg; } .cert:nth-child(4n+2) { --r: 1.2deg; } .cert:nth-child(4n+3) { --r: -.8deg; } .cert:nth-child(4n) { --r: 1.8deg; }
.cert-img { position: relative; aspect-ratio: 4 / 3; padding: 10px; border: 0; border-radius: 4px; background: linear-gradient(145deg, #E9D3A8, #A8844C 45%, #E2C893 70%, #8E6E3C); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 30px -18px rgba(30,40,30,.55), 0 3px 8px -4px rgba(0,0,0,.3);
  transform: rotate(var(--r)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .4s; transform-style: preserve-3d; }
.cert-img::before { content: ""; position: absolute; inset: 10px; background: #fff; box-shadow: inset 0 0 0 6px #FBF8F1, inset 0 0 0 7px rgba(168,132,76,.35); }
.cert-img img { position: relative; padding: 9px; transform: none !important; }
.cert-img::after { content: ""; position: absolute; top: -9px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0, #D8C39C 30%, #7d6235 100%); box-shadow: 0 2px 3px rgba(0,0,0,.35); }
.cert:hover .cert-img { --r: 0deg; transform: rotate(0) translateY(-8px) scale(1.04) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 34px 44px -22px rgba(30,40,30,.6); z-index: 2; }
.cert-body { padding: 14px 4px 0; gap: 3px; }
.cert-top { font-size: .78rem; }
.cert-cat { font-size: .74rem !important; }
.cert h3 { font-size: .95rem !important; line-height: 1.55 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cert-issuer { font-size: .8rem !important; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cert-desc { display: none; }
.cert { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.cert.seen { opacity: 1; transform: none; }
.cert[hidden] { display: none; }
.lb-cap small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; line-height: 1.7; }
@media (max-width: 560px) { .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; } .cert-img { padding: 7px; } .cert-img::before { inset: 7px; } }
@media (prefers-reduced-motion: reduce) { .cert { opacity: 1; transform: none; } }

/* ===== Events: boarding passes of an academic journey ===== */
.tks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.tk { --paper: #FFFDF8; display: grid; grid-template-columns: 1fr 132px; position: relative; filter: drop-shadow(0 16px 22px rgba(20,40,34,.14)); animation: tkIn .8s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d); transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s; }
@keyframes tkIn { from { opacity: 0; transform: translateY(30px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
.tk:hover { transform: translateY(-6px) rotate(-.4deg); filter: drop-shadow(0 26px 30px rgba(20,40,34,.22)); }
.tk-main, .tk-stub { background: var(--paper); position: relative; }
.tk-main { padding: 18px 22px 18px; border-start-start-radius: 16px; border-end-start-radius: 16px;
  -webkit-mask: radial-gradient(circle at 100% 0, transparent 13px, #000 14px) top right / 100% 51% no-repeat, radial-gradient(circle at 100% 100%, transparent 13px, #000 14px) bottom right / 100% 51% no-repeat;
          mask: radial-gradient(circle at 100% 0, transparent 13px, #000 14px) top right / 100% 51% no-repeat, radial-gradient(circle at 100% 100%, transparent 13px, #000 14px) bottom right / 100% 51% no-repeat; }
.tk-stub { border-start-end-radius: 16px; border-end-end-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px; background: linear-gradient(170deg, #1E3A32, #142822); color: #fff;
  -webkit-mask: radial-gradient(circle at 0 0, transparent 13px, #000 14px) top left / 100% 51% no-repeat, radial-gradient(circle at 0 100%, transparent 13px, #000 14px) bottom left / 100% 51% no-repeat;
          mask: radial-gradient(circle at 0 0, transparent 13px, #000 14px) top left / 100% 51% no-repeat, radial-gradient(circle at 0 100%, transparent 13px, #000 14px) bottom left / 100% 51% no-repeat; }
html[dir="rtl"] .tk-main { -webkit-mask-position: top left, bottom left; mask-position: top left, bottom left; -webkit-mask-image: radial-gradient(circle at 0 0, transparent 13px, #000 14px), radial-gradient(circle at 0 100%, transparent 13px, #000 14px); mask-image: radial-gradient(circle at 0 0, transparent 13px, #000 14px), radial-gradient(circle at 0 100%, transparent 13px, #000 14px); }
html[dir="rtl"] .tk-stub { -webkit-mask-position: top right, bottom right; mask-position: top right, bottom right; -webkit-mask-image: radial-gradient(circle at 100% 0, transparent 13px, #000 14px), radial-gradient(circle at 100% 100%, transparent 13px, #000 14px); mask-image: radial-gradient(circle at 100% 0, transparent 13px, #000 14px), radial-gradient(circle at 100% 100%, transparent 13px, #000 14px); }
.tk-main::after { content: ""; position: absolute; inset-block: 20px; inset-inline-end: 0; border-inline-end: 2px dashed rgba(168,132,76,.45); }
.tk-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .76rem; font-weight: 800; letter-spacing: .04em; }
.tk-air { color: var(--brass); text-transform: uppercase; }
.tk-role { margin-inline-start: auto; padding: 3px 10px; border-radius: 999px; background: #EEF1EC; color: var(--green); }
.tk-new { padding: 3px 10px; border-radius: 999px; background: var(--brass); color: #fff; }
.tk-route { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; }
.tk-pt { display: grid; text-align: center; line-height: 1.1; }
.tk-pt b { font-family: var(--f-en-display, 'Source Serif 4', serif); font-size: 2.1rem; color: var(--green); letter-spacing: .04em; }
.tk-pt small { color: var(--muted); font-size: .75rem; margin-top: 4px; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-path { position: relative; flex: 1; height: 24px; }
.tk-path::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed rgba(30,58,50,.25); }
.tk-plane { position: absolute; top: 50%; left: 0; margin-top: -11px; color: var(--brass); transform: rotate(90deg); animation: tkFly 4.5s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes tkFly { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 22px); opacity: 0; } }
.tk:not(:hover) .tk-plane { animation: none; left: calc(50% - 11px); opacity: 1; }
.tk h3 { margin: 6px 0 4px; font-size: 1.08rem; line-height: 1.6; color: var(--green); }
.tk-ex { margin: 0 0 10px; color: #56645E; font-size: .86rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-meta { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding-top: 10px; border-top: 1px solid #EEE7D8; }
.tk-meta small { display: block; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .06em; }
.tk-meta b { font-size: .86rem; color: var(--ink); font-weight: 700; line-height: 1.5; }
.tk-act { display: inline-block; margin-top: 10px; font-size: .85rem; font-weight: 800; color: var(--brass); }
.tk-stub .flag { width: 34px; height: 24px; border-radius: 4px; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.tk-year { font-family: var(--f-en-display, 'Source Serif 4', serif); font-size: 1.6rem; font-weight: 700; color: #E9D3A8; }
.tk-photo { display: block; width: 100%; position: relative; border-radius: 8px; overflow: hidden; border: 2px solid rgba(233,211,168,.6); transform: rotate(-3deg); transition: transform .3s; }
.tk:hover .tk-photo { transform: rotate(0) scale(1.05); }
.tk-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tk-photo span { position: absolute; bottom: 0; inset-inline: 0; background: rgba(20,40,34,.8); font-size: .68rem; text-align: center; padding: 2px; color: #E9D3A8; font-weight: 700; }
.tk-bar { margin-top: auto; width: 80%; height: 30px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.75) 0 2px, transparent 2px 4px, rgba(255,255,255,.75) 4px 5px, transparent 5px 8px, rgba(255,255,255,.75) 8px 11px, transparent 11px 13px); opacity: .55; }
@media (max-width: 980px) { .tks { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .tk { grid-template-columns: 1fr 96px; } .tk-main { padding: 14px 16px; } .tk-pt b { font-size: 1.6rem; } .tk-pt small { max-width: 80px; }
  .tk-meta { grid-template-columns: 1fr; gap: 8px; } .tk-year { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .tk { animation: none; } .tk-plane { animation: none; left: 46%; } }

/* ===== CV page: compact, calm ===== */
.cvx-sec { padding: clamp(34px, 5vw, 56px) 0; }
.cvx-sec h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-bottom: 18px; }
.cvx-sec h2.mt { margin-top: 36px; }
.cvx-job { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0 0 18px; margin: 0; }
.cvx-job + .cvx-job { padding-top: 14px; border-top: 1px dashed rgba(30,58,50,.12); }
.cvx-job + .cvx-job .cvx-dot { top: 18px; }
.cvx-dot { top: 4px; width: 13px; height: 13px; border-width: 3px; inset-inline-start: -30px; }
.cvx-job h3 { font-size: 1.02rem; margin: 2px 0 0; }
.cvx-when { font-size: .8rem; }
.cvx-org { font-size: .9rem; font-weight: 500; }
.cvx-job ul { margin-top: 4px; font-size: .88rem; line-height: 1.75; }
.cvx-cards { gap: 10px; }
.cvx-card { padding: 14px 16px; border-radius: 12px; }
.cvx-card h3 { font-size: .96rem; margin: 4px 0 2px; }
.cvx-card p { font-size: .85rem; }
.cvx-papers { gap: 0; grid-template-columns: 1fr; border-top: 1px solid rgba(216,195,156,.18); }
.cvx-papers li { grid-template-columns: 56px 1fr; column-gap: 12px; row-gap: 0; padding: 11px 4px; background: none; border: 0; border-bottom: 1px solid rgba(216,195,156,.14); border-radius: 0; }
.cvx-papers li:hover { background: rgba(255,255,255,.04); }
.cvx-papers .cvx-yr { grid-row: span 2; font-size: .9rem; }
.cvx-papers li span:not(.cvx-yr) { font-size: .93rem; }
.cvx-papers small { font-size: .8rem; }
.cvx-books { grid-template-columns: repeat(auto-fit, 160px); justify-content: center; gap: 28px; }
.cvx-book img { width: 130px; }
.cvx-book b { font-size: .88rem; margin-top: 10px; }
.cvx-confs { gap: 0; background: #fff; border: 1px solid #E2E5DF; border-radius: 14px; overflow: hidden; }
.cvx-confs li { padding: 11px 16px; border: 0; border-bottom: 1px solid #EEF0EC; border-radius: 0; gap: 12px; }
.cvx-confs li:last-child { border-bottom: 0; }
.cvx-confs li:hover { transform: none; box-shadow: none; background: #FAFBF9; }
.cvx-confs b { font-size: .93rem; }
.cvx-confs span { font-size: .82rem; }
.cvx-sup { font-size: .9rem; line-height: 1.75; }
.cvx-sup li { margin-bottom: 3px; }
.cvx-chips { gap: 8px; } .cvx-chips li { padding: 7px 14px; font-size: .88rem; }
.cvx-lead { font-size: 1rem; line-height: 1.9; }
@media (max-width: 640px) { .cvx-books { grid-template-columns: repeat(2, 1fr); } .cvx-book img { width: 120px; } .cvx-papers li { grid-template-columns: 46px 1fr; } }

/* ===== Certificates v3: calm credential cards ===== */
.certs { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 22px; perspective: none; }
.cert { --acc: var(--green); position: relative; background: #fff; border: 1px solid #E4E1D8; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(20,40,34,.04), 0 14px 30px -26px rgba(20,40,34,.45); transition: opacity .7s ease, transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .4s, border-color .4s; }
.cert.cat-conf { --acc: #1E3A32; } .cert.cat-train { --acc: #A8844C; } .cert.cat-teach { --acc: #3D6A8A; } .cert.cat-honor { --acc: #8A3D4B; }
.cert.seen:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(20,40,34,.55); border-color: color-mix(in srgb, var(--acc) 40%, #E4E1D8); }
.cert-img { aspect-ratio: 4 / 3; padding: 16px 18px; border: 0; border-radius: 0; background: radial-gradient(120% 90% at 50% 0%, #FBFAF6 0%, #EFEBE1 100%); box-shadow: none; transform: none !important; display: grid; place-items: center; }
.cert-img::before { content: none; }
.cert-img::after { content: ""; position: absolute; inset: auto 0 0 0; top: auto; left: 0; width: auto; height: 3px; margin: 0; border-radius: 0; background: var(--acc); box-shadow: none; opacity: .85; }
.cert-img { position: relative; }
.cert-img img { width: 100%; height: 100%; object-fit: contain; padding: 0; filter: drop-shadow(0 6px 10px rgba(20,40,34,.18)); transition: transform .6s cubic-bezier(.2,.8,.2,1) !important; }
.cert:hover .cert-img img { transform: scale(1.05) !important; }
.cert:hover .cert-img { transform: none !important; box-shadow: none; }
.cert-body { padding: 14px 16px 14px; gap: 4px; display: flex; flex-direction: column; flex: 1; }
.cert-cat { order: 1; display: flex; align-items: center; gap: 6px; color: var(--acc) !important; font-weight: 700; letter-spacing: .01em; }
.cert-cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); flex: none; }
.cert h3 { order: 2; color: var(--ink); }
.cert-issuer { order: 3; color: var(--muted) !important; }
.cert-top { order: 4; margin-top: auto; padding-top: 10px; border-top: 1px dashed #E7E3D9; margin-top: 10px; color: var(--muted); }
.cert-year { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgba(20,40,34,.86); color: #E9D3A8 !important; font-size: .76rem; letter-spacing: .04em; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@media (max-width: 560px) {
  .certs { grid-template-columns: 1fr; gap: 12px; }
  .cert { display: grid; grid-template-columns: 118px 1fr; border-radius: 14px; }
  .cert-img { aspect-ratio: auto; height: 100%; min-height: 118px; padding: 10px; }
  .cert-img::after { inset: 0 auto 0 0; width: 3px; height: auto; }
  html[dir="rtl"] .cert-img::after { inset: 0 0 0 auto; }
  .cert-body { padding: 11px 13px; gap: 2px; }
  .cert-top { padding-top: 6px; margin-top: 6px; }
  .cert-year { top: 8px; inset-inline-start: 8px; font-size: .7rem; padding: 2px 8px; }
}

/* ===== Books v3: the story sits beside the book (desktop) / right under it (mobile) ===== */
.bs-panel h2 .ar, .bs-panel h2 { line-height: 1.35; }
@media (min-width: 981px) {
  .bs-sec { background: radial-gradient(900px 520px at 25% 30%, #2E5A4C 0%, transparent 70%), linear-gradient(180deg, #16302A 0%, #1B352E 100%); padding: 40px 0 56px; }
  .bs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "stage info" "dots info" "hint info"; column-gap: 48px; align-items: center; }
  .bs-stage { grid-area: stage; height: 470px; }
  .bs-dots { grid-area: dots; } .bs-hint { grid-area: hint; color: rgba(255,255,255,.55); }
  .bs-info { grid-area: info; max-width: none; margin: 0; text-align: start; min-height: 0; color: #fff; }
  .bs-meta { justify-content: flex-start; }
  .bs-meta span { background: rgba(255,255,255,.08); color: #E9D3A8; border: 1px solid rgba(216,195,156,.25); }
  .bs-meta .bs-year { background: var(--brass); color: #fff; border-color: transparent; }
  .bs-panel h2 { color: #fff; font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
  .bs-sub { color: #E9D3A8; }
  .bs-desc { color: rgba(255,255,255,.8); line-height: 1.95; font-size: 1rem; }
  .bs-links { justify-content: flex-start; }
  .bs-links .btn-outline { color: #fff; border-color: rgba(255,255,255,.35); }
  .bs-links .btn-outline:hover { background: #fff; color: var(--green); }
  .bs-dot { background: rgba(255,255,255,.25); }
  .bs-prev { inset-inline-start: 0; } .bs-next { inset-inline-end: 0; }
}
@media (max-width: 980px) {
  .bs-sec { padding-top: 20px; background: radial-gradient(500px 300px at 50% 15%, #2E5A4C 0%, transparent 70%), linear-gradient(180deg, #16302A 0%, #1B352E 330px, var(--paper, #F6F5F2) 330px); }
  .bs-stage { height: 320px; } .bs-item { --w: 150px; top: 24px; }
  .bs-floor { bottom: 6px; }
  .bs-dots { margin-top: 14px; } .bs-hint { display: none; }
  .bs-info { margin-top: 14px; min-height: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; box-shadow: 0 16px 34px -26px rgba(20,40,34,.5); }
  .bs-panel h2 { font-size: 1.45rem; }
  .bs-sub { margin-bottom: 8px; font-size: .92rem; }
  .bs-desc { font-size: .92rem; line-height: 1.85; margin: 0; }
  .bs-links { margin-top: 14px; } .bs-links .btn { padding: 10px 16px; font-size: .88rem; }
}
.bs-meta span span { padding: 0 !important; background: none !important; border: 0 !important; color: inherit !important; }
.page-books .page-band { padding-block: 28px 34px; } .page-books .page-band .band-art { max-height: 110px; } .page-books .page-band h1 { margin-bottom: 4px; }
@media (min-width: 981px) { .bs-sec { padding-top: 10px; } .bs-stage { height: 440px; } .bs-item { top: 24px; } }
.bs-links .btn-gold { background: var(--brass); color: #fff; border-color: var(--brass); }
.bs-links .btn-gold:hover { background: #8E6E3C; color: #fff; }
@media (max-width: 980px) {
  .page-books .page-band { padding-block: 14px 16px; } .page-books .page-band p, .page-books .band-art { display: none; } .page-books .page-band h1 { font-size: 1.9rem; margin: 0; }
  .bs-sec { padding-top: 8px; background: radial-gradient(500px 300px at 50% 15%, #2E5A4C 0%, transparent 70%), linear-gradient(180deg, #16302A 0%, #1B352E 250px, var(--paper, #F6F5F2) 250px); }
  .bs-stage { height: 262px; } .bs-item { --w: 128px; top: 14px; }
  .bs-nav { width: 36px; height: 36px; font-size: 1.3rem; margin-top: -18px; }
  .bs-dots { margin-top: 8px; }
  .bs-info { margin-top: 10px; padding: 14px 14px 16px; }
  .bs-meta { gap: 6px; margin-bottom: 6px; } .bs-meta > span { font-size: .72rem; padding: 3px 9px; }
  .bs-panel h2 { font-size: 1.3rem; margin-bottom: 2px; }
  .bs-sub { font-size: .85rem; margin-bottom: 6px; line-height: 1.6; }
  .bs-desc { font-size: .88rem; line-height: 1.8; }
}

/* ===== Slim page header on every page ===== */
.page-band { padding-block: 30px 52px !important; }
.page-band h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.25; margin: 0; }
.page-band p { margin-top: 6px; font-size: .98rem; }
.page-band::before { height: 34px !important; background-size: 42px 34px !important; }
.page-band::after { width: 300px; }
.band-art { width: 120px !important; max-height: 96px; }
.band-art.band-globe, .band-globe { width: 170px !important; height: 170px !important; max-height: none; margin-block: -10px; }
.page-band:has(.band-globe) { padding-bottom: 52px !important; }
@media (max-width: 760px) {
  .page-band { padding-block: 18px 40px !important; }
  .page-band h1 { font-size: 1.8rem; }
  .page-band p { font-size: .9rem; line-height: 1.7; }
  .page-band::before { height: 26px !important; background-size: 32px 26px !important; }
  .band-art.band-globe { display: none; }
  .band-inner:has(.band-globe) { gap: 0; }
}
.page-books .page-band { padding-block: 20px 40px !important; }
@media (max-width: 980px) { .page-books .page-band { padding-block: 12px 30px !important; } }

/* ===== Certificates: light & easy ===== */
.certs { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.cert { opacity: 1 !important; transform: none !important; transition: box-shadow .25s, border-color .25s !important; }
.cert:hover { transform: none !important; box-shadow: 0 14px 28px -20px rgba(20,40,34,.45); border-color: #D8CFBD; }
.cert-img img { filter: none; transition: none !important; }
.cert:hover .cert-img img { transform: none !important; }
.filters .chips-flags { display: none; }
@media (max-width: 560px) { .filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 4px 16px; } .filters .chips::-webkit-scrollbar { display: none; } .filters .chip { flex: none; } }
.page-certificates main > .section { padding-top: 28px; } .page-certificates .cert-summary { padding-bottom: 18px; margin-bottom: 18px; }

/* events: small rubber stamp on the ticket stub — ended / upcoming */
.ev-stamp { display: inline-block; margin: -2px 0 2px; font-weight: 800; font-size: .74rem; letter-spacing: .06em; padding: 2px 11px; border: 2px solid currentColor; border-radius: 8px; transform: rotate(-10deg); background: rgba(255,253,248,.96); line-height: 1.5; box-shadow: 0 4px 10px -4px rgba(0,0,0,.5); }
.ev-stamp.ended { color: #A93226; }
.ev-stamp.soon { color: #2E7D4F; transform: rotate(-5deg); }
@media (max-width: 560px) { .ev-stamp { font-size: .68rem; padding: 1px 8px; } }
