/* ============================================================
   Sara Pollard — Academic Website
   style.css
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Custom Properties
   ------------------------------------------------------------ */
:root {
  --color-primary:       #2C5F6E;
  --color-primary-light: #3D7A8A;
  --color-accent:        #C8956B;
  --color-bg:            #FAFAF8;
  --color-surface:       #F0EFEB;
  --color-text:          #1A1A1A;
  --color-text-muted:    #5A5A5A;
  --color-border:        #D8D6D0;
  --color-white:         #FFFFFF;

  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', Times, serif;

  --nav-height: 64px;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-full: 9999px;

  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 8px 24px rgba(44, 95, 110, 0.14);

  --transition: 0.2s ease;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-light);
}

ul {
  list-style: none;
}

/* ------------------------------------------------------------
   3. Typography
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------
   4. Layout Utilities
   ------------------------------------------------------------ */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 88px 0;
}

.section--alt {
  background-color: var(--color-surface);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin: 10px auto 0;
  border-radius: var(--radius-full);
}

.section-header p {
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ------------------------------------------------------------
   5. Navigation
   ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(240, 239, 235, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--color-primary);
  letter-spacing: 0.01em;
}

.nav-logo:hover {
  color: var(--color-primary-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: var(--radius-full);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 28px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}

.nav-drawer.open {
  display: flex;
}

.nav-drawer a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition);
}

.nav-drawer a:last-child {
  border-bottom: none;
}

.nav-drawer a:hover,
.nav-drawer a.active {
  color: var(--color-primary);
}

/* ------------------------------------------------------------
   6. Hero / About Section
   ------------------------------------------------------------ */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 88px;
  background-color: var(--color-bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 56px;
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 4px;
  color: var(--color-primary);
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

.hero-accent-bar {
  width: 56px;
  height: 4px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero-bio {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-light);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(44, 95, 110, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.hero-social {
  display: flex;
  gap: 20px;
  align-items: center;
}

.hero-social a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color var(--transition);
}

.hero-social a:hover {
  color: var(--color-primary);
}

.hero-social svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hero-image-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.hero-image-wrap img {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 40% 20%;
  box-shadow: 0 8px 40px rgba(44, 95, 110, 0.18);
  border: 4px solid var(--color-white);
}

/* ------------------------------------------------------------
   7. Research Section
   ------------------------------------------------------------ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.research-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.research-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.research-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
}

.research-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.research-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.research-badge--current {
  background: rgba(44, 95, 110, 0.1);
  color: var(--color-primary);
}

.research-badge--past {
  background: rgba(90, 90, 90, 0.1);
  color: var(--color-text-muted);
}

.research-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.research-card-lab {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 12px;
}

.research-card p {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 16px;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ------------------------------------------------------------
   8. Publications Section
   ------------------------------------------------------------ */
.publications-list {
  max-width: 760px;
  margin: 0 auto;
}

.pub-entry {
  padding: 20px 20px 20px 24px;
  border-left: 3px solid var(--color-accent);
  margin-bottom: 24px;
  background: var(--color-white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-card);
}

.pub-entry:last-of-type {
  margin-bottom: 0;
}

.pub-citation {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 10px;
  color: var(--color-text);
}

.pub-citation em {
  color: var(--color-text-muted);
}

.pub-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  transition: background-color var(--transition), color var(--transition);
}

.pub-link:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.pub-in-prep {
  margin-top: 36px;
  padding: 20px 24px;
  background: rgba(44, 95, 110, 0.04);
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.pub-in-prep h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.pub-in-prep p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ------------------------------------------------------------
   9. Teaching Section
   ------------------------------------------------------------ */
.teaching-entries {
  max-width: 760px;
  margin: 0 auto 56px;
}

.teaching-entry {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.teaching-entry:last-child {
  margin-bottom: 0;
}

.teaching-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(44, 95, 110, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: bold;
  flex-shrink: 0;
}

.teaching-body h3 {
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.teaching-meta {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.teaching-body p {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* Skills subsection */
.skills-section {
  max-width: 760px;
  margin: 0 auto;
}

.skills-section h3 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.skills-group {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.skills-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 130px;
  padding-top: 4px;
  flex-shrink: 0;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ------------------------------------------------------------
   10. CV Section
   ------------------------------------------------------------ */
.cv-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.cv-summary {
  margin: 32px auto 0;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-align: left;
}

.cv-summary dl {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
}

.cv-summary dt,
.cv-summary dd {
  padding: 13px 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--color-border);
}

.cv-summary dt {
  font-weight: 700;
  color: var(--color-text-muted);
  background: rgba(44, 95, 110, 0.04);
}

.cv-summary dd {
  color: var(--color-text);
}

.cv-summary dt:last-of-type,
.cv-summary dd:last-child {
  border-bottom: none;
}

/* ------------------------------------------------------------
   11. Contact Section
   ------------------------------------------------------------ */
.contact-inner {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner > p {
  color: var(--color-text-muted);
  margin-bottom: 36px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: color var(--transition);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-item a {
  color: var(--color-text);
  font-weight: 500;
}

.contact-item a:hover {
  color: var(--color-primary);
}

/* ------------------------------------------------------------
   12. Beyond the Lab Section
   ------------------------------------------------------------ */
.beyond-intro {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

.beyond-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.beyond-media {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.beyond-media img,
.beyond-media video {
  width: 100%;
  height: 600px;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.beyond-media video {
  background: #000;
}

.beyond-media img {
  object-position: center 70%;
}

.beyond-caption {
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   13. Footer
   ------------------------------------------------------------ */
.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.75);
  padding: 24px 0;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.footer-inner a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-inner a:hover {
  color: var(--color-white);
}

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

  .hero-grid {
    grid-template-columns: 1fr 260px;
    gap: 40px;
  }

  .hero-image-wrap img {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .hero-image-wrap {
    order: -1;
  }

  .hero-accent-bar {
    margin: 0 auto 24px;
  }

  .hero-actions,
  .hero-social {
    justify-content: center;
  }

  .research-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .beyond-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .section {
    padding: 64px 0;
  }

  .teaching-entry {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .skills-group {
    flex-direction: column;
    gap: 8px;
  }

  .skills-label {
    min-width: unset;
    padding-top: 0;
  }

  .cv-summary dl {
    grid-template-columns: 1fr;
  }

  .cv-summary dt {
    border-bottom: none;
    padding-bottom: 2px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }

  h1 { font-size: 1.9rem; }

  .hero-image-wrap img {
    width: 180px;
    height: 180px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}
