:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f2f5f8;
  --border: #d9e0e7;
  --text: #172330;
  --muted: #5f6f82;
  --muted-2: #8a97a8;
  --brand: #2e5e94;
  --brand-2: #244b76;
  --accent: #29a84f;
  --shadow-sm: 0 6px 18px rgba(10, 24, 40, 0.06);
  --shadow-md: 0 18px 38px rgba(10, 24, 40, 0.12);
  --radius: 14px;
  --radius-lg: 20px;
  --max: 1140px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

strong {
  font-weight: 700;
}

.container {
  width: min(var(--max), calc(100% - 2.2rem));
  margin: 0 auto;
}

.section {
  padding: clamp(4.6rem, 8vw, 6.6rem) 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 84px;
}

.section-alt {
  background: linear-gradient(to bottom, rgba(46, 94, 148, 0.04), rgba(46, 94, 148, 0.01));
}

.section-head {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.section h2 {
  font-size: clamp(1.45rem, 1rem + 1.3vw, 2.2rem);
}

.section-head p {
  max-width: 70ch;
  color: var(--muted);
}

.about-headshot {
  display: block;
  width: 130px;
  height: 130px;
  float: left;
  margin: 0.2rem 1rem 0.65rem 0;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.about-content {
  display: block;
}

.about-content p {
  color: var(--muted);
  margin: 0 0 0.9rem 0;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-aside {
  display: grid;
  gap: 1rem;
}

.about-aside .list-card {
  background: linear-gradient(to bottom, rgba(46, 94, 148, 0.1), rgba(46, 94, 148, 0.05));
  border-color: rgba(36, 75, 118, 0.26);
}

.section-foot {
  margin-top: 1.7rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(46, 94, 148, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: saturate(1.2) blur(10px);
  transition: box-shadow 220ms var(--ease), background 220ms var(--ease);
}

.site-header.is-elevated {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 0.8rem;
}

.brand:hover,
.brand:active {
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 750;
  color: #ffffff;
}

.brand-tag {
  margin-top: 0.15rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.8);
}

.nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.7rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 620;
  transition: background 220ms var(--ease), color 220ms var(--ease), transform 220ms var(--ease);
}

.nav-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-links a:active,
.nav-links a:focus,
.nav-links a:focus-visible,
.brand:focus,
.brand:focus-visible {
  text-decoration: none;
}

.nav-links a,
.brand,
.nav-toggle {
  -webkit-tap-highlight-color: transparent;
}

.nav-links a:focus-visible,
.nav-toggle:focus-visible,
.brand:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 18px;
  height: 2px;
  background: #ffffff;
  border-radius: 10px;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(10, 24, 40, 0.18);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: #229042;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero {
  position: relative;
  overflow: hidden;
  background-image: url("../img/hero-mobile.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-color: var(--brand);
  border-top: 0;
  color: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(10, 15, 25, 0.78),
    rgba(10, 15, 25, 0.55) 40%,
    rgba(10, 15, 25, 0.35) 70%,
    rgba(10, 15, 25, 0.2) 100%
  );
  z-index: 1;
}

.hero .container,
.hero .hero-grid,
.hero .hero-copy {
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .hero {
    background-image: url("../img/hero-desktop.jpg");
    background-size: cover;
  }
}

.hero-grid {
  display: grid;
  align-items: center;
  min-height: min(78vh, 760px);
  padding-top: 2rem;
}

.hero-copy {
  max-width: 78ch;
  text-align: center;
  margin: 0 auto;
}

.kicker {
  margin-bottom: 0.95rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hero-title {
  font-size: clamp(2rem, 1.4rem + 2.3vw, 3.35rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.hero-subtitle {
  margin: 1.05rem auto 1.45rem;
  max-width: 70ch;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
}

.cred-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cred-pill {
  padding: 0.42rem 0.74rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.bullets {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.bullets li {
  margin: 0.52rem 0;
}

.bullets.compact li {
  margin: 0.38rem 0;
}

.list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  height: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform 260ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}

.card:hover {
  border-color: #c2ceda;
  box-shadow: 0 14px 32px rgba(10, 24, 40, 0.12);
  transform: translateY(-4px);
}

.service-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 1rem;
}

.service-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--accent);
  stroke-width: 1.8;
}

.card:hover .service-icon svg {
  stroke: #229042;
}

.card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.06rem;
}

.card p {
  margin-bottom: 0.85rem;
  color: var(--muted);
}

.card-meta {
  margin-top: 0.35rem;
  margin-bottom: 0;
  color: var(--muted-2);
  font-size: 0.92rem;
}

.contact-detail {
  margin-top: 0.9rem;
}

.contact-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.contact-social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  transition: transform 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease), filter 220ms var(--ease);
}

.contact-social-link:hover,
.contact-social-link:focus-visible {
  text-decoration: none;
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.36);
  filter: saturate(1.12);
}

.contact-social-link svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2.2;
}

.contact-social-link::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 6px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(7, 9, 12, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0.28rem 0.5rem;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.contact-social-link:hover::after,
.contact-social-link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.social-email {
  background: rgba(41, 168, 79, 0.3);
  border-color: rgba(41, 168, 79, 0.8);
}

.social-x {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.78);
}

.social-linkedin {
  background: rgba(10, 102, 194, 0.35);
  border-color: rgba(80, 164, 255, 0.9);
}

.social-substack {
  background: rgba(255, 102, 0, 0.32);
  border-color: rgba(255, 150, 79, 0.88);
}

.social-github {
  background: rgba(120, 133, 155, 0.28);
  border-color: rgba(198, 208, 222, 0.82);
}

.contact-social-mark {
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.experience-list {
  max-width: 95ch;
}

.publication-list {
  display: grid;
  gap: 0.8rem;
}

.publication-item {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

.publication-item:hover {
  border-color: #c2ceda;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(10, 24, 40, 0.1);
}

.publication-item h3 {
  margin: 0.3rem 0;
  font-size: 1.04rem;
}

.publication-type {
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.publication-modal {
  max-width: min(680px, calc(100% - 2rem));
  border: 0;
  padding: 0;
  border-radius: 14px;
}

.publication-modal[open] {
  animation: modalIn 200ms var(--ease);
}

.publication-modal::backdrop {
  background: rgba(18, 32, 49, 0.55);
}

.publication-modal[open]::backdrop {
  animation: backdropIn 200ms var(--ease);
}

.publication-modal-card {
  padding: 1.25rem;
  background: #ffffff;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-close {
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-meta {
  margin-bottom: 0.6rem;
  color: var(--muted-2);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
}

.modal-title {
  margin: 0 0 0.6rem 0;
  font-size: clamp(1.3rem, 1rem + 1.2vw, 1.6rem);
  line-height: 1.15;
  color: var(--accent);
}

.modal-venue {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.modal-body {
  line-height: 1.6;
}

.modal-desc {
  margin: 0;
  color: var(--muted);
}

#publication-modal-resources {
  margin-top: 1rem;
}

.modal-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.modal-resources a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--brand-2);
  background: rgba(255, 255, 255, 0.6);
}

.modal-resources a:hover {
  border-color: #c2ceda;
  background: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.modal-resources a svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
  flex-shrink: 0;
}


#contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0f1114;
  color: #ffffff;
}

#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-mobile.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  filter: grayscale(100%) contrast(92%) brightness(72%);
  transform: scale(1.02);
  z-index: -2;
}

#contact::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 12, 15, 0.38), rgba(10, 12, 15, 0.58));
  z-index: -1;
}

@media (min-width: 768px) {
  #contact::before {
    background-image: url("../img/hero-desktop.jpg");
  }
}

#contact h2,
#contact h3 {
  color: #ffffff;
}

#contact .section-head p {
  color: rgba(255, 255, 255, 0.82);
}

#contact .container {
  position: relative;
  z-index: 1;
}

#contact .muted {
  color: rgba(255, 255, 255, 0.78);
}

#contact .legal-inner a {
  color: #ffffff;
}

.legal {
  padding-top: 1.8rem;
}

.legal-inner {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 1.1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.996);
  filter: blur(2px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease), filter 520ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .brand-tag {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 66px;
    right: 1rem;
    width: min(360px, calc(100vw - 2rem));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.34rem;
    padding: 0.55rem;
    border-radius: 14px;
    background: #2e5e94;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow-md);
  }

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

  .nav-links a {
    padding: 0.68rem 0.75rem;
  }
}

@media (max-width: 720px) {
  .about-headshot {
    float: none;
    margin: 0 0 0.9rem 0;
  }

  .contact-social {
    gap: 0.5rem;
  }

  .contact-social-link {
    width: 46px;
    height: 46px;
  }

  .contact-social-link svg {
    width: 1.05rem;
    height: 1.05rem;
  }

  .contact-social-mark {
    font-size: 0.98rem;
  }

  .legal-inner a {
    display: inline-block;
    padding: 0.8rem 0;
  }

  .hero-title {
    font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.5rem);
  }

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

  .legal-inner {
    flex-wrap: wrap;
  }
}
