/* ============================================
   williammerrittphd.com — Stylesheet
   ============================================ */

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

:root {
  --navy: #1a2744;
  --navy-light: #243352;
  --teal: #2a9d8f;
  --teal-light: #34b8a8;
  --off-white: #fafafa;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-400: #ced4da;
  --gray-600: #868e96;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 920px;
  --section-padding: 5rem 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
}

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

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.25;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-padding);
}

/* Alternating section backgrounds */
section:nth-of-type(even) {
  background: var(--gray-50);
}

/* --- Section Label --- */
.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--teal);
  border: none;
  margin: 1rem 0 2rem;
  border-radius: 2px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow 0.3s ease;
}

.site-nav.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

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

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-brand:hover {
  color: var(--navy);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.2s ease;
}

.nav-links a:hover {
  color: var(--navy);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 10rem 0 6rem;
  background: var(--white);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.hero-headshot {
  flex-shrink: 0;
}

.hero-headshot img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gray-100);
  box-shadow: 0 4px 24px rgba(26, 39, 68, 0.08);
}

.hero-text h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--gray-600);
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--gray-800);
  font-style: italic;
  font-family: var(--font-serif);
  line-height: 1.5;
}

/* ============================================
   ABOUT
   ============================================ */
.about-text p {
  font-size: 1.05rem;
  color: var(--gray-700);
  line-height: 1.8;
}

.about-text strong {
  color: var(--navy);
  font-weight: 600;
}

/* ============================================
   PUBLICATIONS
   ============================================ */
.pub-category {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--navy);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.pub-category:first-of-type {
  margin-top: 0;
}

.pub-list {
  list-style: none;
  counter-reset: pub-counter;
}

.pub-list li {
  counter-increment: pub-counter;
  padding: 1rem 0 1rem 2.5rem;
  position: relative;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--gray-700);
}

.pub-list li:last-child {
  border-bottom: none;
}

.pub-list li::before {
  content: counter(pub-counter) ".";
  position: absolute;
  left: 0;
  top: 1rem;
  font-weight: 600;
  color: var(--teal);
  font-size: 0.9rem;
  font-family: var(--font-sans);
}

.pub-list .journal {
  font-style: italic;
}

.pub-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  font-style: italic;
}

/* ============================================
   STANDARDS & POLICY
   ============================================ */
.standards-intro {
  font-size: 1.05rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.standards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.standards-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 1.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

section:nth-of-type(even) .standards-card {
  background: var(--white);
}

.standards-card:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 12px rgba(42, 157, 143, 0.08);
}

.standards-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.standards-card p {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.65;
}

.standards-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.standards-list li {
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.standards-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

/* ============================================
   PATENTS
   ============================================ */
.patent-stats {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
}

.patent-stat {
  flex: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
}

section:nth-of-type(odd) .patent-stat {
  background: var(--gray-50);
}

.patent-stat .number {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.patent-stat .label {
  font-size: 0.85rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.patent-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-600);
  font-style: italic;
  margin-top: 1.5rem;
}

/* ============================================
   SPEAKING
   ============================================ */
.speaking-topics {
  list-style: none;
  padding: 0;
}

.speaking-topics li {
  padding: 0.6rem 0 0.6rem 1.5rem;
  position: relative;
  font-size: 1rem;
  color: var(--gray-700);
}

.speaking-topics li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 600;
}

.speaking-cta {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--gray-600);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-section {
  background: var(--navy) !important;
  color: var(--gray-200);
}

.contact-section .section-label {
  color: var(--teal-light);
}

.contact-section h2 {
  color: var(--white);
}

.contact-section .section-divider {
  background: var(--teal-light);
}

.contact-links {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.contact-links li {
  padding: 0.6rem 0;
  font-size: 1.05rem;
}

.contact-links a {
  color: var(--teal-light);
}

.contact-links a:hover {
  color: var(--white);
}

.contact-links .contact-icon {
  display: inline-block;
  width: 1.5rem;
  text-align: center;
  margin-right: 0.5rem;
}

.contact-location {
  font-size: 0.95rem;
  color: var(--gray-400);
  margin-top: 1rem;
}

.contact-orgs {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-orgs p {
  font-size: 0.9rem;
  color: var(--gray-400);
}

.contact-orgs a {
  color: var(--teal-light);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: 3.5rem 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  }

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

  .nav-links li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 7rem 0 3.5rem;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .hero-headshot img {
    width: 160px;
    height: 160px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.65rem;
  }

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

  .patent-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .pub-list li {
    padding-left: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.75rem;
  }

  .hero-headshot img {
    width: 130px;
    height: 130px;
  }

  .nav-brand {
    font-size: 0.95rem;
  }
}
