/* ==========================================================================
   Unified site skin — one token set for home, list pages, posts and about.
   ========================================================================== */

:root {
  --cy-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --cy-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;

  --cy-bg: #f6f8fb;
  --cy-bg-soft: #eef2f8;
  --cy-surface: #ffffff;
  --cy-surface-2: #f8fafc;
  --cy-text: #0f172a;
  --cy-text-2: #334155;
  --cy-muted: #64748b;
  --cy-border: rgba(15, 23, 42, 0.08);
  --cy-border-strong: rgba(15, 23, 42, 0.14);
  --cy-accent: #0891b2;
  --cy-accent-2: #6366f1;
  --cy-accent-3: #a78bfa;
  --cy-accent-soft: rgba(8, 145, 178, 0.1);
  --cy-accent-ring: rgba(8, 145, 178, 0.28);
  --cy-grid: rgba(99, 102, 241, 0.07);
  --cy-glow-a: rgba(34, 211, 238, 0.16);
  --cy-glow-b: rgba(129, 140, 248, 0.14);
  --cy-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --cy-shadow-lg: 0 2px 6px rgba(15, 23, 42, 0.05), 0 20px 48px rgba(15, 23, 42, 0.1);
  --cy-nav-bg: rgba(255, 255, 255, 0.72);
  --cy-code-bg: #f6f8fa;
  --cy-radius: 16px;
  --cy-radius-sm: 10px;
  --cy-wrap: 1100px;
  --cy-gradient: linear-gradient(120deg, var(--cy-accent) 0%, var(--cy-accent-2) 60%, var(--cy-accent-3) 100%);

  --body-bg-color: var(--cy-bg);
  --board-bg-color: var(--cy-surface);
  --text-color: var(--cy-text-2);
  --sec-text-color: var(--cy-muted);
  --post-text-color: var(--cy-text-2);
  --post-heading-color: var(--cy-text);
  --post-link-color: var(--cy-accent);
  --link-hover-color: var(--cy-accent);
  --link-hover-bg-color: var(--cy-accent-soft);
  --line-color: var(--cy-border);
  --navbar-text-color: var(--cy-text);
  --subtitle-color: var(--cy-text);
}

[data-user-color-scheme='dark'] {
  --cy-bg: #0b1120;
  --cy-bg-soft: #0f172a;
  --cy-surface: #111a2e;
  --cy-surface-2: #0f1729;
  --cy-text: #e5ebf5;
  --cy-text-2: #c3cddd;
  --cy-muted: #8b98ad;
  --cy-border: rgba(148, 163, 184, 0.12);
  --cy-border-strong: rgba(148, 163, 184, 0.22);
  --cy-accent: #22d3ee;
  --cy-accent-2: #818cf8;
  --cy-accent-3: #c4b5fd;
  --cy-accent-soft: rgba(34, 211, 238, 0.1);
  --cy-accent-ring: rgba(34, 211, 238, 0.3);
  --cy-grid: rgba(129, 140, 248, 0.06);
  --cy-glow-a: rgba(34, 211, 238, 0.1);
  --cy-glow-b: rgba(129, 140, 248, 0.12);
  --cy-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --cy-shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 24px 56px rgba(0, 0, 0, 0.4);
  --cy-nav-bg: rgba(11, 17, 32, 0.72);
  --cy-code-bg: #0d1424;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-user-color-scheme]) {
    --cy-bg: #0b1120;
    --cy-bg-soft: #0f172a;
    --cy-surface: #111a2e;
    --cy-surface-2: #0f1729;
    --cy-text: #e5ebf5;
    --cy-text-2: #c3cddd;
    --cy-muted: #8b98ad;
    --cy-border: rgba(148, 163, 184, 0.12);
    --cy-border-strong: rgba(148, 163, 184, 0.22);
    --cy-accent: #22d3ee;
    --cy-accent-2: #818cf8;
    --cy-accent-3: #c4b5fd;
    --cy-accent-soft: rgba(34, 211, 238, 0.1);
    --cy-accent-ring: rgba(34, 211, 238, 0.3);
    --cy-grid: rgba(129, 140, 248, 0.06);
    --cy-glow-a: rgba(34, 211, 238, 0.1);
    --cy-glow-b: rgba(129, 140, 248, 0.12);
    --cy-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --cy-shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 24px 56px rgba(0, 0, 0, 0.4);
    --cy-nav-bg: rgba(11, 17, 32, 0.72);
    --cy-code-bg: #0d1424;
  }
}

/* ---------- base ---------- */
html { scroll-padding-top: 76px; }

body.cy-site {
  background: var(--cy-bg);
  color: var(--cy-text-2);
  font-family: var(--cy-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cy-site ::selection { background: var(--cy-accent-ring); color: inherit; }
.cy-site a { transition: color .2s ease; }
.cy-site code, .cy-site kbd, .cy-site pre { font-family: var(--cy-mono); }

.cy-site kbd {
  display: inline-flex;
  align-items: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 .4em;
  border: 1px solid var(--cy-border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--cy-surface);
  color: var(--cy-muted);
  font-size: .72em;
  line-height: 1;
  box-shadow: none;
  justify-content: center;
}

.cy-site :focus-visible {
  outline: 2px solid var(--cy-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.cy-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.cy-backdrop-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--cy-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--cy-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%);
}

.cy-backdrop-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 70vh;
  background:
    radial-gradient(40% 60% at 18% 30%, var(--cy-glow-a), transparent 70%),
    radial-gradient(40% 60% at 82% 20%, var(--cy-glow-b), transparent 70%);
}

/* ---------- one content width for every page ---------- */
.cy-site #navbar > .container,
.cy-site main > .container {
  max-width: calc(var(--cy-wrap) + 30px);
}

.cy-site #board > .container {
  max-width: none;
  padding: 0;
}

.cy-site #board > .container > .row { margin: 0; }

.cy-site #board > .container > .row > .col-12 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0;
}

.cy-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  height: 2px;
  pointer-events: none;
}

.cy-progress span {
  display: block;
  height: 100%;
  background: var(--cy-gradient);
  transform: scaleX(0);
  transform-origin: left center;
}

.cy-site:not(.cy-post) .cy-progress { display: none; }

.cy-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--cy-accent);
  font-family: var(--cy-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cy-eyebrow--status {
  padding: .35rem .8rem;
  border: 1px solid var(--cy-border);
  border-radius: 999px;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow);
  color: var(--cy-text-2);
}

.cy-eyebrow--status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.cy-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 2.6rem;
  padding: 0 1.15rem;
  border: 1px solid var(--cy-border-strong);
  border-radius: 999px;
  background: var(--cy-surface);
  color: var(--cy-text) !important;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.cy-btn:hover {
  transform: translateY(-1px);
  border-color: var(--cy-accent-ring);
  box-shadow: var(--cy-shadow);
  text-decoration: none;
}

.cy-btn--primary {
  border-color: transparent;
  background: var(--cy-text);
  color: var(--cy-bg) !important;
}

.cy-btn--primary:hover { border-color: transparent; box-shadow: 0 8px 24px var(--cy-accent-ring); }
.cy-btn--ghost { background: transparent; border-style: dashed; color: var(--cy-muted) !important; }
.cy-btn kbd { font-size: .68rem; }

/* ---------- navbar ---------- */
.cy-site #navbar {
  padding-top: 10px;
  padding-bottom: 10px;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, padding .3s ease, transform .3s ease;
}

.cy-site #navbar.top-nav-collapse,
.cy-site #navbar.navbar-col-show {
  padding-top: 6px;
  padding-bottom: 6px;
  background: var(--cy-nav-bg) !important;
  border-bottom-color: var(--cy-border);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
}

.cy-site .navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--cy-text);
  font-size: 1rem;
  letter-spacing: .02em;
}

.cy-brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--cy-gradient);
  box-shadow: 0 4px 12px var(--cy-accent-ring);
}

.cy-brand-mark i {
  width: 12px;
  height: 6px;
  border-radius: 3px;
  background: #fff;
  box-shadow: inset 3px 0 0 -1px var(--cy-accent-2), inset -3px 0 0 -1px var(--cy-accent-2);
}

.cy-site .navbar .nav-item .nav-link {
  position: relative;
  margin: 0 .1rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  color: var(--cy-text-2);
  font-weight: 500;
}

.cy-site .navbar .nav-item .nav-link:hover,
.cy-site .navbar .nav-item .nav-link:focus {
  color: var(--cy-text);
  background: var(--cy-accent-soft);
}

.cy-site .navbar .nav-item .nav-link i { margin-right: .2rem; color: var(--cy-muted); }
.cy-site .navbar .navbar-toggler .animated-icon span { background: var(--cy-text); }

.cy-site .navbar .dropdown-menu {
  padding: .4rem;
  border: 1px solid var(--cy-border);
  border-radius: 12px;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow-lg);
}

.cy-site .navbar .dropdown-item { border-radius: 8px; color: var(--cy-text-2); }
.cy-site .navbar .dropdown-item:hover { background: var(--cy-accent-soft); color: var(--cy-text); }

@media (max-width: 991.98px) {
  .cy-site #navbar .navbar-collapse {
    margin-top: .5rem;
    padding: .5rem;
    border: 1px solid var(--cy-border);
    border-radius: 14px;
    background: var(--cy-surface);
    box-shadow: var(--cy-shadow-lg);
  }
}

/* ---------- hero (shared) ---------- */
.cy-site .header-inner { height: auto !important; max-height: none !important; }
.cy-site .header-inner--bare { height: 64px !important; }

.cy-hero.banner {
  height: auto;
  background-color: transparent;
  background-repeat: repeat;
  background-size: 480px 480px;
  background-position: center top;
  overflow: visible;
}

.cy-hero .full-bg-img,
.cy-hero .mask {
  position: relative;
  height: auto;
  background: transparent !important;
}

.cy-hero .banner-text {
  width: 100%;
  max-width: none;
  color: var(--cy-text);
}

.cy-hero-title {
  margin: .9rem 0 0;
  color: var(--cy-text);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.cy-hero .typed-cursor { color: var(--cy-accent); font-weight: 400; }

.cy-hero--compact .mask { padding: 128px 1.25rem 72px; }
.cy-hero--compact .banner-text { max-width: 860px; text-align: center; }
.cy-hero--compact .cy-hero-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.cy-hero--compact #subtitle { font-size: inherit; }

.cy-hero .post-meta,
.cy-hero .banner-text .mt-1,
.cy-hero .banner-text .mt-3 { color: var(--cy-muted); font-size: .88rem; }

.cy-hero .banner-text .mt-3 { margin-top: 1.1rem !important; }
.cy-hero .post-meta i { color: var(--cy-accent); }

.cy-hero--home .mask { padding: 132px 1.25rem 56px; }

.cy-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: 3rem;
  width: 100%;
  max-width: var(--cy-wrap);
  margin: 0 auto;
}

.cy-hero--home .cy-hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  background: linear-gradient(120deg, var(--cy-text) 30%, var(--cy-accent-2) 75%, var(--cy-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cy-hero-sub {
  min-height: 1.6em;
  margin: 1rem 0 0;
  color: var(--cy-text-2);
  font-family: var(--cy-mono);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.cy-hero-sub::before { content: '> '; color: var(--cy-accent); }
.cy-hero-sub #subtitle { font-size: inherit; }

.cy-hero-desc {
  max-width: 34rem;
  margin: .9rem 0 0;
  color: var(--cy-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.cy-hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }

.cy-hero-stats {
  display: flex;
  gap: 2.2rem;
  margin: 2.2rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--cy-border);
}

.cy-hero-stats div { display: flex; flex-direction: column-reverse; }
.cy-hero-stats dt { color: var(--cy-muted); font-size: .8rem; font-weight: 500; }
.cy-hero-stats dd { margin: 0; color: var(--cy-text); font-family: var(--cy-mono); font-size: 1.6rem; font-weight: 700; }

.cy-hero-visual { position: relative; padding: 0 0 2.4rem 2.4rem; }

.cy-terminal {
  overflow: hidden;
  border: 1px solid var(--cy-border-strong);
  border-radius: var(--cy-radius);
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow-lg);
}

.cy-terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--cy-border);
  background: var(--cy-surface-2);
}

.cy-terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--cy-border-strong); }
.cy-terminal-bar i:nth-child(1) { background: #f87171; }
.cy-terminal-bar i:nth-child(2) { background: #fbbf24; }
.cy-terminal-bar i:nth-child(3) { background: #34d399; }
.cy-terminal-bar span { margin-left: auto; color: var(--cy-muted); font-family: var(--cy-mono); font-size: .72rem; }

.cy-terminal-body {
  margin: 0;
  padding: 1.1rem 1.2rem 1.4rem;
  overflow: hidden;
  background: transparent;
  color: var(--cy-text-2);
  font-size: .86rem;
  line-height: 2;
  white-space: pre;
}

.cy-terminal-body .c { color: var(--cy-muted); }
.cy-terminal-body b { color: var(--cy-accent-2); font-weight: 600; }
.cy-terminal-body s { color: var(--cy-accent); text-decoration: none; }
.cy-terminal-body .ok { color: #22c55e; }

.cy-hero-bot {
  position: absolute;
  bottom: -.4rem;
  left: -.6rem;
  width: 116px;
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(15, 23, 42, .16));
}

@media (max-width: 991.98px) {
  .cy-hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .cy-hero-visual { max-width: 460px; }
}

@media (max-width: 575.98px) {
  .cy-hero--home .mask { padding-top: 104px; }
  .cy-hero--compact .mask { padding: 104px 1rem 52px; }
  .cy-hero-visual { display: none; }
  .cy-hero-stats { gap: 1.4rem; }
  .cy-btn--ghost { display: none; }
}

/* ---------- page board ---------- */
.cy-site #board {
  margin-top: 0 !important;
  padding: 2.5rem 2.5rem;
  border: 1px solid var(--cy-border);
  border-radius: 20px;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow);
}

.cy-index #board {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#scroll-top-button { display: none !important; }

/* ---------- home overview ---------- */
.cy-overview,
.cy-feed-head {
  width: min(var(--cy-wrap), calc(100% - 30px));
  margin: 0 auto;
}

.cy-overview { padding: 1.5rem 0 1rem; }

.cy-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.cy-section-head h2 { margin: .35rem 0 0; color: var(--cy-text); font-size: 1.5rem; font-weight: 700; }
.cy-section-head p { max-width: 26rem; margin: 0; color: var(--cy-muted); font-size: .9rem; text-align: right; }
.cy-feed-head { padding-top: 2.5rem; }

.cy-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.cy-panel {
  min-width: 0;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--cy-border);
  border-radius: var(--cy-radius);
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow);
}

.cy-panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--cy-text);
  font-size: .92rem;
  font-weight: 600;
}

.cy-panel-title small { color: var(--cy-muted); font-family: var(--cy-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }

.chart-canvas { width: 100%; height: 230px; }

.chart-fallback {
  display: grid;
  place-items: center;
  color: var(--cy-muted);
  font-size: .85rem;
}

.cy-latest-list { margin: .6rem 0 0; padding: 0; list-style: none; counter-reset: latest; }

.cy-latest-list li { counter-increment: latest; }

.cy-latest-list a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .62rem .4rem;
  border-bottom: 1px dashed var(--cy-border);
  color: var(--cy-text-2);
  font-size: .9rem;
}

.cy-latest-list li:last-child a { border-bottom: 0; }

.cy-latest-list a::before {
  content: counter(latest, decimal-leading-zero);
  color: var(--cy-accent);
  font-family: var(--cy-mono);
  font-size: .72rem;
}

.cy-latest-list span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cy-latest-list time { color: var(--cy-muted); font-family: var(--cy-mono); font-size: .72rem; }
.cy-latest-list a:hover { color: var(--cy-accent); text-decoration: none; }

@media (max-width: 991.98px) {
  .cy-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cy-latest { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
  .cy-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .cy-site #board { padding: 1.6rem 1.1rem; }
  .cy-section-head { flex-direction: column; align-items: flex-start; }
  .cy-section-head p { text-align: left; }
}

/* ---------- index cards ---------- */
.cy-site .index-card {
  position: relative;
  margin: 0 0 1rem;
  padding: 1.25rem;
  border: 1px solid var(--cy-border);
  border-radius: var(--cy-radius);
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.cy-site .index-card::before {
  position: absolute;
  top: 1.4rem;
  bottom: 1.4rem;
  left: -1px;
  width: 3px;
  border-radius: 3px;
  content: '';
  background: var(--cy-gradient);
  opacity: 0;
  transition: opacity .25s ease;
}

.cy-site .index-card:hover {
  border-color: var(--cy-accent-ring);
  box-shadow: var(--cy-shadow-lg);
  transform: translateY(-2px);
}

.cy-site .index-card:hover::before { opacity: 1; }

.cy-site .index-img img {
  width: 100%;
  height: 10.5rem;
  margin: 0;
  border-radius: 12px;
  object-fit: cover;
  transition: transform .5s ease;
}

.cy-site .index-img { overflow: hidden; border-radius: 12px; padding: 0; }
.cy-site .index-card:hover .index-img img { transform: scale(1.04); }

.cy-site .index-header { margin-bottom: .6rem; font-size: 1.25rem; font-weight: 700; line-height: 1.45; }
.cy-site .index-header a { color: var(--cy-text); }
.cy-site .index-header a:hover { color: var(--cy-accent); text-decoration: none; }
.cy-site .index-pin { color: var(--cy-accent-2); }

.cy-site .index-excerpt { color: var(--cy-muted); font-size: .93rem; line-height: 1.75; }
.cy-site .index-excerpt:hover { color: var(--cy-text-2); text-decoration: none; }

.cy-site .index-btm { margin-top: .8rem; color: var(--cy-muted); font-size: .8rem; }
.cy-site .index-btm .post-meta a { color: var(--cy-muted); }
.cy-site .index-btm .post-meta a:hover { color: var(--cy-accent); }

.cy-site .index-btm .post-meta:last-child a {
  display: inline-block;
  margin: 0 .25rem .2rem 0;
  padding: 0 .5rem;
  border-radius: 999px;
  background: var(--cy-accent-soft);
  color: var(--cy-accent);
  font-family: var(--cy-mono);
  font-size: .72rem;
  line-height: 1.6rem;
}

/* ---------- pagination ---------- */
.cy-site #pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  margin: 2rem 0 .5rem;
}

.cy-site #pagination a,
.cy-site #pagination .current,
.cy-site #pagination .space {
  display: inline-grid;
  place-items: center;
  min-width: 2.4rem;
  height: 2.4rem;
  margin: 0;
  padding: 0 .6rem;
  border: 1px solid var(--cy-border);
  border-radius: 12px;
  background: var(--cy-surface);
  color: var(--cy-text-2);
  font-family: var(--cy-mono);
  font-size: .85rem;
}

.cy-site #pagination a:hover { border-color: var(--cy-accent-ring); color: var(--cy-accent); background: var(--cy-surface); text-decoration: none; }
.cy-site #pagination .current { border-color: transparent; background: var(--cy-text); color: var(--cy-bg); font-weight: 700; }
.cy-site #pagination .space { border-style: dashed; color: var(--cy-muted); }

/* ---------- archives / categories / tags / links ---------- */
.cy-site #board .list-group .h4 { color: var(--cy-text); font-size: 1.15rem; font-weight: 700; }

.cy-site #board .list-group .h5 {
  margin: 1.8rem 0 .6rem;
  color: var(--cy-accent);
  font-family: var(--cy-mono);
  font-size: 1rem;
  font-weight: 700;
}

.cy-site #board .list-group hr { border-color: var(--cy-border); }

.cy-site #board .list-group-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: .65rem .8rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--cy-text-2);
}

.cy-site #board .list-group-item:hover { background: var(--cy-accent-soft); color: var(--cy-text); }
.cy-site #board .list-group-item time { flex: 0 0 auto; color: var(--cy-muted); font-family: var(--cy-mono); font-size: .8rem; }

.cy-site #board .category {
  margin-bottom: .8rem;
  padding: .35rem;
  border: 1px solid var(--cy-border);
  border-radius: 14px;
  background: var(--cy-surface-2);
}

.cy-site #board .category-item { color: var(--cy-text); font-weight: 600; }
.cy-site #board .category-count { color: var(--cy-muted); font-family: var(--cy-mono); }
.cy-site #board .category-count:hover { color: var(--cy-accent); }
.cy-site #board .category-post-list { padding: 0 .4rem .4rem; }

.cy-site .tagcloud { padding: 0 1rem; }

.cy-site .tagcloud a {
  display: inline-block;
  margin: .3rem .25rem;
  padding: .15rem .8rem;
  border: 1px solid var(--cy-border);
  border-radius: 999px;
  background: var(--cy-surface-2);
  color: var(--cy-text-2) !important;
  line-height: 1.7;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.cy-site .tagcloud a::before { content: '#'; margin-right: .1em; color: var(--cy-accent); opacity: .7; }
.cy-site .tagcloud a:hover { border-color: var(--cy-accent-ring); color: var(--cy-accent) !important; transform: translateY(-1px); text-decoration: none; }

.cy-site .links .card { padding: .4rem; border: 0; background: transparent; }

.cy-site .links .card-body {
  border: 1px solid var(--cy-border);
  border-radius: 14px;
  background: var(--cy-surface-2);
  transition: border-color .2s ease, transform .2s ease;
}

.cy-site .links .card-body:hover { border-color: var(--cy-accent-ring); background: var(--cy-surface-2); transform: translateY(-2px); }
.cy-site .links .link-title { color: var(--cy-text); font-weight: 600; }
.cy-site .links .link-intro { color: var(--cy-muted); }

/* ---------- post ---------- */
.cy-post #board-ctn #board { padding: 2.6rem 1rem; }

.cy-site .markdown-body {
  color: var(--cy-text-2);
  font-family: var(--cy-font);
  font-size: 1rem;
  line-height: 1.9;
}

.cy-site .markdown-body h1,
.cy-site .markdown-body h2,
.cy-site .markdown-body h3,
.cy-site .markdown-body h4 { color: var(--cy-text); font-weight: 700; letter-spacing: -.005em; }

.cy-site .markdown-body h2 {
  position: relative;
  margin-top: 2.4rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--cy-border);
}

.cy-site .markdown-body h2::before {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  content: '';
  background: var(--cy-gradient);
}

.cy-site .markdown-body a { color: var(--cy-accent); text-decoration: none; border-bottom: 1px solid var(--cy-accent-ring); }
.cy-site .markdown-body a:hover { border-bottom-color: var(--cy-accent); background: var(--cy-accent-soft); }
.cy-site .markdown-body .anchorjs-link { border: 0; color: var(--cy-muted); }
.cy-site .markdown-body .anchorjs-link:hover { background: none; color: var(--cy-accent); }

.cy-site .markdown-body blockquote {
  margin: 1.4rem 0;
  padding: .8rem 1.1rem;
  border-left: 3px solid var(--cy-accent);
  border-radius: 0 12px 12px 0;
  background: var(--cy-accent-soft);
  color: var(--cy-text-2);
}

.cy-site .markdown-body :not(pre) > code {
  padding: .15em .4em;
  border: 1px solid var(--cy-border);
  border-radius: 6px;
  background: var(--cy-surface-2);
  color: var(--cy-accent-2);
  font-size: .86em;
}

.cy-site .markdown-body figure.highlight,
.cy-site .markdown-body .code-wrapper {
  border-radius: 12px;
}

.cy-site .markdown-body .code-wrapper {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--cy-border);
  background: var(--cy-code-bg);
}

.cy-site .markdown-body .code-wrapper pre,
.cy-site .markdown-body figure.highlight pre,
.cy-site .markdown-body figure.highlight table,
.cy-site .markdown-body figure.highlight td { background: var(--cy-code-bg) !important; }

.cy-site .markdown-body pre { font-size: .86rem; line-height: 1.7; }

.cy-site .markdown-body .code-widget {
  border-radius: 6px;
  color: var(--cy-muted);
  font-family: var(--cy-mono);
}

.cy-site .markdown-body table { display: table; width: 100%; overflow: hidden; border-radius: 10px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--cy-border); }
.cy-site .markdown-body table th { background: var(--cy-surface-2); color: var(--cy-text); }
.cy-site .markdown-body table th,
.cy-site .markdown-body table td { border: 0; border-bottom: 1px solid var(--cy-border); }
.cy-site .markdown-body table tr:last-child td { border-bottom: 0; }

.cy-site .markdown-body img { border-radius: 10px; }
.cy-site .markdown-body hr { border-color: var(--cy-border); }

.cy-site .post-content > hr { border-top: 1px dashed var(--cy-border-strong); }

.cy-site .post-metas .post-meta a,
.cy-site .post-meta a { color: var(--cy-muted); }
.cy-site .post-metas .post-meta a:hover { color: var(--cy-accent); }

.cy-site .license-box {
  border: 1px solid var(--cy-border);
  border-radius: 14px;
  background: var(--cy-surface-2) !important;
}

.cy-site .post-prevnext {
  display: flex;
  gap: .8rem;
}

.cy-site .post-prevnext .post-prev,
.cy-site .post-prevnext .post-next { flex: 1; max-width: none; padding: 0; }

.cy-site .post-prevnext a {
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 100%;
  padding: .8rem 1rem;
  border: 1px solid var(--cy-border);
  border-radius: 12px;
  color: var(--cy-text-2);
  font-size: .9rem;
}

.cy-site .post-prevnext .post-next a { justify-content: flex-end; text-align: right; }
.cy-site .post-prevnext a:hover { border-color: var(--cy-accent-ring); color: var(--cy-accent); text-decoration: none; }

.cy-site #toc {
  padding: .9rem 1rem;
  border: 1px solid var(--cy-border);
  border-radius: 14px;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow);
}

.cy-site #toc .toc-header { color: var(--cy-text); font-weight: 600; }
.cy-site #toc .toc-list-item a, .cy-site .toc-link { color: var(--cy-muted); font-size: .84rem; }
.cy-site .tocbot-active-link { color: var(--cy-accent) !important; font-weight: 600; }
.cy-site .toc-link::before { background: var(--cy-accent) !important; }

.cy-site .category-bar {
  padding: .9rem 1rem;
  border: 1px solid var(--cy-border);
  border-radius: 14px;
  background: var(--cy-surface);
}

/* focus reading */
.cy-focus .reading-shell .side-col { display: none !important; }
.cy-focus .reading-shell .col-lg-8 { flex: 0 0 100%; max-width: 100%; }
.cy-focus #board-ctn { max-width: 860px; }
.cy-focus #navbar:not(:hover) { transform: translateY(-100%); }
.cy-focus .cy-backdrop { opacity: .4; }

/* ---------- 404 ---------- */
.lost-signal {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 760px;
  margin: 0 auto 4rem;
  padding: 2rem 2.2rem;
  border: 1px solid var(--cy-border);
  border-radius: 20px;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow);
}

.lost-signal-code {
  background: var(--cy-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--cy-mono);
  font-size: 4.4rem;
  font-weight: 800;
  line-height: 1;
}

.lost-signal small { color: var(--cy-muted); font-family: var(--cy-mono); font-size: .72rem; letter-spacing: .08em; }
.lost-signal h1 { margin: .4rem 0; color: var(--cy-text); font-size: 1.4rem; font-weight: 700; }
.lost-signal p { margin: 0 0 1rem; color: var(--cy-muted); }
.lost-signal p b { color: var(--cy-accent); font-family: var(--cy-mono); }
.lost-signal a { color: var(--cy-accent); font-weight: 600; }

@media (max-width: 575.98px) {
  .lost-signal { flex-direction: column; align-items: flex-start; margin: 0 1rem 3rem; }
}

/* ---------- footer ---------- */
.cy-site footer { position: relative; margin-top: 3rem; }

.cy-site footer .footer-inner {
  padding: 2rem 1rem 2.6rem;
  border-top: 1px solid var(--cy-border);
  color: var(--cy-muted);
  font-size: .82rem;
}

.cy-site footer a { color: var(--cy-text-2); }
.cy-site footer a:hover { color: var(--cy-accent); }

/* ==========================================================================
   About
   ========================================================================== */
.cy-about main { overflow: visible; }

.geek-about {
  position: relative;
  width: min(var(--cy-wrap), calc(100% - 30px));
  margin: 0 auto;
  padding: 2.5rem 0 0;
  color: var(--cy-text-2);
}

.geek-about a { color: inherit; text-decoration: none; }

.about-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: 3rem;
  min-height: calc(86vh - 64px);
  padding: 2rem 0 3rem;
}

.about-status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .8rem;
  border: 1px solid var(--cy-border);
  border-radius: 999px;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow);
  color: var(--cy-text-2);
  font-family: var(--cy-mono);
  font-size: .72rem;
  letter-spacing: .05em;
}

.about-status i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }

.about-kicker {
  margin: 1.4rem 0 0;
  color: var(--cy-accent);
  font-family: var(--cy-mono);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
}

#about-name {
  margin: .4rem 0 0;
  color: var(--cy-text);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
}

#about-name em { color: var(--cy-accent); font-style: normal; }

.about-role { margin: 1rem 0 0; color: var(--cy-text-2); font-size: 1.1rem; font-weight: 500; }

.about-role span {
  background: var(--cy-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.about-lead { max-width: 34rem; margin: .9rem 0 0; color: var(--cy-muted); line-height: 1.85; }

.about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.8rem; }

.about-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 2.6rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  background: var(--cy-text);
  color: var(--cy-bg) !important;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}

.about-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--cy-accent-ring); }

.about-icon {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--cy-border-strong);
  border-radius: 50%;
  background: var(--cy-surface);
  color: var(--cy-text-2) !important;
  transition: border-color .2s ease, color .2s ease;
}

.about-icon:hover { border-color: var(--cy-accent-ring); color: var(--cy-accent) !important; }

.about-console-wrap { position: relative; padding-top: 3.2rem; }

.about-orbit { display: none; }

.about-avatar-frame {
  position: absolute;
  top: 0;
  right: 1.4rem;
  z-index: 2;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 3px solid var(--cy-surface);
  border-radius: 24px;
  box-shadow: var(--cy-shadow-lg);
}

.about-avatar-frame img { width: 100%; height: 100%; object-fit: cover; }
.about-scanline { display: none; }

.about-console {
  overflow: hidden;
  border: 1px solid var(--cy-border-strong);
  border-radius: var(--cy-radius);
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow-lg);
  font-family: var(--cy-mono);
}

.about-console-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--cy-border);
  background: var(--cy-surface-2);
}

.about-console-bar span { width: 10px; height: 10px; border-radius: 50%; }
.about-console-bar span:nth-child(1) { background: #f87171; }
.about-console-bar span:nth-child(2) { background: #fbbf24; }
.about-console-bar span:nth-child(3) { background: #34d399; }
.about-console-bar b { margin-left: auto; color: var(--cy-muted); font-size: .72rem; font-weight: 500; }

.about-console-body { padding: 1.1rem 1.2rem 1.3rem; font-size: .85rem; line-height: 1.8; }
.about-console-body p { margin: 0; color: var(--cy-text); }
.about-console-body p i { color: var(--cy-accent-2); font-style: normal; }
.about-console-body .out { margin-bottom: .55rem; padding-left: 1.1rem; color: var(--cy-muted); white-space: pre-line; }
.about-console-body .out span { color: var(--cy-accent-3); }
.about-console-body #about-type { color: var(--cy-accent); }
.about-caret { color: var(--cy-accent); animation: cy-blink 1s steps(1) infinite; }

.about-scroll-cue {
  position: absolute;
  bottom: .5rem;
  left: 0;
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--cy-muted);
  font-family: var(--cy-mono);
  font-size: .68rem;
  letter-spacing: .12em;
}

.about-scroll-cue i { width: 2.5rem; height: 1px; background: var(--cy-border-strong); }

.about-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--cy-border);
  border-radius: var(--cy-radius);
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow);
}

.about-metrics > div { display: flex; flex-direction: column; padding: 1.3rem 1.4rem; border-right: 1px solid var(--cy-border); }
.about-metrics > div:last-child { border-right: 0; }
.about-metrics b { color: var(--cy-text); font-family: var(--cy-mono); font-size: 1.9rem; font-weight: 700; }
.about-metrics span { margin-top: .2rem; color: var(--cy-text-2); font-size: .88rem; }
.about-metrics small { color: var(--cy-muted); font-family: var(--cy-mono); font-size: .66rem; letter-spacing: .08em; }

.about-body {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 2.5rem;
  padding: 3.5rem 0 1rem;
}

.about-rail {
  position: sticky;
  top: 88px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-family: var(--cy-mono);
  font-size: .8rem;
}

.about-rail span { margin-bottom: .6rem; color: var(--cy-muted); font-size: .68rem; letter-spacing: .1em; }

.about-rail a {
  padding: .45rem .7rem;
  border-left: 2px solid var(--cy-border);
  color: var(--cy-muted) !important;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.about-rail a:hover,
.about-rail a.active { border-left-color: var(--cy-accent); background: var(--cy-accent-soft); color: var(--cy-text) !important; }

.about-content { min-width: 0; }

.about-section {
  margin-bottom: 1.4rem;
  padding: 1.8rem;
  border: 1px solid var(--cy-border);
  border-radius: 20px;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow);
}

.about-section-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }

.about-section-head > span {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: var(--cy-accent-soft);
  color: var(--cy-accent);
  font-family: var(--cy-mono);
  font-size: .85rem;
  font-weight: 700;
}

.about-section-head small { color: var(--cy-muted); font-family: var(--cy-mono); font-size: .68rem; letter-spacing: .08em; }
.about-section-head h2 { margin: .1rem 0 0; color: var(--cy-text); font-size: 1.35rem; font-weight: 700; }

.about-section h3 { margin: 0; color: var(--cy-text); font-size: 1.02rem; font-weight: 700; line-height: 1.5; }
.about-section p, .about-section li { color: var(--cy-text-2); font-size: .93rem; line-height: 1.8; }
.about-section ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.about-section li::marker { color: var(--cy-accent); }
.about-section time { color: var(--cy-muted); font-family: var(--cy-mono); font-size: .76rem; }

.about-profile-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.6rem; }
.about-statement p { margin: 0 0 .8rem; }
.about-stack, .about-tags { display: flex; flex-wrap: wrap; align-content: flex-start; gap: .4rem; }

.about-stack span,
.about-tags span {
  padding: .2rem .65rem;
  border: 1px solid var(--cy-border);
  border-radius: 999px;
  background: var(--cy-surface-2);
  color: var(--cy-text-2);
  font-family: var(--cy-mono);
  font-size: .74rem;
}

.about-education { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin-top: 1.4rem; }

.about-education article,
.about-project-grid > article,
.about-awards article {
  padding: 1rem 1.1rem;
  border: 1px solid var(--cy-border);
  border-radius: 14px;
  background: var(--cy-surface-2);
  transition: border-color .2s ease, transform .2s ease;
}

.about-project-grid > article:hover,
.about-education article:hover { border-color: var(--cy-accent-ring); transform: translateY(-2px); }

.about-education h3 { margin-top: .3rem; }
.about-education p { margin: .2rem 0 0; }
.about-education small { color: var(--cy-muted); font-size: .78rem; }

.about-timeline { position: relative; display: flex; flex-direction: column; gap: 1rem; }

.about-timeline-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--cy-border);
}

.about-timeline-card:last-child { padding-bottom: 0; border-bottom: 0; }
.about-timeline-card time { padding-top: .2rem; }
.about-company { margin: 0 0 .1rem !important; color: var(--cy-accent) !important; font-family: var(--cy-mono); font-size: .76rem !important; font-weight: 600; }
.about-timeline-main > p { margin: .35rem 0 0; }

.about-project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem; }
.about-project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }

.about-project-top span {
  padding: .1rem .55rem;
  border-radius: 6px;
  background: var(--cy-accent-soft);
  color: var(--cy-accent);
  font-family: var(--cy-mono);
  font-size: .7rem;
  font-weight: 600;
}

.about-project-grid p { margin: .4rem 0 0; }
.about-project-grid .about-tags { margin-top: .8rem; }

.about-research-list { display: flex; flex-direction: column; gap: .6rem; }

.about-research-item {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--cy-border);
  border-radius: 14px;
  background: var(--cy-surface-2);
  transition: border-color .2s ease;
}

a.about-research-item:hover { border-color: var(--cy-accent-ring); }
.about-research-item > span { color: var(--cy-accent); font-family: var(--cy-mono); font-size: .8rem; font-weight: 700; }
.about-research-item small { color: var(--cy-muted); font-family: var(--cy-mono); font-size: .72rem; }
.about-research-item b { color: var(--cy-muted); }
a.about-research-item:hover b { color: var(--cy-accent); }

.about-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.about-awards p { margin: .3rem 0 0; color: var(--cy-text); font-weight: 600; }

.about-signoff {
  margin: 2rem 0 1rem;
  padding: 2.6rem 2rem;
  border: 1px solid var(--cy-border);
  border-radius: 20px;
  background:
    radial-gradient(60% 120% at 100% 0%, var(--cy-glow-b), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, var(--cy-glow-a), transparent 60%),
    var(--cy-surface);
  text-align: center;
}

.about-signoff small { color: var(--cy-accent); font-family: var(--cy-mono); font-size: .72rem; letter-spacing: .1em; }
.about-signoff h2 { margin: .6rem 0; color: var(--cy-text); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.35; }
.about-signoff h2 span { background: var(--cy-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.about-signoff p { max-width: 32rem; margin: 0 auto 1.3rem; color: var(--cy-muted); }

.about-signoff a {
  display: inline-flex;
  align-items: center;
  height: 2.4rem;
  padding: 0 1.1rem;
  border: 1px solid var(--cy-border-strong);
  border-radius: 999px;
  background: var(--cy-surface);
  color: var(--cy-text) !important;
  font-size: .88rem;
  font-weight: 600;
}

.about-signoff a:hover { border-color: var(--cy-accent-ring); }
.about-extra, .geek-about #comments { margin-top: 1.4rem; }

@media (max-width: 991.98px) {
  .about-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-bottom: 4rem; }
  .about-body { grid-template-columns: 1fr; }
  .about-rail { display: none; }
  .about-metrics { grid-template-columns: repeat(2, 1fr); }
  .about-metrics > div:nth-child(2) { border-right: 0; }
  .about-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--cy-border); }
  .about-profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .about-section { padding: 1.3rem 1.1rem; }
  .about-timeline-card { grid-template-columns: 1fr; gap: .3rem; }
}

/* ==========================================================================
   Robot
   ========================================================================== */
.dbot { overflow: visible; }
.dbot-shadow { fill: rgba(15, 23, 42, .12); }
.dbot-stroke, .dbot-arm { fill: none; stroke: var(--cy-border-strong); stroke-width: 6; stroke-linecap: round; }
.dbot-arm { stroke: #cbd5e1; stroke-width: 9; }
.dbot-antenna-tip { fill: var(--cy-accent); }
.dbot-shell { fill: #f8fafc; stroke: #dbe3ee; stroke-width: 3; }
.dbot-ear { fill: #e2e8f0; stroke: #dbe3ee; stroke-width: 3; }
.dbot-shine { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: .9; }
.dbot-visor { fill: #0f172a; }
.dbot-eye { fill: #67e8f9; }
.dbot-eye-happy path { fill: none; stroke: #67e8f9; stroke-width: 5; stroke-linecap: round; }
.dbot-eye-happy { opacity: 0; }
.dbot-mouth { fill: none; stroke: #67e8f9; stroke-width: 3.5; stroke-linecap: round; opacity: .8; }
.dbot-cheek { fill: #fda4af; opacity: .55; }
.dbot-core { fill: var(--cy-accent-2); opacity: .85; }
.dbot-eyes { transition: transform .25s ease-out; transform-box: fill-box; }

[data-user-color-scheme='dark'] .dbot-shell { fill: #1e293b; stroke: #334155; }
[data-user-color-scheme='dark'] .dbot-ear { fill: #273449; stroke: #334155; }
[data-user-color-scheme='dark'] .dbot-arm { stroke: #334155; }
[data-user-color-scheme='dark'] .dbot-shine { stroke: #334155; }
[data-user-color-scheme='dark'] .dbot-visor { fill: #020617; }
[data-user-color-scheme='dark'] .dbot-shadow { fill: rgba(0, 0, 0, .35); }

.cy-motion .dbot-float { animation: cy-float 4.2s ease-in-out infinite; }
.cy-motion .dbot-eye-open { animation: cy-wink 5.5s infinite; transform-origin: center 86px; transform-box: view-box; }
.cy-motion .dbot-antenna-tip { animation: cy-pulse 2.4s ease-in-out infinite; }

.is-happy .dbot-eye-open { opacity: 0; animation: none; }
.is-happy .dbot-eye-happy { opacity: 1; }

@keyframes cy-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes cy-wink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes cy-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes cy-blink { 50% { opacity: 0; } }

/* ---------- dock ---------- */
.dbot-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1030;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .6rem;
  pointer-events: none;
}

.dbot-dock > * { pointer-events: auto; }

.dbot-fab {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 1px solid var(--cy-border);
  border-radius: 50%;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow-lg);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.dbot-fab:hover { transform: translateY(-2px); }
.dbot-fab:focus { outline: none; }
.dbot-fab:focus-visible { outline: 2px solid var(--cy-accent); outline-offset: 3px; }

.dbot-ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.dbot-ring circle { fill: none; stroke-width: 2.5; }
.dbot-ring-track { stroke: transparent; }
.dbot-ring-bar { stroke: var(--cy-accent); stroke-linecap: round; transition: stroke-dashoffset .15s linear; }
.dbot-mini { width: 44px; height: 44px; margin-top: 2px; }
.dbot-mini .dbot-shadow { display: none; }

.dbot-bubble {
  max-width: 260px;
  padding: .55rem .85rem;
  border: 1px solid var(--cy-border);
  border-radius: 14px 14px 4px 14px;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow-lg);
  color: var(--cy-text-2);
  font-size: .82rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.dbot-bubble a { color: var(--cy-accent); font-weight: 600; }
.is-talking .dbot-bubble { opacity: 1; transform: none; visibility: visible; }

.dbot-menu {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: .35rem;
  border: 1px solid var(--cy-border);
  border-radius: 14px;
  background: var(--cy-surface);
  box-shadow: var(--cy-shadow-lg);
  animation: cy-pop .16s ease-out;
}

.dbot-menu[hidden] { display: none; }

.dbot-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .7rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--cy-text-2);
  font-size: .86rem;
  text-align: left;
  cursor: pointer;
}

.dbot-menu button:hover, .dbot-menu button:focus-visible { background: var(--cy-accent-soft); color: var(--cy-text); outline: none; }

@keyframes cy-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

@media (max-width: 575.98px) {
  .dbot-dock { right: 14px; bottom: 14px; }
  .dbot-fab { width: 52px; height: 52px; }
  .dbot-mini { width: 38px; height: 38px; }
}

/* ---------- command palette ---------- */
.agent-palette {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 1rem 1rem;
}

.agent-palette[hidden] { display: none; }

.agent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .32);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .16s ease;
}

.agent-palette-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 620px;
  max-height: 70vh;
  overflow: hidden;
  border: 1px solid var(--cy-border-strong);
  border-radius: 18px;
  background: var(--cy-surface);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .3);
  opacity: 0;
  transform: translateY(-8px) scale(.985);
  transition: opacity .16s ease, transform .16s ease;
}

.agent-palette.is-open .agent-backdrop,
.agent-palette.is-open .agent-palette-panel { opacity: 1; transform: none; }

.agent-palette-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0;
  padding: .95rem 1.1rem;
  border-bottom: 1px solid var(--cy-border);
}

.agent-palette-prompt { color: var(--cy-accent); font-family: var(--cy-mono); font-weight: 700; }

.agent-palette-head input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--cy-text);
  font-size: 1rem;
}

.agent-palette-head input::placeholder { color: var(--cy-muted); }

.agent-palette-list { flex: 1; margin: 0; padding: .4rem; overflow-y: auto; list-style: none; }

.agent-palette-group {
  padding: .7rem .7rem .3rem;
  color: var(--cy-muted);
  font-family: var(--cy-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.agent-palette-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .7rem;
  border-radius: 10px;
  cursor: pointer;
}

.agent-palette-item.is-active { background: var(--cy-accent-soft); }
.agent-palette-item.is-active b { color: var(--cy-accent); }

.agent-palette-kind {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--cy-accent);
}

.agent-palette-kind--page { border-radius: 50%; background: var(--cy-accent-2); }
.agent-palette-kind--action { background: transparent; border: 2px solid var(--cy-accent-3); border-radius: 50%; }

.agent-palette-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.agent-palette-text b { overflow: hidden; color: var(--cy-text); font-size: .92rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.agent-palette-text small { overflow: hidden; color: var(--cy-muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.agent-palette-text mark { padding: 0; background: transparent; color: var(--cy-accent); font-weight: 700; }
.agent-palette-item em { flex: 0 0 auto; color: var(--cy-muted); font-family: var(--cy-mono); font-size: .7rem; font-style: normal; }
.agent-palette-empty { padding: 2rem 1rem; color: var(--cy-muted); font-size: .88rem; text-align: center; }

.agent-palette-foot {
  display: flex;
  gap: 1.2rem;
  padding: .6rem 1.1rem;
  border-top: 1px solid var(--cy-border);
  background: var(--cy-surface-2);
  color: var(--cy-muted);
  font-size: .74rem;
}

.agent-palette-foot kbd { margin-right: .2rem; }
body.cy-palette-open { overflow: hidden; }

@media (max-width: 575.98px) {
  .agent-palette { padding-top: 5vh; }
  .agent-palette-foot { display: none; }
}

/* ---------- reveal ---------- */
.cy-motion .cy-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease var(--cy-delay, 0ms), transform .55s cubic-bezier(.22, 1, .36, 1) var(--cy-delay, 0ms), border-color .25s ease, box-shadow .25s ease;
}

.cy-motion .cy-reveal.is-in { opacity: 1; transform: none; }
.cy-motion .index-card.cy-reveal.is-in:hover { transform: translateY(-2px); }

.cy-motion .cy-hero-copy > *,
.cy-motion .cy-hero-visual { animation: cy-rise .7s cubic-bezier(.22, 1, .36, 1) both; }
.cy-motion .cy-hero-copy > :nth-child(2) { animation-delay: .06s; }
.cy-motion .cy-hero-copy > :nth-child(3) { animation-delay: .12s; }
.cy-motion .cy-hero-copy > :nth-child(4) { animation-delay: .18s; }
.cy-motion .cy-hero-copy > :nth-child(5) { animation-delay: .24s; }
.cy-motion .cy-hero-copy > :nth-child(6) { animation-delay: .3s; }
.cy-motion .cy-hero-visual { animation-delay: .2s; }

@keyframes cy-rise { from { opacity: 0; transform: translateY(16px); } }

@media (prefers-reduced-motion: reduce) {
  .cy-site *, .cy-site *::before, .cy-site *::after { animation: none !important; transition: none !important; }
}

@media print {
  .cy-backdrop, .cy-progress, .dbot-dock, .agent-palette { display: none !important; }
}
