/* ════════════════════════════════════════════════════════════
   TRILOGY – Ultrafast Chirality for Life and Technology
   Shared Stylesheet · Bright Modern Theme
   ════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────────── */
:rootlight {
  --bg:        #f7f9ff;
  --bg2:       #edf0fb;
  --bg3:       #e2e6f5;
  --surface:   #ffffff;
  --border:    rgba(10,20,90,0.09);
  --accent:    #2350e8;
  --accent2:   #f05e1c;
  --accent3:   #00a58e;
  --gold:      #d97706;
  --text:      #0c1040;
  --muted:     #58637e;
  --dim:       #9da6c2;
  --r:         12px;
}

:root {
  --bg:        #050810;
  --bg2:       #0c1020;
  --bg3:       #111827;
  --surface:   #161d30;
  --border:    rgba(255,255,255,0.07);
  --accent:    #38e8d5;
  --accent2:   #7b61ff;
  --accent3:   #ff6b6b;
  --gold:      #e8c96b;
  --text:      #e4e8f2;
  --muted:     #8b95b0;
  --dim:       #4a5568;
  --r:         12px;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}
/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Navigation ─────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem;
  height: 64px;
  background: rgba(5,8,16,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 20px rgba(10,20,90,0.06);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.nav-logo span { color: var(--text); font-style: normal; font-weight: 300; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: bolder;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  border: 1px solid rgba(35,80,232,0.35);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

@media (max-width: 480px) {
  .nav-logo span {
    display: none;    /* hides "/ Ultrafast Chirality", keeps "TRILOGY" */
  }
  .nav-logo {
    font-size: 1.25rem;   /* slightly smaller so TRILOGY itself stays on one line */
  }
}

/* ─── Hero ───────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
  /* Subtle grid + gradient background */
  background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
  url('/assets/img/background.jpg') center/cover;
/*   background-size: 60px 60px, 60px 60px, 100%; */
}

/* Molecule decoration */
.hero-molecule {
  position: absolute;
  top: 15%; right: 8%;
  opacity: 0.15;
/*   animation: rotateMolecule 40s linear infinite; */
}
@keyframes rotateMolecule { to { transform: rotate(360deg); } }

.hero-content { position: relative; z-index: 2; max-width: 900px; }
@media (max-width: 768px) {
  .hero-content {
    width: 100%;
    padding: 0 1.2rem;
  }
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(35,80,232,0.07);
  border: 1px solid rgba(35,80,232,0.2);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 2rem;
}
.hero-kicker::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.6); }
}

h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  color: var(--text);
}
h1 em { font-style: italic; color: var(--accent); }

.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 300;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2.5rem;
  max-width: 620px;
  margin-left: auto; margin-right: auto;
}

.hero-stats {
  display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 3rem;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 0.8rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 4px;
  transition: all 0.25s;
}
.hero-cta:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  text-decoration: none;
}

.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--dim);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
/*   animation: bounce 2s ease-in-out infinite; */
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--dim), transparent);
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ─── Section Scaffolding ────────────────────────────────────── */
section { position: relative; z-index: 1; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 6rem 2rem; }
.section-header { margin-bottom: 4rem; }
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1rem;
}
.section-eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--accent); }

h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}
h2 em { font-style: italic; color: var(--accent); }

.section-lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--muted);
/*   max-width: 680px; */
  margin-top: 1rem;
  line-height: 1.7;
}

/* ─── About ──────────────────────────────────────────────────── */
#about { background: var(--bg2); }
.about-grid { display: grid; grid-template-columns: 1fr ; gap: 4rem; align-items: start; }
.about-text p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.8;
}
.about-text p strong { color: var(--text); font-weight: 600; }
.about-facts { display: flex; flex-direction: column; gap: 1rem; }

.fact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.4rem 1.8rem;
  display: flex; align-items: flex-start; gap: 1rem;
  box-shadow: 0 2px 12px rgba(10,20,90,0.05);
}
.fact-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.fact-icon.teal   { background: rgba(35,80,232,0.08);  color: var(--accent); }
.fact-icon.purple { background: rgba(240,94,28,0.08);  color: var(--accent2); }
.fact-icon.gold   { background: rgba(217,119,6,0.08);  color: var(--gold); }
.fact-icon.red    { background: rgba(0,165,142,0.08);  color: var(--accent3); }
.fact-title { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.fact-value { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 600; color: var(--text); }

/* ─── Work Packages ──────────────────────────────────────────── */
#workpackages { background: var(--bg); }
.wp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.wp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(10,20,90,0.05);
}
.wp-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.wp-card.c1::before { background: linear-gradient(90deg, var(--accent), transparent); }
.wp-card.c2::before { background: linear-gradient(90deg, var(--accent2), transparent); }
.wp-card.c3::before { background: linear-gradient(90deg, var(--gold), transparent); }
.wp-card.c4::before { background: linear-gradient(90deg, var(--accent3), transparent); }
.wp-card.c5::before { background: linear-gradient(90deg, #6c3fc8, transparent); }
.wp-card.c6::before { background: linear-gradient(90deg, #e63584, transparent); }
.wp-card:hover {
  border-color: rgba(35,80,232,0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(35,80,232,0.1);
}
.wp-num { font-family: 'JetBrains Mono', monospace; font-size: 1.2rem; letter-spacing: 0.15em; color: var(--muted); margin-bottom: 0.8rem; font-weight:bold; }
.wp-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.8rem; color: var(--text); }
.wp-card p { font-size: 0.94rem; color: var(--muted); line-height: 1.65; }
.wp-tasks { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag {
  font-family: 'Syne';
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg2);
}

.wp-diagram {
  margin-bottom: 3rem;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
/*   box-shadow: 0 2px 12px rgba(10,20,90,0.06); */
  background: var(--surface);
  position: relative;
}
.wp-diagram img {
  width: 100%;
  height: auto;
  display: block;
/*   visibility: hidden; */
/*   float: right; */
}



/* --- INTERACTIVE GROUPS & HITBOXES --- */
.interactive-group {
  position: absolute;
  z-index:5;
  /* These map to the corners of your triangle */
}

.hitbox {
  width: 120px;  /* Size of the hoverable area */
  height: 120px;
  border-radius: 50%;
  cursor: pointer;
  /* TIP: Uncomment the line below temporarily to see where your hitboxes are! */
/*   background-color: rgba(255, 0, 0, 0.05); */
  background-color: transparent; /* No solid fill */
  transition: all 0.3s ease-in-out; /* Makes hover effects smooth */
}

.wp1-card .hitbox {
  /* box-shadow: x-offset y-offset blur spread color */
  box-shadow: 0 0 25px 2px color-mix(in srgb, var(--accent) 35%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.wp2-card .hitbox {
  box-shadow: 0 0 25px 2px color-mix(in srgb, var(--accent2) 35%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent2) 40%, transparent);
}
.wp3-card .hitbox {
  box-shadow: 0 0 25px 2px color-mix(in srgb, var(--gold) 35%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
}


.wp1-card:hover .hitbox {
  /* box-shadow: x-offset y-offset blur spread color */
  box-shadow: 0 0 25px 2px color-mix(in srgb, var(--accent) 60%, transparent);
  background-color: color-mix(in srgb, var(--accent) 10%, transparent);
}

.wp2-card:hover .hitbox {
  box-shadow: 0 0 25px 2px color-mix(in srgb, var(--accent2) 35%, transparent);
  background-color: color-mix(in srgb, var(--accent2) 20%, transparent);
}
.wp3-card:hover .hitbox {
  box-shadow: 0 0 25px 2px color-mix(in srgb, var(--gold) 60%, transparent);
  background-color: color-mix(in srgb, var(--gold) 10%, transparent);
}

/* --- BASE CARD STYLING --- */
.info-card {
  position: absolute; /* Floats the card over the image */
  z-index: 10;
  width: 500px;
  background-color: rgba(12, 16, 32, 0.85); /* #0c1020 with slight transparency */
  color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px); /* Creates a frosted glass effect */
  font-family: system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;

  /* THE FADE IN LOGIC */
  opacity: 0;              /* Fully transparent initially */
  visibility: visible;      /* Prevents clicking the card when it's hidden */
  transform: translateY(10px); /* Starts slightly lower for a slide-up effect */
  transition: all 0.3s ease-in-out; /* Smoothly animates the changes */

  /* Position the card relative to the hitbox */
  top: 100%;
  left: -150%;
/*  margin-left: -110px;
  margin-top: 10px;*/
}

.info-card1 {
  border-top: 4px solid var(--accent); /* Default teal accent */
}
.info-card2 {
  border-top: 4px solid var(--accent2); /* Default teal accent */
}
.info-card3 {
  border-top: 4px solid var(--gold); /* Default teal accent */
}
.info-card h3 {
  margin: 0 0 8px 0;
  color: #38e8d5;
  font-size: 16px;
  font-family: 'Cormorant Garamond'
}

.info-card p {
  margin: 0;
  opacity: 0.9;
  font-family: 'Cormorant Garamond'
}
/* --- THE HOVER TRIGGER --- */
/* When hovering over the group (the hitbox), change the card's styles */
.interactive-group:hover .info-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0); /* Slides it up into final position */
}
/* --- SPECIFIC CARD POSITIONS --- */
/* Adjust these top/bottom/left/right percentages to perfectly align with your specific image */

.wp1-card {
  border-top-color: var(--accent);
  bottom: 27%;
  left: 22%;

}
.wp1-card h3 { color: var(--accent); }

.wp2-card {
  border-top-color: var(--accent2);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}
.wp2-card h3 { color: var(--accent2); }

.wp3-card {
  border-top-color: var(--gold);
  bottom: 27%;
  right: 22%;
}

.wp3-card h3 { color: var(--gold); }

@media (max-width: 768px) {


  /* 3. Make the cards permanently visible, full width, and centered */
  .info-card {
    position: static;      /* Removes the floating overlay effect */
    opacity: 1;            /* Makes them fully visible */
    visibility: visible;
    transform: none;       /* Removes the slide-up animation */
    width: 100%;           /* Makes them fill the container width */
    margin: 0 0 15px 0;    /* Adds spacing between the stacked cards */
    box-sizing: border-box;           /* Ensures padding doesn't break the 100% width */
  }
  .wp-diagram img {
    width: 0%;
    height: auto;
    visibility: hidden;
    float: right;
  }
  .hitbox { display: none; }
  .interactive-group {
    position: static !important;
    margin-top: 20px;
    transform: none !important; /* Stops WP2 from trying to center itself */
  }
}

/* ─── Research ───────────────────────────────────────────────── */
#research { background: var(--bg2); }
.research-layout { display: grid; grid-template-columns: 1fr ; gap: 5rem; align-items: center; }
.research-themes { display: flex; flex-direction: column; gap: 1.2rem; }
.theme {
  border-left: 3px solid var(--border);
  padding: 0.8rem 1.5rem;
  transition: border-color 0.3s, background 0.3s;
  border-radius: 0 8px 8px 0;
}
.theme:hover { border-left-color: var(--accent); background: rgba(35,80,232,0.03); }
.theme h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--text); }
.theme p { font-size: 1.1rem; color: var(--muted); line-height: 1.6; }
.theme img {width:10%; margin-left:25px; margin-right:25px;}
.theme img.l {float:left;}
.theme img.r {float:right;}

.chiral-visual { display: flex; align-items: center; justify-content: center; }
.chiral-visual svg { filter: drop-shadow(0 4px 24px rgba(35,80,232,0.12)); }

.keywords-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 3rem; }
.keyword {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(35,80,232,0.07);
  border: 1px solid rgba(35,80,232,0.2);
  color: var(--accent);
}

.zoom-image1 {
  transition: transform 0.3s ease; /* Controls the speed and smoothness */
}

.zoom-image1:hover {
  transform: scale(1.3); /* Increases the size by 20% */
}


.zoom-image {
  transition: transform 0.3s ease; /* Controls the speed and smoothness */
}

.zoom-image:hover {
  transform: scale(3.5); /* Increases the size by 20% */
}

.zoom-image2 {
  transition: transform 0.3s ease; /* Controls the speed and smoothness */
}

.zoom-image2:hover {
  transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(9); /* Increases the size by 20% */
}

@media (max-width: 768px) {
  .zoom-image2:hover {
    transform: scale(13); /* Increases the size by 20% */
  }
  .zoom-image:hover {
    transform: scale(5.5); /* Increases the size by 20% */
  }
  .zoom-image1:hover {
    transform: scale(2.3); /* Increases the size by 20% */
  }
}

/* ─── Doctoral Projects ──────────────────────────────────────── */
#doctoral { background: var(--bg); }
.dc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.dc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.8rem;
  display: flex; gap: 1.5rem;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 12px rgba(10,20,90,0.04);
}
.dc-card:hover {
  border-color: rgba(35,80,232,0.3);
  background: rgba(35,80,232,0.02);
  box-shadow: 0 6px 24px rgba(35,80,232,0.08);
}
.dc-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(35,80,232,0.08);
  border: 1px solid rgba(35,80,232,0.2);
  border-radius: 6px;
  padding: 4px 10px;
  height: fit-content;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.dc-info h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 600; margin-bottom: 0.4rem; line-height: 1.3; color: var(--text); }
.dc-info p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin-bottom: 0.8rem; }
.dc-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dc-host { font-size: 0.7rem; letter-spacing: 0.06em; color: var(--dim); }
.dc-host strong { color: var(--accent2); }
.dc-info {
  flex: 1;
  min-width: 0;   /* prevents overflow on long text */
}
/* Add to assets/css/main.css */
.dc-avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.2rem 0;
  width: 100%;     /* ← belt-and-braces: always fill parent */

}

.dc-avatar img {
  width: 200px;
  height: 200px;
  object-fit: cover;
/*   border-radius: 50%;          /* optional — makes it a circle */ */
  border: 2px solid var(--border);
  display: block;  /* ← removes the small gap browsers add under inline images */
}

@media (max-width: 768px) {

  /* Grid must be single column */
  .dc-grid {
    grid-template-columns: 1fr;
  }

  /* Card itself must not overflow its grid cell */
  .dc-card {
    flex-direction: column;
    gap: 0.8rem;
    min-width: 0;          /* ← key: allows flex child to shrink below content width */
    overflow: hidden;
    width: 100%;
  }

  /* Info column must also be allowed to shrink */
  .dc-info {
    min-width: 0;
    width: 100%;
  }

  /* Long titles and text must wrap */
  .dc-info h3,
  .dc-info h4,
  .dc-info h5,
  .dc-info p {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Meta row must wrap if host/secondment names are long */
  .dc-meta {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .dc-host {
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
  }

  /* Badge stays left-aligned when stacked */
  .dc-id {
    align-self: flex-start;
  }

}
/* ─── Network Nodes ──────────────────────────────────────────── */
#nodes { background: var(--bg2); }
.nodes-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 3.5rem; }
.nodes-intro p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-weight: 300;
  color: var(--muted); line-height: 1.8;
}
.nodes-intro p + p { margin-top: 0.8rem; }

.nodes-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.nodes-section-label::before { content: ''; width: 20px; height: 1px; background: var(--muted); }

.beneficiaries-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 3rem; }
.pis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 3rem; }

.node-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 10px rgba(10,20,90,0.04);
}
.node-card:hover {
  border-color: rgba(35,80,232,0.25);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(35,80,232,0.08);
}
.node-card.coordinator {
  border-color: rgba(35,80,232,0.3);
  background: linear-gradient(135deg, rgba(35,80,232,0.04), rgba(35,80,232,0.02));
  grid-column: span 2;
}
.node-flag { font-size: 1.4rem; margin-bottom: 0.6rem; }
.node-name { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.2rem; line-height: 1.3; color: var(--text); }
.node-country { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.05em; }
.node-type {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
}
.type-research   { background: rgba(0,165,142,0.1);  color: var(--accent3); }
.type-university { background: rgba(35,80,232,0.08); color: var(--accent); }
.type-industry   { background: rgba(217,119,6,0.1);  color: var(--gold); }
.type-coord      { background: rgba(35,80,232,0.1);  color: var(--accent); border: 1px solid rgba(35,80,232,0.2); }

.partners-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.8rem; }
.partner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.partner-card:hover { border-color: rgba(35,80,232,0.2); box-shadow: 0 3px 12px rgba(35,80,232,0.06); }
.partner-card .node-flag { text-align: center; }
.partner-card .node-name { font-size: 0.72rem; }
.partner-card .node-country { font-size: 0.62rem; }

/* ─── Dissemination ──────────────────────────────────────────── */
#dissemination { background: var(--bg); }
.dis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.dis-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 12px rgba(10,20,90,0.04);
}
.dis-card:hover { border-color: rgba(35,80,232,0.2); box-shadow: 0 6px 24px rgba(35,80,232,0.07); }
.dis-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1.2rem; }
.dis-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; margin-bottom: 0.7rem; color: var(--text); }
.dis-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }
.dis-card ul { list-style: none; margin-top: 1rem; }
.dis-card ul li { font-size: 0.82rem; color: var(--muted); padding: 4px 0; display: flex; align-items: center; gap: 0.6rem; }
.dis-card ul li::before { content: '→'; color: var(--accent); font-size: 0.7rem; flex-shrink: 0; }

.outreach-banner {
  background: linear-gradient(135deg, rgba(35,80,232,0.05), rgba(240,94,28,0.04));
  border: 1px solid rgba(35,80,232,0.15);
  border-radius: var(--r);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
}
.outreach-banner h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 300; margin-bottom: 0.5rem; color: var(--text); }
.outreach-banner p { font-size: 0.92rem; color: var(--muted); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--accent); color: var(--accent);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 28px; border-radius: 4px;
  transition: all 0.25s; white-space: nowrap;
}
.btn-outline:hover { background: var(--accent); color: #fff; text-decoration: none; }

.btn-outline-soon {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--accent2); color: var(--accent2);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 28px; border-radius: 4px;
  transition: all 0.25s; white-space: nowrap;
}
.btn-outline-soon:hover { background: var(--accent2); color: #fff; text-decoration: none; }

.btn-outline-closed {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--accent3); color: var(--accent3);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 28px; border-radius: 4px;
  transition: all 0.25s; white-space: nowrap;
}
.btn-outline-closed:hover { background: var(--accent3); color: #fff; text-decoration: none; }


/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--bg2);
  color: rgba(255,255,255,0.75);
  border-top: none;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 3fr 1fr 1fr 1fr 1fr 1fr;
  gap: 2rem; padding: 3rem 2rem 2rem;
}
.footer-brand .nav-logo { font-size: 1.8rem; color: #fff; }
.footer-brand .nav-logo span { color: rgba(255,255,255,0.6); }
.footer-brand p { font-size: 0.82rem; color: rgba(255,255,255,0.5); line-height: 1.7; margin-top: 0.8rem; }
.eu-badge {
  display: flex; align-items: center; gap: 0.8rem;
  margin-top: 1.5rem; padding: 0.8rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
}
.eu-flag { font-size: 1.6rem; }
.footer-col h5 { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { font-size: 0.85rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.75rem; color: rgba(255,255,255,0.3);
}

/* ─── Dividers ───────────────────────────────────────────────── */
.divider { border: none; height: 1px; background: var(--border); margin: 0; }

/* ─── Scroll-entrance animation ─────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s ease forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.55s; }
.delay-5 { animation-delay: 0.7s; }

/* ─── Hamburger button ───────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.hamburger:hover { background: var(--bg2); border-color: rgba(35,80,232,0.25); }
.hamburger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.25s ease, width 0.25s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .wp-grid               { grid-template-columns: repeat(2, 1fr); }
  .beneficiaries-grid    { grid-template-columns: repeat(3, 1fr); }
  .node-card.coordinator { grid-column: span 1; }
  .partners-grid         { grid-template-columns: repeat(4, 1fr); }
  .footer-inner          { grid-template-columns: 1fr 1fr; }
  .research-layout       { grid-template-columns: 1fr; gap: 3rem; }
}
@media (max-width: 768px) {
  nav { padding: 0 1.2rem; gap: 0.5rem; }
  .nav-badge { display: none; }
  .hamburger { display: flex; }

  /* Slide-down mobile panel */
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    display: flex !important;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(10,20,90,0.1);
    padding: 0.4rem 0 0.8rem;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1),
                opacity   0.28s cubic-bezier(0.4,0,0.2,1);
    z-index: 999;
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 0.85rem 1.5rem;
    font-size: 0.82rem; letter-spacing: 0.1em;
    color: var(--text) !important; font-weight: 600;
  }
  .nav-links a:hover { background: var(--bg2); color: var(--accent) !important; text-decoration: none; }

  /* Content reflow */
  .about-grid, .nodes-intro { grid-template-columns: 1fr; }
  .dc-grid, .dis-grid, .wp-grid { grid-template-columns: 1fr; }
  .beneficiaries-grid  { grid-template-columns: repeat(2, 1fr); }
  .partners-grid       { grid-template-columns: repeat(2, 1fr); }
  .outreach-banner     { grid-template-columns: 1fr; }
  .footer-inner        { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats          { gap: 1.5rem; }
  .stat-num            { font-size: 2rem; }
  .section-inner       { padding: 4rem 1.2rem; }
}

/* ════════════════════════════════════════════════════════════
   INNER PAGE STYLES  (events.html, videos.html, etc.)
   ════════════════════════════════════════════════════════════ */

/* Page header banner */
.page-header {
  padding: 9rem 2rem 4rem;
  background:
 /*   linear-gradient(rgba(35,80,232,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35,80,232,0.04) 1px, transparent 1px),
    linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%),   */
 linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
    url('/assets/img/background.jpg') center/cover;
/*   background-size: 60px 60px, 60px 60px, 100%; */
  border-bottom: 1px solid var(--border);
}
.page-header-inner { max-width: 1200px; margin: 0 auto; }
.breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { opacity: 0.35; }
.page-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300; line-height: 1.1; margin-bottom: 0.8rem; color: var(--text);
}
.page-header h1 em { font-style: italic; color: var(--accent); }
.page-header p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem; font-weight: 300; color: var(--muted); max-width: 580px;
}
.page-content { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem 6rem; }

/* Filter tabs */
.content-filters {
  display: flex; gap: 0;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.filter-btn {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.7rem 1.4rem;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted); cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.filter-btn:hover  { color: var(--text); }
.filter-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Small button */
.btn-sm {
  font-family: 'Syne', sans-serif; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 4px;
  border: 1px solid var(--accent); color: var(--accent);
  background: none; text-decoration: none; white-space: nowrap;
  transition: all 0.2s; cursor: pointer; display: inline-block;
}
.btn-sm:hover { background: var(--accent); color: #fff; text-decoration: none; }
.btn-sm.secondary { border-color: var(--border); color: var(--muted); }
.btn-sm.secondary:hover { background: var(--bg2); color: var(--text); }

/* ─── Event cards ────────────────────────────────────────── */
.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.event-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 2px 12px rgba(10,20,90,0.05);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex; flex-direction: column;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(35,80,232,0.1); border-color: rgba(35,80,232,0.25); }
.event-card-body { padding: 1.6rem; display: flex; align-items: flex-start; gap: 1.2rem; flex: 1; }
.event-date-badge {
  background: rgba(35,80,232,0.07); border: 1px solid rgba(35,80,232,0.15);
  border-radius: 8px; padding: 0.6rem 0.8rem; text-align: center;
  flex-shrink: 0; min-width: 54px;
}
.event-date-badge .day   { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; font-weight: 600; color: var(--accent); line-height: 1; display: block; }
.event-date-badge .month { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: block; }
.event-info h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.4rem; color: var(--text); }
.event-info p  { font-size: 0.83rem; color: var(--muted); line-height: 1.6; }
.event-card-footer {
  padding: 1rem 1.6rem 1.4rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.event-location { font-size: 0.73rem; color: var(--muted); display: flex; align-items: center; gap: 0.35rem; }
.event-type {
  font-family: 'JetBrains Mono', monospace; font-size: 0.58rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 10px; margin-bottom: 4px; display: inline-block;
}
.type-school     { background: rgba(35,80,232,0.08);  color: var(--accent); }
.type-workshop   { background: rgba(0,165,142,0.08);  color: var(--accent3); }
.type-conference { background: rgba(240,94,28,0.08);  color: var(--accent2); }
.type-outreach   { background: rgba(217,119,6,0.08);  color: var(--gold); }
.event-past .event-date-badge { background: var(--bg2); border-color: var(--border); }
.event-past .event-date-badge .day { color: var(--muted); }

/* ─── Video cards ────────────────────────────────────────── */
.videos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.video-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 2px 12px rgba(10,20,90,0.05);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.video-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(35,80,232,0.1); border-color: rgba(35,80,232,0.25); }
.video-thumb {
  position: relative; aspect-ratio: 16/9;
  background: var(--bg2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.8rem;
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
}
.play-circle {
  width: 52px; height: 52px; background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem; padding-left: 4px;
  opacity: 0.8; transition: opacity 0.2s, transform 0.2s;
}
.video-card:hover .play-circle { opacity: 1; transform: scale(1.1); }
.video-thumb-label { font-size: 0.68rem; color: var(--dim); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.1em; }
.video-body { padding: 1.3rem 1.4rem 1.4rem; }
.video-tag  { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.video-body h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.4rem; color: var(--text); }
.video-body p  { font-size: 0.82rem; color: var(--muted); line-height: 1.55; margin-bottom: 1rem; }
.video-footer { display: flex; align-items: center; justify-content: space-between; }
.video-date   { font-size: 0.7rem; color: var(--dim); font-family: 'JetBrains Mono', monospace; }

/* ─── Empty state ────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1; text-align: center;
  padding: 5rem 2rem; border: 2px dashed var(--border);
  border-radius: var(--r); background: var(--bg2);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.45; }
.empty-state h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 300; color: var(--text); margin-bottom: 0.5rem; }
.empty-state p  { font-size: 0.9rem; color: var(--muted); max-width: 380px; margin: 0 auto 1.5rem; line-height: 1.65; }

@media (max-width: 900px) {
  .events-grid, .videos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .events-grid, .videos-grid { grid-template-columns: 1fr; }
  .page-header { padding: 7rem 1.2rem 3rem; }
  .page-content { padding: 3rem 1.2rem 5rem; }
}
/* ─── Dropdown submenus ──────────────────────────────────────── */

.nav-links > li { position: relative; }

/* Parent trigger button */
.nav-parent {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s;
}
.nav-parent:hover { color: var(--accent); }

/* Animated chevron */
.nav-parent::after {
  content: '';
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.nav-links > li.is-open .nav-parent::after {
  transform: rotate(-135deg) translateY(2px);
}

/* ── Submenu: base = mobile accordion ────────────────────────── */
.submenu {
  list-style: none;
  width: 100%;
  background: var(--bg2);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4,0,0.2,1);
}
.nav-links > li.is-open .submenu {
  max-height: 400px;
}
.submenu a {
  display: block;
  padding: 0.75rem 1.5rem 0.75rem 2.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.submenu li:last-child a { border-bottom: none; }
.submenu a:hover {
  background: var(--bg3);
  color: var(--accent);
  text-decoration: none;
}

/* ── Submenu: desktop floating dropdown ──────────────────────── */
@media (min-width: 769px) {

  .nav-parent {
    width: auto;
    border-bottom: none;
    padding: 0;
    font-size: 0.78rem;
    font-weight: bold;
    justify-content: flex-start;
    gap: 5px;
    color: var(--muted);
  }

  .submenu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    width: auto;
    min-width: 190px;
    max-height: none;
    overflow: visible;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: 0 8px 32px rgba(10,20,90,0.1);
    padding: 0.4rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1001;
  }

  /* Upward triangle */
  .submenu::before {
    content: '';
    position: absolute;
    top: -5px; left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px; height: 10px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
  }

  .nav-links > li.is-open .submenu {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
    max-height: none;
  }

  .submenu a {
    padding: 0.55rem 1rem;
    font-weight: bold;
    border-radius: 6px;
    border-bottom: none;
    font-size: 0.75rem;
  }
  .submenu a:hover { background: var(--bg2); }
}


/* ════════════════════════════════════════════════════════════
 N EWS & TIMELINE STYLES                                        *
 ════════════════════════════════════════════════════════════ */

/* ─── Category colour tokens ─────────────────────────────────── */
.cat-general   { --cat: #2350e8; --cat-bg: rgba(35,80,232,0.10); }
.cat-publication { --cat: #00a58e; --cat-bg: rgba(0,165,142,0.10); }
.cat-event       { --cat: #f05e1c; --cat-bg: rgba(240,94,28,0.10); }
.cat-press       { --cat: #d97706; --cat-bg: rgba(217,119,6,0.10); }
.cat-news      { --cat: #6c3fc8; --cat-bg: rgba(108,63,200,0.10); }

.news-cat-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 10px;
  background: var(--cat-bg);
  color: var(--cat);
  flex-shrink: 0;
}

/* ─── Hero news bar ──────────────────────────────────────────── */
@keyframes fadeUpCentered {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.hero-news-bar {
  position: absolute;
  bottom: 3.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 4rem);
  max-width: 680px;
  z-index: 2;
  animation: fadeUpCentered 0.8s ease 0.8s both;
}

.hero-news-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  box-shadow: 0 4px 20px rgba(10,20,90,0.08);
}
.news-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.news-bar-label::before {
/*   content: ''; */
/*   width: 6px; height: 6px; */
/*   border-radius: 50%; */
/*   background: var(--accent); */
/*   animation: pulse 2s ease-in-out infinite; */
}

.news-bar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.news-bar-title:hover { color: var(--accent); text-decoration: none; }
.news-bar-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--dim);
  flex-shrink: 0;
}
.news-bar-arrow {
  color: var(--accent);
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.hero-news-bar:hover .news-bar-arrow { transform: translateX(3px); }

@media (max-width: 768px) {
/*   .hero-news-bar { bottom: 3.5rem; width: calc(100% - 2.4rem); } */
/*.hero-news-bar {
  bottom: 3.5rem;
  width: calc(100% - 2.4rem);
  animation: none;
  opacity: 1;
}*/
.hero-news-bar { display: none; }

  .news-bar-date { display: none; }
  .news-cat-pill  { display: none; }   /* also hide "Latest" label to save space */

}

/* ─── Homepage news preview ──────────────────────────────────── */
#news-preview {
background: var(--bg);
border-top: 1px solid var(--border);
}
.news-preview-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.8rem;
}
@media (max-width: 480px) {
  .news-preview-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}
.news-preview-header .section-eyebrow { margin-bottom: 0; }
.news-preview-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.news-preview-link:hover { text-decoration: underline; }

.news-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.news-card {
  border-left: 3px solid var(--cat);
  background: var(--surface);
  border-radius: 0 var(--r) var(--r) 0;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.2rem;
  text-decoration: none;
  display: block;
  transition: border-left-width 0.2s, box-shadow 0.2s, transform 0.2s;
}
.news-card:hover {
  border-left-width: 5px;
  box-shadow: 0 4px 16px rgba(10,20,90,0.07);
  transform: translateY(-2px);
  text-decoration: none;
}
.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.news-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--dim);
  letter-spacing: 0.05em;
}
.news-card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.news-card p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) { .news-cards-row { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 580px) { .news-cards-row { grid-template-columns: 1fr; } }

/* ─── Timeline (news.html) ───────────────────────────────────── */
.timeline-wrap { position: relative; }

.timeline-wrap::before {
  content: '';
  position: absolute;
  left: 5.5rem;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-year-marker {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 2.5rem 0 1.5rem;
  position: relative;
}
.timeline-year-marker .year-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  width: 4.5rem;
  text-align: right;
  flex-shrink: 0;
  line-height: 1;
}
.timeline-year-marker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 4.5rem 3rem 1fr;
  gap: 0 1.2rem;
  margin-bottom: 1.2rem;
  align-items: start;
  position: relative;
}
.timeline-item-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--dim);
  text-align: right;
  padding-top: 0.85rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
}
.timeline-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.9rem;
}
.timeline-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cat);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--cat);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cat);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1.2rem 1.4rem;
  text-decoration: none;
  display: block;
  transition: border-left-width 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 1px 8px rgba(10,20,90,0.04);
}
.timeline-card:hover {
  border-left-width: 5px;
  box-shadow: 0 4px 20px rgba(10,20,90,0.09);
  transform: translateX(3px);
  text-decoration: none;
}
.timeline-card-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}
.timeline-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.timeline-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.7rem;
}
.timeline-card-read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/*@media (max-width: 768px) {
  .timeline-wrap::before { left: 0; }
  .timeline-item { grid-template-columns: 0 1.5rem 1fr; gap: 0 0.8rem; }
  .timeline-item-date { display: none; }
  .timeline-year-marker .year-num { width: auto; font-size: 1.2rem; }
}*/

@media (max-width: 768px) {
  /* Hide the vertical line entirely */
  .timeline-wrap::before { display: none; }

  /* Stack items as plain blocks — no grid columns at all */
  .timeline-item {
    display: block;
    margin-bottom: 1rem;
  }

  /* Hide the date and dot — card is full width */
  .timeline-item-date,
  .timeline-dot-col { display: none; }

  /* Card takes full width */
  .timeline-card {
    border-radius: var(--r);    /* restore all-round radius without the line */
    transform: none !important; /* disable the translateX hover shift */
  }

  /* Year marker: smaller and no hanging indent */
  .timeline-year-marker {
    margin: 1.5rem 0 1rem;
  }
  .timeline-year-marker .year-num {
    width: auto;
    font-size: 1.2rem;
  }
}

/* ─── Individual post page ───────────────────────────────────── */
.post-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.post-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.post-body { max-width: 720px; }
.post-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 300;
  margin: 2rem 0 0.8rem;
  color: var(--text);
}
.post-body p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 1.2rem;
}
.post-body strong { color: var(--text); font-weight: 600; }
.post-body a { color: var(--accent); }
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.post-back:hover { color: var(--accent); text-decoration: none; }

