button.btn {
  cursor: pointer;
  font-family: inherit;
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  border-radius: 12px;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.35rem;
}

.nav-links a.is-active {
  color: var(--text);
  background: var(--glass-hover);
  border-color: var(--border);
}

.logo span {
  font-size: 0.82rem;
  white-space: nowrap;
}

.hero .hero-badge + .hero-badge {
  margin-left: 0.45rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-head {
  padding: 3.5rem 0 1.5rem;
}

.page-lead {
  color: var(--muted);
  max-width: 560px;
  margin-top: -0.75rem;
  margin-bottom: 1.75rem;
}

.section-cta {
  margin-top: 1.5rem;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  outline: none;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 16px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--black-panel);
  border: 1px solid var(--black-border);
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: var(--crimson-glow);
  border-color: rgba(192, 21, 42, 0.45);
  background: rgba(192, 21, 42, 0.12);
  box-shadow: 0 0 12px rgba(192, 21, 42, 0.18);
}

.result-count {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.empty-state {
  text-align: center;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--accent-2);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.post-excerpt {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.article {
  padding-top: 3.5rem;
  max-width: 720px;
}

.article-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.article-tags {
  margin-bottom: 1.5rem;
}

.article-body {
  color: var(--muted);
  font-size: 1.02rem;
}

.article-body h2 {
  color: var(--text);
  font-size: 1.25rem;
  margin: 1.75rem 0 0.7rem;
}

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

.article-body ul {
  padding-left: 1.2rem;
}

.article-body a {
  color: var(--accent-2);
}

.article-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
}

.related-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.related-link a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.related-link a:hover {
  color: var(--accent-2);
}

.related-link span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(59, 110, 180, 0.16);
  color: var(--accent-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.avatar-btn:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 12px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.avatar-initials {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.user-menu-wrap {
  position: relative;
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  min-width: 220px;
  padding: 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(8, 10, 20, 0.88);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 120;
}

.user-menu-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-menu-email {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 0.4rem;
}

.user-menu-item:hover {
  border-color: var(--border-strong);
  background: var(--glass-hover);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 3, 8, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-modal {
  width: min(440px, 100%);
  position: relative;
}

.auth-modal-head {
  position: relative;
  margin-bottom: 0.5rem;
}

.auth-modal-title {
  margin-bottom: 0.75rem;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 5, 7, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-modal,
.auth-page-card,
.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--black-panel);
  border: 1px solid var(--black-border);
  position: relative;
  animation: cardReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.card-top-bar {
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--crimson-deep), var(--crimson), var(--crimson-deep));
  position: relative;
}

.card-top-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(6px);
  opacity: 0.7;
}

.card-inner,
.auth-panel {
  padding: 38px 36px 30px;
}

.auth-modal .auth-panel {
  padding: 32px 32px 24px;
}

.brand-area {
  margin-bottom: 28px;
  animation: fadeUp 0.7s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.brand-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--crimson);
}

.brand-label {
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--crimson);
  text-transform: uppercase;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.brand-title strong {
  font-weight: 700;
  color: var(--crimson);
}

.brand-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--white-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-condensed);
}

.auth-modal-head {
  position: relative;
  margin-bottom: 1.25rem;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--black-border);
  background: var(--black-soft);
  color: var(--white-dim);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  z-index: 10;
}

.auth-close:hover {
  color: var(--white);
  border-color: var(--crimson);
  background: rgba(192, 21, 42, 0.12);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  background: var(--black-soft);
  padding: 4px;
  border-radius: 4px;
  border: 1px solid var(--black-border);
}

.auth-tab {
  border-radius: 2px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--white-dim);
  padding: 0.45rem 0.75rem;
  font-family: var(--font-condensed);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.is-active {
  color: #fff;
  border-color: rgba(192, 21, 42, 0.4);
  background: var(--crimson);
  box-shadow: 0 0 12px rgba(192, 21, 42, 0.25);
}

.auth-tab:hover:not(.is-active) {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.form-field span {
  display: block;
  font-family: var(--font-condensed);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white-dim);
}

.form-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 2px;
  border: 1px solid var(--black-border);
  border-bottom-color: var(--white-faint);
  background: var(--black-soft);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  -webkit-appearance: none;
  appearance: none;
}

.form-field input::placeholder {
  color: var(--white-faint);
}

.form-field input:focus {
  border-color: var(--crimson);
  background: rgba(192, 21, 42, 0.04);
  box-shadow: 0 0 0 1px var(--crimson), inset 0 0 20px rgba(192, 21, 42, 0.05);
}

.form-error {
  color: #ff6b6b;
  font-family: var(--font-condensed);
  font-size: 12px;
  letter-spacing: 0.05em;
  background: rgba(192, 21, 42, 0.12);
  border: 1px solid rgba(192, 21, 42, 0.3);
  padding: 8px 12px;
  border-radius: 4px;
  animation: shakeIn 0.3s ease;
}

@keyframes shakeIn {
  0% { transform: translateX(-6px); opacity: 0; }
  30% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  100% { transform: translateX(0); opacity: 1; }
}

.auth-submit,
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--crimson);
  border: none;
  color: #fff;
  font-family: var(--font-condensed);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, transform 0.15s;
  margin-top: 0.5rem;
  border-radius: 2px;
  animation: fadeUp 0.7s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-submit::before,
.btn-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.auth-submit:hover:not(:disabled),
.btn-submit:hover:not(:disabled) {
  background: var(--crimson-deep);
  box-shadow: 0 0 16px var(--accent-glow);
}

.auth-submit:hover::before,
.btn-submit:hover::before {
  transform: translateX(100%);
}

.auth-submit:active,
.btn-submit:active {
  transform: scaleX(0.98);
}

.auth-submit:disabled,
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.card-footer {
  padding: 14px 36px 16px;
  border-top: 1px solid var(--black-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--crimson);
  font-family: var(--font-condensed);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.footer-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 6px var(--crimson-glow);
  display: inline-block;
  animation: pulse 2s infinite;
}

.privacy-wrapper {
  margin-top: 16px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

.privacy-link {
  color: rgba(154, 154, 159, 0.7);
  text-decoration: none;
  font-family: var(--font-condensed);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
  padding: 6px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.privacy-link:hover {
  color: #fff;
  background: rgba(192, 21, 42, 0.15);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.auth-note {
  margin-top: 0.85rem;
  font-size: 0.72rem;
  color: var(--white-faint);
  line-height: 1.45;
  text-align: center;
  font-family: var(--font-condensed);
  letter-spacing: 0.04em;
}

.auth-page {
  padding: 3.5rem 0 2rem;
  display: grid;
  place-items: start center;
}

.auth-page-card {
  width: min(440px, 100%);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.bookmark-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}

.bookmark-btn:hover,
.bookmark-btn.is-on {
  color: var(--accent-2);
  border-color: rgba(79, 130, 214, 0.28);
  background: rgba(59, 110, 180, 0.12);
}

.dash {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 2.4rem 0 1rem;
  align-items: start;
}

.dash-loading {
  padding: 3.5rem 0 2rem;
}

.dash-sidebar {
  padding: 1.15rem 1rem;
  position: sticky;
  top: 5.4rem;
}

.dash-sidebar:hover,
.dash-terminal:hover,
.dash-badge-card:hover,
.dash-section:hover {
  transform: none;
}

.dash-sidebar-name {
  font-weight: 600;
  margin: 0.15rem 0 1rem;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-nav-btn {
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.dash-nav-btn:hover,
.dash-nav-btn.is-active {
  color: var(--accent-2);
  border-color: rgba(79, 130, 214, 0.28);
  background: rgba(59, 110, 180, 0.12);
  box-shadow: 0 0 12px rgba(79, 130, 214, 0.14);
}

.dash-nav-exit {
  margin-top: 0.45rem;
}

.dash-head {
  margin-bottom: 1.15rem;
}

.dash-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-section {
  padding: 1.25rem 1.3rem;
}

.dash-h2 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.dash-lead {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.dash-terminal {
  padding: 0;
  overflow: hidden;
}

.dash-terminal-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.dash-console {
  margin: 0;
  padding: 1.1rem 1.15rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

.dash-prompt {
  color: var(--accent-2);
}

.dash-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.dash-badge-card {
  padding: 1.15rem 1.2rem;
}

.dash-badge-card strong {
  display: block;
  font-size: 1.2rem;
  margin: 0.2rem 0 0.35rem;
}

.dash-badge-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3ecf8e;
  box-shadow: 0 0 10px rgba(62, 207, 142, 0.55);
}

.dash-dot.is-off {
  background: #f0a8a8;
  box-shadow: 0 0 10px rgba(240, 168, 168, 0.35);
}

.dash-copy-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.dash-key {
  font-family: var(--mono);
  font-size: 0.78rem;
}

.dash-code {
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.65;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
}

.dash-bookmark-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dash-bookmark {
  padding: 1.15rem 1.2rem;
}

.dash-bookmark h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.dash-bookmark h3 a {
  color: var(--text);
  text-decoration: none;
}

.dash-bookmark h3 a:hover {
  color: var(--accent-2);
}

.dash-support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.authors-section {
  margin-bottom: 2.75rem;
}

.authors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.author-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(59, 110, 180, 0.16);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.author-card h3 {
  font-size: 1.05rem;
  margin: 0.1rem 0 0.2rem;
}

.author-title {
  font-size: 0.82rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .nav-end {
    margin-left: auto;
  }

  .nav-links {
    z-index: 110;
  }

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

  .dash-sidebar {
    position: static;
  }

  .dash-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dash-badges,
  .dash-bookmark-grid,
  .authors-grid {
    grid-template-columns: 1fr;
  }

  .dash-copy-row {
    flex-direction: column;
    align-items: stretch;
  }
}
