/* ===== Design Tokens ===== */
:root {
  --bg: #060608;
  --bg-elevated: #0c0c10;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --text: #fafafa;
  --text-muted: rgba(255, 255, 255, 0.55);
  --text-dim: rgba(255, 255, 255, 0.35);
  --accent: 34, 211, 238;
  --accent-purple: 168, 85, 247;
  --accent-dim: rgba(34, 211, 238, 0.1);
  --accent-hover: #67e8f9;
  --accent-solid: #22d3ee;
  --tag-bg: rgba(255, 255, 255, 0.04);
  --code-bg: rgba(0, 0, 0, 0.45);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  --max-width: 720px;
  --max-width-wide: 1080px;
  --radius: 18px;
  --transition: 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-intensity: 0;
  --glow-radius: 420px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Immersive Background ===== */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbDrift 12s ease-in-out infinite alternate;
}

.ambient__orb--cyan {
  width: 600px;
  height: 600px;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(var(--accent), 0.12) 0%, transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite;
}

.ambient__orb--purple {
  width: 500px;
  height: 500px;
  bottom: 10%;
  right: -5%;
  background: radial-gradient(circle, rgba(var(--accent-purple), 0.08) 0%, transparent 70%);
  animation: orbDrift 10s ease-in-out infinite alternate-reverse;
}

.ambient__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  margin-left: -300px;
  margin-top: -300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--accent), 0.07) 0%,
    rgba(var(--accent-purple), 0.04) 30%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
  will-change: left, top;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

@keyframes orbDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(-30px, 20px); }
}

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

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container--narrow {
  max-width: var(--max-width);
}

main {
  position: relative;
  z-index: 1;
}

/* ===== Glow Card System (QClaw-style) ===== */
.glow-card {
  --glow-color: var(--accent);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.5s,
              box-shadow 0.5s;
}

.glow-card__spotlight {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--glow-intensity);
  transition: opacity 0.35s;
  background: radial-gradient(
    circle calc(var(--glow-radius) * 0.72) at var(--glow-x) var(--glow-y),
    rgba(var(--glow-color), 0.2) 0%,
    rgba(var(--glow-color), 0.1) 18%,
    rgba(var(--glow-color), 0.04) 32%,
    transparent 62%
  );
  filter: blur(18px);
  mix-blend-mode: screen;
  z-index: 1;
}

.glow-card__border {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--glow-intensity);
  transition: opacity 0.3s;
  z-index: 3;
  box-shadow:
    inset 0 0 0 1px rgba(var(--glow-color), 0.45),
    inset 0 0 10px 2px rgba(var(--glow-color), 0.3);
  mask-image: radial-gradient(
    var(--glow-radius) circle at var(--glow-x) var(--glow-y),
    #000 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%
  );
}

.glow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(var(--glow-color), 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 0;
}

.glow-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--glow-color), 0.7), transparent);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 4;
}

.glow-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--glow-color), 0.28);
  box-shadow:
    0 20px 60px rgba(var(--glow-color), 0.1),
    0 0 40px rgba(var(--glow-color), 0.05);
}

.glow-card:hover::before,
.glow-card:hover::after {
  opacity: 1;
}

.glow-card__content {
  position: relative;
  z-index: 2;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 8, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: opacity var(--transition);
}

.logo:hover {
  opacity: 0.85;
}

.logo__mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(var(--accent), 0.2), rgba(var(--accent-purple), 0.1));
  border: 1px solid rgba(var(--accent), 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-solid);
  font-size: 12px;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s;
}

.logo:hover .logo__mark {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 4px 20px rgba(var(--accent), 0.25);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav__link {
  position: relative;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--accent-solid), rgb(var(--accent-purple)));
  transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 2px;
}

.nav__link:hover {
  color: var(--text);
  text-shadow: 0 0 12px rgba(var(--accent), 0.4);
}

.nav__link:hover::after {
  width: 80%;
}

.nav__link--active {
  color: var(--text);
  font-weight: 600;
}

.nav__link--active::after {
  width: 80%;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 100px 0 72px;
  text-align: center;
}

.hero__inner {
  animation: fadeInUp 0.8s ease-out both;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.hero__label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-solid);
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero__title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero__title-gradient {
  background: linear-gradient(135deg, #fff 30%, rgba(var(--accent), 1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__desc {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s, opacity 0.4s, transform 0.4s;
  animation: fadeInUp 0.8s ease-out 0.55s both;
}

.hero__scroll:hover {
  color: var(--accent-solid);
}

.hero__scroll--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.hero__scroll-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__scroll-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  animation: scrollBounce 2s ease-in-out infinite;
}

.hero__scroll:hover .hero__scroll-arrow {
  border-color: rgba(var(--accent), 0.35);
  background: rgba(var(--accent), 0.08);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.stat {
  padding: 16px 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.5s,
              box-shadow 0.5s;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle calc(var(--glow-radius) * 0.5) at var(--glow-x) var(--glow-y),
    rgba(var(--accent), 0.15) 0%,
    transparent 60%
  );
  opacity: var(--glow-intensity);
  transition: opacity 0.35s;
  z-index: 0;
}

.stat:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent), 0.25);
  box-shadow: 0 12px 40px rgba(var(--accent), 0.08);
}

.stat__value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.stat__label {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

/* ===== Section ===== */
.section {
  padding: 64px 0;
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section__title {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.section__link {
  font-size: 13px;
  color: var(--accent-solid);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(var(--accent), 0.2);
  background: rgba(var(--accent), 0.06);
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}

.section__link:hover {
  transform: translateY(-2px);
  background: rgba(var(--accent), 0.12);
  box-shadow: 0 8px 24px rgba(var(--accent), 0.12);
}

/* ===== Featured Cards ===== */
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

.featured-card {
  display: block;
  padding: 28px;
}

.featured-card.featured-card--highlight {
  grid-column: 1 / -1;
  padding: 32px;
}

.featured-card.featured-card--highlight > .glow-card__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.featured-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.featured-card__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.35;
  transition: color 0.3s;
}

.featured-card:hover .featured-card__title {
  color: var(--accent-solid);
}

.featured-card--highlight .featured-card__title {
  font-size: 26px;
}

.featured-card__excerpt {
  font-size: 15px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.6;
  max-height: calc(1.6em * 3);
}

.featured-card--highlight .featured-card__excerpt {
  -webkit-line-clamp: 4;
  line-clamp: 4;
  max-height: calc(1.6em * 4);
}

.featured-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(var(--accent), 0.06);
  border: 1px solid rgba(var(--accent), 0.15);
  border-radius: 100px;
  color: var(--text-muted);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.glow-card:hover .tag {
  background: rgba(var(--accent), 0.12);
  border-color: rgba(var(--accent), 0.3);
  color: var(--accent-solid);
}

.featured-card__visual {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  overflow: hidden;
  transition: border-color 0.5s, box-shadow 0.5s;
}

.featured-card:hover .featured-card__visual {
  border-color: rgba(var(--accent), 0.2);
  box-shadow: inset 0 0 30px rgba(var(--accent), 0.04);
}

.featured-card__visual .kw { color: #c084fc; }
.featured-card__visual .fn { color: #22d3ee; }
.featured-card__visual .str { color: #86efac; }
.featured-card__visual .cm { color: #52525b; }

.featured-card__visual--image {
  padding: 0;
  overflow: hidden;
}

.featured-card__visual--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

#toolboxPosts .featured-card--highlight .featured-card__visual--image,
#featuredPosts .featured-card--highlight .featured-card__visual--image {
  height: 200px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

#toolboxPosts .featured-card--highlight > .glow-card__content:has(.featured-card__visual--image),
#featuredPosts .featured-card--highlight > .glow-card__content:has(.featured-card__visual--image) {
  align-items: center;
}

#toolboxPosts .featured-card--highlight .featured-card__visual--image img,
#featuredPosts .featured-card--highlight .featured-card__visual--image img {
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

#toolboxPosts .featured-card--highlight:hover .featured-card__visual--image img,
#featuredPosts .featured-card--highlight:hover .featured-card__visual--image img {
  transform: scale(1.04);
}

.featured-card__thumb {
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.featured-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.featured-card:hover .featured-card__thumb img {
  transform: scale(1.04);
}

/* ===== Post List ===== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.pagination__btn {
  appearance: none;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.pagination__btn:hover:not([disabled]) {
  border-color: rgba(var(--accent), 0.45);
  background: rgba(var(--accent), 0.08);
}

.pagination__btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination__info {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.post-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005));
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.45s,
              box-shadow 0.45s;
}

.post-row::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle calc(var(--glow-radius) * 0.6) at var(--glow-x) var(--glow-y),
    rgba(var(--accent), 0.12) 0%,
    transparent 55%
  );
  opacity: var(--glow-intensity);
  transition: opacity 0.35s;
  z-index: 0;
}

.post-row::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent), 0.5), transparent);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 2;
}

.post-row:hover {
  transform: translateX(6px);
  border-color: rgba(var(--accent), 0.2);
  box-shadow: 0 8px 32px rgba(var(--accent), 0.06);
}

.post-row:hover::after {
  opacity: 1;
}

.post-row:hover .post-item__title {
  color: var(--accent-solid);
}

.post-item__date,
.post-item__title,
.post-item__tags {
  position: relative;
  z-index: 1;
}

.post-item__date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.post-item__title {
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s;
}

.post-item__tags {
  display: flex;
  gap: 6px;
}

/* ===== Blog Page ===== */
.page-header {
  padding: 64px 0 40px;
  text-align: center;
}

.page-header__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  animation: fadeInUp 0.7s ease-out both;
}

.page-header__desc {
  color: var(--text-muted);
  font-size: 16px;
  animation: fadeInUp 0.7s ease-out 0.1s both;
}

.search-bar {
  position: relative;
  max-width: 480px;
  margin: 32px auto 0;
  animation: fadeInUp 0.7s ease-out 0.15s both;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: rgba(var(--accent), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--accent), 0.1);
}

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

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  animation: fadeInUp 0.7s ease-out 0.2s both;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.filter-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.filter-btn--active {
  border-color: rgba(var(--accent), 0.4);
  color: var(--accent-solid);
  background: rgba(var(--accent), 0.1);
  box-shadow: 0 4px 16px rgba(var(--accent), 0.12);
}

/* ===== Article Page ===== */
.article-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  padding: 48px 0 80px;
}

.article-layout--no-toc {
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--max-width);
  margin: 0 auto;
}

.article-layout > article {
  min-width: 0;
  max-width: 100%;
}

.article-toc {
  position: sticky;
  top: 88px;
  align-self: start;
}

.article-toc__title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.article-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.article-toc__link {
  font-size: 13px;
  color: var(--text-dim);
  padding: 6px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: all 0.3s;
  display: block;
  line-height: 1.4;
}

.article-toc__link:hover,
.article-toc__link--active {
  color: var(--accent-solid);
  border-left-color: var(--accent-solid);
  background: rgba(var(--accent), 0.06);
}

.article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.article-header__title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.article-content {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
  padding-top: 8px;
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 12px;
}

.article-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
  color: var(--text-muted);
  margin: 0 0 16px 24px;
}

.article-content li {
  margin-bottom: 6px;
}

.article-content strong,
.article-content b,
.article-content .text-highlight {
  color: #fafafa;
  font-weight: 600;
  background: rgba(var(--accent), 0.14);
  padding: 1px 5px;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.article-content h2 strong,
.article-content h3 strong {
  color: var(--accent-hover);
  background: rgba(var(--accent), 0.18);
}

.article-content :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-solid);
  word-break: break-all;
}

.article-content pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 24px 0;
  padding: 20px;
  overflow-x: auto;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  -webkit-overflow-scrolling: touch;
}

.article-content pre code {
  display: block;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 16px 0;
}

.article-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  display: block;
  overflow-x: auto;
  font-size: 14px;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.article-content th {
  background: rgba(255, 255, 255, 0.04);
}

.article-content a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.article-content blockquote {
  background: rgba(var(--accent), 0.06);
  border: 1px solid rgba(var(--accent), 0.2);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 24px 0;
  color: var(--text-muted);
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.code-block {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 24px 0;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.code-block:hover {
  border-color: rgba(var(--accent), 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.code-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.code-block__dots {
  display: flex;
  gap: 6px;
}

.code-block__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-block__dot:nth-child(1) { background: #ef4444; }
.code-block__dot:nth-child(2) { background: #eab308; }
.code-block__dot:nth-child(3) { background: #22c55e; }

.code-block pre {
  padding: 20px;
  overflow-x: auto;
  max-width: 100%;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 0;
}

.code-block pre code {
  background: transparent;
  border: none;
  padding: 0;
  white-space: pre;
  word-break: normal;
}

/* Syntax highlighting — DevLog theme */
.article-content .hljs {
  color: #cdd6f4;
  background: transparent;
}

.article-content .hljs-comment,
.article-content .hljs-quote {
  color: #52525b;
  font-style: italic;
}

.article-content .hljs-keyword,
.article-content .hljs-selector-tag,
.article-content .hljs-built_in,
.article-content .hljs-type {
  color: #c084fc;
}

.article-content .hljs-title,
.article-content .hljs-title.function_,
.article-content .hljs-function,
.article-content .hljs-name {
  color: #22d3ee;
}

.article-content .hljs-string,
.article-content .hljs-regexp,
.article-content .hljs-addition {
  color: #86efac;
}

.article-content .hljs-number,
.article-content .hljs-literal,
.article-content .hljs-symbol,
.article-content .hljs-bullet {
  color: #fbbf24;
}

.article-content .hljs-variable,
.article-content .hljs-template-variable,
.article-content .hljs-attribute,
.article-content .hljs-attr {
  color: #67e8f9;
}

.article-content .hljs-meta,
.article-content .hljs-selector-id,
.article-content .hljs-selector-class {
  color: #a78bfa;
}

.article-content .hljs-params {
  color: #cdd6f4;
}

.article-content .hljs-deletion {
  color: #f87171;
}

.callout {
  background: rgba(var(--accent), 0.06);
  border: 1px solid rgba(var(--accent), 0.2);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
  color: var(--text-muted);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.callout:hover {
  border-color: rgba(var(--accent), 0.35);
  box-shadow: 0 4px 20px rgba(var(--accent), 0.06);
}

.callout strong {
  color: var(--accent-solid);
  font-weight: 500;
}

/* ===== About Page ===== */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  padding: 64px 0 80px;
}

.about-avatar {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(var(--accent), 0.15), rgba(var(--accent-purple), 0.1));
  border: 1px solid rgba(var(--accent), 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 48px;
  color: var(--accent-solid);
  margin-bottom: 20px;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.5s;
}

.about-avatar:hover {
  transform: scale(1.04) rotate(-2deg);
  box-shadow: 0 12px 40px rgba(var(--accent), 0.15);
}

.about-name {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.about-role {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.about-info__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(var(--accent), 0.03);
}

.about-info__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.about-info__value {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.about-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: color 0.3s, background 0.3s, border-color 0.3s, transform 0.3s;
}

.about-link:hover {
  color: var(--accent-solid);
  background: rgba(var(--accent), 0.06);
  border-color: rgba(var(--accent), 0.15);
  transform: translateX(4px);
}

.about-link__arrow {
  color: var(--text-dim);
  transition: transform 0.3s;
}

.about-link:hover .about-link__arrow {
  transform: translateX(2px);
  color: var(--accent-solid);
}

.about-wechat {
  margin-top: 48px;
  padding: 32px;
  background: linear-gradient(145deg, rgba(var(--accent), 0.04), rgba(var(--accent-purple), 0.04));
  border-radius: 20px;
  border: 1px solid rgba(var(--accent), 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transition: var(--transition);
}

.about-wechat:hover {
  border-color: rgba(var(--accent), 0.3);
  box-shadow: 0 12px 40px rgba(var(--accent), 0.08);
  transform: translateY(-2px);
}

.about-wechat__info {
  text-align: left;
  flex: 1;
}

.about-wechat__title {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.about-wechat__title strong {
  color: var(--accent-hover);
  background: linear-gradient(135deg, var(--accent-solid), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.about-wechat__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.about-wechat__qr-wrap {
  flex-shrink: 0;
  padding: 6px;
  background: rgba(var(--accent), 0.1);
  border: 1px solid rgba(var(--accent), 0.2);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: rotate(2deg);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s;
  cursor: pointer;
}

.about-wechat:hover .about-wechat__qr-wrap {
  transform: scale(1.05) rotate(0deg);
  box-shadow: 0 16px 40px rgba(var(--accent), 0.2);
}

.about-wechat__qr {
  width: 110px;
  height: 110px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.article-wechat {
  margin-top: 40px;
  margin-bottom: 8px;
}

/* QR Code Lightbox */
.qr-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.qr-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.qr-lightbox img {
  max-width: 320px;
  max-height: 320px;
  width: 90vw;
  height: 90vw;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: #fff;
  padding: 12px;
}

.qr-lightbox.active img {
  transform: scale(1);
}

@media (max-width: 768px) {
  .about-wechat {
    flex-direction: column;
    text-align: center;
    padding: 24px;
    gap: 24px;
  }
  .about-wechat__info {
    text-align: center;
  }
}

.about-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.skill-item {
  padding: 20px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.5s,
              box-shadow 0.5s;
}

.skill-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle calc(var(--glow-radius) * 0.5) at var(--glow-x) var(--glow-y),
    rgba(var(--accent), 0.15) 0%,
    transparent 60%
  );
  opacity: var(--glow-intensity);
  transition: opacity 0.35s;
}

.skill-item:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--accent), 0.25);
  box-shadow: 0 16px 40px rgba(var(--accent), 0.08);
}

.skill-item__icon {
  font-size: 28px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  transition: transform 0.4s;
}

.skill-item:hover .skill-item__icon {
  transform: scale(1.15) rotate(-3deg);
}

.skill-item__name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-footer__copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.site-footer__beian {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.3s;
}

.site-footer__beian:hover {
  color: var(--text-muted);
}

.site-footer__beian--gongan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-footer__beian--gongan img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.site-footer__links {
  display: flex;
  gap: 8px;
}

.site-footer__link {
  font-size: 13px;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.3s, background 0.3s;
}

.site-footer__link:hover {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .cursor-glow {
    display: none;
  }

  .featured,
  .featured-card--highlight {
    grid-template-columns: 1fr;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .post-item__tags {
    display: none;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 72px 0 56px;
  }

  .glow-card:hover {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow,
  .ambient__orb {
    display: none;
  }

  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Article engagement & comments ===== */
.empty-state {
  color: var(--text-muted);
  padding: 24px 0;
  font-size: 14px;
}

.article-engagement {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.article-stat {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.article-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.article-like-btn:hover,
.article-like-btn--active {
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
}

.comments-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.comments-section__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.comment-list {
  margin-bottom: 32px;
}

.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.comment-item__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-item__author {
  font-weight: 500;
  font-size: 14px;
}

.comment-item__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.comment-item__content {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.comment-form__input,
.comment-form__textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
}

.comment-form__textarea {
  min-height: 100px;
  resize: vertical;
}

.comment-form__submit {
  padding: 8px 20px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent), 0.3);
  background: rgba(var(--accent), 0.15);
  color: var(--accent-hover);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.comment-form__submit:hover {
  background: rgba(var(--accent), 0.25);
}

.comment-msg {
  font-size: 13px;
  margin-top: 12px;
}

.comment-msg--success {
  color: #4ade80;
}

.comment-msg--error {
  color: #f87171;
}

.about-avatar--image {
  padding: 0;
  overflow: hidden;
}

.about-avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
