:root {
  --bg: #050505;
  --bg-soft: #0c0c0c;
  --panel: #0b0b0b;
  --panel-2: #111111;
  --text: #ececec;
  --muted: #949494;
  --line: #202020;
  --line-soft: #181818;
  --terminal: #b7ffbf;
  --terminal-dim: #78cf82;
  --danger: #ff5f56;
  --amber: #ffbd2e;
  --green: #27c93f;
  --shadow: 0 24px 50px rgba(0,0,0,.34);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top, #111 0%, #060606 42%, #000 100%);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}
input, textarea, button {
  font: inherit;
}
body.page-ready {
  opacity: 1;
  transform: translateY(0);
}
body.page-leave {
  opacity: 0;
  transform: translateY(4px);
}
a { color: inherit; text-decoration: none; }
.mono, .prompt-line, .nav, .brand, .site-footer, .status-stack, .focus-list, .dashboard-side, .list-panel, .log-list, .type-line, .section-tag {
  font-family: "JetBrains Mono", monospace;
}
.container {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.transition-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.18);
  pointer-events: none;
  z-index: 49;
  opacity: 0;
  transition: opacity .35s ease;
}
body.page-leave .transition-mask {
  opacity: 1;
}
.screen-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.026;
  background-image: radial-gradient(circle, #fff 0.6px, transparent 0.8px);
  background-size: 8px 8px;
}
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.045;
  background: linear-gradient(to bottom, transparent 50%, rgba(255,255,255,0.06) 51%);
  background-size: 100% 4px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0,0,0,0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.nav-wrap {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  color: var(--terminal);
  font-size: .98rem;
}
.nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--muted);
  transition: color .2s ease;
}
.nav a.active,
.nav a:hover {
  color: var(--terminal);
}
.home-main {
  padding: 42px 0 34px;
}
.panel {
  background: linear-gradient(180deg, rgba(11,11,11,.97), rgba(7,7,7,.97));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.hero-terminal {
  overflow: hidden;
}
.terminal-top {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #101010;
}
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.red { background: var(--danger); }
.amber { background: var(--amber); }
.green { background: var(--green); }
.top-title { color: #707070; font-size: 0.82rem; margin-left: 4px; }
.terminal-body { padding: 34px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 30px;
}
.prompt-line {
  margin: 0 0 12px;
  color: var(--terminal-dim);
  font-size: 0.9rem;
}
.hero-terminal h1,
.page-panel h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.1rem);
  letter-spacing: -0.055em;
  line-height: .96;
}
.type-line {
  margin: 16px 0 0;
  color: var(--terminal);
  min-height: 1.5em;
  font-size: .95rem;
}
.lead, .text-blocks p {
  margin: 24px 0 0;
  color: var(--muted);
  line-height: 1.9;
  max-width: 60ch;
  font-size: 1.02rem;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.btn {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #292929;
  background: #0f0f0f;
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.btn:hover {
  border-color: #404040;
  transform: translateY(-1px);
}
.btn-primary {
  color: var(--terminal);
  border-color: #234528;
  background: linear-gradient(180deg, #101410, #0c100c);
}
.status-stack {
  display: grid;
  gap: 12px;
}
.status-box {
  padding: 15px;
  border: 1px solid #1d1d1d;
  border-radius: 10px;
  background: #0d0d0d;
}
.status-box .key {
  display: block;
  font-size: 0.79rem;
  color: #787878;
  margin-bottom: 8px;
}
.status-box strong {
  color: var(--terminal);
  font-weight: 600;
  line-height: 1.75;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.home-links,
.page-grid.two-col,
.page-grid.three-col {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.page-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.page-grid.three-col,
.home-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.compact { padding: 22px; }
.section-tag {
  margin: 0 0 12px;
  color: var(--terminal-dim);
  font-size: 0.78rem;
}
.compact h3 {
  margin: 0 0 10px;
  font-size: 1.06rem;
  line-height: 1.45;
}
.compact p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}
.dashboard {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-top: 20px;
}
.page-hero {
  padding: 28px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  align-items: start;
}
.page-card,
.project-card,
.quick-link {
  padding: 24px;
}
.quick-link,
.page-card,
.project-card {
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.quick-link:hover,
.page-card:hover,
.project-card:hover {
  transform: translateY(-2px);
  border-color: #2d4d31;
  background: #0d0f0d;
}
.quick-link h3,
.page-card h3,
.project-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}
.quick-link p:not(.section-tag),
.page-card p:not(.section-tag),
.project-card p:not(.section-tag) {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}
.mini-terminal {
  padding: 18px;
  border: 1px solid #1d1d1d;
  border-radius: 10px;
  background: #0d0d0d;
  color: var(--terminal);
  display: grid;
  gap: 10px;
}
.project-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--terminal);
  font-size: 0.9rem;
  word-break: break-all;
}
.project-links-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.repo-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.repo-card {
  padding: 24px;
}
.repo-card-large,
.repo-card-wide {
  grid-column: span 2;
}
.repo-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.repo-tag {
  color: var(--terminal-dim);
  font-size: 0.8rem;
}
.repo-name {
  color: #707070;
  font-size: 0.82rem;
}
.repo-card h3 {
  margin: 0 0 12px;
  font-size: 1.14rem;
}
.repo-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}
.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  color: var(--terminal-dim);
  font-size: 0.82rem;
}
.project-summary-board {
  display: grid;
  gap: 12px;
}
.project-summary-board div {
  padding: 14px;
  border: 1px solid #1d1d1d;
  border-radius: 10px;
  background: #0d0d0d;
}
.project-summary-board span {
  display: block;
  color: #777;
  font-size: 0.78rem;
  margin-bottom: 8px;
}
.project-summary-board strong {
  color: var(--terminal);
  line-height: 1.7;
}
.featured-card {
  background: linear-gradient(180deg, rgba(14,16,14,.98), rgba(8,10,8,.98));
}
.subtle-card {
  background: linear-gradient(180deg, rgba(12,12,12,.96), rgba(8,8,8,.96));
}
.dashboard-main,
.dashboard-side,
.page-panel { padding: 28px; }
.focus-list,
.list-panel,
.log-list {
  margin-top: 16px;
  display: grid;
  gap: 11px;
  color: var(--terminal);
  font-size: 0.94rem;
}
.mini-log {
  padding: 12px 0;
  border-bottom: 1px solid #1b1b1b;
  color: var(--terminal);
}
.mini-log:last-child { border-bottom: 0; }
.subpage { padding: 42px 0 26px; }
.page-panel p:not(.prompt-line) {
  color: var(--muted);
  line-height: 1.9;
}
.text-blocks { margin-top: 18px; }
.notes-page .page-panel {
  padding: 30px;
}
.notes-shell {
  display: grid;
  gap: 24px;
}
.notes-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}
.notes-head p:not(.prompt-line) {
  color: var(--muted);
  line-height: 1.9;
  max-width: 64ch;
}
.notes-meta {
  color: var(--terminal-dim);
  font-size: 0.86rem;
  display: grid;
  gap: 8px;
  text-align: right;
}
.notes-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 20px;
}
.inner-panel {
  padding: 22px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(14,14,14,.98), rgba(9,9,9,.98));
}
.note-form {
  display: grid;
  gap: 14px;
}
.note-form label {
  display: grid;
  gap: 8px;
}
.field-label {
  color: var(--terminal-dim);
  font-size: 0.82rem;
}
.note-form input,
.note-form textarea {
  width: 100%;
  border: 1px solid #242424;
  background: #0a0a0a;
  color: var(--text);
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.note-form input:focus,
.note-form textarea:focus {
  border-color: #315736;
  box-shadow: 0 0 0 3px rgba(120, 207, 130, 0.08);
}
.note-form textarea {
  resize: vertical;
  min-height: 110px;
}
.list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.editor-head,
.reader-toolbar,
.reader-actions,
.editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.btn-ghost {
  background: #0d0d0d;
  color: var(--muted);
}
.btn-danger {
  background: #130b0b;
  color: #ff9b9b;
  border-color: #472020;
}
.note-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.note-item-wrap {
  display: grid;
  gap: 10px;
}
.note-item {
  display: block;
  padding: 18px;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  background: #0b0b0b;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.note-item:hover {
  transform: translateY(-2px);
  border-color: #2d4d31;
  background: #0d0f0d;
}
.note-item-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.note-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.note-item-tag,
.note-item-link {
  color: var(--terminal);
  font-size: 0.82rem;
}
.note-item-date {
  color: #6e6e6e;
  font-size: 0.78rem;
}
.note-item h3 {
  margin: 0 0 10px;
  font-size: 1.06rem;
}
.note-item p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.8;
}
.note-reader {
  padding: 30px;
}
.reader-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.back-link {
  color: var(--terminal);
  font-size: 0.88rem;
}
.reader-date {
  color: #6f6f6f;
  font-size: 0.84rem;
}
.reader-tag {
  color: var(--terminal-dim);
  font-size: 0.84rem;
  margin: 0;
}
.reader-summary {
  margin: 18px 0 0;
  color: #b7b7b7;
  font-size: 1.05rem;
  line-height: 1.85;
  max-width: 58ch;
}
.reader-content {
  margin-top: 26px;
  display: grid;
  gap: 18px;
}
.reader-content p {
  margin: 0;
  color: var(--muted);
  line-height: 2;
  font-size: 1rem;
  white-space: pre-wrap;
}
.reader-loader {
  display: grid;
  gap: 8px;
  color: var(--terminal);
  font-size: 0.92rem;
  line-height: 1.8;
  padding: 6px 0 12px;
}
.reader-article.hidden,
.reader-loader.hidden {
  display: none;
}
.reader-article {
  display: block;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 36px;
  color: #666;
  font-size: 0.86rem;
}
.reveal, .reveal-delay, .reveal-delay-2 {
  opacity: 0;
  transform: translateY(12px);
  animation: rise .55s ease forwards;
}
.reveal-delay { animation-delay: .08s; }
.reveal-delay-2 { animation-delay: .16s; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 920px) {
  .hero-grid,
  .summary-strip,
  .dashboard,
  .notes-layout,
  .home-links,
  .page-grid.two-col,
  .page-grid.three-col,
  .page-hero,
  .repo-showcase {
    grid-template-columns: 1fr;
  }
  .repo-card-large,
  .repo-card-wide {
    grid-column: span 1;
  }
  .notes-head {
    grid-template-columns: 1fr;
    display: grid;
  }
  .notes-meta {
    text-align: left;
  }
}
@media (max-width: 700px) {
  .container { width: min(100% - 22px, 1080px); }
  .nav-wrap {
    padding: 10px 0;
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav { justify-content: center; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .terminal-body,
  .dashboard-main,
  .dashboard-side,
  .page-panel { padding: 22px; }
  .reader-top,
  .note-item-head,
  .list-head,
  .editor-head,
  .reader-toolbar,
  .reader-actions,
  .editor-actions,
  .note-item-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
