/* aerosol-visual: restrained microscopy-inspired visual layer for the blog */
:root {
  --aero-ink: #172238;
  --aero-panel: rgba(255, 255, 255, 0.92);
  --aero-cyan: #13b9c7;
  --aero-blue: #2b6c9f;
  --aero-gold: #d7b36a;
  --aero-line: rgba(43, 108, 159, 0.18);
  --aero-shadow: 0 12px 30px rgba(23, 34, 56, 0.12);
}

body {
  background:
    linear-gradient(180deg, rgba(248, 252, 253, 0.96), rgba(244, 248, 250, 0.96)),
    repeating-linear-gradient(90deg, rgba(19, 185, 199, 0.035) 0 1px, transparent 1px 26px);
}

#navbar,
.navbar {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#banner {
  position: relative;
  overflow: hidden;
  background-color: #162033 !important;
  isolation: isolate;
}

#banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(8, 17, 31, 0.72), rgba(25, 62, 88, 0.52)),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px);
}

#banner::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(248, 252, 253, 0.78));
}

#banner .banner-text {
  position: relative;
  z-index: 2;
}

#banner .scroll-down-bar {
  z-index: 2;
}

#banner .banner-text {
  width: min(92%, 1040px);
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}

.aerosol-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.78;
  mix-blend-mode: screen;
}

.banner-text .h2 {
  color: #f7fbfc;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 1px 16px rgba(19, 185, 199, 0.34);
}

#banner #subtitle,
#banner .typed-cursor {
  font-size: clamp(2.15rem, 3.2vw, 3.2rem);
  line-height: 1.25;
}

#banner #subtitle {
  letter-spacing: 0;
}

#board {
  border: 1px solid rgba(43, 108, 159, 0.13);
  box-shadow: var(--aero-shadow);
}

.index-card {
  position: relative;
  border: 1px solid var(--aero-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(249, 252, 253, 0.94)),
    linear-gradient(90deg, rgba(19, 185, 199, 0.06), transparent 45%);
  box-shadow: 0 8px 24px rgba(23, 34, 56, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.index-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--aero-cyan), var(--aero-gold));
}

.index-card:hover {
  transform: translateY(-3px);
  border-color: rgba(19, 185, 199, 0.38);
  box-shadow: 0 14px 34px rgba(23, 34, 56, 0.14);
}

.index-header a,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: var(--aero-ink);
}

.markdown-body h2 {
  position: relative;
  padding-left: 0.85rem;
  border-left: 0;
}

.markdown-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 1.1em;
  transform: translateY(-50%);
  border-radius: 2px;
  background: var(--aero-cyan);
}

.markdown-body h3 {
  color: #245d88;
}

.markdown-body blockquote {
  border-left: 3px solid var(--aero-cyan);
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(19, 185, 199, 0.08), rgba(255, 255, 255, 0));
}

.markdown-body table {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--aero-line);
  box-shadow: 0 8px 22px rgba(23, 34, 56, 0.06);
}

.markdown-body table th {
  background: rgba(19, 185, 199, 0.12);
  color: var(--aero-ink);
}

.markdown-body img {
  border-radius: 8px;
  border: 1px solid rgba(43, 108, 159, 0.16);
  box-shadow: 0 10px 28px rgba(23, 34, 56, 0.14);
}

.post-meta a,
.category-chain-item,
.markdown-body a {
  text-decoration-color: rgba(19, 185, 199, 0.45);
}

.post-meta a:hover,
.category-chain-item:hover,
.markdown-body a:hover {
  color: #0f8e9a;
}

.post-meta .print-no-link,
.index-btm .post-meta a {
  display: inline-block;
  margin-bottom: 0.25rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid rgba(19, 185, 199, 0.22);
  border-radius: 8px;
  background: rgba(19, 185, 199, 0.06);
}

.toc-body a:hover {
  color: var(--aero-cyan);
}

@media (prefers-reduced-motion: reduce) {
  .index-card {
    transition: none;
  }

  .index-card:hover {
    transform: none;
  }

  .aerosol-canvas {
    display: none;
  }
}

@media (max-width: 767px) {
  .index-card {
    border-radius: 8px;
  }

  #banner #subtitle,
  #banner .typed-cursor {
    font-size: clamp(1.55rem, 7vw, 2.05rem);
    line-height: 1.45;
  }

  .markdown-body h2 {
    padding-left: 0.7rem;
  }

  .markdown-body h2::before {
    height: 1em;
  }
}
