@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
}

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

a:hover {
  color: var(--brand);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 8px 12px;
  background: var(--brand);
  color: var(--bg);
  z-index: 20;
}

.skip:focus {
  left: 8px;
  top: 8px;
}

.wrap {
  width: min(var(--max), calc(100% - 64px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

.bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.wordmark {
  position: relative;
  display: block;
  flex: none;
  width: 5.5rem;
  aspect-ratio: 745 / 311;
  overflow: hidden;
}

.wordmark:hover {
  color: inherit;
}

.lockup-frame img {
  position: absolute;
  display: block;
  width: calc(1024 / 745 * 100%);
  height: calc(1024 / 311 * 100%);
  max-width: none;
  left: calc(-139 / 745 * 100%);
  top: calc(-355 / 311 * 100%);
  pointer-events: none;
}

.lockup-cursor {
  position: absolute;
  left: calc((808 - 139) / 745 * 100%);
  top: calc((464 - 355) / 311 * 100%);
  width: calc(76 / 745 * 100%);
  height: calc(19 / 311 * 100%);
  background: #fefefe;
  animation: blink-bar 1.1s steps(1) infinite;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}

.nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

.nav a:hover,
.nav a.is-active {
  color: var(--fg);
}

.bar-end {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  flex: none;
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.lang button {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--fg-muted);
  font: inherit;
  cursor: pointer;
}

.lang button.is-active,
.lang button:hover {
  color: var(--fg);
}

.lang .sep {
  color: var(--line);
  pointer-events: none;
}

.auth-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}

.auth-link:hover {
  color: var(--brand);
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: none;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

main {
  flex: 1;
}

.hero {
  padding: 56px 0 72px;
}

.cursor {
  display: inline-block;
  margin-left: 0.06em;
  color: var(--fg);
  animation: blink 1.1s steps(1) infinite;
}

.lede {
  margin: 0 0 12px;
  max-width: 36rem;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.45;
  text-wrap: pretty;
}

.sub {
  margin: 0;
  max-width: 36rem;
  color: var(--fg-muted);
  text-wrap: pretty;
}

.kicker {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--brand);
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-head .kicker {
  margin: 0;
}

.section-head .more {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
}

.section-head .more:hover {
  color: var(--brand);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.prose {
  margin: 0;
  max-width: 38rem;
  color: var(--fg);
  text-wrap: pretty;
}

.prose + .prose {
  margin-top: 16px;
  color: var(--fg-muted);
}

.audiences {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.audiences li {
  padding: 18px 16px;
  background: var(--bg-subtle);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

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

.work li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.work li:last-child {
  border-bottom: 1px solid var(--line);
}

.work .k {
  font-weight: 600;
}

.work .d {
  margin: 0;
  color: var(--fg-muted);
}

.stack-fig {
  width: 100%;
  height: auto;
  display: block;
}

.stack-fig .layer {
  fill: var(--bg-subtle);
  stroke: var(--line);
  stroke-width: 1;
}

.stack-fig .layer-top {
  fill: #12140a;
  stroke: #3d4a12;
}

.stack-fig .label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  fill: var(--fg);
}

.stack-fig .hint {
  font-family: var(--font-sans);
  font-size: 12px;
  fill: var(--fg-muted);
}

.stack-fig .mark {
  fill: var(--brand);
}

.how {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

.how li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.how li:last-child {
  border-bottom: 1px solid var(--line);
}

.how .n {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--brand);
  padding-top: 3px;
}

.how h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.how p {
  margin: 0;
  color: var(--fg-muted);
}

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

.feed li {
  border-top: 1px solid var(--line);
}

.feed li:last-child {
  border-bottom: 1px solid var(--line);
}

.feed a,
.feed .row {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  color: inherit;
}

.feed a:hover {
  color: inherit;
}

.feed a:hover .feed-title {
  color: var(--brand);
}

.feed-date {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
}

.feed-title {
  font-weight: 600;
  font-size: 15px;
}

.feed-excerpt {
  display: none;
}

.feed-lock {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.page-hero {
  padding: 56px 0 32px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-hero .sub {
  max-width: 40rem;
}

.article {
  padding: 24px 0 80px;
  max-width: 40rem;
}

.article h1 {
  margin: 0 0 28px;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.article-meta {
  margin: 0 0 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
}

.article-body h2 {
  margin: 32px 0 12px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.article-body p {
  margin: 0 0 16px;
  text-wrap: pretty;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
}

.back:hover {
  color: var(--brand);
}

.gate {
  margin: 32px 0;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  max-width: 28rem;
}

.gate h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.gate p {
  margin: 0 0 20px;
  color: var(--fg-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--bg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  color: var(--bg);
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--fg);
}

.btn-ghost:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

.form {
  display: grid;
  gap: 16px;
  max-width: 22rem;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
}

.form-note,
.err,
.ok {
  margin: 0;
  font-size: 13px;
}

.err {
  color: var(--danger);
}

.ok {
  color: var(--brand);
}

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

.auth-card {
  padding: 56px 0 80px;
  max-width: 24rem;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.auth-card .sub {
  margin-bottom: 32px;
}

.auth-alt {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--fg-muted);
}

.auth-alt a {
  color: var(--fg);
  font-weight: 500;
}

.auth-alt a:hover {
  color: var(--brand);
}

.prompt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.prompt .gt {
  color: var(--brand);
  flex: none;
}

.site-foot {
  margin-top: auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--fg-muted);
  font-size: 13px;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-foot strong {
  color: var(--fg);
  font-weight: 500;
}

.legal {
  max-width: 36rem;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.empty,
.offline {
  padding: 24px 0;
  color: var(--fg-muted);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes blink-bar {
  50% {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .nav-toggle {
    display: block;
  }

  .bar {
    gap: 16px;
  }

  .nav {
    display: none;
  }

  .site-header.is-open {
    height: auto;
  }

  .site-header.is-open .bar {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 0 20px;
  }

  .site-header.is-open .nav {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    order: 3;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(var(--max), calc(100% - 32px));
  }

  .hero {
    padding: 56px 0 48px;
  }

  .lede {
    font-size: 18px;
  }

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

  .work li,
  .feed a,
  .feed .row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .feed-lock {
    justify-self: start;
  }

  .section {
    padding: 40px 0;
  }
}

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

  .cursor,
  .lockup-cursor {
    animation: none;
    opacity: 1;
  }
}
