:root {
  --paper: #f4f1e8;
  --paper-bright: #fbfaf5;
  --paper-green: #e7f0ea;
  --ink: #17201d;
  --muted: #58645f;
  --faint: #46524c;
  --line: #bbc1b8;
  --line-strong: #6d7872;
  --accent: #006b4f;
  --accent-dark: #004c39;
  --accent-soft: #d8ebe4;
  --console: #b6482f;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --shell: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 32, 29, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 29, 0.032) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--paper-bright);
  background: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  color: var(--paper-bright);
  background: var(--accent);
  font: 700 0.75rem/1 var(--mono);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 2.5rem), var(--shell));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid transparent;
  background: rgba(244, 241, 232, 0.86);
  backdrop-filter: blur(16px);
  transition: border-color 160ms ease, background 160ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(244, 241, 232, 0.97);
}

.header-inner {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.2rem);
}

.site-nav a,
.contact-links a,
.footer-inner a {
  color: var(--ink);
  font: 700 0.7rem/1.2 var(--mono);
  letter-spacing: 0.05em;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  text-transform: uppercase;
}

.site-nav a:hover,
.contact-links a:hover,
.footer-inner a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  font: 700 0.7rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-glyph {
  display: inline-block;
  width: 1.25rem;
  height: 0.75rem;
  margin-left: 0.5rem;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.hero {
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(4.5rem, 9vw, 7rem);
  border-bottom: 1px solid var(--line-strong);
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: clamp(3rem, 7vw, 6rem);
  grid-template-columns: minmax(20rem, 0.82fr) minmax(0, 1.18fr);
}

.hero-copy {
  padding-left: clamp(1.25rem, 2.5vw, 2rem);
  border-left: 2px solid var(--accent);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.identity-photo {
  width: clamp(4.75rem, 8vw, 6.5rem);
  height: clamp(4.75rem, 8vw, 6.5rem);
  flex: none;
  border: 1px solid var(--ink);
  object-fit: cover;
  image-rendering: pixelated;
}

.eyebrow,
.section-index,
.filter-label {
  margin: 0 0 1.15rem;
  color: var(--accent);
  font: 700 0.69rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  margin-bottom: 0.45rem;
  color: var(--console);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
}

.hero h1 {
  max-width: none;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2.55rem, 4.4vw, 4.35rem);
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 1;
}

.profile-domain {
  margin: 0.55rem 0 0;
  color: var(--accent);
  font: 700 0.78rem/1.4 var(--mono);
}

.hero-lede {
  max-width: 62ch;
  margin: 1.65rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(0.9rem, 1.35vw, 1rem);
  line-height: 1.8;
}

.profile-principle {
  max-width: 64ch;
  margin: 1.3rem 0 0;
  padding: 0.8rem 0.9rem;
  border-left: 2px solid var(--console);
  color: var(--ink);
  background: rgba(231, 240, 234, 0.72);
  font: 600 0.78rem/1.65 var(--mono);
}

.profile-principle span {
  margin-right: 0.55rem;
  color: var(--console);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.35rem;
  margin-top: 1.8rem;
}

.command-link {
  color: var(--accent);
  font: 700 0.78rem/1.5 var(--mono);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.command-link:hover {
  color: var(--console);
}

.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font: 700 0.7rem/1 var(--mono);
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: var(--accent);
  color: var(--paper-bright);
  background: var(--accent);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-quiet {
  background: transparent;
}

.button-quiet:hover {
  color: var(--paper-bright);
  background: var(--ink);
}

.hero-visual {
  width: min(100%, 43rem);
  justify-self: end;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid var(--ink);
  background: var(--paper-bright);
}

.hero-visual img {
  width: 100%;
}

.hero-arena img {
  height: auto;
  object-fit: contain;
}

.hero-visual figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 0.15rem 0.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-visual figcaption span {
  flex: none;
  color: var(--accent);
  font: 700 0.62rem/1.5 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section {
  padding: clamp(4.5rem, 9vw, 8rem) 0;
  border-bottom: 1px solid var(--line-strong);
}

.section-heading {
  display: grid;
  align-items: end;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.72fr);
}

.section-heading h2,
.contact h2 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.5rem, 4.6vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.section-intro {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

div.section-intro p {
  margin: 0 0 1.25rem;
}

.section-cves {
  background: rgba(251, 250, 245, 0.7);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.1rem;
  padding: 0;
  border: 0;
}

.filter-label {
  margin: 0;
}

.filter-options {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-button {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  background: var(--paper-bright);
  font: 700 0.66rem/1 var(--mono);
  cursor: pointer;
}

.filter-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-button.is-active {
  border-color: var(--accent);
  color: var(--paper-bright);
  background: var(--accent);
}

.filter-count {
  margin: 0;
  color: var(--faint);
  font: 700 0.66rem/1 var(--mono);
  white-space: nowrap;
}

.cve-table-wrap {
  overflow-x: auto;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper-bright);
}

.cve-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.cve-table th,
.cve-table td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.cve-table thead th {
  color: var(--faint);
  background: var(--paper-green);
  font: 700 0.65rem/1.2 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cve-table thead th:first-child,
.cve-table tbody th {
  width: 15rem;
  border-right: 1px solid var(--line);
}

.cve-table tbody th {
  font: 700 0.82rem/1.35 var(--mono);
  white-space: nowrap;
}

.cve-table tbody td {
  font-size: 0.95rem;
}

.cve-table tbody tr:last-child th,
.cve-table tbody tr:last-child td {
  border-bottom: 0;
}

.cve-table tbody tr:hover {
  background: var(--accent-soft);
}

.cve-table a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.cve-table a::after {
  content: " ↗";
}

.section-research {
  background: rgba(244, 241, 232, 0.72);
}

.featured-research {
  display: grid;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper-bright);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.featured-copy {
  padding: clamp(1.5rem, 4.5vw, 3.75rem);
}

.featured-copy h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3.8vw, 3.65rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.featured-copy > p:not(.eyebrow) {
  margin: 1.4rem 0 0;
  color: var(--muted);
}

.research-stats {
  display: grid;
  margin: 1.8rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
}

.research-stats div {
  padding: 0.9rem 0;
}

.research-stats div + div {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.research-stats dt {
  color: var(--faint);
  font: 700 0.6rem/1.2 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.research-stats dd {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: 1.55rem;
}

.featured-media {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: clamp(1.25rem, 3.5vw, 3rem);
  border-left: 1px solid var(--line);
  background: var(--paper-green);
}

.featured-media img {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--paper-bright);
}

.featured-media figcaption {
  margin-top: 0.8rem;
  color: var(--faint);
  font: 700 0.62rem/1.4 var(--mono);
  text-align: right;
  text-transform: uppercase;
}

.section-writing {
  background: rgba(251, 250, 245, 0.82);
}

.writing-grid {
  border-top: 2px solid var(--ink);
}

.post-card {
  display: grid;
  gap: 0.35rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 11rem minmax(0, 1fr);
}

.post-meta {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  margin: 0;
  color: var(--faint);
  font: 700 0.63rem/1.4 var(--mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  grid-row: 1 / span 2;
}

.post-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.post-card h3 a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.post-card h3 a::after {
  content: " ↗";
  font: 700 0.75rem/1 var(--mono);
}

.post-card > p:not(.post-meta) {
  max-width: 64ch;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact {
  background: var(--paper-green);
}

.contact-grid {
  display: grid;
  align-items: start;
  gap: 3rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
}

.contact-copy > p {
  max-width: 40ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.email-reveal {
  display: flex;
  min-height: 4rem;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

.email-output a {
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  text-underline-offset: 0.25em;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.contact-links .social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
}

.social-link svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: currentColor;
}

.social-link strong {
  font-weight: 700;
}

.site-footer {
  padding: 1.2rem 0;
  background: var(--paper);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--faint);
  font: 700 0.62rem/1.4 var(--mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .hero-grid,
  .section-heading,
  .featured-research,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    width: min(100%, 43rem);
    justify-self: start;
  }

  .section-heading {
    align-items: start;
  }

  .featured-media {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 1.25rem), var(--shell));
  }

  .header-inner {
    min-height: 4.1rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .js .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0.625rem;
    left: 0.625rem;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem;
    border: 1px solid var(--ink);
    background: var(--paper-bright);
    box-shadow: 0 16px 34px rgba(23, 32, 29, 0.12);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 11vw, 4rem);
  }

  .hero-grid {
    gap: 3rem;
  }

  .hero-copy {
    padding-left: 1rem;
  }

  .hero-visual figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .profile-identity {
    align-items: flex-start;
  }

  .identity-photo {
    width: 4.75rem;
    height: 4.75rem;
  }

  .filter-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-count {
    align-self: flex-end;
  }

  .cve-table th,
  .cve-table td {
    padding: 0.85rem 0.75rem;
  }

  .cve-table thead th:first-child,
  .cve-table tbody th {
    width: 10.5rem;
  }

  .cve-table tbody th {
    font-size: 0.7rem;
  }

  .cve-table tbody td {
    font-size: 0.85rem;
    line-height: 1.45;
  }

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

  .research-stats div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .post-card {
    gap: 0.75rem;
    grid-template-columns: 1fr;
  }

  .post-meta {
    display: flex;
    justify-content: space-between;
    grid-row: auto;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .featured-copy .button,
  div.section-intro .button {
    width: 100%;
  }

  .cve-table thead th:first-child,
  .cve-table tbody th {
    width: 9.4rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
