/* ============ Article (post detail) ============ */
.article-head {
  position: relative;
  overflow: hidden;
  padding: 90px 0 54px;
  min-height: 320px;
  background: var(--bg);
  color: #eef9ff;
  border: 0;
}

.article-head-media {
  position: absolute;
  top: -30px;
  right: -30px;
  bottom: -30px;
  left: -30px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.article-head-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  filter: blur(14px) saturate(1.2);
  opacity: 0.7;
  transform: scale(1.06);
}

.article-head-surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 25% 20%, rgba(59, 130, 246, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(8, 22, 34, 0.25) 0%, rgba(8, 22, 34, 0.7) 55%, rgba(8, 22, 34, 0.88) 100%);
  pointer-events: none;
}

.article-head .flux-container {
  position: relative;
  z-index: 2;
}

.article-head h1,
.page-banner-inner h1 {
  color: var(--heading);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
  max-width: 880px;
}

.article-head .article-meta { color: rgba(238, 249, 255, 0.75); }
.page-banner-inner p { color: rgba(238, 249, 255, 0.78); max-width: 680px; }

.article-head h1 {
  font-size: clamp(30px, 4vw, 54px);
  max-width: 880px;
}

.article-head .article-meta { color: rgba(238, 249, 255, 0.75); }

.article-head .tags-list {
  margin-top: 18px;
}

.article-meta {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.article-meta > span::after {
  content: "·";
  margin-left: 14px;
  color: var(--border);
}

.article-meta > span:last-child::after { content: none; }

.article-container {
  margin-top: 40px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  align-items: start;
  padding-bottom: 60px;
}

.article-aside {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  align-self: start;
}

.article-toc-wrap { min-width: 0; }

.article-toc-panel,
.article-info {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: none;
}

.article-toc-panel h3,
.article-info h3 {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--heading);
  font-weight: 700;
}

.article-toc {
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: 4px;
  list-style: none;
}

.article-toc a {
  color: var(--muted);
  padding: 6px 0 6px 12px;
  display: block;
  border-left: 2px solid transparent;
  transition: .2s ease;
  text-decoration: none;
  line-height: 1.45;
}

.article-toc a:hover,
.article-toc a.is-active {
  color: var(--heading);
  border-left-color: var(--blue);
}

html[data-theme="light"] .article-toc a:hover,
html[data-theme="light"] .article-toc a.is-active {
  color: var(--blue-2);
  border-left-color: var(--blue-2);
  background: rgba(59, 130, 246, 0.06);
}

.article-toc a[data-level="3"] { padding-left: 22px; }
.article-toc a[data-level="4"] { padding-left: 34px; }

.article-main { min-width: 0; }

.article-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 3vw, 44px);
  min-width: 0;
}

.article-content > *:first-child { margin-top: 0 !important; }
.article-content > *:last-child { margin-bottom: 0 !important; }

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin: 2em 0 0.7em;
  font-family: var(--font);
  letter-spacing: -0.025em;
  color: var(--heading);
  line-height: 1.35;
  font-weight: 700;
}

.article-content h2 {
  position: relative;
  font-size: 1.65rem;
  margin: 2em 0 0.9em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--border);
}

.article-content h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  border-radius: 2px;
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 1.7em 0 0.6em;
  padding-left: 12px;
  border-left: 3px solid var(--blue);
  line-height: 1.4;
}

.article-content h4 {
  font-size: 1.05rem;
  margin: 1.5em 0 0.5em;
  color: var(--heading);
}

.article-content h4::before {
  content: "#";
  margin-right: 8px;
  color: var(--blue);
  font-family: var(--mono);
  font-weight: 500;
}

.article-content h5 { font-size: 0.98rem; color: var(--muted); }
.article-content h6 { font-size: 0.92rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content pre,
.article-content table { margin: 0 0 1em; }

.article-content p {
  color: var(--body);
  font-size: 15.5px;
  line-height: 1.72;
}

.article-content ul,
.article-content ol {
  color: var(--body);
  padding-left: 1.5em;
  line-height: 1.72;
  font-size: 15.5px;
}

.article-content ul li,
.article-content ol li {
  margin-bottom: 0.35em;
}

.article-content ul li::marker { color: var(--blue); }
.article-content ol li::marker { color: var(--blue); font-family: var(--mono); font-weight: 600; }

.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
  margin: 0.3em 0 0.3em;
}

.article-content hr {
  margin: 2.4em auto;
  border: 0;
  height: 1px;
  max-width: 120px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.article-content hr::after {
  content: "· · ·";
  display: block;
  text-align: center;
  color: var(--muted-2);
  letter-spacing: 0.4em;
  transform: translateY(-0.7em);
  background: var(--card-bg);
  width: fit-content;
  margin: 0 auto;
  padding: 0 10px;
}

.article-content a {
  color: var(--blue-light);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

.article-content code {
  font-family: var(--mono);
  color: var(--blue-light);
  background: rgba(59, 130, 246, .1);
  border: 1px solid rgba(59, 130, 246, .15);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.92em;
}

.article-content pre {
  position: relative;
  margin: 20px 0 28px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #020617;
  overflow: hidden;
  padding: 52px 20px 20px;
  box-shadow: none;
}

.article-content pre .code-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: linear-gradient(180deg, #0f172a, #0b111c);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
}

.article-content pre .code-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.article-content pre .code-bar-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-content pre .code-bar-dots .code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.article-content pre .code-bar-dots .code-dot:nth-child(1) { background: var(--red); }
.article-content pre .code-bar-dots .code-dot:nth-child(2) { background: var(--yellow); }
.article-content pre .code-bar-dots .code-dot:nth-child(3) { background: var(--green); }

.article-content pre .code-lang {
  color: var(--muted-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.article-content pre .code-copy {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.article-content pre .code-copy:hover {
  color: var(--blue-light);
  border-color: var(--blue);
}

.article-content pre .code-copy.is-copied {
  color: var(--green);
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.08);
}

.article-content pre code {
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--body);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  display: block;
  overflow-x: auto;
}

.article-content img {
  margin: 1.4em auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  max-width: 100%;
  cursor: zoom-in;
  transition: transform 0.25s ease, border-color 0.25s ease;
  display: block;
}

.article-content img:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
}

.article-content figure {
  margin: 1.6em 0;
}

.article-content figcaption {
  margin-top: 0.6em;
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
  font-family: var(--font);
}

.article-content blockquote {
  padding: 14px 18px 14px 20px;
  margin: 1.2em 0;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: rgba(59, 130, 246, 0.06);
  color: var(--body);
  position: relative;
}

.article-content blockquote > :first-child { margin-top: 0; }
.article-content blockquote > :last-child { margin-bottom: 0; }

.article-content blockquote::before {
  content: "“";
  position: absolute;
  top: -2px;
  left: 10px;
  font-size: 2.4em;
  color: var(--blue);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 14.5px;
  margin: 1.4em 0;
}

.article-content th,
.article-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  color: var(--body);
}

.article-content th {
  background: var(--card-2);
  color: var(--heading);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-content tbody tr:last-child td { border-bottom: 0; }
.article-content tbody tr:hover { background: rgba(59, 130, 246, 0.04); }

.article-content strong { color: var(--heading); font-weight: 700; }
.article-content em { color: var(--body); font-style: italic; }

.article-content kbd {
  display: inline-block;
  padding: 1px 7px;
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--heading);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 2px 0 var(--border);
  vertical-align: 1px;
}

/* Article info sidebar */
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.info-row:last-child { border-bottom: 0; }
.info-row span:last-child { color: var(--heading); font-family: var(--mono); }

/* Article footer */
.article-footer {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.article-tags {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.article-tags .meta-label {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-neighbors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.neighbor-card {
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.72);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
  box-shadow: none;
  transition: .2s ease;
}

.neighbor-card:hover { border-color: var(--blue); }

.neighbor-card .meta-label,
.meta-label {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.neighbor-card a {
  color: var(--heading);
  font-weight: 600;
  display: inline-block;
  margin-top: 0;
}

.neighbor-card a:hover { color: var(--blue-light); }

/* ============ Image lightbox (GLightbox overrides) ============ */
.article-content a.glightbox {
  display: inline-block;
  line-height: 0;
}

.glightbox-clean .gslide-description {
  background: rgba(17, 24, 39, 0.92) !important;
  backdrop-filter: blur(8px);
}

.glightbox-clean .gslide-title,
.glightbox-clean .gslide-desc { color: #e5e7eb !important; }

.glightbox-container .gclose,
.glightbox-container .gprev,
.glightbox-container .gnext {
  background-color: rgba(17, 24, 39, 0.7) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  transition: background-color .2s ease, border-color .2s ease;
}

.glightbox-container .gclose:hover,
.glightbox-container .gprev:hover,
.glightbox-container .gnext:hover {
  background-color: rgba(37, 99, 235, 0.3) !important;
  border-color: var(--blue) !important;
}

.glightbox-container .gclose svg,
.glightbox-container .gprev svg,
.glightbox-container .gnext svg { color: #e5e7eb; }

.gcounter { color: var(--muted) !important; font-family: var(--mono); }

/* ============ Comments ============ */
.comment-form-panel {
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 18px;
  box-shadow: none;
}

.comment-form-panel.is-disabled {
  display: grid;
  gap: 10px;
  align-content: start;
}

.comment-form-panel h3 {
  margin: 0 0 18px;
  color: var(--heading);
  font-size: 18px;
  font-weight: 700;
}

.comment-form-panel.is-disabled h3 { margin-bottom: 0; }

.comment-form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 14px; }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.comment-form label { display: grid; gap: 6px; }

.comment-form span {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1220;
  color: var(--text);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.comment-list,
.comment-list ol,
.comment-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-list-wrap { margin-top: 18px; }

.comment-list .comment-body {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.72);
  box-shadow: none;
}

.comment-list > .comment-body + .comment-body,
.comment-list .comment-children .comment-body { margin-top: 14px; }

.comment-list .comment-children {
  margin-top: 14px;
  padding-left: 18px;
}

.comment-list .comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 13px;
}

.comment-list .comment-author {
  color: var(--heading);
  font-weight: 600;
}

.comment-list .comment-content {
  color: var(--body);
  font-size: 14px;
  line-height: 1.7;
}

.comment-list .avatar { border-radius: 50%; }

.form-note,
.comment-section p {
  color: var(--muted);
  font-size: 14px;
}

