:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1a2a4a;
  --muted: #5a6b86;
  --border: #e5e7eb;

  --accent: #2563eb;
  --accent-dark: #0a4aff;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);

  --radius: 12px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

/* subtle background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(37,99,235,0.06), transparent 45%);
  pointer-events: none;
  z-index: -1;
}

html {
  scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3 {
  letter-spacing: -0.02em;
  line-height: 1.2;
}

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

p {
  margin-bottom: 1rem;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent-dark);
}

/* Layout */
main {
  flex: 1;
  max-width: 850px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  text-align: left; 
}

/* Header */
header {
  background: linear-gradient(to bottom, var(--surface), #f1f5ff);
  padding: 3rem 1rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  gap: 1rem;
}

header h1 {
  font-size: 2.6rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--muted);
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
}

nav a {
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 4px;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  transition: width 0.25s ease;
}

nav a:hover::after {
  width: 100%;
}

.ocapi-logo-small {
  height: clamp(50px, 4vw, 70px);
  width: auto;
  display: block;
}

/* Sections */
section {
  margin-bottom: 4rem;
}

section:first-of-type {
  font-size: 1.05rem;
}

#project {
  text-align: justify;
  text-justify: inter-word;
  max-width: 75ch;
}

/* Team */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.team-grid .member.pi {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}
  
.member {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.member img {
  display: block;
  margin: 0 auto 1rem;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid #d9e1f2;
}

.member h3 {
  margin: 0.5rem 0 0.3rem;
}

.member p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

.member .email {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
}

/* Logo blocks */
.logo-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.ocapi-logo {
  width: min(90%, 500px);
}

/* Footer */
footer {
  background: #f1f5f9;
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
}

.footer-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.footer-left {
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.footer-logo {
  height: 80px;
  width: auto;
  display: block;
  opacity: 0.9;
}

/* Funding section */
.funding-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
  flex-wrap: wrap;
}

.funding-text {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 420px;
}

.funding-logo { 
  width: min(360px, 90%);
  height: auto;
}

/* Responsive */
@media (max-width: 700px) {
  header h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  nav {
    gap: 1rem;
  }

  main {
    margin: 2rem auto;
  }
}
