:root {
  --bg: #0a0c0b;
  --bg-elevated: #101412;
  --text: #d4ddd6;
  --text-muted: #7a8a80;
  --accent: #6fbf8a;
  --accent-dim: #3d7a52;
  --border: #1e2a22;
  --font: "IBM Plex Mono", ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  --max: 42rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 122, 82, 0.18), transparent),
    linear-gradient(180deg, #0c100e 0%, var(--bg) 40%);
  background-attachment: fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #9fd9b0;
  text-decoration: underline;
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

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

.site-logo {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.8125rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: none;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Hub */

.hub {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  max-width: 36rem;
  margin: 0 auto;
  animation: hub-in 0.7s var(--ease) both;
}

@keyframes hub-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hub-brand {
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.hub-handle {
  color: var(--accent);
  font-weight: 500;
}

.hub-tagline {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 22rem;
}

.hub-nav {
  margin-top: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  list-style: none;
  padding: 0;
}

.hub-nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  width: fit-content;
}

.hub-nav a .prefix {
  color: var(--accent-dim);
  transition: color 0.2s var(--ease);
}

.hub-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.hub-nav a:hover .prefix {
  color: var(--accent);
}

.hub-nav a .label {
  position: relative;
}

.hub-nav a .label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.hub-nav a:hover .label::after {
  transform: scaleX(1);
}

/* Lists */

.page-title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.page-lead {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.post-list li {
  border-bottom: 1px solid var(--border);
}

.post-list a {
  display: block;
  padding: 1.15rem 0;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s var(--ease);
}

.post-list a:hover {
  text-decoration: none;
}

.post-list .post-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.post-list a:hover .post-title {
  color: var(--accent);
}

.post-list .post-meta {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-list .post-excerpt {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.empty-state {
  margin: 0;
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
}

/* Post */

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article-title {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.article-meta {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.article-meta .cve-id {
  color: var(--accent);
}

.article-body {
  font-size: 0.9375rem;
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body h2,
.article-body h3 {
  margin: 2rem 0 0.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.article-body h2 {
  font-size: 1.15rem;
}

.article-body h3 {
  font-size: 1rem;
}

.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 1rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
}

.article-body code {
  font-family: var(--font);
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.article-body pre {
  margin: 0 0 1.25rem;
  padding: 1rem;
  overflow-x: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.article-body pre code {
  padding: 0;
  background: none;
  border: none;
}

.article-body blockquote {
  margin: 0 0 1.25rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 2px solid var(--accent-dim);
  color: var(--text-muted);
}

.article-body a {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

@media (prefers-reduced-motion: reduce) {
  .hub {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
