html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: #08080a;
  color: #ece9e4;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: #00b4a0; text-decoration: none; }
a:hover { color: #2fd3bd; }
::selection { background: #e0463a; color: #fff; }

@keyframes asPulse { 0%, 100% { opacity: .25 } 50% { opacity: 1 } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

.page {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(224, 70, 58, .13), transparent 70%),
    radial-gradient(900px 480px at 8% 4%, rgba(0, 180, 160, .09), transparent 68%);
  background-color: #08080a;
}

header nav a { white-space: nowrap; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 8, 10, .72);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.nav-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #ece9e4;
  flex: 0 1 auto;
  min-width: 0;
}
.nav-brand:hover { color: #ece9e4; }
.nav-brand-mark {
  width: 30px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 5px;
  background: #101013;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  color: #ece9e4;
  flex-shrink: 0;
}
.nav-brand-name {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13.5px;
  color: #9d9a94;
}
.nav-links a { color: #9d9a94; }
.nav-links a:hover { color: #ece9e4; }
.nav-links a.is-current { color: #ece9e4; }
.nav-cta {
  padding: 9px 16px;
  border-radius: 7px;
  background: #ece9e4;
  color: #08080a !important;
  font-weight: 600;
  font-size: 13px;
}
.nav-cta:hover { background: #fff; color: #08080a !important; }
.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 8px;
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
  padding: 3px 4px;
  flex-shrink: 0;
}
.lang-switch button {
  background: none;
  border: 0;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  color: #8d8b87;
}
.lang-switch button.is-on {
  color: #08080a;
  background: #ece9e4;
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
  background: #101013;
  cursor: pointer;
  color: #ece9e4;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-toggle-bars { display: block; width: 16px; height: 10px; position: relative; }
.nav-toggle-bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .18s ease, top .18s ease, opacity .18s ease;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 4.25px; }
.nav-toggle-bars span:nth-child(3) { top: 8.5px; }
.site-header.is-open .nav-toggle-bars span:nth-child(1) { top: 4.25px; transform: rotate(45deg); }
.site-header.is-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle-bars span:nth-child(3) { top: 4.25px; transform: rotate(-45deg); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 32px 96px;
}
.section-lead {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}
.section-lead .idx {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  color: #00b4a0;
  letter-spacing: .14em;
}
.section-lead h1,
.section-lead h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.section-lead p {
  margin: 0 0 0 auto;
  font-size: 13.5px;
  color: #7e7b76;
  max-width: 330px;
  text-align: right;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #00b4a0;
  border: 1px solid rgba(0, 180, 160, .30);
  background: rgba(0, 180, 160, .07);
  border-radius: 100px;
  padding: 6px 13px;
}
.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00b4a0;
  animation: asPulse 2.4s ease-in-out infinite;
}

.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  overflow: hidden;
}
.note-card {
  background: #0c0c0f;
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  color: inherit;
}
.note-card:hover { color: inherit; }
.note-card:hover h3 { color: #2fd3bd; }
.note-card .tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: #00b4a0;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.note-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: #ece9e4;
}
.note-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #918e89;
  flex: 1;
}
.note-card .meta {
  margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  color: #6f6c68;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: #0a0a0c;
}
.site-footer > div {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  color: #6f6c68;
}
.site-footer .mark { font-size: 13px; color: #b8b5b0; }
.site-footer .copy { margin-left: auto; }

.note-hero { padding: 72px 32px 28px; max-width: 1180px; margin: 0 auto; }
.note-hero h1 {
  margin: 18px 0 0;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 600;
  text-wrap: pretty;
  max-width: 720px;
}
.note-hero .lede {
  margin: 20px 0 0;
  max-width: 560px;
  font-size: 17.5px;
  line-height: 1.62;
  color: #a5a29c;
}
.note-meta {
  margin-top: 22px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: #6f6c68;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.note-back {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: #9d9a94;
}
.note-back:hover { color: #ece9e4; }

.note-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 32px 96px;
  font-size: 17px;
  line-height: 1.7;
  color: #c8c4bc;
}
.note-body p { margin: 0 0 1.15em; }
.note-body h2 {
  margin: 2em 0 .6em;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: #ece9e4;
}
.note-body ul {
  margin: 0 0 1.15em;
  padding-left: 1.15em;
  color: #c8c4bc;
}
.note-body li { margin: 0 0 .4em; }
.note-body code {
  font-family: "IBM Plex Mono", monospace;
  font-size: .88em;
  color: #00b4a0;
}
.note-body h3 {
  margin: 1.8em 0 .5em;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #ece9e4;
}
.note-body pre {
  margin: 0 0 1.4em;
  padding: 16px 18px;
  overflow-x: auto;
  background: #151412;
  border: 1px solid #2a2823;
  border-radius: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #b9b5ad;
}
.note-body pre code { color: inherit; font-size: inherit; }
.note-body ol {
  margin: 0 0 1.15em;
  padding-left: 1.3em;
  color: #c8c4bc;
}
.note-body ol li { margin: 0 0 .4em; }
.note-body blockquote {
  margin: 0 0 1.4em;
  padding: 2px 0 2px 18px;
  border-left: 2px solid #00b4a0;
  color: #d8d4cc;
}
.note-body hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid #2a2823;
}

@media (max-width: 900px) {
  .nav-bar { padding: 12px 16px; gap: 12px; }
  .nav-tools { margin-left: auto; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 10px 16px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: rgba(8, 8, 10, .96);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .9);
  }
  .site-header.is-open .nav-links { display: flex; }
  .nav-links a { display: block; padding: 12px 8px; }
  .nav-links a.nav-cta { margin-top: 8px; align-self: flex-start; }
  .nav-toggle { display: inline-flex; }
  .lang-switch { padding: 2px 3px; }
  .lang-switch button { min-width: 40px; min-height: 36px; padding: 6px 10px; }
  .notes-grid { grid-template-columns: 1fr; }
  .section-lead { flex-wrap: wrap; }
  .section-lead p { margin-left: 0; text-align: left; max-width: none; }
  .wrap, .note-hero, .note-body { padding-left: 16px; padding-right: 16px; }
  .note-hero h1 { font-size: 34px; }
}

@media (max-width: 380px) {
  .nav-bar { padding: 10px 12px; gap: 8px; }
  .nav-brand { gap: 8px; }
  .nav-brand-name { font-size: 13px; }
  .nav-toggle { width: 36px; height: 36px; }
  .lang-switch button { min-width: 36px; min-height: 34px; padding: 5px 8px; }
}
@media (max-width: 340px) {
  .nav-brand-name { display: none; }
}
