/* ============================================================
   MAGGIE POWELL — Academic Portfolio
   Clean minimal, slate-blue accent, Inter typeface
============================================================ */

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

:root {
  --accent:       #2B6CB0;
  --accent-dark:  #2358A5;
  --accent-light: #EBF4FF;
  --text:         #1a202c;
  --muted:        #718096;
  --border:       #E2E8F0;
  --bg:           #ffffff;
  --bg-alt:       #F7FAFC;
  --nav-h:        56px;
  --max-w:        800px;
  --radius:       6px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

/* === Layout === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.75rem;
}

section {
  padding: 4.5rem 0;
}
section.alt-bg {
  background: var(--bg-alt);
}

/* === Typography === */
h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
  color: var(--text);
}
h2::after {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  background: var(--accent);
  margin-top: 0.5rem;
}

em { font-style: italic; }
strong { font-weight: 600; }

/* ============================================================
   NAVIGATION
============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.75rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-weight: 600;
  font-size: 0.975rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nav-name:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   ABOUT
============================================================ */
#about {
  padding-top: calc(var(--nav-h) + 3.5rem);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 3.5rem;
  align-items: start;
}

.about-text h1 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}

.about-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.4rem;
}

.about-text p {
  font-size: 0.925rem;
  margin-bottom: 0.9rem;
  color: #2d3748;
}

/* Link pills */
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.about-links a {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  transition: color 0.15s, border-color 0.15s;
}
.about-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* Photo column */
.about-photo {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.about-photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.about-affil {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.affil-badge {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  padding: 0.25rem 0.6rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ============================================================
   NEWS
============================================================ */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-list li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  align-items: baseline;
}

.news-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
}

/* ============================================================
   RESEARCH
============================================================ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.research-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.research-card:hover {
  border-color: #bee3f8;
  box-shadow: 0 2px 12px rgba(43,108,176,0.07);
}

.research-icon {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.research-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.research-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ============================================================
   PUBLICATIONS
============================================================ */
.pub-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1.25rem;
  margin-top: 2.75rem;
}
.pub-category:first-of-type {
  margin-top: 0;
}

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.pub-item {
  border-left: 2px solid var(--border);
  padding-left: 1.1rem;
  transition: border-color 0.15s;
}
.pub-item:hover {
  border-color: var(--accent);
}

.pub-main {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.pub-title {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  flex: 1;
  min-width: 200px;
}

.pub-authors {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

.pub-venue {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}
.pub-venue em {
  color: #4a5568;
}

/* Badges */
.pub-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.badge-preprint { background: #FEF3C7; color: #92400E; }
.badge-journal  { background: var(--accent-light); color: #1e4e8c; }
.badge-conf     { background: #F0FDF4; color: #166534; }

/* ============================================================
   CV
============================================================ */
.cv-blurb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.btn-download {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s;
}
.btn-download:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ============================================================
   FOOTER
============================================================ */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
footer p {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
footer a {
  color: var(--muted);
}
footer a:hover {
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 700px) {
  :root { --max-w: 100%; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-photo {
    order: -1;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  .about-photo img {
    width: 120px;
    flex-shrink: 0;
  }
  .about-affil {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .about-text h1 { font-size: 1.7rem; }

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

  .nav-links {
    gap: 1.1rem;
  }
  .nav-links a {
    font-size: 0.8rem;
  }

  .news-list li {
    grid-template-columns: 62px 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 400px) {
  .nav-links { gap: 0.75rem; }
  .about-text h1 { font-size: 1.5rem; }
}
