/* Base – DM Sans, self-hosted */
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/dm-sans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/dm-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2d3748;
  background: #e8f0e8;
  min-height: 100vh;
}

a {
  color: #0d5c2e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: #0a4a24;
}

a:focus-visible {
  outline: 2px solid #0d5c2e;
  outline-offset: 2px;
}

/* Top menu bar */
.menu-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #2d6a4f;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.menu-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 0.35rem 0.5rem 0.35rem 0;
  display: inline-flex;
  align-items: center;
}

.site-title:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Navigation in menu bar */
.menu-bar .top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.menu-bar .top-nav li {
  margin: 0;
}

.menu-bar .top-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.menu-bar .top-nav a:hover {
  color: #fff;
}

.menu-bar .top-nav a.current {
  color: #fff;
}

/* Personal dropdown */
.menu-bar .top-nav li.has-dropdown {
  position: relative;
}

.menu-bar .top-nav .dropdown-trigger {
  cursor: pointer;
}

.menu-bar .top-nav .has-dropdown .dropdown-trigger {
  background: none;
  border: none;
  font: inherit;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}

.menu-bar .top-nav .has-dropdown .dropdown-trigger:hover,
.menu-bar .top-nav .has-dropdown .dropdown-trigger.current {
  color: #fff;
}

.menu-bar .top-nav .has-dropdown .dropdown-trigger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.menu-bar .top-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 10rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #1b4332;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
  flex-direction: column;
  gap: 0;
}

.menu-bar .top-nav li.has-dropdown:hover .dropdown-menu,
.menu-bar .top-nav li.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-bar .top-nav .dropdown-menu a {
  display: block;
  padding: 0.4rem 1rem;
  white-space: nowrap;
}

.menu-bar .top-nav .dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Page content area */
.page-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 2rem;
}

/* Main content */
.content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
  text-align: left;
  transition: box-shadow 0.2s ease;
}

.content:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content h1 {
  font-size: 1.75rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
  color: #1a202c;
  letter-spacing: 0.02em;
}

.content h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem 0;
  font-weight: 600;
  color: #2d3748;
  letter-spacing: 0.02em;
}

.content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem 0;
  letter-spacing: 0.02em;
}

/* Table of contents - no underline on nav links */
.page-toc {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.page-toc a {
  text-decoration: none;
}
.page-toc a:hover {
  text-decoration: underline;
}

.content p {
  margin: 0 0 1rem 0;
}

.content ul {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.email-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.email-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

.content li {
  margin-bottom: 0.35rem;
}

/* Research page – topic boxes */
.research-topic {
  border: 1px solid #e2e8e2;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  transition: background-color 0.2s ease;
}

.research-topic:hover {
  background-color: #eef5ee;
}

.research-topic:last-child {
  margin-bottom: 0;
}

.research-topic h2 {
  margin-top: 0;
}

/* Home page hero */
.home-hero {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 0;
}

.home-hero-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-headshot {
  border-radius: 8px;
  display: block;
}

.home-intro {
  flex: 1;
  min-width: 0;
}

.home-intro h1 {
  margin-top: 0;
}

.home-intro .lead {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a {
  color: #0d5c2e;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
}

.social-links a:hover {
  background: #e8f0e8;
  color: #0a4a24;
}

.social-icon {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Code and preformatted */
tt, code {
  font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Mono", "Consolas", monospace;
  font-size: 0.9em;
  background: #f7faf7;
  padding: 0.15em 0.35em;
  border-radius: 4px;
  color: #0d5c2e;
}

pre {
  background: #f7faf7;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid #e2e8e2;
  font-size: 0.85rem;
  line-height: 1.5;
}

.content code {
  max-width: 100%;
}

.content > code {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Reference list container - ensures block layout */
.ref-list {
  display: block;
}

/* Reference items (bibliography style) - left-aligned site-wide */
.ref-item {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  text-align: left;
}

/* Title/author centering for certain pages (riskcomm, etc.) */
.center {
  text-align: center;
}

/* Paper header – centered title and metadata for research articles */
.paper-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.paper-header h2 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.paper-header p {
  margin: 0;
  font-size: 0.95rem;
  color: #4a5568;
}

/* Speaking list – structured list with separators */
.speaking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.speaking-list li {
  padding: 0.25rem 0;
  margin-bottom: 0;
}

/* Blog index – heading (override .content h1) */
.content h1.blog-heading {
  font-size: calc(1rem + 2pt);
  font-weight: 500;
}

/* Blog index – card grid */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.blog-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8e2;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s;
}

.blog-card:hover {
  background: #e8e8e8;
  color: inherit;
  text-decoration: none;
}

.blog-card-img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 6px;
}

.blog-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.blog-card-title {
  font-weight: 600;
}


.blog-card-date {
  font-size: 0.9rem;
  color: #5a6c5d;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: #4a5568;
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Blog post pages */
.blog-featured-img {
  margin: 0 0 1.5rem 0;
}

.blog-featured-img img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.blog-meta {
  font-size: 0.9rem;
  color: #5a6c5d;
  margin-bottom: 1rem;
}

.blog-post-content {
  margin-top: 1rem;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 1rem 0;
}

.blog-post-content .wp-block-image {
  margin: 1.5rem 0;
}

.blog-post-content figure {
  margin: 1.5rem 0;
}

.blog-post-content figcaption {
  font-size: 0.9rem;
  color: #5a6c5d;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Organizations grid */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.org-card {
  border: 1px solid #e2e8e2;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.org-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.org-card-link {
  display: block;
  padding: 1.25rem;
  color: inherit;
  text-decoration: none;
}

.org-card-link:hover {
  text-decoration: none;
}

.org-logo {
  display: block;
  margin-bottom: 1rem;
  max-width: 120px;
  height: auto;
  object-fit: contain;
}

.org-card h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
}

.org-card p {
  font-size: 0.9rem;
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.org-card a {
  text-decoration: none;
}

.org-card a:hover {
  text-decoration: none;
}

.org-card-header-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.org-card-header-link:hover {
  text-decoration: none;
}

.org-link {
  font-size: 0.85rem;
  color: #0d5c2e;
}

.ham-illustration {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.ham-intro-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin: 0 0 2rem 0;
}

.ham-intro-text {
  flex: 1;
  min-width: 0;
}

.ham-intro-img {
  flex-shrink: 0;
}

.ham-globe-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin: 2rem 0;
}

.ham-globe-fig {
  flex-shrink: 0;
  margin: 0;
}

.ham-globe-fig img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.ham-globe-text {
  flex: 1;
  min-width: 0;
}

.ham-globe-standalone {
  margin: 2rem 0 0 0;
}

.ham-globe-standalone img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 640px) {
  .menu-bar {
    position: static;
  }

  .menu-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.25rem 1rem;
    gap: 0;
  }

  .menu-bar .top-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .menu-bar .top-nav .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.15);
    margin: 0 0 0 1rem;
    padding: 0.25rem 0;
  }

  .menu-bar .top-nav li.has-dropdown:hover .dropdown-menu,
  .menu-bar .top-nav li.has-dropdown:focus-within .dropdown-menu {
    display: block;
  }

  .menu-bar .top-nav a {
    margin: 0;
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  .menu-bar .top-nav li:last-child a {
    border-bottom: none;
  }

  .site-title {
    padding: 0.4rem 0.5rem;
  }

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

  .home-hero-side {
    align-items: center;
  }

  .page-wrap {
    padding: 1.25rem 1rem;
  }

  .content {
    padding: 1.25rem 1rem;
  }

  .ham-intro-row,
  .ham-globe-row {
    flex-direction: column;
  }
}

/* Site footer */
.site-footer {
  font-size: 0.75rem;
  color: #5a6c5d;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
  border-top: 1px solid #d4e0d4;
}

/* Print styles */
@media print {
  .menu-bar,
  .site-footer,
  .page-toc {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .content {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .page-wrap {
    max-width: none;
    padding: 0;
  }

  a {
    color: #000;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }
}
