@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2');
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: light-dark(#fafaf9, #0c0c0c);
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.65;
  color: light-dark(#1a1a1a, #dadada);
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: light-dark(#bbbbbb, #4a4a4a);
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
}
a:hover { text-decoration-color: currentColor; }

/* External-link marker: a small up-right arrow, drawn as a currentColor mask so
   it adapts to light/dark and never gets underlined. */
a.ext::after {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.25em;
  vertical-align: -0.08em;
  background: currentColor;
  opacity: 0.6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E") no-repeat center / contain;
}

.stage { position: relative; min-height: 100vh; }
#grid {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none; z-index: 0;
}
.col { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.page { padding: 88px 24px 96px; }

header { margin-bottom: 64px; }
.topbar {
  display: flex; justify-content: space-between;
  font-size: 11px; color: light-dark(#666666, #838383);
  margin-bottom: 36px;
}
.topbar a { text-decoration: none; color: inherit; }
.topbar a:hover { text-decoration: underline; text-decoration-color: currentColor; }
.name { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.subtitle { color: light-dark(#4e4e4e, #a2a2a2); margin-top: 4px; font-size: 13.5px; }
.nav {
  display: flex; gap: 16px; margin-top: 18px;
  font-size: 12px;
}
.nav a {
  color: light-dark(#1a1a1a, #dadada);
  text-decoration: underline;
  text-decoration-color: light-dark(#bbbbbb, #4a4a4a);
  text-underline-offset: 3px;
}
.nav a:hover { text-decoration-color: currentColor; }

.intro { margin-bottom: 56px; max-width: 60ch; font-size: 13.5px; }
.intro p { text-wrap: pretty; }
.intro p + p { margin-top: 1.3em; color: light-dark(#4e4e4e, #a2a2a2); }

section { margin-bottom: 76px; scroll-margin-top: 40px; }
h2 {
  font-weight: 400; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: light-dark(#666666, #838383);
  margin-bottom: 12px;
}
.rows { border-top: 1px solid light-dark(#dcdcda, #2a2a2a); }
ul.rows { list-style: none; }

.row {
  display: grid; grid-template-columns: 120px 1fr; gap: 20px;
  padding: 14px 0; border-bottom: 1px solid light-dark(#dcdcda, #2a2a2a);
}
.link-row {
  display: grid; grid-template-columns: 120px 1fr; gap: 20px;
  padding: 10px 0; border-bottom: 1px solid light-dark(#dcdcda, #2a2a2a);
  font-size: 13px;
}
.label { font-size: 13px; color: light-dark(#666666, #838383); padding-top: 1px; }
.item { font-size: 13.5px; }
.item .strong { font-weight: 500; }
.note {
  display: block; color: light-dark(#4e4e4e, #a2a2a2);
  font-size: 12.5px; margin-top: 2px; text-wrap: pretty;
}
/* Internal "read more" link on a project row */
.readmore {
  display: inline-block; margin-top: 7px;
  font-size: 13px; color: light-dark(#666666, #838383);
  text-decoration-color: light-dark(#cccccc, #444444);
}

footer {
  margin-top: 72px; display: flex; justify-content: space-between;
  font-size: 11px; color: light-dark(#666666, #838383);
}
.updated {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: light-dark(#999999, #666666);
}
.colophon {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
  color: light-dark(#b3b3b3, #4a4a4a);
}

.cursor {
  display: inline-block;
  width: 0.5em;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: text-bottom;
  transform: translateY(-2px);
  background: light-dark(#1a1a1a, #dadada);
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* Project detail pages: article / prose */
.backlink { display: inline-block; margin-bottom: 40px; font-size: 12px; color: light-dark(#666666, #838383); }
.article { max-width: 62ch; }
.article h1 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 8px; }
.article .lead { color: light-dark(#4e4e4e, #a2a2a2); font-size: 13.5px; font-style: italic; margin-bottom: 14px; text-wrap: pretty; }
.article .proj-links { font-size: 12.5px; margin-bottom: 0; }
.article code {
  font-size: 0.92em; padding: 0.05em 0.35em; border-radius: 3px;
  background: light-dark(#ececea, #1e1e1e);
}
.article h2 {
  font-weight: 400; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: light-dark(#666666, #838383); margin: 44px 0 14px;
}
.article p { font-size: 13.5px; margin-bottom: 1.25em; text-wrap: pretty; }
.article ul { list-style: none; margin: 0 0 1.4em; border-top: 1px solid light-dark(#dcdcda, #2a2a2a); }
.article li {
  font-size: 13px; padding: 8px 0; text-wrap: pretty;
  border-bottom: 1px solid light-dark(#dcdcda, #2a2a2a);
}
.article strong { font-weight: 500; }

@media (max-width: 600px) {
  #grid { display: none; }
  .page { padding: 48px 24px 72px; }
  .name { font-size: 19px; }
  .topbar { align-items: flex-start; }
  .coords { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  .coords .sep { display: none; }
  .row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; }
  .link-row { display: flex; flex-direction: column; gap: 1px; padding: 10px 0; font-size: 12.5px; }
  .label { font-size: 11px; padding-top: 0; }
}
