/* ================================================
   OpenClaw Blog — Space + Terminal Aesthetic
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #080810;
  --surface: #0f0f1a;
  --surface2: #141425;
  --surface3: #1a1a2e;
  --border: #1e1e38;
  --border2: #2a2a50;
  --accent: #ff6b00;
  --accent2: #ff8c33;
  --accent-glow: rgba(255,107,0,0.15);
  --text: #f0f0f8;
  --text-muted: #8888aa;
  --text-dim: #44445a;
  --radius: 12px;
  --max-w: 900px;
  --theme: #080810;
  --code-bg: #0f0f1a;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --term-green: #4ade80;
  --term-blue: #60a5fa;
  --term-yellow: #facc15;
  --term-bg: #0a0a14;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;

/* Override PaperMod .list class so list pages also use dark theme */
.list, [data-theme="dark"] .list {
  background: var(--bg) !important;
}
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* ---- Space Background ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(100,60,200,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(255,60,80,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 10% 60%, rgba(60,100,255,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.stars::before, .stars::after {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 90px 40px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 160px 120px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 200px 50px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 250px 160px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 300px 90px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 350px 200px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 400px 60px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 450px 140px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 500px 220px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 80px 200px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 120px 280px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 180px 320px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 280px 350px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 380px 300px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 480px 380px, rgba(255,255,255,0.5), transparent);
  background-repeat: repeat;
  background-size: 550px 420px;
  animation: drift 120s linear infinite;
  opacity: 0.6;
}
.stars::after {
  width: 300%;
  height: 300%;
  inset: -100%;
  background-size: 800px 600px;
  animation: drift 200s linear infinite reverse;
  opacity: 0.4;
}
@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ---- Header ---- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,16,0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header .logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.03em;
}
header .logo:hover { opacity: 0.85; }
header .logo-icon { width: 28px; height: 28px; flex-shrink: 0; }
header .logo-text { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.03em; }
header .logo-text span { color: var(--accent); }
header nav { display: flex; align-items: center; gap: 2px; }
header nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.825rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 7px;
  transition: all 0.14s;
}
header nav a:hover { color: var(--text); background: var(--surface2); }

/* ---- Main ---- */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---- Hero ---- */
.hero {
  padding: 72px 0 56px;
  text-align: left;
}
.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 36px;
}
.hero-text { flex: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero-eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.65;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text-muted);
}

/* ---- Terminal Block ---- */
.terminal {
  background: var(--term-bg);
  border: 1px solid var(--border2);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  width: 320px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 24px 60px rgba(0,0,0,0.6), 0 0 40px rgba(255,107,0,0.05);
}
.terminal-header {
  background: #0d0d1a;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title {
  margin-left: 6px;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: 'SF Mono', 'Fira Code', monospace;
  flex: 1;
  text-align: center;
}
.terminal-body {
  padding: 16px 18px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.77rem;
  line-height: 1.9;
  color: var(--text-muted);
}
.terminal-line { display: flex; gap: 10px; margin-bottom: 2px; }
.terminal-prompt { color: var(--term-green); user-select: none; }
.terminal-cmd { color: var(--text); }
.terminal-cmd .c-blue { color: var(--term-blue); }
.terminal-cmd .c-orange { color: var(--accent); }
.terminal-cmd .c-yellow { color: var(--term-yellow); }
.terminal-cmd .c-muted { color: var(--text-dim); }
.terminal-output { color: var(--text-dim); padding-left: 20px; font-size: 0.73rem; }
.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--accent);
  border-radius: 1px;
  animation: blink 1.2s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ---- Section Header ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.section-count { font-size: 0.75rem; color: var(--text-dim); font-weight: 500; }

/* ---- Post List ---- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 80px;
}
.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent2) 100%);
  opacity: 0;
  transition: opacity 0.18s;
}
.post-card:hover {
  border-color: rgba(255,107,0,0.25);
  background: var(--surface2);
  transform: translateX(2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.post-card:hover::before { opacity: 1; }
.post-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-card-date { font-size: 0.72rem; color: var(--text-dim); font-weight: 500; }
.post-card-cat {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(255,107,0,0.2);
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post-card h2 {
  font-size: 0.975rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 5px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.post-card:hover h2 { color: var(--accent2); }
.post-card-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}
.post-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.post-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 0.67rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
}
.post-card-meta { font-size: 0.7rem; color: var(--text-dim); white-space: nowrap; flex-shrink: 0; }

/* ================================================
   Shoutouts — Article List (openclaw.ai style)
   ================================================ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---- List Header ---- */
.list-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 20px;
  transition: color 0.14s;
}
.back-link:hover { color: var(--accent); }
.list-title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.1;
}
.claw-accent {
  color: var(--accent);
  margin-right: 6px;
}
.list-subtitle {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---- Shoutouts Grid ---- */
.shoutouts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 72px;
}

/* ---- Shoutout Card ---- */
.shoutout-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.shoutout-card:hover {
  border-color: rgba(255,107,0,0.35);
  box-shadow: 0 0 20px rgba(255,107,0,0.07);
}

.shoutout-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--border2);
}

.shoutout-content {
  flex: 1;
  min-width: 0;
}

.shoutout-quote {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shoutout-author {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.14s;
}
.shoutout-card:hover .shoutout-author {
  color: var(--accent);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .shoutouts-grid { grid-template-columns: 1fr; }
  .list-header { padding: 36px 0 28px; }
  .list-title { font-size: 1.6rem; }
}

/* ================================================
   Article / Single Page — openclaw.ai style
   ================================================ */

/* ---- Back Link ---- */
.back-link {
  display: inline-block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 36px 0 28px;
  transition: color 0.14s;
}
.back-link:hover { color: var(--accent); }

/* ---- Article Header ---- */
.article-header {
  max-width: 680px;
  margin: 0 auto 36px;
}
.article-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(255,107,0,0.2);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.article-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.18;
  background: linear-gradient(90deg, #ffffff 0%, #ff8533 60%, #ff6b00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.meta-sep { color: var(--text-dim); }
.article-accent-line {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---- Cover Image ---- */
.article-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 40px;
  display: block;
}

/* ---- Article Body ---- */
.article-body {
  max-width: 680px;
  margin: 0 auto 80px;
  font-size: 1rem;
  line-height: 1.85;
  color: #b4b4c8;
}
.article-body p {
  margin-bottom: 1.4em;
  color: #b4b4c8;
}
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 2em 0 0.7em;
  line-height: 1.25;
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.7em 0 0.6em;
  letter-spacing: -0.02em;
}
.article-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,107,0,0.25);
  transition: border-color 0.14s;
}
.article-body a:hover { border-color: var(--accent); }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.8em 0;
  padding: 14px 20px;
  background: var(--accent-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}
.article-body blockquote p { margin-bottom: 0; }
.article-body code {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.875em;
  color: var(--accent2);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.article-body pre {
  background: var(--term-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 1.8em 0;
}
.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.article-body img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5em 0;
}
.article-body ul, .article-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.4em;
}
.article-body li {
  margin-bottom: 0.5em;
  color: #b4b4c8;
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 72px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 0.825rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.14s;
}
.pagination a {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.pagination a:hover { color: var(--accent); border-color: rgba(255,107,0,0.4); }
.pagination .active {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  background: var(--surface);
  position: relative;
  z-index: 1;
}
footer .footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}
footer .footer-brand .logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
footer .footer-brand .logo span { color: var(--accent); }
footer .footer-brand p { font-size: 0.75rem; color: var(--text-dim); line-height: 1.5; max-width: 200px; }
footer .footer-col h4 {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}
footer .footer-col ul { list-style: none; }
footer .footer-col ul li { margin-bottom: 6px; }
footer .footer-col ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.14s;
}
footer .footer-col ul li a:hover { color: var(--accent); }
footer .footer-bottom {
  max-width: var(--max-w);
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}
footer .footer-bottom a { color: var(--text-dim); text-decoration: none; }
footer .footer-bottom a:hover { color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 680px) {
  .hero-top { flex-direction: column; }
  .terminal { width: 100%; }
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 1.7rem; }
  .post-card { padding: 14px 16px; }
  footer .footer-inner { grid-template-columns: 1fr 1fr; }
  footer .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}


/* ---- Category Pills ---- */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}
.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  text-decoration: none;
}
.cat-tab svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.cat-tab:hover svg {
  transform: scale(1.15);
}
.cat-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,107,0,0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,107,0,0.15);
}
.cat-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(255,107,0,0.35);
}

/* ===== Skill Download Button ===== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-primary {
  background: #ff6b00;
  color: #ffffff !important;
  border: 1px solid #ff6b00;
  box-shadow: 0 0 20px rgba(255,107,0,0.25);
  text-shadow: none;
}
.btn-primary:hover {
  background: #ff8533;
  border-color: #ff8533;
  box-shadow: 0 0 30px rgba(255,107,0,0.4);
  transform: translateY(-1px);
}
