@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-light-italic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-medium-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Martina Plantijn";
  src: url("fonts/test-martina-plantijn-black-italic.woff2") format("woff2");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-light-italic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-regular-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-medium-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-semibold-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Founders Grotesk";
  src: url("fonts/test-founders-grotesk-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --accent: #1e3a5f;
  --accent-underline: #8fa8c4;
}

body {
  font-family: "Martina Plantijn", Georgia, serif;
  font-weight: 100;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #1a1a1a;
  background-color: #e8eef2;
  max-width: 820px;
  margin: 8rem auto;
  padding: 0 2rem;
}

header {
  display: grid;
  grid-template-columns: 100px 1fr;
  column-gap: 3.5rem;
  margin-bottom: 4rem;
}

h1 {
  grid-column: 2;
  font-family: "Martina Plantijn", Georgia, serif;
  font-weight: 600;
  font-size: 3rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0 0 0.5rem;
}

nav {
  grid-column: 2;
  font-family: "Founders Grotesk", sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

nav a {
  color: #999;
  text-decoration: none;
  margin-right: 1.5rem;
}

nav a:hover { color: var(--accent); }
nav a.active { color: var(--accent); }

main {
  display: grid;
  grid-template-columns: 100px 1fr;
  column-gap: 3.5rem;
  row-gap: 2.5rem;
}

section { display: contents; }

h2 {
  font-family: "Founders Grotesk", sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999;
  text-align: right;
  margin: 0;
  padding-top: 0.4em;
}

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

a {
  color: #3a3a3a;
  text-decoration-color: var(--accent-underline);
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.muted {
  font-size: 0.9rem;
  color: #666;
}

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

/* Margin notes */
#margin-note {
  position: fixed;
  left: calc(50% + 430px);
  width: 160px;
  font-family: "Martina Plantijn", Georgia, serif;
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.5;
  color: #999;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

#margin-note.visible { opacity: 1; }

#margin-note.tooltip {
  width: 200px;
  background: #fff;
  color: #555;
  border: 1px solid #e8e8e8;
  padding: 0.5em 0.75em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-radius: 2px;
}

.interest {
  cursor: default;
  border-bottom: 1px dotted #ccc;
}

.role {
  margin-bottom: 2rem;
}

.role:last-child { margin-bottom: 0; }

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4em;
}

.role .org {
  font-style: italic;
  font-size: 1.05rem;
}

.role .dates {
  font-family: "Founders Grotesk", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: #aaa;
  white-space: nowrap;
  margin-left: 1rem;
}

.role p { margin: 0; }

.article-title {
  font-family: "Martina Plantijn", Georgia, serif;
  font-weight: 400;
  font-size: 1.4rem;
  margin: 0 0 0.25em;
  line-height: 1.3;
}

.article-columns {
  text-align: justify;
  hyphens: auto;
}

.article-section-label {
  font-family: "Founders Grotesk", sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999;
  margin: 0 0 0.4em;
  break-after: avoid;
}

.article-columns p {
  margin: 0 0 1em;
  break-inside: avoid;
}

.article-list {
  margin: 0 0 1em;
  padding-left: 1.4em;
  break-inside: avoid;
}

.article-list li {
  margin-bottom: 0.4em;
}

.code-block {
  font-family: "Menlo", ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  background: rgba(0,0,0,0.04);
  border-left: 2px solid var(--accent);
  padding: 0.75em 1em;
  margin: 0 0 1em;
  overflow-x: auto;
  break-inside: avoid;
}

.article-columns code {
  font-family: "Menlo", ui-monospace, monospace;
  font-size: 0.88em;
}

.writing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 3rem;
}

.writing-item {
  break-inside: avoid;
  margin-bottom: 1.75em;
}

.writing-item:last-child {
  margin-bottom: 0;
}

.writing-title {
  display: block;
  font-family: "Founders Grotesk", sans-serif;
  font-weight: 300;
  font-size: 1.5rem;
  text-decoration: none;
  color: #1a1a1a;
  margin-bottom: 0.2em;
}

.writing-title:hover {
  color: var(--accent);
}

.writing-desc {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  header, main {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
  h1 { grid-column: 1; }
  nav { grid-column: 1; }
  h2 {
    text-align: left;
    padding-top: 0;
    margin-bottom: 0.25em;
  }
  .experience {
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }
  .experience .org { padding-top: 0; }
  .experience .detail { margin-bottom: 0.25rem; }
}
