
:root{
  --bg:#ffffff;
  --text:#111111;
  --muted:#6b6b6b;
  --line:rgba(0,0,0,.08);
  --shadow:0 10px 30px rgba(0,0,0,.04);
  --ease:cubic-bezier(0.22, 1, 0.36, 1);
  --max:760px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Helvetica,Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block;border-radius:18px}
.site-shell{min-height:100vh}
.container{width:min(calc(100% - 32px), var(--max));margin:0 auto}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  transition:background .28s var(--ease), backdrop-filter .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
  border-bottom:1px solid transparent;
}
.topbar.scrolled{
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(18px) saturate(180%);
  -webkit-backdrop-filter:blur(18px) saturate(180%);
  border-color:var(--line);
  box-shadow:0 6px 20px rgba(0,0,0,.03);
}
.topbar-inner{
  width:min(calc(100% - 32px), 1080px);
  margin:0 auto;
  height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.brand{
  font-size:15px;
  font-weight:600;
  letter-spacing:-0.01em;
}
.nav{display:flex;gap:20px}
.nav a{
  color:var(--muted);
  font-size:14px;
  transition:color .24s var(--ease), transform .24s var(--ease);
}
.nav a:hover{color:var(--text);transform:translateY(-1px)}

.hero{padding:96px 0 48px}
.eyebrow{
  margin:0 0 10px;
  color:var(--muted);
  font-size:14px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.hero h1{
  margin:0;
  font-size:clamp(44px, 8vw, 82px);
  line-height:.96;
  letter-spacing:-0.05em;
  font-weight:700;
}
.subtitle{
  margin:18px 0 0;
  max-width:680px;
  color:var(--muted);
  font-size:18px;
  line-height:1.8;
  min-height:1.8em;
  display:flex;
  align-items:flex-start;
  flex-wrap:nowrap;
}
#typing-text{
  display:inline-block;
  min-width:0.5ch;
  white-space:pre-wrap;
  word-break:break-word;
}
.typing-cursor{
  display:inline-block;
  width:1ch;
  flex:0 0 1ch;
  margin-left:2px;
  color:var(--text);
  vertical-align:top;
}
.typing-cursor::before{
  content:"|";
  animation:blinkCursor 1s step-end infinite;
}
@keyframes blinkCursor{
  0%, 49% { opacity:1; }
  50%, 100% { opacity:0; }
}

.list{padding:18px 0 96px}
.post-card{
  border-top:1px solid var(--line);
  padding:28px 0;
}
.post-link{display:block}
.post-card .meta{
  color:var(--muted);
  font-size:13px;
  margin-bottom:10px;
}
.post-card h2{
  margin:0;
  font-size:clamp(28px, 4vw, 42px);
  line-height:1.08;
  letter-spacing:-0.035em;
}
.post-card p{
  margin:12px 0 0;
  color:var(--muted);
  font-size:17px;
  line-height:1.85;
  max-width:640px;
}
.tags{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.tags span{
  border:1px solid var(--line);
  padding:8px 12px;
  border-radius:999px;
  color:var(--muted);
  font-size:13px;
}

.pagination{
  margin-top:40px;
  padding-top:8px;
}
.pagination-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.page-numbers{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.page-btn,
.page-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  height:42px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--text);
  font-size:14px;
  transition:transform .24s var(--ease), box-shadow .24s var(--ease), background .24s var(--ease), color .24s var(--ease);
}
.page-btn:hover,
.page-number:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(0,0,0,.06);
}
.page-number.active{
  background:#111;
  color:#fff;
  border-color:#111;
}
.page-btn.disabled{
  color:#aaa;
  pointer-events:none;
  background:#fafafa;
}

.post-page{padding:44px 0 96px}
.backnav{margin:12px 0 36px}
.backnav a{color:var(--muted);font-size:14px}
.post-header{margin-bottom:40px}
.post-date{color:var(--muted);font-size:14px;margin:0 0 12px}
.post-header h1{
  margin:0;
  font-size:clamp(36px, 7vw, 72px);
  line-height:.98;
  letter-spacing:-0.05em;
}
.post-excerpt{
  margin:16px 0 0;
  color:var(--muted);
  font-size:18px;
  line-height:1.8;
  max-width:680px;
}
.prose{
  font-size:18px;
  line-height:1.95;
  opacity:1;
  transform:none;
}
.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6{
  line-height:1.15;
  letter-spacing:-0.03em;
  margin:2.2em 0 .7em;
}
.prose h1{font-size:40px}
.prose h2{font-size:32px}
.prose h3{font-size:24px}
.prose h4{font-size:20px}
.prose h5{font-size:17px}
.prose h6{font-size:15px;color:var(--muted)}
.prose p,.prose ul,.prose ol,.prose blockquote,.prose pre{margin:1.15em 0}
.prose blockquote{
  margin-left:0;
  padding:14px 18px;
  border-left:3px solid rgba(0,0,0,.14);
  color:#444;
  background:#fafafa;
  border-radius:14px;
}
.prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:.9em;
  background:#f6f6f6;
  padding:.2em .45em;
  border-radius:8px;
}
.prose pre{
  overflow:auto;
  padding:20px;
  background:#0f1115;
  color:#f5f5f5;
  border-radius:20px;
}
.prose pre code{
  background:transparent;
  padding:0;
  color:inherit;
}
.prose hr{border:none;border-top:1px solid var(--line);margin:2em 0}
.prose a{
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
.prose img{
  width:100%;
  height:auto;
  margin:1.4em 0;
  border-radius:18px;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
}

.footer{border-top:1px solid var(--line)}
.footer-inner{padding:28px 0 40px}
.footer p{margin:0;color:var(--muted);font-size:13px}
.empty{color:var(--muted)}

.login-shell{
  min-height:calc(100vh - 140px);
  display:grid;
  place-items:center;
  padding:32px 16px 64px;
}
.login-card{
  width:min(100%, 520px);
  border:1px solid var(--line);
  border-radius:28px;
  padding:32px;
  box-shadow:var(--shadow);
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(16px);
}
.login-card h1{
  margin:0;
  font-size:40px;
  line-height:1.04;
  letter-spacing:-0.04em;
}
.login-form,.editor-form{
  display:grid;
  gap:18px;
  margin-top:20px;
}
.login-form label,.editor-form label{
  display:grid;
  gap:8px;
}
.login-form span,.editor-form span{
  font-size:13px;
  color:var(--muted);
}
input,textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  color:var(--text);
  font:inherit;
  padding:14px 16px;
  outline:none;
  transition:border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
textarea{
  resize:vertical;
  min-height:520px;
  line-height:1.7;
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:14px;
}
input:focus,textarea:focus{
  border-color:rgba(0,0,0,.2);
  box-shadow:0 0 0 4px rgba(0,0,0,.04);
}
.primary-btn,.mini-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--text);
  padding:11px 16px;
  font:inherit;
  font-size:14px;
  cursor:pointer;
  transition:transform .24s var(--ease), box-shadow .24s var(--ease), background .24s var(--ease);
}
.primary-btn{
  background:#111;
  color:#fff;
  border-color:#111;
  min-width:110px;
}
.primary-btn:hover,.mini-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(0,0,0,.06);
}
.mini-btn.danger{color:#a11}
.form-error{
  margin:18px 0 0;
  color:#b42318;
  background:#fff4f2;
  border:1px solid #ffd6d1;
  border-radius:14px;
  padding:12px 14px;
  font-size:14px;
}

.console-shell{
  width:min(calc(100% - 32px), 1280px);
  margin:0 auto;
  padding:28px 0 72px;
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:24px;
}
.console-panel{
  border:1px solid var(--line);
  border-radius:28px;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(16px);
  box-shadow:var(--shadow);
  padding:20px;
}
.console-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.console-panel-head h2{
  margin:0;
  font-size:20px;
  letter-spacing:-0.03em;
}

.console-post-list{
  display:grid;
  gap:12px;
}
.console-post-item{
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 16px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  min-width:0;
  background:rgba(255,255,255,.6);
  transition:border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.console-post-item:hover{
  border-color:rgba(0,0,0,.14);
  box-shadow:0 10px 24px rgba(0,0,0,.05);
  transform:translateY(-1px);
}
.console-post-main{
  flex:1;
  min-width:0;
}
.console-post-title{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  font-weight:700;
  font-size:15px;
  line-height:1.45;
  margin-bottom:8px;
  color:var(--text);
  word-break:break-word;
}
.console-post-title:hover{
  color:#111;
  text-decoration:underline;
  text-underline-offset:3px;
}
.console-post-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-size:12px;
}
.console-post-meta span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(0,0,0,.04);
}
.post-status.published{
  background:rgba(34,197,94,.12);
  color:#15803d;
}
.post-status.draft{
  background:rgba(245,158,11,.14);
  color:#b45309;
}
.console-post-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
  margin-left:auto;
}
.console-post-actions form{
  margin:0;
}
.console-post-actions .mini-btn{
  padding:8px 12px;
  font-size:12px;
  min-width:auto;
  white-space:nowrap;
}
.console-post-actions .mini-btn.danger{
  color:#b42318;
}

.editor-actions{
  display:flex;
  gap:12px;
  align-items:center;
}

.fade-up{
  opacity:0;
  transform:translateY(18px);
  animation:fadeUp .9s var(--ease) forwards;
}
.delay-1{ animation-delay:.08s; }
.delay-2{ animation-delay:.16s; }

.reveal{
  opacity:0;
  transform:translateY(24px);
  transition:opacity .9s var(--ease), transform .9s var(--ease);
  will-change:transform, opacity;
}
.reveal.visible{
  opacity:1;
  transform:translateY(0);
}
@keyframes fadeUp{
  to{
    opacity:1;
    transform:translateY(0);
  }
}
@media (max-width: 980px){
  .console-shell{grid-template-columns:1fr}
}
@media (max-width: 720px){
  .hero{padding:72px 0 30px}
  .subtitle,.prose{font-size:17px}
  .topbar-inner{height:60px}

  .console-post-item{
    flex-direction:column;
    align-items:stretch;
  }
  .console-post-actions{
    width:100%;
    justify-content:flex-end;
  }

  .login-card,.console-panel{
    padding:16px;
    border-radius:22px;
  }
  .pagination-inner{
    align-items:flex-start;
    flex-direction:column;
  }
}

.table-wrap{
  width:100%;
  overflow-x:auto;
  margin:1.4em 0;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
}

.prose table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:15px;
  line-height:1.7;
  min-width:560px;
}

.prose thead{
  background:#f7f7f7;
}

.prose th,
.prose td{
  padding:12px 14px;
  vertical-align:top;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.prose th{
  font-weight:700;
  color:var(--text);
}

.prose tr > *:last-child{
  border-right:none;
}

.prose tbody tr:last-child td{
  border-bottom:none;
}
