/* =====================================================
   Joel Fundaun — Academic Website
   ===================================================== */

:root {
  --navy: #1d3557;
  --navy-mid: #2c4a7c;
  --navy-light: #e8eef5;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --muted: #666;
}

/* ---- Top accent bar ---- */
body::before {
  content: '';
  display: block;
  height: 5px;
  background: var(--navy);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
}

/* ---- Base ---- */
body {
  font-family: "Georgia", serif;
  color: var(--text);
  line-height: 1.85;
  font-size: 1.08rem;
  background: #fff;
  padding-top: 5px;
}

/* Sans for UI */
nav, footer, h1, h2, h3, h4,
.contact-links, .year-label,
.pub-meta, .credentials, label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---- Links ---- */
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-mid); text-decoration: underline; }

/* ---- Navbar ---- */
.navbar {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
  background: #fff !important;
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy) !important;
  letter-spacing: -0.03em;
}
.nav-link {
  color: #555 !important;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.25rem 0.6rem !important;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--navy) !important; }
.nav-link.active {
  color: var(--navy) !important;
  font-weight: 600;
}

/* ---- Profile photo ---- */
.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 24px rgba(29, 53, 87, 0.18);
}
@media (min-width: 992px) {
  .profile-photo { margin: 0 0 1.5rem 0; }
}

/* ---- Name block ---- */
.name-block h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.15rem;
  line-height: 1.2;
}
.credentials {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.4rem;
}

/* ---- Contact / social ---- */
.contact-block {
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}
.contact-block .email-link {
  font-size: 0.9rem;
  color: #444;
  display: block;
  margin-bottom: 0.9rem;
}
.contact-block .email-link:hover { color: var(--navy); text-decoration: none; }

/* Social icons — large and clear */
.social-icons {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.social-icons a {
  font-size: 2.2rem;
  color: #555;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color 0.15s, transform 0.15s;
}
.social-icons a:hover {
  color: var(--navy);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ---- Bio text ---- */
.bio-text p {
  font-size: 1.08rem;
  margin-bottom: 1.2rem;
  color: #222;
}
.bio-text p:last-child { margin-bottom: 0; }

/* ---- Page title (research, publications, teaching) ---- */
.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
  line-height: 1.1;
}
.page-subtitle {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---- Research blocks ---- */
.research-block {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.research-block:first-of-type { padding-top: 0; }
.research-block:last-child { border-bottom: none; }
.research-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.65rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--navy);
}

/* ---- Publications ---- */
.pub-year-group { margin-bottom: 1rem; }

.pub-year-row {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-year-row:last-child { border-bottom: none; }

.pub-year-label {
  font-size: 2.4rem;
  font-weight: 800;
  color: #1d3557;
  min-width: 4rem;
  text-align: right;
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -0.04em;
  padding-top: 0.1rem;
}

.pub-content { flex: 1; }

.pub-title {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.25rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
.pub-authors {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.pub-journal {
  font-size: 1.05rem;
  color: #444;
  font-style: italic;
  margin-bottom: 0.2rem;
  font-family: "Georgia", serif;
}
.pub-doi {
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Section heading for presentations/engagement */
.section-heading {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--navy);
}

/* ---- Teaching ---- */
.teaching-block {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.teaching-block:first-of-type { padding-top: 0; }
.teaching-block:last-child { border-bottom: none; }
.teaching-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.65rem;
}

/* ---- Footer ---- */
footer {
  background: #f5f7fa;
  border-top: 1px solid var(--border) !important;
}
footer p {
  font-size: 0.85rem;
  color: #999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Small label variant for "Preprint" etc */
.pub-year-label--small {
  font-size: 0.95rem;
  font-weight: 700;
  color: #bbb;
  letter-spacing: 0;
  text-transform: uppercase;
}
