/* ===== SemPER Website — Color Palette from Logo ===== */
:root {
  --semantics: #A07A8E;   /* dusty rose */
  --proofs:    #5B6AAF;   /* slate blue */
  --reasoning: #8B8B3A;   /* olive */
  --text:      #3A3A3A;
  --bg:        #FAFAFA;
  --white:     #FFFFFF;
  --light-gray:#F0F0F0;
  --border:    #DDD;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

a { color: var(--proofs); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Splash (full-page landing) ===== */
.splash {
  background: linear-gradient(135deg, var(--semantics) 0%, var(--proofs) 50%, var(--reasoning) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.splash-logo {
  width: 220px;
  height: auto;
  border-radius: 16px;
  background: rgba(255,255,255,0.15);
  padding: 14px;
  backdrop-filter: blur(6px);
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}

.splash-title {
  font-size: 4rem;
  letter-spacing: 0.12em;
  margin: 0;
}

.splash-subtitle {
  font-size: 1.3rem;
  font-weight: 300;
  opacity: 0.92;
  margin: 0;
}

.splash-funding {
  font-size: 0.88rem;
  opacity: 0.78;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.splash-funding img {
  height: 28px;
}

.splash-cta {
  margin-top: 1rem;
  display: inline-block;
  border: 2px solid rgba(255,255,255,0.7);
  color: var(--white);
  padding: 0.65rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.splash-cta:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  text-decoration: none;
}


@media (max-width: 600px) {
  .splash-title { font-size: 2.8rem; }
  .splash-logo { width: 160px; }
}

/* ===== Navigation ===== */
nav {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0.4rem 1rem 0.4rem 0;
  border-bottom: none !important;
}

.nav-logo img {
  height: 36px;
  width: auto;
  border-radius: 6px;
}

.nav-logo:hover { opacity: 0.85; text-decoration: none; }

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

nav li { position: relative; }

nav a {
  display: block;
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.2s, border-color 0.2s;
  border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
  color: var(--proofs);
  border-bottom-color: var(--proofs);
  text-decoration: none;
}

/* ===== Main Content ===== */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

h2 {
  font-size: 1.6rem;
  color: var(--proofs);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--proofs);
  padding-bottom: 0.4rem;
}

h3 {
  font-size: 1.15rem;
  color: var(--semantics);
  margin: 1.5rem 0 0.5rem;
}

p { margin-bottom: 1rem; }

#home > p { text-align: justify; }

/* ===== Project Details Grid ===== */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  border-left: 4px solid var(--proofs);
}

.detail-card.semantics { border-left-color: var(--semantics); }
.detail-card.reasoning { border-left-color: var(--reasoning); }
.detail-card.proofs    { border-left-color: var(--proofs); }

.detail-card strong {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 0.3rem;
}

/* ===== Three Pillars ===== */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.pillar {
  background: var(--white);
  border-radius: 8px;
  padding: 1.3rem;
  text-align: center;
  border-top: 4px solid var(--proofs);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.pillar.sem  { border-top-color: var(--semantics); }
.pillar.prf  { border-top-color: var(--proofs); }
.pillar.reas { border-top-color: var(--reasoning); }

.pillar h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.pillar.sem  h3 { color: var(--semantics); }
.pillar.prf  h3 { color: var(--proofs); }
.pillar.reas h3 { color: var(--reasoning); }

.pillar p {
  font-size: 0.92rem;
  text-align: left;
}

/* ===== Objectives ===== */
.objective {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.3rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--proofs);
}

.objective summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--proofs);
  font-size: 1rem;
}

.objective summary:hover { color: var(--semantics); }

.objective p {
  margin-top: 0.7rem;
  font-size: 0.93rem;
}

/* ===== Partners ===== */
.partner-section-title {
  font-size: 1.2rem;
  color: var(--semantics);
  margin: 2rem 0 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.partner-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  transition: box-shadow 0.2s;
}

.partner-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}


.partner-card .inst {
  font-weight: 700;
  font-size: 0.95rem;
}

.partner-card .inst a {
  color: inherit;
  text-decoration: none;
}

.partner-card .inst a:hover {
  color: var(--proofs);
  text-decoration: underline;
}

.partner-card .country {
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.2rem;
}

.partner-card .people {
  font-size: 0.88rem;
  color: #555;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-style: italic;
}

.partner-card .people::before {
  content: "Local Coordinator";
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #aaa;
  margin-bottom: 0.2rem;
}

/* ===== World Map ===== */
.map-note {
  background: var(--light-gray);
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
  font-size: 0.92rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.map-embed {
  margin-bottom: 0.8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

#partner-map {
  width: 100%;
  height: 480px;
  border-radius: 8px;
}

.map-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  color: #666;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.legend-dot.beneficiary-dot { background: #5B6AAF; }
.legend-dot.associated-dot  { background: #8B8B3A; }

.custom-pin { background: transparent !important; border: none !important; }

/* ===== Bibliography & Reports ===== */
.pub-list {
  list-style: none;
  counter-reset: pub;
}

.pub-list li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.7rem;
  font-size: 0.92rem;
  position: relative;
  padding-left: 3rem;
}

.pub-list li::before {
  counter-increment: pub;
  content: counter(pub);
  position: absolute;
  left: 1rem;
  top: 0.9rem;
  font-weight: 700;
  color: var(--proofs);
  font-size: 0.9rem;
}

.pub-list li .pdf-link {
  display: inline-block;
  margin-top: 0.3rem;
  background: var(--proofs);
  color: white;
  padding: 0.2rem 0.7rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pub-list li .pdf-link:hover {
  background: var(--semantics);
  text-decoration: none;
}

/* ===== Events ===== */
.event-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--reasoning);
}

.event-card .date {
  font-weight: 700;
  color: var(--reasoning);
  font-size: 0.9rem;
}

.event-card h3 {
  margin: 0.3rem 0;
  color: var(--text);
}

.event-card p {
  font-size: 0.92rem;
  margin-bottom: 0;
}

.placeholder-msg {
  background: var(--light-gray);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: #888;
  font-style: italic;
}

/* ===== Predecessor Projects ===== */
.predecessors {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.pred-badge {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
}

.pred-badge strong { color: var(--proofs); }

/* ===== WP Table (Home page summary) ===== */
.wp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.93rem;
}

.wp-table th {
  background: var(--proofs);
  color: white;
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 600;
}

.wp-table td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.wp-table tr:nth-child(even) { background: var(--light-gray); }

.wp-table tr.wp-research td:first-child {
  font-weight: 700;
  color: var(--proofs);
}

/* ===== WP Cards (Work Packages tab) ===== */
.wp-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  border-left: 5px solid var(--proofs);
}

.wp-card.wp-support { border-left-color: #BBB; }
.wp-card.wp-bridge  { border-left-color: var(--reasoning); }

.wp-header {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.wp-num {
  display: inline-block;
  background: var(--proofs);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.wp-card.wp-support .wp-num { background: #999; }
.wp-card.wp-bridge  .wp-num { background: var(--reasoning); }

.wp-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
  flex: 1;
}

.wp-lead {
  font-size: 0.82rem;
  color: #888;
  white-space: nowrap;
}

.wp-tasks {
  margin: 0.7rem 0 0 2rem;
  font-size: 0.9rem;
  color: #555;
}

.wp-tasks li { margin-bottom: 0.25rem; }

/* ===== Contacts ===== */
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.3rem 1.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--semantics);
}

.contact-card h3 {
  margin: 0 0 0.5rem;
  color: var(--semantics);
}

.contact-card p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.7;
}

/* ===== Footer ===== */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
}

footer img { height: 32px; vertical-align: middle; margin-right: 0.5rem; }
footer a { color: rgba(255,255,255,0.9); }

/* ===== Hamburger toggle button (hidden on desktop) ===== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem;
  margin-left: auto;
  line-height: 1;
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .details-grid,
  .pillars { grid-template-columns: 1fr; }

  .partners-grid { grid-template-columns: 1fr; }

  .nav-logo img { height: 28px; }
  .hero h1 { font-size: 1.8rem; }

  .nav-toggle { display: block; }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid var(--border);
    background: var(--white);
  }

  nav.open ul { display: flex; }

  nav a {
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--light-gray);
    border-left: none;
  }

  nav a.active,
  nav a:hover {
    border-bottom: 1px solid var(--light-gray);
    border-left: 4px solid var(--proofs);
    background: var(--light-gray);
  }

  .wp-lead { white-space: normal; }
}
