/* ===== Float Animation ===== */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}
.floating-icon { animation: float 3s ease-in-out infinite; }
.float-slow { animation-duration: 5s; }

/* ===== Root Variables & Base ===== */
:root{
  --gold:#003f6c;
  --accent:#1a6bb5;
  --accent-warm:#f59e0b;
  --accent-warm-2:#f97316;
  --muted:#6b7280;
  --bg-ink: #ffffff;
}
html,body{height:100%;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;margin:0;direction:ltr;overflow-x:hidden
}
.smooth-scroll{scroll-behavior:smooth}
body{
  color:#ffffff;
  -webkit-font-smoothing:antialiased;
    background:
    radial-gradient(
      900px 480px at 8% 0%,
      rgba(26,107,181,.18),
      transparent 60%
    ),
    radial-gradient(
      760px 420px at 92% 4%,
      rgba(139,92,246,.13),
      transparent 58%
    ),
    linear-gradient(
      180deg,
      #003f6c 0%,
      #002a4a 100%
    );
}
/* ===== Scrollbar — matches Journal page ===== */

html{
  scrollbar-width:thin;
  scrollbar-color:#1a6bb5 #002a4a;
}

::-webkit-scrollbar{
  width:10px;
}

::-webkit-scrollbar-track{
  background:#002a4a;
}

::-webkit-scrollbar-thumb{
  background:linear-gradient(
    180deg,
    #1a6bb5,
    #003f6c
  );
  border-radius:10px;
  border:2px solid #002a4a;
}

::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(
    180deg,
    #4a9ad4,
    #1a6bb5
  );
}

/* HERO / CANVAS */
.card-glass{
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  backdrop-filter: blur(6px);
}
.hero-overlay{background: linear-gradient(180deg, rgba(0,63,108,0.2), rgba(0,42,74,0.55));}

@keyframes floatUpDown {0%{transform:translateY(0) rotate(0);}50%{transform:translateY(-14px) rotate(4deg);}100%{transform:translateY(0) rotate(0);}}
.float-slow{animation:floatUpDown 7.2s ease-in-out infinite}
.float-med{animation:floatUpDown 5.2s ease-in-out infinite}
.float-fast{animation:floatUpDown 4.2s ease-in-out infinite}

/* buttons (shine sweep on hover — kept as the site's one "live" button effect) */
.btn-3d{position:relative;overflow:hidden;transform-style:preserve-3d;transition:transform .18s ease}
.btn-3d:active{transform:translateY(1px) scale(.995)}
.btn-shine::before{
  content:'';position:absolute;top:-140%;left:-40%;width:70%;height:280%;
  background:linear-gradient(120deg,transparent,rgba(255,255,255,0.6),transparent);
  transform:skewX(-22deg);transition:all .6s;pointer-events:none;mix-blend-mode:overlay;
}
.btn-shine:hover::before{left:140%}

/* ===== Primary CTA — warm accent, used for the real calls-to-action ===== */
.btn-primary{
  background: linear-gradient(90deg, var(--accent-warm), var(--accent-warm-2));
  color:#1a1206;
  font-weight:700;
}
.btn-primary:hover{ filter:brightness(1.08); }

/* card hover */
.project-card{transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s;transform-style:preserve-3d}
.project-card:hover{transform:translateY(-10px) rotateX(3deg) scale(1.03);box-shadow:0 38px 80px rgba(0,63,108,0.15)}

/* gallery */
.research-img{height:160px;object-fit:cover;width:100%;display:block;border-radius:.75rem}

/* intro cinematic */
.intro-wrap{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:80;background:radial-gradient(circle at 30% 30%, rgba(0,63,108,0.95), rgba(0,40,80,0.99));backdrop-filter:blur(3px)}
.intro-text{font-size:clamp(20px,3vw,46px);font-weight:800;color:#ffffff;letter-spacing:0.6px;text-align:center}
.intro-sub{color:#b8d4ea;margin-top:10px;font-weight:500}

/* parallax helper */
.parallax{position:relative;transform-style:preserve-3d}

/* sticky subtle header */
header{backdrop-filter: blur(6px);background:linear-gradient(180deg, rgba(0,63,108,0.85), rgba(0,42,74,0.75));border-bottom:1px solid rgba(255,255,255,0.08)}

/* accessibility focus */
a:focus, button:focus, input:focus {outline: 3px solid rgba(0,63,108,0.18);outline-offset:3px}

/* responsive tweaks */
@media (max-width:880px){ .research-img{height:120px} }

/* ===== Calmer heading system (replaces the old gradient+glow+pulse+scale stack) ===== */
.section-title{
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  position: relative;
  display:inline-block;
}
.section-title::after{
  content:'';
  display:block;
  width: 46px; height:3px;
  margin-top:10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  border-radius:2px;
}
.section-title.centered{ text-align:center; }
.section-title.centered::after{ margin-left:auto; margin-right:auto; }

.card-heading{
  font-size:1.15rem;
  font-weight:700;
  color:#ffffff;
}

/* One signature glow effect, reserved for the hero headline only */
.hero-heading{
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight:800;
  line-height:1.15;
  background: linear-gradient(90deg, #ffffff, #cfe8ff);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  position:relative;
  display:inline-block;
}
.hero-heading::before{
  content:'';
  position:absolute; inset:-16px -24px;
  background: radial-gradient(circle, rgba(74,154,212,0.35), transparent 70%);
  filter: blur(24px);
  z-index:-1;
}

/* stats */
.stat-number{ font-size:1.75rem; font-weight:800; color:#ffffff; }
.stat-label{ font-size:0.72rem; letter-spacing:0.08em; text-transform:uppercase; color:#9db8d1; }

/* ===== Field category cards (replaces the 16-icon grid) ===== */
.field-card{
  background: rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  padding: 1.75rem;
  text-align:left;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
}
.field-card:hover{
  transform: translateY(-6px);
  border-color: rgba(74,154,212,0.4);
  box-shadow: 0 24px 50px rgba(0,0,0,0.25);
}
.field-card .field-icon{
  width:46px; height:46px;
  border-radius:.75rem;
  display:flex; align-items:center; justify-content:center;
  font-size:1.25rem;
  margin-bottom:1rem;
}
.field-chip{
  display:inline-flex;
  align-items:center;
  padding: 4px 11px;
  border-radius:999px;
  background: rgba(255,255,255,0.06);
  color:#d7e6f2;
  font-size:0.75rem;
  margin:4px 6px 0 0;
  border:1px solid rgba(255,255,255,0.06);
}

/* ===== Mobile performance helpers ===== */
@media (max-width: 1023px){
  .desktop-only-visual{ display:none !important; }
}
@media (min-width: 1024px){
  .mobile-only-fallback{ display:none !important; }
}

/* ===== Gradient Text + Shine + Glow (kept for optional reuse) ===== */
.gradient-text {
  background: linear-gradient(90deg, #003f6c, #1a6bb5, #003f6c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
  overflow: hidden;
}
.gradient-text::after {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
  animation: shine 3s infinite;
}
@keyframes shine { 0% { left: -75%; } 100% { left: 125%; } }

/* ===== Card Glass Effects ===== */
.card-glass::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, rgba(0,63,108,0.15), transparent, rgba(0,63,108,0.15), transparent);
  animation: rotateBorder 6s linear infinite;
  z-index: 0;
}
.card-glass::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: rgba(0, 63, 108, 0.6);
  border-radius: inherit;
  z-index: 1;
}
@keyframes rotateBorder { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.card-glass {
  position: relative;
  z-index: 0;
  border: 2px solid transparent;
  background: linear-gradient(#003f6c, #002a4a) padding-box,
              linear-gradient(270deg, #ffffff, #1a6bb5, #ffffff) border-box;
  background-size: 200% 200%;
  animation: borderMove 10s linear infinite;
  border-radius: 8px;
}
@keyframes borderMove {
  0% { background-position: 0% 50%, 0% 50%; }
  100% { background-position: 200% 50%, 200% 50%; }
}
.card-glass > * { position: relative; z-index: 2; }

/* ===== Falling Particles ===== */
@keyframes fall {
  0% { transform: translateY(-10px) scale(1); opacity: 0.8; }
  100% { transform: translateY(150px) scale(0.5); opacity: 0; }
}
.particle {
  position: absolute;
  width: 5px; height: 5px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: fall 4s linear infinite;
}
.particle:nth-child(1) { left: 25%; animation-delay: 0s; }
.particle:nth-child(2) { left: 55%; animation-delay: 1s; }
.particle:nth-child(3) { left: 75%; animation-delay: 2s; }
.particle:nth-child(4) { left: 25%; animation-delay: 0.5s; }
.particle:nth-child(5) { left: 55%; animation-delay: 1.5s; }
.particle:nth-child(6) { left: 75%; animation-delay: 2.5s; }

/* ===== Animated Border (Form Inputs) ===== */
.animated-border {
  position: relative;
  z-index: 0;
  border: 2px solid transparent;
  background: linear-gradient(#003f6c, #003f6c) padding-box,
              linear-gradient(270deg, #ffffff, #1a6bb5, #ffffff) border-box;
  background-size: 200% 200%;
  animation: borderMove 3s linear infinite;
  border-radius: 8px;
}

/* ===== Card Glass (Support Section) ===== */
.card-glass {
  background: rgba(0, 63, 108, 0.85);
  backdrop-filter: blur(14px);
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card-glass:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 20px rgba(0, 63, 108, 0.15);
}

/* ===== Join Button (Glitch Effect — kept as a single fun easter-egg CTA) ===== */
.join-btn, .join-btn::after {
  padding: 10px 50px;
  font-size: 20px;
  border: none;
  border-radius: 5px;
  color: #ffffff;
  background-color: transparent;
  position: relative;
  cursor: pointer;
}
.join-btn::after {
  --move1: inset(50% 50% 50% 50%);
  --move2: inset(31% 0 40% 0);
  --move3: inset(39% 0 15% 0);
  --move4: inset(45% 0 40% 0);
  --move5: inset(45% 0 6% 0);
  --move6: inset(14% 0 61% 0);
  clip-path: var(--move1);
  content: 'JOIN NETWORK';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: block;
}
.join-btn:hover::after {
  animation: glitch_4011 1s;
  animation-timing-function: steps(2, end);
  text-shadow: -3px -3px 0px #1a6bb5, 3px 3px 0px #ffffff;
  background-color: transparent;
  border: 3px solid #1a6bb5;
}
.join-btn:hover {
  text-shadow: -1px -1px 0px #1a6bb5, 1px 1px 0px #ffffff;
  background-color: transparent;
  border: 1px solid #1a6bb5;
  box-shadow: 0px 10px 10px -10px #1a6bb5;
}
@keyframes glitch_4011 {
  0% { clip-path: var(--move1); transform: translate(0px,-10px); }
  10% { clip-path: var(--move2); transform: translate(-10px,10px); }
  20% { clip-path: var(--move3); transform: translate(10px,0px); }
  30% { clip-path: var(--move4); transform: translate(-10px,10px); }
  40% { clip-path: var(--move5); transform: translate(10px,-10px); }
  50% { clip-path: var(--move6); transform: translate(-10px,10px); }
  60% { clip-path: var(--move1); transform: translate(10px,-10px); }
  70% { clip-path: var(--move3); transform: translate(-10px,10px); }
  80% { clip-path: var(--move2); transform: translate(10px,-10px); }
  90% { clip-path: var(--move4); transform: translate(-10px,10px); }
  100% { clip-path: var(--move1); transform: translate(0); }
}

/* =========================================================
   NAVBAR + MOBILE MENU
   ========================================================= */
/* ===== NAV ===== */
.nav-link{
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #cbd5e1;
  padding-bottom: 4px;
  transition: color .3s ease;
}
.nav-link::after{
  content:'';
  position:absolute;
  left:0; bottom:0;
  width:0%; height:2px;
  background: linear-gradient(90deg,#1a6bb5,#4a9ad4);
  border-radius:2px;
  transition: width .35s cubic-bezier(.2,.8,.2,1);
}
.nav-link:hover{ color:#ffffff; text-shadow: 0 0 12px rgba(74,154,212,0.5); }
.nav-link:hover::after{ width:100%; }

.logo-wrap{
  display:inline-block;
  padding:2px;
  border-radius:.5rem;
  background: linear-gradient(135deg,#1a6bb5,#003f6c);
  transition: box-shadow .3s ease, transform .3s ease;
}
.logo-wrap:hover{ box-shadow: 0 0 18px rgba(26,107,181,0.55); transform: scale(1.05); }

.hamburger{ width:24px; height:18px; position:relative; display:flex; flex-direction:column; justify-content:space-between; }
.hamburger span{ display:block; height:2px; width:100%; background:#e2e8f0; border-radius:2px; transition: transform .35s ease, opacity .35s ease; }
.hamburger.open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2){ opacity:0; }
.hamburger.open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* ===== MOBILE MENU ===== */
#mobileMenu{
  position:fixed; top:0; right:0; height:100vh;
  width:78%; max-width:320px;
  background: linear-gradient(180deg, rgba(0,63,108,0.98), rgba(0,30,54,0.98));
  backdrop-filter: blur(12px);
  border-left:1px solid rgba(255,255,255,0.1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
  z-index:100;
  display:flex; flex-direction:column;
  padding-top: 90px;
}
#mobileMenu.open{ transform: translateX(0); }

.mobile-close-btn{
  position:absolute; top:22px; right:22px;
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  background: rgba(255,255,255,0.06);
  color:#e2e8f0;
  border:1px solid rgba(255,255,255,0.12);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.mobile-close-btn:hover{ background: rgba(255,255,255,0.14); color:#ffffff; transform: rotate(90deg); }

#mobileMenu a{
  opacity:0;
  transform: translateX(20px);
  transition: opacity .4s ease, transform .4s ease, color .25s ease, background .25s ease;
  padding: 14px 28px;
  color:#e2e8f0;
  font-weight:600;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
#mobileMenu.open a{ opacity:1; transform: translateX(0); }
#mobileMenu.open a:nth-child(2){ transition-delay:.08s; }
#mobileMenu.open a:nth-child(3){ transition-delay:.14s; }
#mobileMenu.open a:nth-child(4){ transition-delay:.20s; }
#mobileMenu.open a:nth-child(5){ transition-delay:.26s; }
#mobileMenu.open a:nth-child(6){ transition-delay:.32s; }
#mobileMenu.open a:nth-child(7){ transition-delay:.38s; }
#mobileMenu a:hover{ background: rgba(255,255,255,0.06); color:#4a9ad4; padding-left: 34px; }
#mobileMenu .join-cta{
  margin: 20px 24px 0;
  text-align:center;
  background: linear-gradient(90deg,#1a6bb5,#003f6c);
  border-radius:8px;
  border-bottom:none !important;
}

#mobileBackdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,0.5);
  opacity:0; pointer-events:none;
  transition: opacity .35s ease;
  z-index:99;
}
#mobileBackdrop.open{ opacity:1; pointer-events:auto; }

/* ===== HERO BUTTONS ===== */
.hero-actions{
  display:flex; flex-wrap:wrap; align-items:center;
  gap:.75rem 1rem;
}

.hero-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.75rem 1.5rem;
  border-radius:.5rem;
  font-size:.95rem; font-weight:600; line-height:1;
  transition: transform .25s ease, background .25s ease,
              border-color .25s ease, color .25s ease;
}
.hero-btn:hover{ transform: translateY(-2px); }

.hero-btn-outline{
  color:#e2e8f0;
  background: rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.25);
}
.hero-btn-outline:hover{
  color:#ffffff;
  background: rgba(74,154,212,0.12);
  border-color:#4a9ad4;
}

.hero-link{
  font-size:.875rem; font-weight:600; color:#cbd5e1;
  padding:.5rem .25rem;
  transition: color .25s ease, transform .25s ease;
}
.hero-link:hover{ color:#4a9ad4; transform: translateX(3px); }

@media (max-width:520px){
  .hero-btn{ flex:1 1 100%; }   /* stack full-width on small phones */
}

/* ===== IMPACT AT A GLANCE ===== */
.impact-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1.5rem;
  margin-top:3rem;
}
.impact-card{
  text-align:center;
  padding:2.25rem 1.25rem;
  border:1px solid rgba(255,255,255,0.18);
  border-radius:1.1rem;
  background:rgba(0,63,108,0.45);
  transition:transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s, box-shadow .35s;
}
.impact-card:hover{
  transform:translateY(-6px);
  border-color:rgba(74,154,212,0.55);
  box-shadow:0 24px 50px rgba(0,0,0,0.25);
}
.impact-num{
  font-size:clamp(2.75rem,5vw,4rem);
  font-weight:800;
  line-height:1.05;
  background:linear-gradient(90deg,#3b82f6,#60a5fa);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}
.impact-card:nth-child(2) .impact-num{ background-image:linear-gradient(90deg,#a855f7,#60a5fa); }
.impact-card:nth-child(4) .impact-num{ background-image:linear-gradient(90deg,#8b5cf6,#60a5fa); }
.impact-card:nth-child(5) .impact-num{ background-image:linear-gradient(90deg,#60a5fa,#93c5fd); }
.impact-card:nth-child(6) .impact-num{ background-image:linear-gradient(90deg,#3b82f6,#93c5fd); }
.impact-num{ -webkit-background-clip:text; background-clip:text; }
.impact-label{
  margin-top:.9rem;
  font-size:1rem;
  font-weight:600;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:#ffffff;
}
.impact-sub{
  margin-top:.4rem;
  font-size:.875rem;
  color:#8fb0cc;
}
.impact-countries{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:.5rem 1.75rem;
  margin:2.25rem 0 0;
  padding:0;
  list-style:none;
  color:#b8d4ea;
}
.impact-countries li{
  display:flex;
  align-items:center;
  gap:1.75rem;
}
.impact-countries li:not(:last-child)::after{
  content:'';
  width:6px; height:6px;
  border-radius:50%;
  background:#4a9ad4;
}
@media (max-width:900px){
  .impact-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:520px){
  .impact-grid{ grid-template-columns:1fr; gap:1rem; }
  .impact-countries li{ gap:1rem; }
  .impact-countries{ gap:.5rem 1rem; }
}