/* FDI Lab - GitHub Pages Stylesheet */

/* ── Self-hosted Oxygen font ── */
@font-face {
  font-family: 'Oxygen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/oxygen-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Oxygen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/oxygen-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Oxygen';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/oxygen-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Oxygen';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/oxygen-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --navy: #122E5E;
  --navy-dark: #0c2248;
  --navy-light: #1a3f7a;
  --accent: #4a90d9;
  --accent-light: #e8f1fb;
  --white: #ffffff;
  --gray-light: #f5f7fa;
  --gray-mid: #e0e5ed;
  --gray-text: #555f6e;
  --text: #1a1a2e;
  --font: 'Oxygen', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; color: var(--navy); margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; color: var(--navy); margin-bottom: 0.5rem; }
h4 { font-size: 1rem; margin-bottom: 0.25rem; }
p  { margin-bottom: 1rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 4rem 0; }
section:nth-child(even) { background: var(--gray-light); }

/* ── Header & Nav ── */
header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}


nav { display: flex; gap: 0; }

nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0 1rem;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

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

/* hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  margin: 5px 0;
  border-radius: 2px;
}

/* ── Nav dropdown ── */
.nav-dropdown { position: relative; display: flex; }

.nav-dropdown-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0 1rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s, border-color 0.2s;
}

.nav-dropdown-btn:hover,
.nav-dropdown-btn.active {
  color: var(--white);
  border-bottom-color: var(--accent);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  background: var(--navy-dark);
  min-width: 185px;
  border-top: 3px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  border-radius: 0 0 6px 6px;
  z-index: 200;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.7rem 1.25rem;
  height: auto;
  border-bottom: none;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  border-bottom-color: transparent;
  border-left-color: var(--accent);
  background: rgba(255,255,255,0.07);
  text-decoration: none;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 6rem 1.5rem;
  text-align: center;
}

.hero h1 { font-size: 2.8rem; margin-bottom: 1rem; }
.hero p  { font-size: 1.2rem; max-width: 720px; margin: 0 auto 2rem; opacity: 0.9; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.7rem 1.6rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.btn:hover { background: #3578c2; text-decoration: none; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  margin-left: 0.75rem;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ── FAIR pillars ── */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.pillar {
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(18,46,94,0.10);
  border-top: 4px solid var(--accent);
}

.pillar-letter {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.pillar h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.pillar p  { font-size: 0.88rem; color: var(--gray-text); margin: 0; }

/* ── Cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(18,46,94,0.08);
  border: 1px solid var(--gray-mid);
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 6px 24px rgba(18,46,94,0.14); }
.card h3 { color: var(--navy); }
.card p  { font-size: 0.92rem; color: var(--gray-text); }

/* ── Projects grid ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.project-chip {
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s;
}

.project-chip:hover {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

/* ── Team ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.team-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(18,46,94,0.08);
  border: 1px solid var(--gray-mid);
}

.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 auto 0.75rem;
  overflow: hidden;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.team-card h4 { font-size: 0.95rem; color: var(--navy); margin-bottom: 0.2rem; }
.team-card .role { font-size: 0.82rem; color: var(--gray-text); font-style: italic; }

.team-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: center;
  margin-top: 0.6rem;
}

.team-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--accent);
}

.team-link:hover { text-decoration: underline; }

.team-link img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Section header ── */
.section-header { text-align: center; margin-bottom: 0.5rem; }
.section-header p { color: var(--gray-text); max-width: 640px; margin: 0 auto; }
.divider {
  width: 56px; height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0.6rem auto 1.5rem;
}

/* ── Funding ── */
.funding-list { list-style: none; margin-top: 1.5rem; }
.funding-list li {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--white);
  margin-bottom: 0.75rem;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 4px rgba(18,46,94,0.06);
}
.funding-list li strong { color: var(--navy); }
.grant-id { font-family: monospace; font-size: 0.85rem; color: var(--gray-text); }

/* ── Publications ── */
.pub-list { list-style: decimal; padding-left: 1.5rem; margin-top: 0.75rem; }
.pub-list li {
  color: var(--gray-text);
  line-height: 1.7;
  margin-bottom: 0.85rem;
  font-size: 0.93rem;
}
.pub-list li a { color: var(--accent); }

/* ── Contact ── */
.contact-box {
  background: var(--white);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  max-width: 560px;
  margin: 2rem auto 0;
  box-shadow: 0 2px 12px rgba(18,46,94,0.10);
  text-align: center;
}

.contact-box a { font-weight: 700; }

.social-links { display: flex; gap: 1rem; justify-content: center; margin-top: 1.25rem; }
.social-links a {
  background: var(--navy);
  color: var(--white);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 700;
}
.social-links a:hover { background: var(--accent); text-decoration: none; }

/* ── Page hero (inner pages) ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.page-hero h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
.page-hero p  { opacity: 0.85; max-width: 600px; margin: 0 auto; }

/* ── Footer ── */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
}

footer a { color: rgba(255,255,255,0.85); }
footer a:hover { color: var(--white); }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-links { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }

.footer-github {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.footer-github a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
}

.footer-github a:hover { color: var(--white); text-decoration: none; }

.footer-github img {
  width: 16px;
  height: 16px;
  opacity: 0.75;
  filter: invert(1);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .cards   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  h1 { font-size: 1.9rem; }
  .hero h1 { font-size: 2rem; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .cards   { grid-template-columns: 1fr; }
  nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy-dark); padding: 0.5rem 0; }
  nav.open { display: flex; }
  nav a { height: auto; padding: 0.75rem 1.5rem; border-bottom: none; border-left: 3px solid transparent; }
  nav a.active, nav a:hover { border-left-color: var(--accent); }
  .nav-toggle { display: block; }
  .nav-dropdown { display: block; }
  .nav-dropdown-btn {
    width: 100%;
    height: auto;
    padding: 0.75rem 1.5rem;
    border-bottom: none;
    border-left: 3px solid transparent;
    justify-content: flex-start;
  }
  .nav-dropdown-btn.active,
  .nav-dropdown-btn:hover { border-bottom-color: transparent; border-left-color: var(--accent); }
  .nav-dropdown-menu { position: static; box-shadow: none; border-top: none; border-radius: 0; background: rgba(0,0,0,0.15); }
  .nav-dropdown-menu a { padding-left: 2.5rem; }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
}
