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

    :root {
      /* ── Shared with blog ── */
      --ivory:   #FAF9F5;
      --slate:   #141413;
      --clay:    #D97757;
      --clay-d:  #B85C3E;
      --oat:     #E3DACC;
      --olive:   #788C5D;
      --rust:    #B04A3F;
      --blue:    #5B8DB8;
      --gray-50: #F0EEE6;
      --gray-150:#F0EEE6;
      --gray-200:#E6E3DA;
      --gray-300:#D1CFC5;
      --gray-500:#87867F;
      --gray-700:#3D3D3A;
      --white:   #FFFFFF;
      /* ── Homepage extras ── */
      --bg:           #FAF9F5;
      --surface:      #FFFFFF;
      --surface-hi:   #F8F7F4;
      --border:       #E6E3DA;
      --border-hi:    #D1CFC5;
      --accent:       #D97757;
      --accent-hi:    #B85C3E;
      --text:          #3D3D3A;
      --text-muted:    #87867F;
      --shanghai:     #22d3ee;
      --korean:       #f43f5e;
      --us:           #4ade80;
      --star:         #a78bfa;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -1;
      background:
        radial-gradient(circle at 50% 50%, rgba(217, 119, 87, 0.05) 0%, transparent 60%),
        linear-gradient(rgba(20, 20, 19, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 20, 19, 0.025) 1px, transparent 1px);
      background-size: 100% 100%, 40px 40px, 40px 40px;
      pointer-events: none;
    }
    body {
      background: var(--ivory);
      color: var(--gray-700);
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 2rem;
      line-height: 1.6;
    }

    .logo {
      font-size: 3.5rem;
      margin-bottom: 1rem;
    }

    h1 {
      font-size: 2rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
      letter-spacing: -0.02em;
    }

    .top-bar {
      display: flex;
      gap: 1rem;
      margin-bottom: 2rem;
      flex-wrap: wrap;
      justify-content: center;
      position: relative;
    }

    .top-bar a {
      text-decoration: none;
    }


    @keyframes pulse-dot {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(0.7); }
    }

    /* Pulsing status indicator */
    .node-uptime {
      font-size: 0.62rem;
      color: rgba(148,163,184,0.55);
      margin-left: 4px;
    }

    .status-pulse.idle { background: #4ade80; animation: pulse-idle 3s ease-in-out infinite; }
    .status-pulse.working { background: #facc15; animation: pulse-working 1.2s ease-in-out infinite; }
    .status-pulse.error { background: #fb7185; animation: pulse-error 0.8s ease-in-out infinite; }

    @keyframes pulse-idle {
      0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
      50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); }
    }

    @keyframes pulse-working {
      0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.5); }
      50% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(250, 204, 21, 0); }
    }

    @keyframes pulse-error {
      0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.5); }
      50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(251, 113, 133, 0); }
    }

    

    /* Animated counter */
    .node-stat-value {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--gray-700);
      transition: color 0.2s;
    }

    .node-stat-value.bumped {
      color: var(--accent);
    }

    .nav-card {
      background: var(--card-bg, rgba(255, 255, 255, 0.8));
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--card-border, var(--gray-300));
      border-radius: 12px;
      padding: 0.45rem 0.7rem;
      color: var(--gray-700);
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-size: 0.95rem;
      font-weight: 500;
    }

    .nav-card:hover {
      transform: translateY(-2px);
    }

    .nav-card-shanghai {
      border-color: rgba(34, 211, 238, 0.3);
    }
    .nav-card-shanghai:hover {
      border-color: var(--shanghai);
      box-shadow: 0 4px 20px rgba(34, 211, 238, 0.15);
    }
    .nav-card-shanghai .nav-icon { filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.5)); }

    .nav-card-korean {
      border-color: rgba(244, 63, 94, 0.3);
    }
    .nav-card-korean:hover {
      border-color: var(--korean);
      box-shadow: 0 4px 20px rgba(244, 63, 94, 0.15);
    }
    .nav-card-korean .nav-icon { filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.5)); }

    .nav-card-us {
      border-color: rgba(74, 222, 128, 0.3);
    }
    .nav-card-us:hover {
      border-color: var(--us);
      box-shadow: 0 4px 20px rgba(74, 222, 128, 0.15);
    }
    .nav-card-us .nav-icon { filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.5)); }

    .nav-card-star {
      border-color: rgba(167, 139, 250, 0.3);
    }
    .nav-card-star:hover {
      border-color: var(--star);
      box-shadow: 0 4px 20px rgba(167, 139, 250, 0.15);
    }
    .nav-card-star .nav-icon { filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.5)); }

    .nav-icon { font-size: 1.4rem; }

    /* Main layout */
    .main-layout {
      display: flex;
      gap: 2rem;
      width: 100%;
      max-width: 1100px;
      align-items: flex-start;
    }

    /* Blog Section */
    .blog-container {
      flex: 1;
      min-width: 0;
    }

    .section-label {
      font-size: 0.75rem;
      color: var(--gray-500);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    /* Blog List View */
    .blog-list {
      display: flex;
      flex-direction: column;
      gap: 0;
    }

    .blog-item {
      display: flex;
      align-items: baseline;
      gap: 1rem;
      padding: 1rem 0;
      border-bottom: 1px solid var(--gray-300);
      cursor: pointer;
      transition: all 0.15s;
    }

    .blog-item:hover {
      padding-left: 0.5rem;
    }

    .blog-item:first-child {
      border-top: 1px solid var(--border);
    }

    .blog-date {
      font-size: 0.8rem;
      color: var(--gray-500);
      white-space: nowrap;
      min-width: 70px;
    }

    .blog-item:hover .blog-date {
      color: var(--accent);
    }

    .blog-title {
      font-size: 1rem;
      font-weight: 500;
      color: var(--gray-700);
      text-decoration: none;
    }

    .blog-item:hover .blog-title {
      color: var(--accent);
    }

    /* Blog Detail View */
    /* Blog Detail Full-Width View */
    .blog-detail-full {
      display: none;
      flex: 1;
      min-width: 0;
    }

    .blog-detail-full.active {
      display: block;
    }

    .blog-detail-full.active ~ .stats-sidebar {
      display: none;
    }

    .main-layout.post-active > .blog-container {
      display: none;
    }

    .main-layout.post-active > .stats-sidebar {
      display: none;
    }

    .blog-detail-inner {
      background: rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--gray-300);
      border-radius: 16px;
      padding: 2rem;
      width: 100%;
      max-width: 1100px;
      box-sizing: border-box;
    }

    .blog-list-view {
      display: block;
    }

    .blog-list-view.hidden {
      display: none;
    }

    .blog-load-more-btn {
      background: var(--gray-150);
      border: 1px solid var(--gray-300);
      color: var(--gray-500);
      padding: 0.5rem 1.5rem;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.82rem;
      transition: all 0.2s;
    }

    .blog-load-more-btn:hover {
      background: var(--white);
      color: var(--gray-700);
      border-color: var(--accent);
    }

    .blog-load-more-btn:disabled {
      opacity: 0.4;
      cursor: default;
    }

    .back-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      background: none;
      border: 1px solid var(--gray-300);
      color: var(--gray-500);
      padding: 0.4rem 0.8rem;
      border-radius: 8px;
      cursor: pointer;
      font-size: 0.85rem;
      margin-bottom: 1.5rem;
      transition: all 0.15s;
    }

    .back-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .article-header {
      margin-bottom: 2rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid var(--gray-300);
    }

    .article-title {
      font-size: 1.5rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
      line-height: 1.3;
    }

    .article-meta {
      display: flex;
      gap: 1rem;
      font-size: 0.8rem;
      color: var(--gray-500);
      flex-wrap: wrap;
    }

    .article-meta a {
      color: var(--shanghai);
      text-decoration: none;
    }

    .article-meta a:hover {
      text-decoration: underline;
    }

    .article-content {
      font-size: 1rem;
      line-height: 1.85;
      color: var(--gray-700);
    }

    .article-content img {
      max-width: 100%;
      border-radius: 8px;
      margin: 1rem 0;
    }

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

    .article-content h1, .article-content h2, .article-content h3 {
      margin: 1.75rem 0 1rem;
      font-weight: 600;
      line-height: 1.3;
    }

    .article-content h2 {
      font-size: 1.25rem;
      padding-bottom: 0.5rem;
      border-bottom: 1px solid var(--gray-300);
    }

    .article-content h3 {
      font-size: 1.1rem;
      color: var(--accent);
    }

    .article-content pre {
      background: #0d0d12;
      border: 1px solid var(--gray-300);
      border-radius: 10px;
      padding: 1.25rem;
      overflow-x: auto;
      font-size: 0.85rem;
      line-height: 1.6;
      margin: 1.25rem 0;
    }

    .article-content code {
      background: rgba(255,255,255,0.08);
      padding: 0.15rem 0.4rem;
      border-radius: 4px;
      font-size: 0.88em;
      font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
      color: #e2e8f0;
    }

    .article-content pre code {
      background: none;
      padding: 0;
      color: #e2e8f0;
    }

    .article-content blockquote {
      border-left: 3px solid var(--accent);
      padding-left: 1rem;
      margin: 1rem 0;
      color: var(--gray-500);
    }

    .article-content ul, .article-content ol {
      margin: 0.75rem 0;
      padding-left: 1.5rem;
    }

    .article-content li {
      margin-bottom: 0.4rem;
    }

    .article-content a {
      color: var(--shanghai);
      text-decoration: none;
    }

    .article-content a:hover {
      text-decoration: underline;
    }

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

    .article-content table {
      border-collapse: collapse;
      width: 100%;
      margin: 1rem 0;
    }

    .article-content th, .article-content td {
      border: 1px solid var(--gray-300);
      padding: 0.5rem 0.75rem;
      text-align: left;
    }

    .article-content th {
      background: var(--white);
    }

    .article-thoughts {
      margin-top: 2rem;
      padding: 1.25rem;
      background: var(--white);
      border: 1px solid var(--gray-300);
      border-radius: 12px;
    }

    .thoughts-label {
      font-size: 0.75rem;
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin-bottom: 0.5rem;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .thoughts-content {
      font-size: 0.9rem;
      color: var(--gray-500);
      line-height: 1.7;
    }

    /* reveal.js 幻灯片宽度修复：撑满 article-content */
    .article-content .reveal {
      width: 100% !important;
    }
    .article-content .reveal .slides {
      width: 100% !important;
      text-align: left;
    }
    .article-content .reveal .slides > section {
      text-align: left;
      width: 100% !important;
      margin: 0 !important;
    }

    /* Blog empty state */
    .blog-empty {
      text-align: center;
      padding: 3rem 1rem;
      color: var(--gray-500);
    }

    .blog-empty-icon {
      font-size: 3rem;
      margin-bottom: 1rem;
    }

    /* Stats Sidebar */
    .stats-sidebar {
      width: 260px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .stats-panel {
      background: rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--gray-300);
      border-radius: 16px;
      padding: 1.25rem;
      transition: box-shadow 0.3s ease;
    }
    .stats-panel:hover {
      box-shadow: 0 0 20px rgba(74, 222, 128, 0.08);
    }

    .stats-header {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 1rem;
      padding-bottom: 0.75rem;
      border-bottom: 1px solid var(--gray-300);
    }

    .stats-header h2 {
      font-size: 0.95rem;
      font-weight: 600;
    }

    .stats-refresh {
      margin-left: auto;
      background: none;
      border: none;
      color: var(--gray-500);
      cursor: pointer;
      font-size: 0.75rem;
      padding: 0.25rem 0.5rem;
      border-radius: 4px;
    }

    .stats-refresh:hover {
      background: var(--gray-150);
      color: var(--gray-700);
    }

    .agent-stat-row {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.3rem 0;
    }
    .agent-stat-row:not(:last-child) {
      border-bottom: 1px solid var(--gray-300);
      padding-bottom: 0.4rem;
      margin-bottom: 0.1rem;
    }
    .agent-stat-icon { font-size: 0.8rem; }
    .agent-stat-name { flex: 1; font-weight: 500; }
    .agent-stat-count { color: var(--gray-500); font-size: 0.68rem; }
    .agent-stat-time { color: var(--gray-500); font-size: 0.65rem; min-width: 48px; text-align: right; }
    .agent-stat-bar-wrap { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
    .agent-stat-bar { height: 100%; border-radius: 2px; transition: width 0.4s ease; }

    .stats-summary {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 0.5rem;
      border-top: 1px solid var(--border);
      font-size: 0.7rem;
      color: var(--gray-500);
    }
    .stats-summary strong { color: var(--gray-700); }


    /* 两列节点卡片 */
    .node-cards-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.75rem;
    }

    .node-card {
      padding: 0.75rem;
      border-radius: 10px;
      background: rgba(255,255,255,0.02);
      min-width: 0;
    }

    .node-header {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      margin-bottom: 0.35rem;
      flex-wrap: wrap;
      min-width: 0;
    }

    .node-name {
      font-weight: 600;
      font-size: 0.88rem;
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .node-status {
      margin-left: auto;
      padding: 0.12rem 0.45rem;
      border-radius: 10px;
      font-size: 0.68rem;
      font-weight: 500;
    }

    .status-idle { background: rgba(34,197,94,0.2); color: #4ade80; }
    .status-working { background: rgba(234,179,8,0.2); color: #facc15; }
    .status-error { background: rgba(244,63,94,0.2); color: #fb7185; }

    .node-detail {
      font-size: 0.72rem;
      color: var(--gray-500);
      margin-bottom: 0.5rem;
      min-height: 1em;
      position: relative;
      cursor: default;
    }
    .node-detail::after {
      content: attr(data-tip);
      position: absolute;
      bottom: calc(100% + 6px);
      left: 0;
      background: rgba(0,0,0,0.85);
      color: #e2e8f0;
      font-size: 0.68rem;
      padding: 6px 10px;
      border-radius: 6px;
      white-space: nowrap;
      max-width: 260px;
      white-space: normal;
      word-break: break-all;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.15s;
      z-index: 500;
      line-height: 1.5;
      box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }
    .node-detail:hover::after {
      opacity: 1;
    }

    .node-stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.4rem;
      text-align: center;
    }

    .node-stat {
      background: rgba(255,255,255,0.03);
      padding: 0.35rem 0.2rem;
      border-radius: 6px;
    }

    .node-stat-value {
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--gray-700);
    }

    .node-stat-label {
      font-size: 0.62rem;
      color: var(--gray-500);
      margin-top: 2px;
    }

    footer {
      color: var(--gray-500);
      font-size: 0.75rem;
      text-align: center;
      margin-top: 2.5rem;
    }

    footer a {
      color: var(--gray-500);
      text-decoration: none;
    }

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

    @media (max-width: 900px) {
      .main-layout { flex-direction: column; }
      .blog-container { order: 2; }
      .stats-sidebar { width: 100%; order: 1; }
      .stats-panel { position: static; }
      .node-cards-grid { grid-template-columns: 1fr 1fr 1fr; }
    }


    /* ── Desktop Nav ── */
    .main-nav {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      position: relative;
      z-index: 1000;
    }
    .main-nav .nav-card {
      margin-top: 0.5rem;
      background: var(--card-bg, rgba(255,255,255,0.55));
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--card-border, rgba(0,0,0,0.08));
      border-radius: 12px;
      padding: 0.45rem 0.7rem;
      color: var(--gray-700);
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-size: 0.95rem;
      font-weight: 500;
    }
    .main-nav .site-title {
      flex: none;
      text-align: center;
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
    }
    .site-title {
      font-family: var(--sans);
      font-size: clamp(1.3rem, 3vw, 1.8rem);
      font-weight: 700;
      color: var(--gray-700);
      letter-spacing: -0.02em;
      white-space: nowrap;
      margin: 0;
      text-align: center;
    }
    .site-title span {
      font-size: 1.2em;
    }
    [data-theme="dark"] .site-title {
      color: var(--slate);
    }

    @media (max-width: 600px) {
      
    body::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -1;
      background: 
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.03) 0%, transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
      background-size: 100% 100%, 40px 40px, 40px 40px;
      pointer-events: none;
    }
    .main-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
    }
    .main-nav {
      grid-column: 1 / 3;
      grid-row: 1;
      padding-top: 1rem;
      display: grid;
    }
    .blog-container {
      grid-column: 1 / 3;
      grid-row: 2;
    }
    .stats-sidebar {
      grid-column: 1 / 3;
      grid-row: 3;
    }
    .main-nav .site-title {
      position: static !important;
      left: auto !important;
      transform: none !important;
      grid-column: 1 / 3;
      grid-row: 1;
      justify-self: center;
    }
    .main-nav .nav-left {
      grid-column: 1;
      grid-row: 2;
    }
    .main-nav .nav-right {
      grid-column: 2;
      grid-row: 2;
      justify-self: start;
    }
    .site-title {
      font-size: clamp(1.2rem, 4.8vw, 1.6rem);
    }
    body { padding: 1rem; }
    .nav-card { padding: 0.75rem 1rem; font-size: 0.88rem; border-radius: 10px; }
    .nav-icon { font-size: 1.2rem; }
    .stats-sidebar { width: 100%; }
    .node-cards-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .node-card { padding: 0.6rem; }
    .node-name { font-size: 0.8rem; }
    .blog-item { padding: 0.8rem 0; }
    .blog-item-title { font-size: 0.9rem; }
    .blog-item-date { font-size: 0.75rem; }
    footer { margin-top: 1.5rem; font-size: 0.7rem; }
    .blog-detail-inner { padding: 1rem; }
    .blog-load-more-btn { font-size: 0.85rem; padding: 0.6rem 1.2rem; }
    #node-dropdown { left: 0; right: 0; min-width: unset; }
    #node-dropdown a { justify-content: center; }

    }
    /* Skeleton Loading */
    @keyframes skeleton-loading {
      0% { background-color: rgba(255, 255, 255, 0.03); }
      50% { background-color: rgba(255, 255, 255, 0.08); }
      100% { background-color: rgba(255, 255, 255, 0.03); }
    }
    .skeleton-text {
      height: 1em;
      border-radius: 4px;
      animation: skeleton-loading 1.5s infinite ease-in-out;
      display: inline-block;
    }

    /* Dropdown Animation */
    #node-dropdown {
      position: absolute;
      z-index: 500;
      top: calc(100% + 0.5rem);
      background: var(--white);
      border: 1px solid var(--gray-300);
      border-radius: 12px;
      overflow: hidden;
      min-width: max-content;
      box-shadow: 0 8px 24px rgba(0,0,0,0.4);
      opacity: 0;
      transform: translateY(-10px);
      pointer-events: none;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }
    #node-dropdown.show {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }
    #node-dropdown .nav-card {
      background: rgba(255,255,255,0.55);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 12px;
      font-size: 0.65rem;
      padding: 0.35rem 0.5rem;
      color: var(--gray-700);
      transition: all 0.2s;
    }
    .node-stat-value, .agent-stat-count, .agent-stat-time, .blog-date, .node-uptime {
      font-family: 'JetBrains Mono', monospace;
    }

    /* Activity Toasts */
    /* Search Bar */
    .search-container {
      margin-bottom: 1rem;
      position: relative;
    }
    .blog-search-input {
      width: 100%;
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--gray-300);
      border-radius: 8px;
      padding: 0.6rem 1rem;
      color: var(--gray-700);
      font-size: 0.9rem;
      transition: all 0.3s ease;
      outline: none;
      font-family: inherit;
    }
    .blog-search-input:focus {
      background: rgba(255,255,255,0.05);
      border-color: rgba(74, 222, 128, 0.5);
      box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
      transform: scale(1.01);
    }
    .blog-search-input::placeholder {
      color: var(--gray-500);
    }

/* Ambient Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -2;
  opacity: 0.25;
  pointer-events: none;
  animation: float-glow 20s ease-in-out infinite alternate;
}

.glow-1 {
  width: 700px;
  height: 700px;
  background: var(--shanghai);
  top: -20%;
  left: -20%;
  animation-delay: 0s;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: var(--star);
  bottom: -20%;
  right: -20%;
  animation-delay: -5s;
}

.glow-3 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: 40%;
  left: 40%;
  opacity: 0.15;
  animation-delay: -10s;
}

@keyframes float-glow {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -50px) scale(1.1); }
  66% { transform: translate(-30px, 40px) scale(0.9); }
  100% { transform: translate(20px, 20px) scale(1); }
}

/* Increase width for post reading */
.main-layout.post-active {
  max-width: 1400px;
  width: 96%;
  transition: max-width 0.3s ease;
}

/* Force Reveal.js to be transparent to reveal our ambient glassmorphism */
.reveal, .reveal.slide, .reveal .slides {
  background: transparent !important;
}

.reveal .slide-background, .reveal .slide-background-content {
  background: transparent !important;
  display: none !important;
  opacity: 0 !important;
}

/* Make code blocks slightly transparent */
.article-content pre {
  background: rgba(13, 13, 18, 0.75) !important;
  backdrop-filter: blur(8px);
}

.main-layout.post-active .blog-detail-inner { max-width: 1400px; }

body.reveal-viewport { background: transparent !important; background-color: transparent !important; }


/* ── Dark Mode ── */
:root[data-theme="dark"],
[data-theme="dark"] {
  --ivory:     #0a0a0f;
  --slate:     #e2e8f0;
  --clay:      #f97316;
  --clay-d:    #fb923c;
  --oat:       #e3dacc;
  --olive:     #4ade80;
  --rust:      #f43f5e;
  --blue:      #38bdf8;
  --gray-50:   rgba(255,255,255,0.04);
  --gray-150:  rgba(255,255,255,0.06);
  --gray-200:  rgba(255,255,255,0.08);
  --gray-300:  rgba(255,255,255,0.12);
  --gray-500:  #64748b;
  --gray-700:  #94a3b8;
  --white:     #13131a;
  --bg:        #0a0a0f;
  --surface:   #13131a;
  --surface-hi:#1a1a24;
  --border:    #1e1e2e;
  --border-hi: #2e2e3e;
  --accent:    #f97316;
  --accent-hi: #fb923c;
  --text:      #e2e8f0;
  --text-muted:#64748b;
  color-scheme: dark;
}

[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] .site-title { color: var(--slate); }
[data-theme="dark"] .ambient-glow { opacity: 0.15; }
[data-theme="dark"] {
  --card-bg: #13131a;
  --card-border: rgba(255,255,255,0.10);
}
[data-theme="dark"] .nav-card {
  background: var(--card-bg) !important;
  background-color: var(--card-bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: var(--card-border) !important;
  color: var(--gray-700) !important;
}
[data-theme="dark"] .main-nav .nav-card {
  background: var(--card-bg) !important;
  background-color: var(--card-bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: var(--card-border) !important;
  color: var(--gray-700) !important;
}
[data-theme="dark"] .main-nav .nav-card .nav-icon {
  filter: brightness(1.3) saturate(1.2);
}
[data-theme="dark"] #node-dropdown .nav-card {
  background: #13131a !important;
  background-color: #13131a !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: var(--gray-700) !important;
}
[data-theme="dark"] .nav-icon { filter: brightness(1.2); }
[data-theme="dark"] #node-dropdown {
  background: rgba(20,23,40,0.95);
  border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] #node-dropdown .nav-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
  color: var(--text);
}
[data-theme="dark"] #theme-toggle {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
}
[data-theme="dark"] .stats-panel {
  background: rgba(19,23,40,0.85) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: rgba(255,255,255,0.10) !important;
}
[data-theme="dark"] .stats-header {
  border-bottom-color: rgba(255,255,255,0.10) !important;
}
[data-theme="dark"] .stats-header h2 {
  color: var(--text) !important;
}
[data-theme="dark"] .agent-stat-row {
  border-bottom-color: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .agent-stat-name { color: var(--text) !important; }
[data-theme="dark"] .agent-stat-count { color: var(--text-muted) !important; }
[data-theme="dark"] .agent-stat-time { color: var(--text-muted) !important; }
[data-theme="dark"] .agent-stat-bar-wrap { background: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .stats-summary {
  border-top-color: rgba(255,255,255,0.10) !important;
  color: var(--text-muted) !important;
}
[data-theme="dark"] .stats-summary strong { color: var(--text) !important; }
[data-theme="dark"] .node-card {
  background: rgba(19,23,40,0.70) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .node-name { color: var(--text) !important; }
[data-theme="dark"] .node-detail { color: var(--text-muted) !important; }
[data-theme="dark"] .node-stat {
  background: rgba(255,255,255,0.04) !important;
}
[data-theme="dark"] .node-stat-value { color: var(--text) !important; }
[data-theme="dark"] .node-stat-label { color: var(--text-muted) !important; }
[data-theme="dark"] .stats-refresh { color: var(--text-muted) !important; }
[data-theme="dark"] .stats-refresh:hover { background: rgba(255,255,255,0.08) !important; color: var(--text) !important; }
[data-theme="dark"] .section-label { color: var(--text) !important; }
[data-theme="dark"] .blog-search-input {
  background: rgba(19,23,40,0.80) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: var(--text) !important;
}
[data-theme="dark"] .blog-tag {
  background: rgba(255,255,255,0.06) !important;
  color: var(--text-muted) !important;
  border-color: rgba(255,255,255,0.10) !important;
}
[data-theme="dark"] .blog-tag.active {
  background: rgba(74,222,128,0.20) !important;
  color: #4ade80 !important;
}
[data-theme="dark"] .blog-item { border-bottom-color: rgba(255,255,255,0.06) !important; }
[data-theme="dark"] .blog-item-title { color: var(--text) !important; }
[data-theme="dark"] .blog-item-date { color: var(--text-muted) !important; }
[data-theme="dark"] .blog-load-more-btn {
  background: rgba(19,23,40,0.80) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: var(--text) !important;
}
[data-theme="dark"] footer { color: var(--text-muted) !important; }
[data-theme="dark"] .blog-empty { color: var(--text-muted) !important; }

