@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/fraunces-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/fraunces-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}

:root {
  --ink: #14201c;
  --muted: #6a7a72;
  --paper: #f7f8f6;
  --panel: #eef1ee;
  --accent: #0f766e;
  --accent-ink: #042f2e;
  --line: color-mix(in oklab, var(--ink) 10%, transparent);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --max: 72rem;
}

html.dark {
  --ink: #e8f0eb;
  --muted: #8fa396;
  --paper: #101614;
  --panel: #1a2220;
  --accent: #5eead4;
  --accent-ink: #ccfbf1;
  --line: color-mix(in oklab, var(--ink) 14%, transparent);
  color-scheme: dark;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-ink); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--paper);
  padding: 0.5rem 0.75rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.35rem 1.5rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
}

.nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 500;
  color: var(--muted);
  padding: 0.2rem 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}
.nav-item:hover {
  color: var(--ink);
  transform: translateY(-1px);
}
.nav-item:active { transform: translateY(0); }
.nav-item.is-active {
  color: var(--ink);
  font-weight: 600;
}
.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}
.nav-item:hover::after { transform: scaleX(0.45); }
.nav-item.is-active::after { transform: scaleX(1); }

/* Dark toggle only exists when JS enabled */
.theme-toggle { display: none; }
html.js .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
html.js .theme-toggle:hover {
  color: var(--ink);
  background: color-mix(in oklab, var(--panel) 80%, transparent);
  transform: rotate(-8deg);
}
html.js .theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}
html:not(.dark) .theme-toggle .icon-moon { display: none; }
html.dark .theme-toggle .icon-sun { display: none; }

main { flex: 1 0 auto; width: 100%; }

.view[hidden] { display: none !important; }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 7rem) 1.5rem 4rem;
}

.brand-mark {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  max-width: 22ch;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.section h1 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

/* Journal blog layout */
.journal {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) minmax(0, 1fr);
  gap: 2.5rem 3.5rem;
  align-items: start;
}

.journal-rail {
  position: sticky;
  top: 1.25rem;
}

.journal-rail h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.journal-sub {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 16ch;
  line-height: 1.4;
}

.cat-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.cat-item {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.cat-item:hover { color: var(--ink); }
.cat-item.is-active {
  color: var(--ink);
  font-weight: 600;
}

.journal-feed {
  min-width: 0;
  padding-top: 0.35rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list > li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.post-list > li:first-child { padding-top: 0.2rem; }
.post-list > li[hidden] { display: none; }

.post-meta {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.post-title {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
}
.post-title:hover { color: var(--accent-ink); }

.post-summary {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 40rem;
}

.coming-soon {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.exp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.exp {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.15rem 0.95rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.exp:first-child { padding-top: 0.15rem; }
.exp:last-child { border-bottom: 0; padding-bottom: 0.15rem; }
.exp-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
  padding: 0.4rem;
  display: block;
}
.exp-logo-fallback {
  display: grid;
  place-items: center;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #14201c;
  letter-spacing: 0.02em;
}
.exp-org {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}
.exp-role {
  margin: 0.15rem 0 0;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.35;
}
.exp-loc,
.exp-when {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.exp-when {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
}
.exp-roles {
  list-style: none;
  margin: 0.95rem 0 0;
  padding: 0 0 0 0.85rem;
  border-left: 1px solid var(--line);
}
.exp-roles > li {
  padding: 0 0 1rem 0.85rem;
}
.exp-roles > li:last-child { padding-bottom: 0; }
.exp-roles .exp-role { margin-top: 0; }
.exp-note {
  margin: 0.45rem 0 0;
  max-width: 40rem;
}
.exp-note p { margin: 0 0 0.5rem; }
.exp-note p:last-child { margin-bottom: 0; }

.prose { max-width: 42rem; }
.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
}
.prose .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.prose p { margin: 0 0 1rem; }
.prose pre {
  overflow: auto;
  padding: 1rem;
  border-radius: 0.35rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
}

.tag {
  font-size: 0.82rem;
  color: var(--muted);
}

.text-btn {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}
.text-btn:hover { color: var(--accent-ink); }

.site-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer p { margin: 0; }

.footer-social {
  display: inline-flex;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-social:hover {
  color: var(--ink);
  transform: translateY(-1px);
}
.footer-social svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

@media (max-width: 760px) {
  .journal {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .cat-rail {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
  }
  .journal-sub { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .nav-item::after,
  html.js .theme-toggle { transition: none; }
  .nav-item:hover { transform: none; }
}
