:root {
  --bg: #0a0b0f;
  --bg-card: #111318;
  --bg-surface: #1a1c24;
  --header-bg: rgba(10, 11, 15, 0.86);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text-primary: #eceef2;
  --text-secondary: #9a9eb5;
  --text-muted: #5b6078;
  --text-body: #c9ccdc;
  --accent: var(--ghost-accent-color, #63d3b4);
  --accent-soft: color-mix(in srgb, var(--accent) 35%, transparent);
  --accent-faint: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-bg: color-mix(in srgb, var(--accent) 5%, transparent);
  --accent-link-underline: color-mix(in srgb, var(--accent) 35%, transparent);
  --accent-shadow: color-mix(in srgb, var(--accent) 30%, transparent);
  --accent-hover: color-mix(in srgb, var(--accent) 82%, white);
  --accent2: #7c8dff;
  --code-bg: #0d0f13;
  --shadow-elevated: 0 20px 54px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1180px;
  --font-display: "Syne", sans-serif;
  --font-body-fallback: "DM Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f3f6fb;
  --bg-card: #ffffff;
  --bg-surface: #eef2f8;
  --header-bg: rgba(243, 246, 251, 0.86);
  --border: rgba(23, 33, 53, 0.12);
  --border-hover: rgba(23, 33, 53, 0.24);
  --text-primary: #101827;
  --text-secondary: #42506a;
  --text-muted: #607089;
  --text-body: #1e2a3b;
  --code-bg: #e9edf6;
  --shadow-elevated: 0 18px 36px rgba(30, 42, 59, 0.12);
  --accent-hover: color-mix(in srgb, var(--accent) 84%, black);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--gh-font-body, var(--font-body-fallback));
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--gh-font-heading, var(--font-display));
  letter-spacing: -0.02em;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
}

.outer {
  padding-left: clamp(20px, 5vw, 60px);
  padding-right: clamp(20px, 5vw, 60px);
}

.inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.gh-head {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.gh-head-inner {
  height: 64px;
  display: flex;
  gap: 28px;
  align-items: center;
}

.gh-head-logo {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.gh-head-menu {
  margin-right: auto;
}

.gh-head-menu ul {
  list-style: none;
  display: flex;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.gh-head-menu a {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition:
    color var(--transition),
    background var(--transition);
}

.gh-head-menu a:hover,
.gh-head-menu .nav-current a {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .gh-head-menu a:hover,
[data-theme="light"] .gh-head-menu .nav-current a {
  background: rgba(16, 24, 39, 0.08);
}

.gh-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 70px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.btn-theme:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-subscribe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #0a0b0f;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.btn-subscribe:hover {
  transform: translateY(-1px);
  background: var(--accent-hover);
  box-shadow: 0 8px 24px var(--accent-shadow);
}

.site-hero {
  position: relative;
  padding-top: 100px;
  padding-bottom: 52px;
  overflow: hidden;
  margin-bottom: 48px;
}

.hero-glow {
  position: absolute;
  width: min(760px, 90vw);
  height: 360px;
  left: 50%;
  transform: translateX(-50%);
  top: -120px;
  background: radial-gradient(
    ellipse,
    var(--accent-faint),
    rgba(124, 141, 255, 0.09) 60%,
    transparent 72%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 60px;
  align-items: start;
}

.hero-title {
  margin: 0;
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.02;
  animation: heroTitleIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
  margin-top: 5px;
  background: var(--accent-bg);
  animation: heroRise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-desc {
  margin-top: 18px;
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 700px;
  animation: heroRise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s both;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 34px;
  animation: heroRise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.14s both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.hero-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.hero-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

.hero-avatar-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  animation: heroRise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s both;
}

.avatar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 370px;
}

.avatar-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--bg);
  flex-shrink: 0;
}

.avatar-name {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
}

.avatar-role {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  justify-content: flex-end;
}

.pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid;
  letter-spacing: 0.03em;
}

.pill-accent {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--accent-bg);
}
.pill-blue {
  color: var(--accent2);
  border-color: rgba(124, 141, 255, 0.3);
  background: rgba(124, 141, 255, 0.06);
}
.pill-pink {
  color: var(--accent3);
  border-color: rgba(255, 107, 157, 0.3);
  background: rgba(255, 107, 157, 0.06);
}
.pill-muted {
  color: var(--text-secondary);
  border-color: var(--border);
  background: transparent;
}

.section-header {
  border-bottom: 1px solid var(--border);
  margin: 48px 0 20px;
  padding-bottom: 16px;
}

.section-label {
  font-family: var(--font-mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.section-title {
  margin: 6px 0 0;
  font-size: 28px;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 72px;
}

.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.topic-card::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-bg), transparent 70%);
  transition: all 0.4s ease;
  transform: translate(20px, 20px);
  pointer-events: none;
}

.topic-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.topic-card:hover::before {
  transform: translate(0, 0);
  width: 120px;
  height: 120px;
}

.topic-icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
  line-height: 1;
  color: var(--accent);
}

.topic-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.topic-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 56px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-elevated);
}

.post-card-large {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 26px;
}

.post-card-image-wrap {
  background: var(--bg-surface);
  min-height: 200px;
}

.post-card-large .post-card-image-wrap {
  min-height: 320px;
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card-large .post-card-content {
  padding: 34px;
}

.post-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-card-tags a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--accent-soft);
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 999px;
}

.post-tag {
  font-family: var(--font-mono);
  border: 1px solid var(--accent-soft);
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid;
  padding: 3px 10px;
  border-radius: 999px;
}

.tag-green {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--accent-bg);
}

.tag-purple {
  color: var(--accent2);
  border-color: rgba(124, 141, 255, 0.35);
  background: rgba(124, 141, 255, 0.05);
}

.tag-gray {
  color: var(--text-secondary);
  border-color: var(--border);
}

.post-card-title {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.2;
  font-size: 24px;
}

.posts-grid .post-card-title {
  font-size: 20px;
}

.post-card-excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.post-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.meta-date,
.meta-read,
.meta {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.article-header {
  padding-top: 88px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.article-header-inner {
  max-width: 760px;
  margin: 0 auto;
}

.article-title {
  margin: 16px 0 0;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.08;
}

.article-excerpt {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1.55;
}

.page-feature-image {
  margin-top: 20px;
  border-radius: var(--radius);
}

.article-body-wrap {
  max-width: 760px;
}

.content {
  padding-top: 38px;
  padding-bottom: 60px;
}

.gh-content {
  font-size: 1.0625rem;
}

.gh-content > * {
  margin-top: 0;
  margin-bottom: 1.6em;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
  margin-top: 1.9em;
  margin-bottom: 0.7em;
  line-height: 1.2;
}

.gh-content p,
.gh-content li {
  color: var(--text-body);
}

.gh-content a {
  text-decoration: underline;
  text-decoration-color: var(--accent-link-underline);
  text-underline-offset: 2px;
}

.gh-content pre {
  margin: 2em 0;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  overflow-x: auto;
}

.gh-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.gh-content :not(pre) > code {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  color: var(--accent);
}

.gh-content blockquote {
  margin: 2em 0;
  padding: 1.1em 1.3em;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-card);
}

.gh-content img,
.gh-content .kg-image {
  border-radius: var(--radius-sm);
}

.gh-content .kg-card {
  margin: 1.8em 0;
}

.gh-content .kg-width-wide {
  width: min(100vw - 48px, 1100px);
  margin-left: 50%;
  transform: translateX(-50%);
}

.gh-content .kg-width-full {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

.gh-content .kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gh-content .kg-gallery-row {
  display: flex;
  gap: 0.75rem;
}

.gh-content .kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh-content .kg-bookmark-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.gh-content .kg-bookmark-container {
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
  color: var(--text-primary);
  background: var(--bg-card);
}

.gh-content .kg-bookmark-title {
  font-weight: 600;
}

.gh-content .kg-bookmark-description,
.gh-content .kg-bookmark-metadata {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.article-header .post-card-tags a {
  border-color: var(--accent-soft);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  padding-bottom: 26px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.footer-brand-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-bg);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition:
    transform var(--transition),
    border-color var(--transition),
    color var(--transition),
    background var(--transition);
  font-size: 14px;
}

.social-btn:hover {
  border-color: var(--border-hover);
  color: var(--accent);
  background: var(--bg-card);
  transform: translateY(-2px);
}

.footer-copy,
.footer-ghost,
.footer-nav a {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 10px;
}

.footer-ghost:hover,
.footer-nav a:hover {
  color: var(--accent);
}

@keyframes heroTitleIn {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-avatar-stack {
    align-items: flex-start;
  }

  .skill-pills {
    justify-content: flex-start;
  }

  .post-card-large {
    grid-template-columns: 1fr;
  }

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

  .gh-content .kg-width-wide,
  .gh-content .kg-width-full {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
}

@media (max-width: 640px) {
  .gh-head-inner {
    gap: 14px;
  }

  .gh-head-menu {
    display: none;
  }

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

  .post-card-content,
  .post-card-large .post-card-content {
    padding: 20px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-meta {
    gap: 16px;
  }

  .hero-divider {
    display: none;
  }

  .avatar-card {
    width: 100%;
  }

  .footer-top {
    align-items: flex-start;
  }

  .article-excerpt {
    font-size: 18px;
  }
}
