/* ────────────────────────────────────────────────────────────
   KRSC — Kuwait Research and Studies Center
   Shared stylesheet — used by index.html, affiliation.html, contact.html
   ──────────────────────────────────────────────────────────── */

:root {
  --teal:         #176B6B;
  --teal-dark:    #0F5252;
  --teal-darker:  #0A3D3D;
  --teal-light:   #E6F0F0;
  --gold:         #C9A55C;
  --ink:          #0E1A1A;
  --ink-2:        #3C3C3C;
  --ink-3:        #595959;
  --gray:         #8A8A8A;
  --line:         #E5E5E5;
  --bg:           #FFFFFF;
  --bg-gray:      #F7F7F5;
  --footer-bg:    #0C3C3C;

  --font:    'IBM Plex Sans', system-ui, sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: #fff; color: var(--ink);
  line-height: 1.55; font-size: 16px;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
html[dir="rtl"] body { font-family: var(--font-ar); }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: 48px; }

/* ─── UTILITY BAR ─── */
.utility-bar {
  background: var(--teal-dark); color: #fff;
  font-size: 13px; padding: 10px 0;
}
.utility-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.utility-bar .socials { display: flex; gap: 18px; }
.utility-bar .socials a {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0.85; transition: all 0.3s var(--ease);
}
.utility-bar .socials a:hover { opacity: 1; transform: translateY(-2px); }
.utility-bar .socials svg { width: 15px; height: 15px; fill: currentColor; }
.utility-bar .right { display: flex; align-items: center; gap: 16px; }
.utility-bar .right .text { opacity: 0.9; }
.utility-bar .subscribe {
  background: var(--gold); color: var(--teal-darker);
  padding: 7px 22px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 22px; transition: all 0.3s var(--ease);
}
html[dir="rtl"] .utility-bar .subscribe { font-size: 13px; letter-spacing: 0; text-transform: none; }
.utility-bar .subscribe:hover {
  background: #E0B770; transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 165, 92, 0.35);
}

/* ─── NAVIGATION ─── */
nav.primary { background: #fff; border-bottom: 1px solid var(--line); }
nav.primary .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px; gap: 40px;
}
.brand { display: flex; align-items: center; cursor: pointer; }
.brand img { height: 52px; display: block; transition: opacity 0.3s var(--ease); }
.brand:hover img { opacity: 0.85; }
.nav-links { display: flex; list-style: none; gap: 34px; }
.nav-links a {
  font-size: 15px; color: var(--ink-2);
  padding: 8px 0; position: relative; cursor: pointer;
  transition: color 0.25s var(--ease);
}
html[dir="rtl"] .nav-links a { font-size: 16px; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -19px;
  height: 3px; background: var(--teal); transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--teal); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--teal); font-weight: 500; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.lang-toggle {
  display: flex; align-items: center;
  background: var(--bg-gray); border-radius: 24px; padding: 4px;
}
.lang-toggle button {
  background: none; border: none; padding: 6px 14px;
  font: inherit; font-size: 13px; color: var(--ink-3);
  cursor: pointer; border-radius: 20px;
  transition: all 0.3s var(--ease);
}
.lang-toggle button[data-lang="ar"] { font-family: var(--font-ar); font-size: 14px; }
.lang-toggle button.active { color: #fff; background: var(--teal); }
.search-btn {
  width: 38px; height: 38px;
  background: none; border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease);
}
.search-btn:hover {
  background: var(--teal); border-color: var(--teal); color: #fff;
  transform: rotate(90deg);
}

/* Page entrance animation */
main { animation: pageEnter 0.7s var(--ease); }
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── HERO ─── */
.hero {
  background: var(--teal); color: #fff;
  position: relative; overflow: hidden;
  min-height: 520px; display: flex; align-items: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(255,255,255,0.04), transparent 70%),
    radial-gradient(circle at 80% 20%, rgba(201, 165, 92, 0.06), transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px; opacity: 0.5; pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; padding: 90px 0 70px; width: 100%; }
.hero-inner .wrap { display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: center; }

.slides { position: relative; min-height: 320px; }
.slide {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(20px);
  transition: all 0.8s var(--ease);
  pointer-events: none;
}
.slide.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.slide-cat {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 24px;
  display: inline-block; padding: 6px 14px;
  border: 1px solid rgba(201, 165, 92, 0.4); border-radius: 20px;
}
html[dir="rtl"] .slide-cat { font-size: 14px; letter-spacing: 0; text-transform: none; }
.slide h2 {
  font-size: clamp(34px, 4vw, 54px); font-weight: 500;
  line-height: 1.15; max-width: 720px; letter-spacing: -0.015em;
  margin-bottom: 24px; color: #fff;
}
html[dir="rtl"] .slide h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.35; letter-spacing: 0; font-weight: 600; }
.slide p { font-size: 16px; color: rgba(255,255,255,0.82); line-height: 1.65; max-width: 580px; margin-bottom: 36px; }
html[dir="rtl"] .slide p { line-height: 1.85; }

.slide-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--teal-dark);
  padding: 13px 32px; border-radius: 26px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: all 0.35s var(--ease); cursor: pointer;
}
html[dir="rtl"] .slide-btn { font-size: 14px; letter-spacing: 0; text-transform: none; }
.slide-btn svg { transition: transform 0.35s var(--ease); }
.slide-btn:hover {
  background: var(--gold); color: var(--teal-darker);
  transform: translateX(4px); box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
html[dir="rtl"] .slide-btn:hover { transform: translateX(-4px); }
html[dir="rtl"] .slide-btn svg { transform: rotate(180deg); }
.slide-btn:hover svg { transform: translateX(4px); }

.slide-dots { margin-top: 48px; display: flex; gap: 10px; align-items: center; }
.slide-dots button {
  position: relative; width: 46px; height: 4px;
  padding: 0; border: none;
  background: rgba(255,255,255,0.22); border-radius: 2px;
  cursor: pointer; overflow: hidden;
  transition: width 0.4s var(--ease);
}
.slide-dots button.active { width: 64px; }
.slide-dots button .progress {
  display: block; position: absolute; inset: 0;
  height: 100%; width: 0;
  background: var(--gold); border-radius: 2px;
}
html[dir="rtl"] .slide-dots button .progress { right: 0; left: auto; }
.slide-dots button.active .progress {
  animation: dotFill 7s linear forwards;
}
@keyframes dotFill { from { width: 0; } to { width: 100%; } }

/* ─── HERO CIRCLE ─── */
.hero-circle {
  position: relative; width: 460px; height: 460px;
  flex-shrink: 0; animation: slowSpin 60s linear infinite;
}
@keyframes slowSpin { to { transform: rotate(360deg); } }
.hero-circle .ring {
  position: absolute; inset: 0;
  border: 1.5px solid rgba(201, 165, 92, 0.7); border-radius: 50%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 85%, 88% 85%, 88% 15%, 0 15%, 0 0);
}
.hero-circle .ring-dots {
  position: absolute; top: 38px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px;
}
.hero-circle .ring-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(201, 165, 92, 0.6);
  transition: all 0.4s var(--ease); cursor: pointer;
}
.hero-circle .ring-dots span.active { background: var(--gold); width: 24px; border-radius: 4px; }
.hero-circle .inner-disk {
  position: absolute; inset: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal-darker) 100%);
  overflow: hidden;
  animation: reverseSpin 60s linear infinite;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.3);
}
@keyframes reverseSpin { to { transform: rotate(-360deg); } }
.inner-disk::before {
  content: ''; position: absolute; inset: 0;
  background-image: url("../images/Logo_Sign.png");
  background-size: 55%; background-position: center; background-repeat: no-repeat;
  opacity: 0.18; filter: brightness(0) invert(1);
}
.inner-disk::after {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0, transparent 12px, rgba(255,255,255,0.03) 12px, rgba(255,255,255,0.03) 13px);
}
.hero-circle .tick {
  position: absolute; width: 10px; height: 10px;
  background: var(--gold); border-radius: 50%;
  top: 50%; left: -5px; transform: translateY(-50%);
  animation: pulseTick 3s ease-in-out infinite;
  box-shadow: 0 0 20px var(--gold);
}
@keyframes pulseTick {
  0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(1); }
  50%      { opacity: 1; transform: translateY(-50%) scale(1.4); }
}

/* ─── SECTIONS ─── */
section.block-light { background: #fff; padding: 88px 0; }
section.block-teal {
  background: var(--teal); color: #fff;
  padding: 88px 0; position: relative; overflow: hidden;
}
section.block-teal::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px; opacity: 0.4; pointer-events: none;
}
section.block-teal .wrap { position: relative; z-index: 2; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 56px; gap: 24px;
}
.section-head h2 {
  font-size: clamp(36px, 4vw, 52px); font-weight: 500;
  letter-spacing: -0.015em; line-height: 1.1;
}
html[dir="rtl"] .section-head h2 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.35; letter-spacing: 0; font-weight: 600; }
.section-head h2 .accent { display: block; color: var(--teal); font-weight: 300; }
section.block-teal .section-head h2 { color: #fff; }
section.block-teal .section-head h2 .accent { color: var(--gold); }
.section-head a.view-more {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: all 0.3s var(--ease);
  align-self: flex-end; margin-bottom: 8px; cursor: pointer;
}
html[dir="rtl"] .section-head a.view-more { font-size: 14px; letter-spacing: 0; text-transform: none; }
.section-head a.view-more:hover { color: var(--teal); border-color: var(--teal); padding-inline-end: 12px; }
section.block-teal .section-head a.view-more { color: #fff; border-color: rgba(255,255,255,0.5); }
section.block-teal .section-head a.view-more:hover { color: var(--gold); border-color: var(--gold); }

/* ─── PUBLICATIONS ─── */
.pub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.pub-card {
  cursor: pointer; display: flex; flex-direction: column;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.pub-card.in { opacity: 1; transform: translateY(0); }
.pub-card:nth-child(1) { transition-delay: 0.1s; }
.pub-card:nth-child(2) { transition-delay: 0.25s; }
.pub-card:nth-child(3) { transition-delay: 0.4s; }
.pub-thumb {
  width: 100%; aspect-ratio: 16/10;
  background: var(--teal); margin-bottom: 22px;
  position: relative; overflow: hidden; border-radius: 2px;
}
.pub-thumb-img { position: absolute; inset: 0; transition: transform 0.7s var(--ease); }
.pub-thumb.var-1 .pub-thumb-img { background: linear-gradient(135deg, #176B6B, #0F5252 60%, #0A3D3D); }
.pub-thumb.var-2 .pub-thumb-img { background: linear-gradient(135deg, #1E4858, #0F5252 60%, #176B6B); }
.pub-thumb.var-3 .pub-thumb-img { background: linear-gradient(135deg, #0F5252, #176B6B 60%, #1E4858); }
.pub-thumb-img::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 60%; height: 100%;
  background-image: url("../images/Logo_Sign.png");
  background-size: contain; background-repeat: no-repeat;
  background-position: right bottom;
  opacity: 0.15; filter: brightness(0) invert(1);
  transition: transform 0.6s var(--ease);
}
html[dir="rtl"] .pub-thumb-img::after { right: auto; left: 0; background-position: left bottom; }
.pub-card:hover .pub-thumb-img { transform: scale(1.06); }
.pub-card:hover .pub-thumb-img::after { transform: scale(1.1) rotate(3deg); }
.pub-thumb-overlay {
  position: absolute; top: 16px; left: 16px;
  background: rgba(255,255,255,0.92); color: var(--teal-dark);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 2px;
  backdrop-filter: blur(10px); z-index: 2;
}
html[dir="rtl"] .pub-thumb-overlay { left: auto; right: 16px; font-size: 13px; letter-spacing: 0; text-transform: none; }
.pub-date { font-size: 13px; color: var(--gray); margin-bottom: 10px; }
.pub-card h3 {
  font-size: 20px; font-weight: 500; line-height: 1.3;
  color: var(--ink); margin-bottom: 14px;
  transition: color 0.3s var(--ease);
}
html[dir="rtl"] .pub-card h3 { font-size: 18px; line-height: 1.5; font-weight: 600; }
.pub-card:hover h3 { color: var(--teal); }
.pub-card p { font-size: 14px; color: var(--ink-3); line-height: 1.6; margin-bottom: 16px; }
.pub-link {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal);
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: auto; transition: gap 0.3s var(--ease);
}
html[dir="rtl"] .pub-link { font-size: 14px; letter-spacing: 0; text-transform: none; }
.pub-link::after {
  content: ''; width: 18px; height: 1px; background: var(--teal);
  transition: width 0.3s var(--ease);
}
.pub-card:hover .pub-link::after { width: 28px; }

/* ─── EVENTS ─── */
.events-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.event-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px; padding: 28px; cursor: pointer;
  transition: all 0.4s var(--ease);
  position: relative; overflow: hidden;
  opacity: 0; transform: translateY(30px);
}
.event-card.in { opacity: 1; transform: translateY(0); }
.event-card:nth-child(1) { transition-delay: 0.1s; }
.event-card:nth-child(2) { transition-delay: 0.25s; }
.event-card:nth-child(3) { transition-delay: 0.4s; }
.event-card:hover {
  background: rgba(255,255,255,0.1); border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.35);
}
.event-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  background-image: radial-gradient(circle at top right, rgba(201,165,92,0.12), transparent 70%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.event-card:hover::before { opacity: 1; }
.event-date-strip {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 20px; margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.event-day { font-size: 44px; font-weight: 300; line-height: 1; color: #fff; }
.event-monthyear { display: flex; flex-direction: column; gap: 2px; }
.event-month {
  font-size: 13px; color: var(--gold);
  letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
}
html[dir="rtl"] .event-month { font-size: 14px; letter-spacing: 0; text-transform: none; }
.event-year { font-size: 13px; color: rgba(255,255,255,0.6); }
.event-label {
  font-size: 11px; color: var(--gold);
  letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; margin-bottom: 10px;
}
html[dir="rtl"] .event-label { font-size: 13px; letter-spacing: 0; text-transform: none; }
.event-card h3 {
  font-size: 18px; font-weight: 500; line-height: 1.35;
  color: #fff; margin-bottom: 12px; min-height: 72px;
}
html[dir="rtl"] .event-card h3 { font-size: 17px; line-height: 1.55; font-weight: 600; }
.event-meta { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.55; }
.event-card .learn-more {
  margin-top: 20px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.3s var(--ease);
}
html[dir="rtl"] .event-card .learn-more { font-size: 14px; letter-spacing: 0; text-transform: none; }
.event-card:hover .learn-more { color: var(--gold); }

/* ─── COMMENTARY ─── */
.commentary-list { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px; }
.commentary-card {
  padding: 32px 36px; background: #fff;
  border: 1px solid var(--line); border-radius: 3px;
  cursor: pointer;
  opacity: 0; transform: translateX(-20px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.5s var(--ease),
    box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease),
    background 0.4s var(--ease);
  position: relative; overflow: hidden;
}
.commentary-card.in { opacity: 1; transform: translateX(0); }
.commentary-card:nth-child(even) { transform: translateX(20px); }
.commentary-card:nth-child(even).in { transform: translateX(0); }
.commentary-card:nth-child(1) { transition-delay: 0.1s; }
.commentary-card:nth-child(2) { transition-delay: 0.2s; }
.commentary-card:nth-child(3) { transition-delay: 0.3s; }
.commentary-card:nth-child(4) { transition-delay: 0.4s; }
.commentary-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0;
  width: 4px; background: var(--teal);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.4s var(--ease);
}
html[dir="rtl"] .commentary-card::before { left: auto; right: 0; }
.commentary-card:hover {
  border-color: transparent; background: #FAFCFC;
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -15px rgba(23,107,107,0.25), 0 4px 12px rgba(0,0,0,0.04);
}
.commentary-card:hover::before { transform: scaleY(1); }
.commentary-card h3 {
  font-size: 22px; font-weight: 500; line-height: 1.3;
  margin: 12px 0; color: var(--ink);
  transition: color 0.3s var(--ease);
}
html[dir="rtl"] .commentary-card h3 { font-size: 20px; line-height: 1.5; font-weight: 600; }
.commentary-card:hover h3 { color: var(--teal); }
.commentary-card p { font-size: 15px; color: var(--ink-3); line-height: 1.65; margin-bottom: 14px; }
html[dir="rtl"] .commentary-card p { line-height: 1.85; }
.commentary-card .pub-link { transition: gap 0.3s var(--ease), color 0.3s var(--ease); }
.commentary-card:hover .pub-link { gap: 14px; }

/* ─── PAGE HEADER (used by affiliation & contact) ─── */
.page-header {
  background: var(--teal); color: #fff;
  padding: 90px 0 80px; position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px; opacity: 0.4;
}
.page-header::after {
  content: ''; position: absolute;
  top: 50%; right: -200px; transform: translateY(-50%);
  width: 500px; height: 500px;
  border: 1px solid rgba(201,165,92,0.2); border-radius: 50%;
  animation: slowSpin 80s linear infinite;
}
html[dir="rtl"] .page-header::after { right: auto; left: -200px; }
.page-header .wrap { position: relative; z-index: 2; }
.page-header .eyebrow {
  font-size: 13px; font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.7s var(--ease) 0.1s forwards;
}
html[dir="rtl"] .page-header .eyebrow { font-size: 15px; letter-spacing: 0; text-transform: none; }
.page-header h1 {
  font-size: clamp(38px, 4.5vw, 60px); font-weight: 500;
  line-height: 1.15; letter-spacing: -0.02em;
  max-width: 920px; margin-bottom: 24px;
  opacity: 0; transform: translateY(14px);
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}
html[dir="rtl"] .page-header h1 { font-size: clamp(32px, 3.6vw, 46px); letter-spacing: 0; line-height: 1.4; font-weight: 600; }
.page-header p {
  font-size: 18px; color: rgba(255,255,255,0.8);
  max-width: 740px; line-height: 1.65;
  opacity: 0; transform: translateY(14px);
  animation: fadeUp 0.8s var(--ease) 0.35s forwards;
}
html[dir="rtl"] .page-header p { line-height: 1.85; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ─── AFFILIATION ─── */
.fellows-section { padding: 88px 0; background: #fff; }
.fellow-row {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  max-width: 920px;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.fellow-row.in { opacity: 1; transform: translateY(0); }
.fellow-row:nth-child(1) { transition-delay: 0.1s; }
.fellow-row:last-child { border-bottom: 1px solid var(--line); }
.fellow-info .fellow-title {
  font-size: 12px; font-weight: 600; color: var(--teal);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
}
html[dir="rtl"] .fellow-info .fellow-title { font-size: 14px; letter-spacing: 0; text-transform: none; }
.fellow-info h2 {
  font-size: 34px; font-weight: 500;
  margin-bottom: 22px; letter-spacing: -0.01em;
}
html[dir="rtl"] .fellow-info h2 { font-size: 30px; font-weight: 600; letter-spacing: 0; }
.bio-heading {
  font-size: 11px; font-weight: 600; color: var(--gray);
  letter-spacing: 0.15em; text-transform: uppercase;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
html[dir="rtl"] .bio-heading { font-size: 13px; letter-spacing: 0; text-transform: none; }
.fellow-info p.bio {
  font-size: 15px; color: var(--ink-2);
  line-height: 1.8; margin-bottom: 18px; max-width: 70ch;
}
html[dir="rtl"] .fellow-info p.bio { line-height: 2; }
.fellow-expertise {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-top: 24px;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.fellow-expertise .lbl {
  font-size: 12px; color: var(--gray);
  text-transform: uppercase; letter-spacing: 0.1em;
}
html[dir="rtl"] .fellow-expertise .lbl { font-size: 14px; letter-spacing: 0; text-transform: none; }
.fellow-expertise .tag {
  font-size: 13px; padding: 5px 14px;
  background: var(--bg-gray); color: var(--ink-2);
  border-radius: 2px; transition: all 0.3s var(--ease);
}
html[dir="rtl"] .fellow-expertise .tag { font-size: 14px; }
.fellow-expertise .tag:hover { background: var(--teal); color: #fff; }
.fellow-contact {
  margin-top: 20px; display: flex; gap: 24px;
  font-size: 14px; flex-wrap: wrap;
}
.fellow-contact a {
  color: var(--teal);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.fellow-contact a:hover { border-bottom-color: var(--teal); }

/* ─── CONTACT ─── */
.contact-section { padding: 88px 0; background: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }
.contact-info h2 {
  font-size: 24px; font-weight: 500;
  padding-bottom: 16px; border-bottom: 2px solid var(--teal);
  margin-bottom: 24px; display: inline-block;
}
html[dir="rtl"] .contact-info h2 { font-weight: 600; font-size: 22px; }
.info-item {
  padding: 22px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateX(-16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.info-item.in { opacity: 1; transform: translateX(0); }
.info-item:nth-child(2) { transition-delay: 0.05s; }
.info-item:nth-child(3) { transition-delay: 0.1s; }
.info-item:nth-child(4) { transition-delay: 0.15s; }
.info-item:nth-child(5) { transition-delay: 0.2s; }
.info-item:nth-child(6) { transition-delay: 0.25s; }
.info-item:nth-child(7) { transition-delay: 0.3s; }
.info-item .label {
  font-size: 11px; font-weight: 600; color: var(--gray);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px;
}
html[dir="rtl"] .info-item .label { font-size: 13px; letter-spacing: 0; text-transform: none; }
.info-item .value { font-size: 16px; color: var(--ink); }
.info-item .value a {
  color: var(--teal); border-bottom: 1px solid var(--line);
  transition: border-color 0.2s var(--ease);
}
.info-item .value a:hover { border-bottom-color: var(--teal); }

.contact-form {
  background: var(--bg-gray); padding: 44px;
  border-radius: 4px; border-top: 4px solid var(--teal);
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.8s var(--ease) 0.2s, transform 0.8s var(--ease) 0.2s;
}
.contact-form.in { opacity: 1; transform: translateY(0); }
.contact-form h2 { font-size: 24px; font-weight: 500; margin-bottom: 8px; }
html[dir="rtl"] .contact-form h2 { font-weight: 600; font-size: 22px; }
.contact-form .form-sub { font-size: 14px; color: var(--ink-3); margin-bottom: 28px; }
.form-row { margin-bottom: 20px; }
.form-row.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--ink-2); letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 8px;
}
html[dir="rtl"] .form-row label { font-size: 13px; letter-spacing: 0; text-transform: none; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 12px 14px;
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  outline: none; transition: all 0.3s var(--ease);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23,107,107,0.1);
}
.form-row textarea { min-height: 130px; resize: vertical; }

button.submit-btn {
  background: var(--teal); color: #fff; border: none;
  padding: 14px 34px; font-size: 13px; font-weight: 600;
  font-family: inherit; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; border-radius: 2px;
  transition: all 0.3s var(--ease);
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 6px; position: relative; overflow: hidden;
}
html[dir="rtl"] button.submit-btn { font-size: 15px; letter-spacing: 0; text-transform: none; }
button.submit-btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--teal-dark);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
html[dir="rtl"] button.submit-btn::before { transform-origin: left; }
button.submit-btn:hover::before { transform: scaleX(1); transform-origin: left; }
html[dir="rtl"] button.submit-btn:hover::before { transform-origin: right; }
button.submit-btn span, button.submit-btn svg { position: relative; z-index: 2; }
button.submit-btn svg { transition: transform 0.3s var(--ease); }
html[dir="rtl"] button.submit-btn svg { transform: rotate(180deg); }
button.submit-btn:hover svg { transform: translateX(4px); }
html[dir="rtl"] button.submit-btn:hover svg { transform: translateX(-4px) rotate(180deg); }

.form-feedback {
  margin-top: 20px; padding: 14px 16px;
  font-size: 14px; border-radius: 2px; display: none;
  animation: slideDown 0.4s var(--ease);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.form-feedback.show { display: block; }
.form-feedback.ok {
  background: var(--teal-light); color: var(--teal-dark);
  border-left: 3px solid var(--teal);
}
html[dir="rtl"] .form-feedback.ok { border-left: none; border-right: 3px solid var(--teal); }
.form-feedback.err {
  background: #FBE9E7; color: #842029;
  border-left: 3px solid #C43A1C;
}
html[dir="rtl"] .form-feedback.err { border-left: none; border-right: 3px solid #C43A1C; }

/* ─── FOOTER ─── */
footer {
  background: var(--footer-bg); color: #fff;
  padding: 72px 0 28px;
  position: relative; overflow: hidden;
}
footer::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,165,92,0.3), transparent);
}
footer::after {
  content: ''; position: absolute;
  bottom: -50px; right: -50px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(201,165,92,0.08), transparent 70%);
  pointer-events: none;
}
footer .wrap {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  position: relative;
}
footer .foot-brand img { height: 54px; filter: brightness(0) invert(1); margin-bottom: 22px; }
footer .foot-brand p {
  font-size: 14px; color: rgba(255,255,255,0.75);
  line-height: 1.7; max-width: 34ch;
}
footer h4 {
  font-size: 12px; font-weight: 600; color: var(--gold);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 20px;
}
html[dir="rtl"] footer h4 { font-size: 14px; letter-spacing: 0; text-transform: none; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
footer a {
  font-size: 14px; color: rgba(255,255,255,0.85);
  transition: all 0.3s var(--ease); cursor: pointer;
  display: inline-block;
}
footer a:hover { color: var(--gold); transform: translateX(4px); }
html[dir="rtl"] footer a:hover { transform: translateX(-4px); }
.foot-bottom {
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; font-size: 13px; color: rgba(255,255,255,0.55);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) { .hero-circle { width: 340px; height: 340px; } }
@media (max-width: 1024px) {
  .wrap, nav.primary .wrap { padding-inline: 32px; }
  .hero-inner .wrap { grid-template-columns: 1fr; }
  .hero-circle { display: none; }
  .pub-grid { grid-template-columns: 1fr 1fr; }
  .events-wrap { grid-template-columns: 1fr 1fr; }
  .events-wrap > :nth-child(3) { display: none; }
  .fellow-row { gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
  .commentary-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap, nav.primary .wrap { padding-inline: 20px; }
  nav.primary .wrap { flex-wrap: wrap; padding-block: 14px; gap: 16px; }
  .nav-links { order: 3; width: 100%; gap: 20px; justify-content: flex-start; padding-top: 10px; border-top: 1px solid var(--line); }
  .utility-bar .right .text { display: none; }
  .brand img { height: 44px; }
  .hero-inner { padding: 60px 0; }
  .slide h2 { font-size: 28px; }
  html[dir="rtl"] .slide h2 { font-size: 26px; }
  .pub-grid { grid-template-columns: 1fr; gap: 36px; }
  .events-wrap { grid-template-columns: 1fr; }
  .events-wrap > :nth-child(3) { display: block; }
  section.block-light, section.block-teal { padding: 56px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .section-head h2 { font-size: 30px; }
  .contact-form { padding: 28px 24px; }
  .form-row.split { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr; gap: 32px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
  .page-header { padding: 60px 0 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ════════════════════════════════════════════════════════════
   ADDITIONS — Recent Projects, Partners, News, TBA, Coming Soon,
   Affiliation tabs, Projects detail page
   ════════════════════════════════════════════════════════════ */

/* ─── HERO: COMING SOON pill (replaces slide-btn for placeholder slides) ─── */
.coming-soon {
  display: inline-block;
  padding: 9px 22px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 24px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(4px);
}
html[dir="rtl"] .coming-soon { font-size: 14px; letter-spacing: 0; text-transform: none; }

/* ─── SECTION HEAD — centered variant for partners ─── */
.section-head.center-head {
  flex-direction: column;
  align-items: center; text-align: center;
  gap: 12px;
}

/* ─── RECENT PROJECTS GRID (home page) ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  margin-top: 8px;
}
.project-card {
  display: flex; flex-direction: column;
  cursor: pointer;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.project-card.in { opacity: 1; transform: translateY(0); }
.project-card:nth-child(1) { transition-delay: 0.1s; }
.project-card:nth-child(2) { transition-delay: 0.25s; }
.project-card:nth-child(3) { transition-delay: 0.4s; }
.project-imgs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin-bottom: 22px;
  border-radius: 2px; overflow: hidden;
  background: var(--teal);
}
.project-img {
  position: relative; aspect-ratio: 4 / 3;
  overflow: hidden; background: var(--teal-light);
}
.project-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.project-card:hover .project-img img { transform: scale(1.06); }
.project-cat {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}
html[dir="rtl"] .project-cat { font-size: 13px; letter-spacing: 0; text-transform: none; }
.project-card h3 {
  font-size: 20px; font-weight: 500; line-height: 1.3;
  color: var(--ink); margin-bottom: 14px;
  transition: color 0.3s var(--ease);
}
html[dir="rtl"] .project-card h3 { font-size: 18px; line-height: 1.5; font-weight: 600; }
.project-card:hover h3 { color: var(--teal); }
.project-card p {
  font-size: 14px; color: var(--ink-3); line-height: 1.65;
  margin-bottom: 16px;
}
html[dir="rtl"] .project-card p { line-height: 1.85; }

/* ─── PARTNERS SECTION (In Collaboration With) ─── */
.partners-section { padding: 64px 0 88px; }
.partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 56px;
  max-width: 1080px;
  margin: 28px auto 0;
}
.partner {
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  flex: 0 1 220px;
  max-width: 240px;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.4s var(--ease);
}
.partner.in { opacity: 1; transform: translateY(0); }
.partner:nth-child(1) { transition-delay: 0.05s; }
.partner:nth-child(2) { transition-delay: 0.15s; }
.partner:nth-child(3) { transition-delay: 0.25s; }
.partner:nth-child(4) { transition-delay: 0.35s; }
.partner img {
  max-width: 100%; max-height: 130px;
  width: auto; height: auto;
  transition: transform 0.4s var(--ease);
}
.partner:hover img { transform: scale(1.04); }
.partner .grc-logo { max-height: 140px; }

/* ─── IN THE NEWS — banner-style strip ─── */
.news-section { padding-bottom: 64px; }
.news-controls { display: flex; gap: 8px; }
.news-nav {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 50%; cursor: pointer;
  transition: all 0.3s var(--ease);
}
.news-nav:hover {
  border-color: var(--teal); color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(23, 107, 107, 0.12);
}
html[dir="rtl"] .news-nav svg { transform: rotate(180deg); }
.news-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 12px;
}
.news-item {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  padding: 22px 26px;
  border-radius: 2px;
  transition: all 0.35s var(--ease);
  opacity: 0; transform: translateY(16px);
}
html[dir="rtl"] .news-item { border-left: 1px solid var(--line); border-right: 3px solid var(--teal); }
.news-item.in { opacity: 1; transform: translateY(0); }
.news-item:hover {
  border-color: var(--teal);
  border-left-color: var(--gold);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}
html[dir="rtl"] .news-item:hover { border-right-color: var(--gold); }
.news-meta {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray);
}
html[dir="rtl"] .news-meta { font-size: 13px; letter-spacing: 0; text-transform: none; }
.news-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--teal-light); color: var(--teal-dark);
  border-radius: 2px;
  font-weight: 600; font-size: 10px; letter-spacing: 0.1em;
}
html[dir="rtl"] .news-tag { font-size: 12px; letter-spacing: 0; }
.news-source { font-weight: 600; color: var(--ink-2); }
.news-date { color: var(--gray); }
.news-title {
  font-size: 17px; font-weight: 500; line-height: 1.4;
  color: var(--ink); margin-bottom: 8px;
}
html[dir="rtl"] .news-title { font-size: 17px; line-height: 1.55; font-weight: 600; }
.news-summary {
  font-size: 14px; color: var(--ink-3); line-height: 1.65;
  margin-bottom: 14px;
}
html[dir="rtl"] .news-summary { line-height: 1.85; }
.news-external {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal);
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: auto;
  transition: gap 0.3s var(--ease);
}
html[dir="rtl"] .news-external { font-size: 13px; letter-spacing: 0; text-transform: none; }
.news-external::after {
  content: ''; width: 16px; height: 1px; background: var(--teal);
  transition: width 0.3s var(--ease);
}
.news-item:hover .news-external::after { width: 24px; }

/* ─── EVENTS — TBA badge variant ─── */
.event-date-strip.event-tba {
  justify-content: flex-start;
}
.tba-badge {
  display: inline-flex; align-items: center;
  padding: 10px 18px;
  background: rgba(201, 165, 92, 0.12);
  border: 1px solid rgba(201, 165, 92, 0.45);
  color: var(--gold);
  border-radius: 22px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
html[dir="rtl"] .tba-badge { font-size: 14px; letter-spacing: 0; text-transform: none; }

/* ─── AFFILIATION — tabs ─── */
.affil-tabs {
  display: inline-flex; gap: 8px;
  padding: 6px;
  background: var(--bg-gray);
  border-radius: 28px;
  margin-bottom: 32px;
}
.affil-tab {
  font-family: inherit;
  padding: 10px 22px;
  border: none; background: transparent;
  color: var(--ink-2);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 22px; cursor: pointer;
  transition: all 0.3s var(--ease);
}
html[dir="rtl"] .affil-tab { font-size: 14px; letter-spacing: 0; text-transform: none; }
.affil-tab:hover { color: var(--teal); }
.affil-tab.active {
  background: var(--teal); color: #fff;
}
.affil-pane { display: none; }
.affil-pane.active { display: block; }

/* ─── AFFILIATION — placeholder fellow row ─── */
.placeholder-row { opacity: 0.85; }
.bio-placeholder {
  font-style: italic;
  color: var(--gray) !important;
  padding: 18px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

/* ════════════════════════════════════════════════════════════
   PROJECTS DETAIL PAGE (projects.html)
   ════════════════════════════════════════════════════════════ */
.project-detail-section { padding: 72px 0 96px; background: #fff; }
.project-block {
  max-width: 1080px;
  margin: 0 auto 96px;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  scroll-margin-top: 120px;
}
.project-block.in { opacity: 1; transform: translateY(0); }
.project-block:last-of-type { border-bottom: none; margin-bottom: 32px; }
.project-head { margin-bottom: 32px; }
.project-eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
html[dir="rtl"] .project-eyebrow { font-size: 13px; letter-spacing: 0; text-transform: none; }
.project-head h2 {
  font-size: 38px; font-weight: 500;
  line-height: 1.2; letter-spacing: -0.015em;
  color: var(--ink); margin-bottom: 12px;
}
html[dir="rtl"] .project-head h2 { font-size: 34px; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.project-subtitle {
  font-size: 16px; color: var(--ink-3);
  line-height: 1.6;
}
html[dir="rtl"] .project-subtitle { font-size: 16px; line-height: 1.8; }

.project-gallery {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 40px;
  flex-wrap: wrap;
}
.project-gallery figure {
  margin: 0;
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-gray);
  display: flex; flex-direction: column;
}
.project-gallery figure img {
  display: block;
  height: 180px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.6s var(--ease);
}
.project-gallery figure:hover img { transform: scale(1.03); }
.project-gallery figcaption {
  font-size: 12px; color: var(--ink-3);
  padding: 12px 16px;
  background: var(--bg-gray);
  letter-spacing: 0.04em;
}
html[dir="rtl"] .project-gallery figcaption { font-size: 13px; letter-spacing: 0; }

.project-text {
  margin-bottom: 44px;
  max-width: 78ch;
}
.project-text p {
  font-size: 16px; color: var(--ink-2);
  line-height: 1.85;
  margin-bottom: 18px;
}
html[dir="rtl"] .project-text p { line-height: 2.05; }
.project-text p:last-child { margin-bottom: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.stat-card {
  padding: 22px 20px;
  background: var(--bg-gray);
  border-left: 3px solid var(--teal);
  border-radius: 2px;
  transition: all 0.35s var(--ease);
}
html[dir="rtl"] .stat-card { border-left: none; border-right: 3px solid var(--teal); }
.stat-card:hover {
  background: var(--teal-light);
  border-left-color: var(--gold);
  transform: translateY(-3px);
}
html[dir="rtl"] .stat-card:hover { border-right-color: var(--gold); }
.stat-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 8px;
}
html[dir="rtl"] .stat-label { font-size: 13px; letter-spacing: 0; text-transform: none; }
.stat-value {
  font-size: 22px; font-weight: 500;
  color: var(--teal-darker); line-height: 1.25;
  letter-spacing: -0.01em;
}
html[dir="rtl"] .stat-value { font-size: 20px; font-weight: 600; letter-spacing: 0; }

.project-closing {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 0 0;
  text-align: center;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.project-closing.in { opacity: 1; transform: translateY(0); }
.project-closing p {
  font-size: 17px; color: var(--ink-2);
  line-height: 1.75;
  max-width: 70ch;
  margin: 0 auto 32px;
}
html[dir="rtl"] .project-closing p { font-size: 17px; line-height: 1.95; }
.project-cta {
  background: var(--teal); color: #fff;
}
.project-cta:hover {
  background: var(--gold); color: var(--teal-darker);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — additions
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .news-strip { grid-template-columns: 1fr; }
  .partners-grid { gap: 40px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .project-gallery { gap: 14px; }
  .project-gallery figure img { height: 150px; }
  .project-head h2 { font-size: 32px; }
  html[dir="rtl"] .project-head h2 { font-size: 28px; }
}
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; gap: 36px; }
  .partners-grid { gap: 32px; }
  .partner img { max-height: 90px; }
  .partner .grc-logo { max-height: 100px; }
  .news-strip { gap: 18px; }
  .news-item { padding: 18px 20px; }
  .news-title { font-size: 16px; }
  .project-block { margin-bottom: 64px; padding-bottom: 56px; }
  .project-head h2 { font-size: 26px; }
  html[dir="rtl"] .project-head h2 { font-size: 24px; }
  .project-gallery { gap: 12px; }
  .project-gallery figure img { height: 130px; }
  .project-text p { font-size: 15px; }
  .stat-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-value { font-size: 20px; }
  .project-closing p { font-size: 15px; }
  .affil-tabs { width: 100%; justify-content: center; }
  .affil-tab { flex: 1; padding: 10px 12px; font-size: 12px; }
  html[dir="rtl"] .affil-tab { font-size: 13px; }
}

/* ════════════════════════════════════════════════════════════
   PUBLICATIONS PAGE + LIGHTBOX  (publications.html)
   ════════════════════════════════════════════════════════════ */

.publications-section { padding: 72px 0 96px; background: #fff; }

.publication-block {
  max-width: 1080px;
  margin: 0 auto 80px;
  padding: 40px 44px 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 4px;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  scroll-margin-top: 120px;
}
.publication-block.in { opacity: 1; transform: translateY(0); }
.publication-block:last-of-type { margin-bottom: 32px; }

.pub-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.pub-type-badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--teal-light);
  color: var(--teal-dark);
  border-radius: 2px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
html[dir="rtl"] .pub-type-badge { font-size: 13px; letter-spacing: 0; text-transform: none; }
.pub-date-line {
  font-size: 13px; color: var(--gray);
  letter-spacing: 0.04em;
}

.publication-title {
  font-size: 32px; font-weight: 500;
  line-height: 1.2; letter-spacing: -0.015em;
  color: var(--ink); margin-bottom: 8px;
}
html[dir="rtl"] .publication-title { font-size: 28px; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.publication-byline {
  font-size: 15px; color: var(--ink-3);
  margin-bottom: 32px; line-height: 1.6;
}
html[dir="rtl"] .publication-byline { line-height: 1.85; }

.publication-lead {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  margin-bottom: 40px;
  align-items: start;
}
.publication-cover {
  display: block; cursor: pointer;
  position: relative; overflow: hidden;
  background: var(--bg-gray);
  border-radius: 2px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.publication-cover:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}
.publication-cover img {
  display: block;
  width: 100%; height: auto;
  transition: transform 0.5s var(--ease);
}
.publication-cover:hover img { transform: scale(1.03); }
.cover-zoom-hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: #fff; text-align: center;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
html[dir="rtl"] .cover-zoom-hint { font-size: 13px; letter-spacing: 0; text-transform: none; }
.publication-cover:hover .cover-zoom-hint { opacity: 1; }

.publication-abstract p {
  font-size: 16px; color: var(--ink-2);
  line-height: 1.85; margin-bottom: 22px;
}
html[dir="rtl"] .publication-abstract p { line-height: 2.05; }
.publication-topics {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.topic-tag {
  padding: 5px 12px;
  background: var(--bg-gray);
  color: var(--ink-2);
  border-radius: 2px;
  font-size: 12px;
  transition: all 0.3s var(--ease);
}
html[dir="rtl"] .topic-tag { font-size: 13px; }
.topic-tag:hover {
  background: var(--teal); color: #fff;
}

.publication-snapshots { margin-bottom: 36px; }
.snapshots-heading {
  font-size: 11px; font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.15em; text-transform: uppercase;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
html[dir="rtl"] .snapshots-heading { font-size: 13px; letter-spacing: 0; text-transform: none; }
.snapshots-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.snapshot {
  position: relative; display: block; cursor: pointer;
  background: var(--bg-gray);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  transition: all 0.35s var(--ease);
}
.snapshot img {
  display: block;
  width: 100%; height: auto;
  aspect-ratio: 8.5 / 11;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.snapshot:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 22px -6px rgba(23, 107, 107, 0.25);
  transform: translateY(-3px);
}
.snapshot:hover img { transform: scale(1.04); }
.snapshot-num {
  position: absolute; top: 8px; left: 8px;
  width: 22px; height: 22px;
  background: rgba(15, 82, 82, 0.92);
  color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  backdrop-filter: blur(4px);
}
html[dir="rtl"] .snapshot-num { left: auto; right: 8px; }

.publication-citation {
  background: var(--bg-gray);
  padding: 22px 24px;
  border-radius: 2px;
  margin-bottom: 28px;
}
.citation-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.citation-label {
  font-size: 11px; font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.14em; text-transform: uppercase;
}
html[dir="rtl"] .citation-label { font-size: 13px; letter-spacing: 0; text-transform: none; }
.citation-copy {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
html[dir="rtl"] .citation-copy { font-size: 14px; letter-spacing: 0; }
.citation-copy:hover {
  background: var(--teal); color: #fff;
  border-color: var(--teal);
}
.citation-copy.copied {
  background: var(--teal); color: #fff;
  border-color: var(--teal);
}
.citation-text {
  font-size: 15px; color: var(--ink);
  line-height: 1.75;
  font-family: Georgia, 'Times New Roman', serif;
}
html[dir="rtl"] .citation-text { font-family: var(--font-ar); line-height: 1.95; }
.citation-text em { font-style: italic; }

.publication-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.publication-action {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  background: var(--teal); color: #fff;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
html[dir="rtl"] .publication-action { font-size: 15px; letter-spacing: 0; text-transform: none; }
.publication-action:hover {
  background: var(--gold); color: var(--teal-darker);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(201, 165, 92, 0.3);
}
html[dir="rtl"] .publication-action svg { transform: rotate(0); }

.publication-copublish {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
}
.copublish-label {
  font-size: 11px; font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.14em; text-transform: uppercase;
}
html[dir="rtl"] .copublish-label { font-size: 13px; letter-spacing: 0; text-transform: none; }
.copublish-logos {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.copublish-logos a {
  display: inline-flex; align-items: center;
  height: 36px;
  transition: transform 0.3s var(--ease);
}
.copublish-logos a:hover { transform: translateY(-2px); }
.copublish-logos img {
  max-height: 36px; max-width: 110px;
  width: auto; height: auto;
}

/* ─── LIGHTBOX ─── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(8, 32, 32, 0.95);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 60px 80px;
  animation: fadeIn 0.25s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  max-width: 100%; max-height: 100%;
}
.lightbox-img {
  display: block;
  max-width: 100%; max-height: calc(100vh - 120px);
  width: auto; height: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  background: #fff;
  animation: zoomIn 0.3s var(--ease);
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-counter {
  position: absolute;
  bottom: -40px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s var(--ease);
  backdrop-filter: blur(8px);
}
html[dir="rtl"] .lightbox-close { right: auto; left: 24px; }
.lightbox-close:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--teal-darker);
  transform: rotate(90deg);
}

.lightbox-nav {
  width: 56px; height: 56px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s var(--ease);
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.lightbox-nav:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--teal-darker);
}
.lightbox-prev { margin-right: 24px; }
.lightbox-next { margin-left: 24px; }
html[dir="rtl"] .lightbox-prev svg,
html[dir="rtl"] .lightbox-next svg { transform: rotate(180deg); }

/* ════════════════════════════════════════════════════════════
   PARTNERS GRID, flex layout centers any logo count
   ════════════════════════════════════════════════════════════ */
.partner:nth-child(5) { transition-delay: 0.45s; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE, publications
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .publication-block { padding: 32px 28px; }
  .publication-lead { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
  .snapshots-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .publication-title { font-size: 28px; }
  html[dir="rtl"] .publication-title { font-size: 24px; }
  .lightbox { padding: 40px 60px; }
}
@media (max-width: 640px) {
  .partners-grid { gap: 28px; }
  .publication-block { padding: 24px 20px; margin-bottom: 56px; }
  .publication-lead { grid-template-columns: 1fr; gap: 20px; }
  .publication-cover { max-width: 220px; margin: 0 auto; }
  .publication-title { font-size: 22px; }
  html[dir="rtl"] .publication-title { font-size: 20px; }
  .snapshots-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .citation-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .publication-footer { flex-direction: column; align-items: flex-start; gap: 18px; }
  .copublish-logos img { max-height: 30px; }
  .lightbox { padding: 16px; }
  .lightbox-prev { margin-right: 8px; }
  .lightbox-next { margin-left: 8px; }
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; }
  html[dir="rtl"] .lightbox-close { left: 12px; right: auto; }
}

/* ════════════════════════════════════════════════════════════
   HOME RECENT PUBLICATIONS, published-paper card variant
   ════════════════════════════════════════════════════════════ */
.pub-card-link { display: flex; flex-direction: column; cursor: pointer; }
.pub-thumb-cover {
  width: 100%; aspect-ratio: 16/10;
  margin-bottom: 22px;
  position: relative; overflow: hidden;
  border-radius: 2px;
  background: var(--teal-darker);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
}
.pub-thumb-cover img {
  max-height: 100%; max-width: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.6s var(--ease);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.pub-card-link:hover .pub-thumb-cover img { transform: scale(1.04); }
