/* ===========================
   Neil C. Swart — Research Site
   style.css
   =========================== */

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

:root {
  --navy:    #0d2137;
  --navy2:   #122840;
  --blue:    #1a4a73;
  --accent:  #3a9bd5;
  --accent2: #2e86c1;
  --gold:    #e6a817;
  --text:    #1f2d3d;
  --text-lt: #4a5568;
  --bg:      #f7f9fc;
  --bg2:     #eef2f7;
  --white:   #ffffff;
  --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
  --card-radius: 12px;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; font-size: 16px; }

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

a { color: var(--accent2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

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

/* --- Navbar --- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(13, 33, 55, 0.97);
  backdrop-filter: blur(8px);
  z-index: 1000;
  transition: box-shadow 0.3s;
}
#navbar.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.3); }

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.01em;
}
.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: 0.3s;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent2);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(58,155,213,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
}

/* --- Sections --- */
.section { padding: 5rem 0; }
.section-light { background: var(--bg); }
.section-dark  { background: var(--navy2); color: var(--white); }
.section-hero  { background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%); color: var(--white); }

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: inherit;
}
.section-dark .section-title { color: var(--white); }
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-lt);
  margin-bottom: 2.5rem;
}
.section-dark .section-subtitle { color: rgba(255,255,255,0.65); }

/* --- Hero --- */
.hero {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy2) 50%, var(--blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
  position: relative;
}

.hero-bg-globe {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 680px;
  height: 680px;
  object-fit: contain;
  opacity: 0.30;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-content {
  max-width: 900px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.hero-photo-wrap {
  flex-shrink: 0;
}
.hero-photo {
  width: 235px;
  height: 235px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  border: 4px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.hero-text { color: var(--white); }
.hero-text h1 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
.hero-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.hero-affil {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.9rem;
  line-height: 1.5;
}
.hero-tagline {
  font-size: 0.93rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  max-width: 520px;
  border-left: 3px solid var(--accent);
  padding-left: 0.85rem;
}

.hero-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 1.3rem;
  animation: bounce 2s infinite;
}
.scroll-down:hover { color: rgba(255,255,255,0.8); }

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text);
}
.about-text .lead {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
}

.about-text h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.about-text ul { padding-left: 1.25rem; }
.about-text li { margin-bottom: 0.35rem; color: var(--text-lt); }

.award-card {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--accent);
}
.award-icon {
  font-size: 1.5rem;
  color: var(--accent2);
  margin-bottom: 0.5rem;
}
.award-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--navy);
}
.award-card ul { padding-left: 1.1rem; }
.award-card li { font-size: 0.875rem; margin-bottom: 0.4rem; color: var(--text-lt); }
.award-card p { font-size: 0.875rem; color: var(--text-lt); }

/* --- Research Grid --- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.research-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--card-radius);
  padding: 1.75rem;
  transition: transform 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
}
.research-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.1);
}
.research-icon {
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.research-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.6rem;
}
.research-card p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.6;
  flex: 1;
}
.research-card li {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255,255,255,0.68);
  line-height: 1.6;
}
.research-papers {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.32);
}
.research-papers a {
  color: var(--accent);
  opacity: 0.6;
  transition: opacity 0.2s;
}
.research-papers a:hover { opacity: 1; }

/* --- Projects --- */
.projects-list { display: flex; flex-direction: column; gap: 1.5rem; }

.project-item {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--card-shadow);
  border-left: 5px solid var(--accent2);
  transition: box-shadow 0.2s;
}
.project-item:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.12); }

.project-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.project-tag {
  background: var(--bg2);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.project-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
}
.project-item p {
  color: var(--text-lt);
  font-size: 0.93rem;
  line-height: 1.65;
}
.project-links {
  margin-top: 0.85rem;
  display: flex;
  gap: 1rem;
}
.project-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent2);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.project-links a:hover { color: var(--accent); }

/* --- Publications --- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.pub-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}
.pub-item.featured {
  border-color: var(--gold);
  background: rgba(230,168,23,0.07);
}

.pub-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.pub-badge {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pub-badge.accent {
  background: var(--gold);
  color: var(--navy);
}

.pub-ref {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}
.pub-ref strong { color: var(--white); }
.pub-ref em { color: rgba(255,255,255,0.65); }
.pub-ref a { color: var(--accent); font-size: 0.85rem; }
.pub-ref a:hover { color: rgba(58,155,213,0.8); }

.pub-cta { text-align: center; }

/* --- Impact --- */
.impact-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.metric-card {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 1.75rem 1rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  border-top: 4px solid var(--accent2);
}
.metric-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-serif);
}
.metric-label {
  font-size: 0.8rem;
  color: var(--text-lt);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}
.impact-block {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
}
.impact-block h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.impact-block h3 i { color: var(--accent2); }
.impact-block p { font-size: 0.9rem; color: var(--text-lt); line-height: 1.6; }
.impact-block ul { padding-left: 1.1rem; }
.impact-block li { font-size: 0.875rem; color: var(--text-lt); margin-bottom: 0.35rem; line-height: 1.5; }
.impact-block strong { color: var(--text); }

.award-list { padding-left: 0; list-style: none; }
.award-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg2);
  font-size: 0.875rem;
  color: var(--text-lt);
  line-height: 1.5;
}
.award-list li:last-child { border-bottom: none; }
.award-list strong { color: var(--text); }

/* --- Contact --- */
.contact-container { max-width: 860px; margin: 0 auto; }
.section-title.light { color: var(--white); }
.section-title.light::after { background: var(--accent); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  max-width: 560px;
}

.contact-lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}
.contact-list i {
  color: var(--accent);
  margin-top: 0.15rem;
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
}
.contact-list a { color: var(--accent); }
.contact-list a:hover { color: rgba(58,155,213,0.8); }

.contact-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.contact-links a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s, transform 0.2s;
}
.contact-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}


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

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

@media (max-width: 700px) {
  .hero-bg-globe { width: 400px; height: 400px; opacity: 0.07; right: -20%; }
  .hero-content { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-text h1 { font-size: 2rem; }
  .hero-tagline { border-left: none; padding-left: 0; }
  .hero-links { justify-content: center; }
  .research-grid { grid-template-columns: 1fr; }
  .research-papers { font-size: 0.75rem; }
  .impact-metrics { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .section-title { font-size: 1.6rem; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  #navbar { position: fixed; }
}

@media (max-width: 480px) {
  .impact-metrics { grid-template-columns: 1fr 1fr; }
  .hero-photo { width: 175px; height: 175px; }
  .project-item { padding: 1.25rem; }
}
