/* =========================================
   CSS VARIABLES
   ========================================= */
:root {
  --bg: #0b0d14;
  --bg-surface: #111520;
  --bg-card: #161b2a;
  --border: #1e2840;
  --border-hover: rgba(34, 211, 238, 0.35);
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.12);
  --accent-border: rgba(34, 211, 238, 0.22);
  --text: #c5d0e8;
  --text-muted: #5a6b8a;
  --heading: #eef2ff;
  --link: #22d3ee;
  --link-hover: #67e8f9;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 820px;
  --pad: 1.5rem;
  --radius: 10px;
  --radius-lg: 16px;
  --ease: 0.18s ease;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--ease);
}

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

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* =========================================
   LAYOUT
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* =========================================
   SITE HEADER
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 20, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  transition: color var(--ease);
}

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

.brand-icon {
  width: 22px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  transition: color var(--ease);
}

.brand-name {
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--ease);
  display: flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--heading);
}

.nav-rss {
  color: var(--text-muted);
  opacity: 0.7;
}

.nav-rss:hover {
  color: var(--accent);
  opacity: 1;
}

/* =========================================
   MAIN
   ========================================= */
.site-main {
  min-height: calc(100vh - 64px - 160px);
}

/* =========================================
   HOME PAGE - HERO
   ========================================= */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
  background: radial-gradient(ellipse at 20% 60%, rgba(34, 211, 238, 0.055) 0%, transparent 58%);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #eef2ff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.hero-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
  text-decoration: none;
}

.hero-link-card:hover {
  border-color: var(--border-hover);
  background: rgba(34, 211, 238, 0.04);
  color: var(--text);
  transform: translateY(-1px);
}

.hero-link-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.hero-link-sub {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.hero-link-arrow {
  font-size: 0.8rem;
  color: var(--accent);
  margin-top: 0.5rem;
  transition: transform var(--ease);
}

.hero-link-card:hover .hero-link-arrow {
  transform: translateX(3px);
}

/* =========================================
   HOME PAGE - POSTS
   ========================================= */
.posts-section {
  padding-bottom: 5rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-header h2 {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.post-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.post-card-featured {
  position: relative;
  padding: 2.25rem 2.5rem;
  border-color: var(--accent-border);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(34, 211, 238, 0.04) 100%);
  margin-bottom: 2rem;
}

.post-featured-label {
  position: absolute;
  top: 1.1rem;
  right: 1.4rem;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.post-card-meta time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.post-tag-badge {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.post-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.3;
  margin-bottom: 0.7rem;
  letter-spacing: -0.025em;
}

.post-card-title-lg {
  font-size: 1.55rem;
  margin-bottom: 0.85rem;
}

.post-card-title a {
  color: inherit;
  transition: color var(--ease);
}

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

.post-card-excerpt {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  gap: 0.25rem;
  transition: gap var(--ease), color var(--ease);
}

.read-more:hover {
  color: var(--link-hover);
  gap: 0.5rem;
}

.view-all-row {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.view-all-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--ease);
  letter-spacing: 0.01em;
}

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

/* =========================================
   POST PAGE
   ========================================= */
.post-wrapper {
  padding: 4rem 0 5rem;
}

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

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.post-date {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-weight: 500;
}

.post-tag {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
}

.post-title {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-author {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Post Content */
.post-content {
  font-size: 1.05rem;
  line-height: 1.82;
  color: var(--text);
}

.post-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.025em;
  margin: 2.75rem 0 1rem;
  padding-top: 0.5rem;
}

.post-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading);
  margin: 2.25rem 0 0.75rem;
  letter-spacing: -0.02em;
}

.post-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin: 1.75rem 0 0.6rem;
}

.post-content p {
  margin-bottom: 1.6rem;
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.35);
  text-underline-offset: 3px;
  transition: color var(--ease), text-decoration-color var(--ease);
}

.post-content a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.6rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 1rem;
}

.post-content pre,
.post-content .highlight {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: 0.875rem;
  line-height: 1.65;
  font-family: var(--font-mono);
}

.post-content code:not(pre code) {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.post-content img {
  display: block;
  margin: 2rem auto;
  border: 1px solid var(--border);
}

/* highlight.js dark mode override */
.hljs {
  background: var(--bg-surface) !important;
  border-radius: var(--radius);
}

/* Share links */
.share-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0 2.5rem;
  padding: 1.1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Post navigation */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0 2rem;
}

.post_navi {
  display: flex;
  gap: 1rem;
}

.post_navi-item {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text) !important;
  transition: border-color var(--ease), color var(--ease), transform var(--ease);
  font-size: 0.875rem;
  line-height: 1.4;
  gap: 0.3rem;
}

.post_navi-item:hover {
  border-color: var(--border-hover);
  color: var(--heading) !important;
  transform: translateY(-1px);
}

.post_navi-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 1;
}

.nav_prev {
  text-align: left;
}

.nav_next {
  text-align: right;
}

.post_navi-arrow {
  font-size: 1.1rem;
  opacity: 0.4;
  position: static;
  transform: none;
}

/* =========================================
   PAGE LAYOUT (archive etc)
   ========================================= */
.page-wrapper {
  padding: 4rem 0 5rem;
}

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.03em;
}

.page-content h3 {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 2rem 0 0.85rem;
}

.page-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.page-content li a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--ease), color var(--ease), transform var(--ease);
  font-size: 0.93rem;
  text-decoration: none;
}

.page-content li a:hover {
  border-color: var(--border-hover);
  color: var(--heading);
  transform: translateY(-1px);
}

/* =========================================
   ABOUT PAGE
   ========================================= */
.about-content {
  max-width: 680px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.about-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.about-content p {
  margin-bottom: 1.2rem;
  color: var(--text);
}

.about-content a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.35);
  text-underline-offset: 3px;
  transition: color var(--ease), text-decoration-color var(--ease);
}

.about-content a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.footer-tagline {
  font-size: 0.83rem;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.55;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.footer-link {
  font-size: 0.83rem;
  color: var(--text-muted);
  transition: color var(--ease);
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 640px) {
  :root {
    --pad: 1.1rem;
  }

  body {
    font-size: 16px;
  }

  .home-hero {
    padding: 3rem 0 2.5rem;
  }

  .hero-links {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .hero-link-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
  }

  .hero-link-arrow {
    margin-top: 0;
    flex-shrink: 0;
  }

  .post-card {
    padding: 1.5rem 1.25rem;
  }

  .post-card-featured {
    padding: 1.75rem 1.5rem;
  }

  .post-card-title {
    font-size: 1.15rem;
  }

  .post-card-title-lg {
    font-size: 1.3rem;
  }

  .nav-links {
    gap: 1.1rem;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-right {
    align-items: flex-start;
    flex-direction: row;
    gap: 1.5rem;
  }

  .post_navi {
    flex-direction: column;
  }

  .post_navi-item {
    text-align: left !important;
  }

  .share-links {
    flex-wrap: wrap;
  }
}

/* =========================================
   FAQ PAGE
   ========================================= */
.faq-wrapper {
  padding: 4rem 0 5rem;
}

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

.faq-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.7;
  margin-top: 1rem;
}

.faq-sections {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.faq-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.faq-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 1rem;
  cursor: default;
}

.faq-answer {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.78;
}

.faq-answer p {
  margin-bottom: 1rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
  margin: 0.75rem 0 1rem 1.5rem;
}

.faq-answer li {
  margin-bottom: 0.45rem;
}

.faq-answer strong {
  color: var(--heading);
  font-weight: 600;
}

.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.35);
  text-underline-offset: 3px;
  transition: color var(--ease);
}

.faq-answer a:hover {
  color: var(--link-hover);
}

/* FAQ Call to Action */
.faq-cta {
  margin-top: 4rem;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.faq-cta-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.faq-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
}

.faq-cta-btn:hover {
  background: var(--link-hover);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.3);
}

@media (max-width: 640px) {
  .faq-question {
    font-size: 1rem;
  }

  .faq-item {
    padding: 1.5rem 0;
  }

  .faq-cta {
    padding: 1.75rem 1.25rem;
  }
}

/* =========================================
   GLOSSARY PAGE
   ========================================= */
.glossary-content {
  padding: 2rem 0 4rem;
  max-width: var(--max-width);
}

.glossary-alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.1rem;
  margin: 1.5rem 0 2rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.glossary-alpha-nav a {
  color: var(--accent);
  text-decoration: none;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  transition: color var(--ease), background var(--ease);
}

.glossary-alpha-nav a:hover {
  color: var(--heading);
  background: var(--accent-dim);
}

.glossary-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  text-transform: none;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.glossary-content h3:first-of-type {
  margin-top: 0.5rem;
}

.glossary-content p {
  color: var(--text);
  line-height: 1.75;
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}

.glossary-content a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.glossary-content a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

.glossary-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

@media (max-width: 640px) {
  .glossary-alpha-nav {
    font-size: 0.8rem;
  }
  .glossary-content h3 {
    font-size: 0.98rem;
  }
}

/* =========================================
   TOOLS PAGE
   ========================================= */
.tools-content {
  padding: 2rem 0 4rem;
  max-width: var(--max-width);
}

.tools-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
}

.tools-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: none;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.35rem;
}

.tools-content p {
  color: var(--text);
  line-height: 1.75;
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.tools-content strong {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tools-content a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.tools-content a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

.tools-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Comparison table */
.tools-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1.5rem 0 2rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.tools-content table thead {
  background: var(--bg-surface);
}

.tools-content table th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.tools-content table td {
  padding: 0.65rem 1rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.45;
}

.tools-content table tr:last-child td {
  border-bottom: none;
}

.tools-content table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.tools-content table td a {
  font-weight: 600;
}

@media (max-width: 768px) {
  .tools-content table {
    font-size: 0.82rem;
  }
  .tools-content table th,
  .tools-content table td {
    padding: 0.55rem 0.7rem;
  }
}

@media (max-width: 560px) {
  .tools-content table thead {
    display: none;
  }
  .tools-content table,
  .tools-content table tbody,
  .tools-content table tr,
  .tools-content table td {
    display: block;
    width: 100%;
  }
  .tools-content table tr {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
  }
  .tools-content table tr:last-child {
    border-bottom: none;
  }
  .tools-content table td {
    border-bottom: none;
    padding: 0.2rem 0.7rem;
  }
  .tools-content table td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
  }
}

/* Tool Cards */
.tools-content .tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 0.85rem;
  transition: border-color var(--ease), box-shadow var(--ease);
  position: relative;
}

.tools-content .tool-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(34, 211, 238, 0.06);
}

.tools-content .tool-card-featured {
  border-color: var(--accent-border);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(34, 211, 238, 0.04) 100%);
}

.tools-content .tool-featured-label {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  border: 1px solid var(--accent-border);
}

.tools-content .tool-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.tools-content .tool-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--heading);
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tools-content .tool-name a {
  color: var(--heading);
  text-decoration: none;
  border-bottom: none;
  transition: color var(--ease);
}

.tools-content .tool-name a:hover {
  color: var(--accent);
}

.tools-content .tool-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.tools-content .badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  line-height: 1.4;
}

.tools-content .badge-online {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.tools-content .badge-desktop {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.tools-content .badge-selfhosted {
  background: rgba(249, 115, 22, 0.1);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.tools-content .badge-daw {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tools-content .badge-free {
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tools-content .badge-paid {
  background: rgba(248, 113, 113, 0.08);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.tools-content .badge-credits {
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.tools-content .tool-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  line-height: 1.5;
}

.tools-content .tool-desc {
  color: var(--text);
  font-size: 0.93rem;
  line-height: 1.72;
  margin: 0 0 1rem;
}

.tools-content .tool-desc a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.tools-content .tool-desc a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

.tools-content .tool-card-footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.tools-content .tool-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: none;
  transition: color var(--ease);
  line-height: 1;
}

.tools-content .tool-link:hover {
  color: var(--link-hover);
}

.tools-content .tool-more {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
  line-height: 1;
}

.tools-content .tool-more:hover {
  color: var(--text);
  border-bottom-color: var(--text-muted);
}

@media (max-width: 640px) {
  .tools-content .tool-card {
    padding: 1.25rem 1.25rem;
  }
  .tools-content .tool-featured-label {
    position: static;
    display: inline-block;
    margin-bottom: 0.6rem;
  }
  .tools-content .tool-card-header {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* =========================================
   RESEARCH PAGES
   ========================================= */

.research-meta-line {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.research-hub-intro {
  max-width: 680px;
  font-size: 0.975rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.research-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

.research-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  text-decoration: none;
  transition: border-color var(--ease), transform var(--ease);
}

.research-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.research-card-pending {
  opacity: 0.6;
}

.research-card-number {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.research-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.35;
}

.research-card-finding {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.research-card-pending-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  flex: 1;
}

.research-card-arrow {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.35rem;
}

/* Research post */
.research-post-container {
  max-width: 860px;
}

.research-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.research-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.research-breadcrumb a:hover {
  text-decoration: underline;
}

.research-breadcrumb span {
  color: var(--text-muted);
}

.research-post-subtitle {
  font-size: 0.975rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.4rem;
  margin-bottom: 1rem;
}

.research-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.research-meta-bar a {
  color: var(--accent);
  text-decoration: none;
}

.research-key-finding {
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.research-finding-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.research-pending-notice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.research-post-content {
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.research-post-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  margin: 2rem 0 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.research-post-content p {
  margin-bottom: 1rem;
}

.research-post-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
}

.research-post-content a:hover {
  border-bottom-color: var(--accent);
}

.research-post-content ul {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.research-post-content li {
  margin-bottom: 0.35rem;
}

.research-table-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  margin: 2.5rem 0 0.5rem;
}

.research-table-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.research-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.research-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.research-table thead tr {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.research-table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.research-table td {
  padding: 0.6rem 1rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.research-table tbody tr:last-child td {
  border-bottom: none;
}

.research-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.research-table .row-lossless td:first-child {
  color: var(--heading);
}

.delta-neutral {
  color: var(--text-muted);
  font-style: italic;
}

.delta-good {
  color: #4ade80;
  font-weight: 600;
}

.delta-warn {
  color: #facc15;
}

.delta-bad {
  color: #f87171;
  font-weight: 600;
}

/* Research footer: citation + raw data */
.research-footer-blocks {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 680px;
}

.research-raw-data {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  align-items: center;
}

.research-raw-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.research-raw-data a {
  color: var(--accent);
  text-decoration: none;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.78rem;
}

.research-raw-data a:hover {
  text-decoration: underline;
}

.research-cite-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.research-cite-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.research-bibtex {
  background: var(--bg-code, #0d1117);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre;
  overflow-x: auto;
  margin: 0;
}

@media (max-width: 640px) {
  .research-card-grid {
    grid-template-columns: 1fr;
  }
  .research-meta-bar {
    flex-direction: column;
    gap: 0.35rem;
  }
  .research-bibtex {
    font-size: 0.68rem;
  }
}
