:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --fg: #1E1F1E;
  --muted: #888888;
  --border: #e0e0e0;
  --accent: #ff6633;
  --shadow-hard: 4px 4px 0 var(--fg);
  --shadow-none: 0 0 0 transparent;
  --font-display: 'Victor Mono', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Victor Mono', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Victor Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --dot: color-mix(in oklch, var(--fg) 12%, transparent);
  --logo-h: 80px;
  --nav-pad-y: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--border);
}
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-track { background: var(--border); border-radius: 0; }
html::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 0;
  border: 1px solid var(--fg);
}

body {
  --nav-h: calc(var(--logo-h) + var(--nav-pad-y) * 2);
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-transform: uppercase;
}

p { text-wrap: pretty; margin: 0; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 700; }
a { color: inherit; }

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: var(--nav-pad-y) clamp(16px, 3vw, 40px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-brand img {
  height: var(--logo-h);
  width: auto;
  display: block;
}
.nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 4px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.nav-link:hover {
  color: var(--accent);
  border-color: var(--border);
}
.nav-link.is-active {
  color: var(--accent);
  border-color: var(--fg);
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  transform: translate(2px, 2px);
}

main { padding-top: var(--nav-h); }

.section {
  padding: clamp(48px, 7vw, 88px) clamp(16px, 3vw, 40px);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 18px 18px;
  color: var(--fg);
  min-height: calc(100vh - var(--nav-h));
}
.wrap { width: min(1100px, 100%); margin: 0 auto; }

.section-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}

.section-kicker.post-date {
  text-transform: none;
}

.h-xl {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 2rem;
  max-width: 32ch;
  display: flex;
  align-items: stretch;
  gap: 14px;
}
.h-xl .accent-bar {
  flex: 0 0 10px;
  background: var(--accent);
  min-height: 100%;
}
.h-xl .title-text { flex: 1; }

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

.col-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.col-label {
  font-family: var(--font-mono);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fg);
  margin: 0 0 4px;
}
.col-sub {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.body-copy {
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.6;
  text-transform: none;
  color: var(--fg);
  margin: 0 0 14px;
}
.body-copy:last-child { margin-bottom: 0; }

.inline-link {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.inline-link:hover { color: var(--accent); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--fg);
  transform: translate(4px, 4px);
  box-shadow: var(--shadow-none);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: transform 0.12s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.12s cubic-bezier(0.23, 1, 0.32, 1);
}
.btn-secondary:hover {
  transform: none;
  box-shadow: var(--shadow-hard);
}

.pt.product {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 16px 18px;
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  color: var(--fg);
}
.pt-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0;
}
.pt.product h3 {
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}
.pt.product p {
  color: inherit;
  margin: 0;
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.55;
  text-transform: none;
}
.repo-path {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: none;
  margin: 0;
  word-break: break-all;
}
.pt.product .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  justify-content: flex-end;
}
.pt.product .btn-secondary { margin-top: 0; }

.about-panel,
.content-panel {
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  padding: clamp(20px, 3vw, 28px);
}

.package-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  max-width: 760px;
}

.package-intro {
  margin-bottom: 8px;
}

.h-section {
  font-size: clamp(14px, 1.2vw, 16px);
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-list li {
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.55;
  text-transform: none;
  padding-left: 16px;
  position: relative;
}
.feature-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.code-block-wrap {
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid color-mix(in oklch, #f5f5f5 35%, transparent);
  background: color-mix(in oklch, var(--fg) 85%, #ffffff 15%);
  color: #f5f5f5;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.code-copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.code-copy-btn.is-copied {
  border-color: var(--accent);
  color: var(--accent);
}

.code-block {
  margin: 0;
  padding: 16px 18px;
  padding-top: 44px;
  background: var(--fg);
  color: #f5f5f5;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  text-transform: none;
  overflow-x: auto;
  border: 1px solid var(--fg);
  box-shadow: var(--shadow-hard);
}
.code-block code { white-space: pre; }

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.announcements-section,
.blog-feed-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.announcements-panel {
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  padding: clamp(20px, 3vw, 28px);
}

.announcements-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.announcement-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.announcement-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: none;
  margin: 0;
}

.announcement-item h3 {
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}

.announcement-title {
  color: inherit;
  text-decoration: none;
}

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

.announcement-excerpt {
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.55;
  text-transform: none;
  color: var(--fg);
  margin: 0;
}

.post-split {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  margin-top: 8px;
}

.post-split .post-article {
  max-width: none;
}

.post-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-product {
  margin: 0;
}

.package-split {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
}

.package-split .package-layout {
  max-width: none;
}

.package-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.post-subtitle {
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.6;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 62ch;
}

.post-article {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
}

.post-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-lede {
  font-size: clamp(14px, 1.1vw, 16px);
}

.post-list {
  margin: 0 0 14px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-list li {
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.6;
  text-transform: none;
  color: var(--fg);
}

.post-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0 14px;
}

.post-byline {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: none;
}

.blog-feed-panel {
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  padding: clamp(20px, 3vw, 28px);
}

.blog-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-feed-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.blog-feed-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.blog-feed-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0;
  grid-row: 1 / span 3;
}

.blog-feed-item h3 {
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
  grid-column: 2;
}

.blog-feed-title {
  color: inherit;
  text-decoration: none;
}

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

.blog-feed-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: none;
  margin: 0;
  grid-column: 2;
}

.blog-feed-excerpt {
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.55;
  text-transform: none;
  color: var(--fg);
  margin: 0;
  grid-column: 2;
}

.blog-feed-message {
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.6;
  text-transform: none;
  color: var(--muted);
  margin: 0;
}

.blog-feed-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.site-foot {
  margin-top: clamp(48px, 7vw, 88px);
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

@media (max-width: 980px) {
  :root { --logo-h: 64px; }
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .package-sidebar {
    position: static;
  }
  .post-sidebar {
    position: static;
  }
  .post-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-nav {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--nav-h);
    padding-top: 8px;
    padding-bottom: 8px;
  }
  body { --nav-h: auto; }
  main { padding-top: calc(var(--logo-h) + 56px); }
  .nav-menu { justify-content: flex-start; }
}
