/* Public site — Migration & Displacement in Kurdistan Throughout History
   One stylesheet for English (LTR) and Arabic (RTL): layout uses logical properties
   (margin-inline, inset-inline, text-align: start) so it mirrors automatically. */

:root {
    --navy-950: #061128;
    --navy-900: #0a1b3d;
    --navy-800: #0c2147;
    --navy-700: #183466;
    --navy-500: #3f5b8f;
    --navy-100: #e6ecf6;
    --navy-50:  #f2f5fa;

    --orange: #f7941d;
    --orange-700: #b85f00;
    --red: #e3262e;
    --yellow: #ffc100;

    --paper: #fbfaf7;
    --surface: #ffffff;
    --ink: #142036;
    --ink-soft: #3b4659;
    --muted: #5d677a;
    --line: #e3e1db;
    --line-strong: #cfd5df;

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(10, 27, 61, .06), 0 2px 8px rgba(10, 27, 61, .05);
    --shadow: 0 2px 6px rgba(10, 27, 61, .06), 0 12px 32px rgba(10, 27, 61, .08);
    --header-h: 72px;
    --container: 1180px;
    --gutter: clamp(16px, 4vw, 32px);
}

:root[lang="ar"] {
    --font-display: 'Noto Naskh Arabic', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, serif;
    --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
:root[lang="ar"] body { line-height: 1.9; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-underline-offset: .2em; }
a:hover { color: var(--orange-700); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; color: var(--navy-900); margin: 0 0 .6em; font-weight: 600; }
:root[lang="ar"] h1, :root[lang="ar"] h2, :root[lang="ar"] h3 { line-height: 1.45; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.25em; margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--yellow); color: var(--navy-950); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); transition: top .15s; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .8em 1.4em; border-radius: 999px; border: 2px solid transparent;
    font: 600 .95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: .55em 1.05em; font-size: .875rem; }
.btn-primary { background: var(--orange); color: var(--navy-950); }
.btn-primary:hover { background: #ffa53d; color: var(--navy-950); box-shadow: 0 6px 18px rgba(247, 148, 29, .35); }
.btn-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.45); }
.btn-light:hover { background: #fff; color: var(--navy-900); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); color: #fff; }
.btn-outline { background: transparent; color: var(--navy-800); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--navy-800); color: var(--navy-900); }
.btn-link { padding-inline: 0; color: var(--navy-700); border: 0; }
.btn-link:hover { transform: none; color: var(--orange-700); }
[dir="rtl"] .bi-arrow-right, [dir="rtl"] .bi-arrow-left { transform: scaleX(-1); display: inline-block; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy-900); flex-shrink: 0; }
.brand img { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.brand-text small { font-size: .78rem; color: var(--muted); font-weight: 500; }
.brand:hover { color: var(--navy-900); }

.main-nav { display: flex; align-items: center; gap: 20px; margin-inline-start: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav ul a {
    display: block; padding: 8px 12px; border-radius: 999px;
    color: var(--ink-soft); font-weight: 500; font-size: .95rem; text-decoration: none;
}
.main-nav ul a:hover { color: var(--navy-900); background: var(--navy-50); }
.main-nav ul a[aria-current="page"] { color: var(--navy-900); background: var(--navy-100); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
    color: var(--navy-800); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.lang-switch[lang="ar"] { font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif; }
.lang-switch:hover { border-color: var(--navy-800); color: var(--navy-900); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; color: var(--navy-900); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 1020px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .header-actions { margin-inline-start: auto; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
        flex-direction: column; align-items: stretch; gap: 12px;
        padding: 16px var(--gutter) 24px; margin: 0;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .main-nav.open { transform: none; opacity: 1; visibility: visible; }
    .main-nav ul { flex-direction: column; }
    .main-nav ul a { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 1.05rem; }
}
@media (max-width: 480px) {
    .brand-text small { display: none; }
    .lang-switch { padding: 7px 10px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    color: #fff; background: var(--navy-800);
    padding: clamp(56px, 9vw, 120px) 0 clamp(120px, 14vw, 170px);
}
.hero::before { /* conference photo (set per page through --hero-image), on the far side of the text */
    content: ""; position: absolute; inset: 0; z-index: -2;
    background: var(--hero-image, none) right center / cover no-repeat;
}
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, var(--navy-800) 0%, rgba(12, 33, 71, .96) 38%, rgba(12, 33, 71, .55) 70%, rgba(12, 33, 71, .35) 100%),
        linear-gradient(0deg, rgba(6, 17, 40, .55), transparent 40%);
}
[dir="rtl"] .hero::before { background-position: left center; }
[dir="rtl"] .hero::after {
    background:
        linear-gradient(270deg, var(--navy-800) 0%, rgba(12, 33, 71, .96) 38%, rgba(12, 33, 71, .55) 70%, rgba(12, 33, 71, .35) 100%),
        linear-gradient(0deg, rgba(6, 17, 40, .55), transparent 40%);
}
.hero-content { max-width: 720px; }
.back-link {
    display: flex; width: fit-content; align-items: center; gap: 8px; margin-bottom: 26px;
    padding: 6px 14px 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
    color: #dbe4f3; font-size: .9rem; font-weight: 500; text-decoration: none; background: rgba(255,255,255,.06);
}
.back-link:hover { color: #fff; background: rgba(255,255,255,.14); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: #ffd27a; margin-bottom: 22px;
}
:root[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.stripes { display: inline-flex; gap: 3px; flex-shrink: 0; }
.stripes span { width: 6px; height: 18px; border-radius: 2px; }
.stripes span:nth-child(1) { background: var(--orange); }
.stripes span:nth-child(2) { background: var(--red); }
.stripes span:nth-child(3) { background: var(--yellow); }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.2vw, 3.9rem); font-weight: 600; letter-spacing: -.015em; margin-bottom: 20px; }
:root[lang="ar"] .hero h1 { letter-spacing: 0; font-size: clamp(2rem, 5vw, 3.5rem); }
.hero-number { color: var(--orange); font-style: italic; }
.hero-lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: #dbe4f3; max-width: 600px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Key facts card overlapping the hero */
.facts { position: relative; z-index: 2; margin-top: calc(-1 * clamp(72px, 9vw, 96px)); }
.facts-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    border: 1px solid var(--line); overflow: hidden;
}
.fact { display: flex; gap: 14px; padding: 24px; border-inline-start: 1px solid var(--line); }
.fact:first-child { border-inline-start: 0; }
.fact-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-700); font-size: 1.25rem; }
.fact h2 { font-family: var(--font-body); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
:root[lang="ar"] .fact h2 { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.fact p { margin: 0; font-weight: 600; color: var(--navy-900); line-height: 1.45; }
.fact p small { display: block; font-weight: 400; color: var(--muted); }
@media (max-width: 900px) {
    .facts-grid { grid-template-columns: 1fr 1fr; }
    .fact:nth-child(3) { border-inline-start: 0; }
    .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 540px) {
    .facts-grid { grid-template-columns: 1fr; }
    .fact { border-inline-start: 0; padding: 18px 20px; }
    .fact + .fact { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-navy { background: var(--navy-900); color: #dbe4f3; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--orange-700); margin-bottom: 12px;
}
:root[lang="ar"] .kicker { letter-spacing: 0; font-size: .95rem; }
.kicker::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--orange) 33%, var(--red) 33% 66%, var(--yellow) 66%); }
.section-navy .kicker { color: #ffd27a; }
.section-head h2, .section-title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.01em; }
.section-head p { font-size: 1.1rem; color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-lead { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.5; color: var(--navy-900); font-weight: 500; }
:root[lang="ar"] .about-lead { line-height: 1.9; }
.about-poster { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); margin-top: 28px; }
.issue-card picture { display: block; }
.background-text p { color: var(--ink-soft); }
.background-text details { border-top: 1px solid var(--line); margin-top: 8px; }
.background-text summary {
    cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 0; font-weight: 600; color: var(--navy-700);
}
.background-text summary::-webkit-details-marker { display: none; }
.background-text summary .bi { transition: transform .2s; }
.background-text details[open] summary .bi { transform: rotate(180deg); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* Themes */
.themes-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.theme-card {
    grid-column: span 2; position: relative;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.themes-grid.count-5 .theme-card:nth-child(4) { grid-column: 2 / span 2; }
.themes-grid.count-5 .theme-card:nth-child(5) { grid-column: 4 / span 2; }
.themes-grid.count-4 .theme-card, .themes-grid.count-2 .theme-card { grid-column: span 3; }
.themes-grid.count-1 .theme-card { grid-column: 2 / span 4; }
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.theme-num { position: absolute; top: 20px; inset-inline-end: 24px; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--navy-100); font-weight: 700; }
.theme-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 18px; color: #fff; background: var(--navy-800); }
.theme-card:nth-child(2) .theme-icon { background: var(--orange); color: var(--navy-950); }
.theme-card:nth-child(3) .theme-icon { background: var(--red); }
.theme-card:nth-child(4) .theme-icon { background: var(--yellow); color: var(--navy-950); }
.theme-card:nth-child(5) .theme-icon { background: var(--navy-500); }
.theme-card h3 { font-size: 1.25rem; }
.theme-card p { color: var(--muted); margin: 0; font-size: .97rem; }
@media (max-width: 960px) {
    .themes-grid { grid-template-columns: 1fr 1fr; }
    .theme-card, .theme-card:nth-child(4), .theme-card:nth-child(5) { grid-column: auto; }
}
@media (max-width: 600px) { .themes-grid { grid-template-columns: 1fr; } }

/* Objectives */
.objectives { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; counter-reset: obj; }
.objectives li {
    counter-increment: obj; position: relative;
    padding: 22px 0 22px 0; padding-inline-start: 64px; border-top: 1px solid rgba(255,255,255,.14);
    color: #dbe4f3;
}
.objectives li::before {
    content: counter(obj, decimal-leading-zero); position: absolute; inset-inline-start: 0; top: 18px;
    font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--orange);
}
:root[lang="ar"] .objectives li::before { content: counter(obj, arabic-indic); }
@media (max-width: 800px) { .objectives { grid-template-columns: 1fr; } }

/* Guidelines + timeline */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-sm); }
.panel h3 { font-size: 1.45rem; }
.check-list { list-style: none; padding: 0; margin: 0 0 24px; }
.check-list li { position: relative; padding-inline-start: 34px; margin-bottom: 14px; color: var(--ink-soft); }
.check-list li::before { content: "\F26B"; font-family: bootstrap-icons; position: absolute; inset-inline-start: 0; top: .05em; color: var(--orange-700); font-size: 1.15rem; }
.note-box { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: var(--navy-50); border: 1px solid var(--navy-100); margin-bottom: 24px; }
.note-box .bi { font-size: 1.4rem; color: var(--navy-700); }
.note-box strong { display: block; color: var(--navy-900); }
.note-box p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.pdf-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pdf-links a {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--line-strong); background: #fff; color: var(--navy-800); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.pdf-links a:hover { border-color: var(--navy-800); }
.pdf-links a.primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pdf-links a .bi { color: var(--red); }
.pdf-links a.primary .bi { color: var(--yellow); }
.panel-label { font-weight: 600; color: var(--navy-900); margin-bottom: 10px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 12px; bottom: 12px; inset-inline-start: 11px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-inline-start: 44px; padding-bottom: 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; inset-inline-start: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: .8rem; }
.timeline li.done .timeline-dot { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.timeline li.highlight .timeline-dot { background: var(--orange); border-color: var(--orange); color: var(--navy-950); width: 28px; height: 28px; inset-inline-start: -2px; }
.timeline time { display: block; font-weight: 700; color: var(--navy-900); }
.timeline span { color: var(--muted); }
.timeline .tag { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px; background: var(--navy-50); color: var(--navy-700); font-size: .75rem; font-weight: 600; vertical-align: middle; }

/* ---------- Papers ---------- */
.issue-card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0; overflow: hidden;
    background: var(--navy-900); color: #dbe4f3; border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 40px;
}
.issue-card picture, .issue-card img { width: 100%; height: 100%; object-fit: cover; }
.issue-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.issue-body .kicker { color: #ffd27a; }
.issue-body h3 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.issue-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 24px; color: #b9c6dd; font-size: .95rem; }
.issue-meta span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 800px) { .issue-card { grid-template-columns: 1fr; } }

.paper-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.paper-item {
    display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px;
    transition: border-color .2s, box-shadow .2s;
}
.paper-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.paper-item h3 { font-size: 1.2rem; margin: 0 0 6px; }
.paper-item h3 a { color: var(--navy-900); text-decoration: none; }
.paper-item h3 a:hover { color: var(--orange-700); text-decoration: underline; }
.paper-authors { color: var(--muted); font-size: .95rem; margin: 0; }
.paper-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .85rem; color: var(--muted); }
.paper-meta span { display: inline-flex; align-items: center; gap: 5px; }
.paper-actions { display: flex; gap: 8px; }
@media (max-width: 640px) {
    .paper-item { grid-template-columns: 1fr; padding: 20px; }
    .paper-actions .btn { flex: 1; }
}
.empty-state { text-align: center; padding: 48px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.empty-state .bi { font-size: 2rem; display: block; margin-bottom: 8px; color: var(--navy-500); }
.section-foot { margin-top: 32px; display: flex; justify-content: center; }

/* Papers page */
.page-hero { background: var(--navy-800); color: #dbe4f3; padding: clamp(44px, 7vw, 80px) 0; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset-inline-end: 0; bottom: 0; width: 140px; height: 8px; background: linear-gradient(90deg, var(--orange) 33%, var(--red) 33% 66%, var(--yellow) 66%); }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3rem); margin-bottom: 10px; }
.page-hero p { max-width: 640px; margin: 0; font-size: 1.08rem; }
.breadcrumb { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .9rem; color: #9fb0cc; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; color: #fff; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 8px; color: #6f82a6; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: -32px 0 32px; position: relative; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow); }
.search-field { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); }
.search-field:focus-within { border-color: var(--navy-700); box-shadow: 0 0 0 3px var(--navy-100); }
.search-field .bi { color: var(--muted); }
.search-field input { flex: 1; border: 0; background: transparent; padding: 12px 0; font: inherit; color: var(--ink); min-width: 0; }
.search-field input:focus { outline: none; }
.select { padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); font: inherit; color: var(--ink); }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--muted); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 40px 0 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--navy-800); text-decoration: none; font-weight: 600; }
.pagination a:hover { border-color: var(--navy-800); }
.pagination [aria-current="page"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* Paper detail */
.paper-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); align-items: start; padding-block: clamp(40px, 6vw, 72px); }
@media (max-width: 960px) { .paper-layout { grid-template-columns: 1fr; } }
.paper-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.paper-byline { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 28px; padding: 0; list-style: none; }
.paper-byline li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .95rem; }
.paper-byline li small { color: var(--muted); }
.prose h2 { font-size: 1.35rem; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose p { color: var(--ink-soft); text-align: start; }
.prose .references { font-size: .93rem; color: var(--ink-soft); white-space: pre-line; overflow-wrap: anywhere; }
.keywords { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.keywords li { background: var(--navy-50); color: var(--navy-700); border-radius: 999px; padding: 4px 12px; font-size: .9rem; font-weight: 500; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); position: sticky; top: calc(var(--header-h) + 20px); }
.side-card .btn { width: 100%; margin-bottom: 10px; }
.side-card dl { margin: 18px 0 0; display: grid; gap: 14px; }
.side-card dt { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
:root[lang="ar"] .side-card dt { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.side-card dd { margin: 2px 0 0; font-weight: 600; color: var(--navy-900); overflow-wrap: anywhere; }
.cite-box { margin-top: 18px; padding: 14px; border-radius: var(--radius-sm); background: var(--paper); border: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft); }
.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--navy-900); color: #fff; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
[dir="rtl"] .toast { transform: translateX(50%); }
.toast.show { opacity: 1; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.contact-card .bi { font-size: 1.5rem; color: var(--orange-700); }
.contact-card h3 { font-family: var(--font-body); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 6px; }
:root[lang="ar"] .contact-card h3 { text-transform: none; letter-spacing: 0; font-size: .95rem; }
.contact-card p, .contact-card a { margin: 0; font-weight: 600; color: var(--navy-900); overflow-wrap: anywhere; }
.contact-card .small-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 500; color: var(--navy-700); font-size: .9rem; }
.contact-note { margin-top: 24px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #9fb0cc; padding-top: 56px; font-size: .95rem; }
.site-footer a { color: #dbe4f3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand img { background: #fff; border-radius: 50%; padding: 3px; }
.footer-brand strong { color: #fff; font-family: var(--font-display); font-size: 1.15rem; }
.footer-brand p { margin: 4px 0 0; }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-contact .bi { color: var(--orange); margin-inline-end: 8px; }
.footer-social span { display: block; margin-bottom: 12px; }
.footer-social div { display: flex; gap: 8px; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: 1.05rem; }
.footer-social a:hover { background: var(--orange); color: var(--navy-950); text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Homepage hero ---------- */
.hero-home { padding-bottom: clamp(64px, 9vw, 112px); background:
    radial-gradient(1200px 500px at 85% -10%, rgba(247, 148, 29, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 120%, rgba(255, 193, 0, .10), transparent 60%),
    var(--navy-800); }
.hero-home::before { /* faint "NU" monogram pattern, echoing the poster */
    background: url("../img/site/logo-192.png") center / 120px auto repeat;
    opacity: .035; filter: grayscale(1) brightness(3);
}
.hero-home::after { background: linear-gradient(180deg, transparent 60%, rgba(6, 17, 40, .35)); }
[dir="rtl"] .hero-home::after { background: linear-gradient(180deg, transparent 60%, rgba(6, 17, 40, .35)); }
.hero-home-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; }
.hero-stats { display: grid; gap: 14px; margin: 0; min-width: 220px; }
.hero-stats > div {
    padding: 18px 22px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06); backdrop-filter: blur(6px);
}
.hero-stats dt { font-size: .85rem; color: #b9c6dd; }
.hero-stats dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: #fff; line-height: 1.1; }
.hero-stats > div:nth-child(1) dd { color: var(--orange); }
.hero-stats > div:nth-child(3) dd { color: var(--yellow); }
@media (max-width: 860px) {
    .hero-home-grid { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); min-width: 0; }
    .hero-stats > div { padding: 14px; }
    .hero-stats dd { font-size: 1.7rem; }
}

/* ---------- Status pills ---------- */
.status-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
    font-size: .8rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
    background: #fff; color: var(--navy-900); box-shadow: 0 2px 8px rgba(6, 17, 40, .18);
}
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-open { background: #e7f8ee; color: #137a3c; }
.status-ongoing { background: #fff3df; color: #a35400; }
.status-upcoming { background: #e8eefc; color: #2a4fb3; }
.status-past { background: #eef0f4; color: #4a5568; }
.hero .status-pill { align-self: center; }

/* ---------- Conference cards ---------- */
.conferences-section { position: relative; }
.conf-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.conf-card:hover, .conf-card:focus-within { transform: translateY(-4px); box-shadow: 0 6px 14px rgba(10, 27, 61, .08), 0 24px 48px rgba(10, 27, 61, .14); border-color: var(--line-strong); }
.conf-media { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: var(--navy-800); }
.conf-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.conf-card:hover .conf-media img { transform: scale(1.04); }
.conf-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,17,40,.0) 45%, rgba(6,17,40,.55)); pointer-events: none; }
.conf-media-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.35); font-size: 3.5rem;
    background: radial-gradient(400px 200px at 80% 0%, rgba(247,148,29,.35), transparent 60%), var(--navy-800); }
.conf-edition {
    position: absolute; z-index: 1; bottom: 14px; inset-inline-start: 16px;
    width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--orange), var(--red)); color: #fff;
    font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1;
    box-shadow: 0 8px 20px rgba(227, 38, 46, .35); border: 2px solid rgba(255,255,255,.85);
}
.conf-media .status-pill { position: absolute; z-index: 1; top: 14px; inset-inline-end: 14px; }
.conf-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 20px; }
.conf-series { margin: 0 0 6px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-700); }
:root[lang="ar"] .conf-series { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.conf-title { font-size: 1.35rem; margin: 0 0 12px; }
.conf-title a { color: var(--navy-900); text-decoration: none; }
.conf-title a:hover { color: var(--navy-700); }
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.stretched-link:focus-visible { outline: none; }
.conf-card:has(.stretched-link:focus-visible) { outline: 3px solid var(--orange); outline-offset: 3px; }
.conf-meta { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; }
.conf-meta li { display: inline-flex; align-items: center; gap: 6px; }
.conf-meta .bi { color: var(--navy-500); }
.conf-summary { color: var(--ink-soft); font-size: .95rem; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.conf-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.conf-foot span { display: inline-flex; align-items: center; gap: 6px; }
.conf-cta { color: var(--navy-800); font-weight: 600; margin-inline-start: auto; }
.conf-cta .bi { transition: transform .2s; }
.conf-card:hover .conf-cta .bi { transform: translateX(4px); }
[dir="rtl"] .conf-card:hover .conf-cta .bi { transform: scaleX(-1) translateX(4px); }

/* Compact homepage cards: title and series sit on the cover image */
.conf-grid .conf-media { aspect-ratio: 16 / 10; }
.conf-grid .conf-media::after { background: linear-gradient(180deg, rgba(6, 17, 40, .05) 25%, rgba(6, 17, 40, .55) 55%, rgba(6, 17, 40, .92) 100%); }
.conf-overlay { position: absolute; z-index: 1; inset-inline: 0; bottom: 0; padding: 16px 20px 18px; }
.conf-overlay .conf-series { margin: 0 0 4px; color: #ffd27a; font-size: .72rem; line-height: 1.4; }
.conf-overlay .conf-title { margin: 0; font-size: 1.25rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.conf-overlay .conf-title { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .45); transition: color .2s; }
.conf-card:hover .conf-overlay .conf-title { color: #ffd27a; }

/* The whole card is one link */
.conf-card-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; cursor: pointer; border-radius: inherit; }
.conf-card-link:hover { color: inherit; }
.conf-card-link:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.conf-card:hover .conf-cta { color: var(--orange-700); }
.conf-grid .conf-card .done-stamp { top: 22px; transform: translateX(-50%) rotate(-8deg); padding: 6px 14px; font-size: .9rem; }
:root[lang="ar"] .conf-grid .conf-card .done-stamp { font-size: 1.05rem; }
.conf-grid .conf-edition { top: 14px; bottom: auto; inset-inline-start: 14px; width: 46px; height: 46px; font-size: 1.5rem; border-radius: 13px; }
.conf-grid .conf-media-placeholder { align-items: start; padding-top: 18%; }
.conf-grid .conf-body { padding: 14px 20px 16px; }
.conf-grid .conf-meta { margin-bottom: 4px; font-size: .88rem; }
.conf-grid .conf-foot { padding-top: 12px; margin-top: 8px; }

/* Finished conference: faded picture with an "Already Done" rubber stamp across it */
.conf-card.is-past .conf-media img { filter: grayscale(.6) brightness(.8); }
.conf-card.is-past .conf-media::after { background: rgba(6, 17, 40, .35); }
.done-stamp {
    position: absolute; z-index: 1; top: 38%; left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 10px;
    background: rgba(255, 255, 255, .94); color: #c4161d;
    border: 3px double #c4161d; outline: 2px solid rgba(255, 255, 255, .94); outline-offset: 2px;
    font-weight: 800; font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
    box-shadow: 0 10px 30px rgba(6, 17, 40, .35);
    pointer-events: none;
}
:root[lang="ar"] .done-stamp { letter-spacing: 0; font-size: 1.25rem; }
.conf-card.is-past .conf-edition { z-index: 2; }
.done-stamp .bi { font-size: 1.3em; }
.conf-card-large .done-stamp { top: 45%; font-size: 1.5rem; padding: 14px 30px; }
.conf-card.is-past:hover .conf-media img { filter: grayscale(.3) brightness(.9); }

/* Featured conference: horizontal on wide screens */
.conf-card-large { margin-bottom: 28px; }
@media (min-width: 900px) {
    .conf-card-large { display: grid; grid-template-columns: 1.15fr 1fr; }
    .conf-card-large .conf-media { aspect-ratio: auto; min-height: 380px; background: #04214a; }
    /* Show the whole poster (posters carry their own lettering), on a background matching its navy */
    .conf-card-large .conf-media img { object-fit: contain; }
    .conf-card-large:hover .conf-media img { transform: scale(1.02); }
    .conf-card-large .conf-media::after { background: linear-gradient(90deg, transparent 60%, rgba(6,17,40,.25)); }
    [dir="rtl"] .conf-card-large .conf-media::after { background: linear-gradient(270deg, transparent 60%, rgba(6,17,40,.25)); }
    .conf-card-large .conf-body { padding: clamp(28px, 3.5vw, 44px); justify-content: center; }
    .conf-card-large .conf-title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
    .conf-card-large .conf-summary { -webkit-line-clamp: 5; font-size: 1.02rem; }
    .conf-card-large .conf-edition { width: 74px; height: 74px; font-size: 2.4rem; border-radius: 20px; bottom: 20px; inset-inline-start: 20px; }
}
.conf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
@media (max-width: 400px) { .conf-grid { grid-template-columns: 1fr; } }

/* ---------- Conference page section menu ---------- */
.section-nav { position: sticky; top: var(--header-h); z-index: 40; background: rgba(251, 250, 247, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin-top: 32px; }
.section-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
.section-nav ul::-webkit-scrollbar { display: none; }
.section-nav a { display: block; padding: 7px 14px; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .93rem; white-space: nowrap; }
.section-nav a:hover { background: var(--navy-100); color: var(--navy-900); }
html { scroll-padding-top: calc(var(--header-h) + 72px); }

.paper-conference { margin: 0 0 4px; font-size: .8rem; font-weight: 600; color: var(--orange-700); display: inline-flex; gap: 6px; align-items: center; }
.spacer { height: clamp(56px, 8vw, 96px); }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
    .site-header, .site-footer, .side-card .btn, .skip-link, .toast { display: none !important; }
    body { background: #fff; }
    .paper-layout { grid-template-columns: 1fr; padding: 0; }
    .side-card { position: static; box-shadow: none; }
}
