/*
Theme Name: Ultra Minimal
Theme URI: https://zhuangpenglong.com/
Author: SHOPAGG AI
Author URI: https://zhuangpenglong.com/
Description: First-principles minimalist theme. Zero JavaScript. Zero webfonts. Zero external requests.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: ultra-minimal
*/

/* ============================================
   1. RESET & BASE
   ============================================ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:18px;line-height:1.75;-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
  color:#222;background:#fafafa;
  overflow-wrap:break-word;word-break:break-word
}
a{color:#0d6efd;text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto;display:block}
hr{border:none;border-top:1px solid #e5e5e5;margin:2.5rem 0}

/* ── Global overflow guard ── */
.site-main,article,.site-footer,blockquote,pre,code,.post-nav,.breadcrumb{
  overflow-wrap:break-word;word-break:break-word
}
pre,code{overflow-x:auto;max-width:100%}
table{max-width:100%;display:block;overflow-x:auto;border-collapse:collapse}
iframe,video,embed{max-width:100%}

/* ============================================
   2. TYPOGRAPHY
   ============================================ */
h1{font-size:2rem;line-height:1.3;margin:0 0 .6rem;color:#111;font-weight:800}
h2{font-size:1.5rem;line-height:1.35;margin:2rem 0 .6rem;color:#1a1a1a;font-weight:700}
h3{font-size:1.2rem;line-height:1.4;margin:1.5rem 0 .5rem;color:#333;font-weight:700}
p,ul,ol{margin-bottom:1.1rem}
ul,ol{padding-left:1.5rem}
li{margin-bottom:.3rem}

/* ============================================
   3. HEADER / NAV
   ============================================ */
.site-nav{
  background:#fff;
  border-bottom:1px solid #e5e5e5;
  position:sticky;top:0;z-index:100;
  box-shadow:0 1px 3px rgba(0,0,0,.04)
}
.nav-inner{
  max-width:780px;margin:0 auto;
  padding:.9rem 1.5rem;
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:.5rem
}
.nav-brand{
  font-weight:800;font-size:1.15rem;color:#111;letter-spacing:-.01em
}
.nav-brand:hover{color:#0d6efd;text-decoration:none}
.nav-menu{list-style:none;display:flex;gap:1.8rem;padding:0;margin:0}
.nav-menu li{margin:0}
.nav-menu a{font-size:.88rem;color:#555;font-weight:500}
.nav-menu a:hover{color:#0d6efd;text-decoration:none}
.nav-menu .current-menu-item a{color:#0d6efd;font-weight:700}
.nav-menu .sub-menu{display:none}

/* ============================================
   4. MAIN CONTENT AREA
   ============================================ */
.site-main{max-width:780px;margin:0 auto;padding:2rem 1.5rem 3rem}

/* ============================================
   5. BREADCRUMB
   ============================================ */
.breadcrumb{
  font-size:.78rem;color:#aaa;margin-bottom:1.2rem;
  display:flex;align-items:center;flex-wrap:wrap;gap:.3rem
}
.breadcrumb a{color:#888}
.breadcrumb a:hover{color:#0d6efd;text-decoration:none}
.bc-sep{color:#d0d0d0;font-size:.7rem}
.bc-current{color:#555;font-weight:500}

/* ============================================
   6. SINGLE ARTICLE CARD
   ============================================ */
.single article,.page article{
  background:#fff;border-radius:10px;
  padding:2.5rem 2rem;margin-bottom:2rem;
  box-shadow:0 1px 4px rgba(0,0,0,.05);
  border:1px solid #eee;
  overflow:hidden
}
.single article .article-cover{overflow:hidden}
.single article .article-cover img{width:100%}

/* Article meta */
.post-meta{
  color:#999;font-size:.82rem;margin-bottom:1.8rem;
  padding-bottom:1rem;border-bottom:1px solid #f0f0f0
}

/* Content typography */
.single article h2{
  font-size:1.45rem;margin-top:2.5rem;padding-top:1.5rem;
  border-top:2px solid #f0f0f0
}
.single article h3{font-size:1.15rem;margin-top:2rem}
.single article p{margin-bottom:1.2rem}
.single article blockquote{
  margin:1.5rem 0;padding:1.2rem 1.5rem;
  background:#f8f9fb;border-left:4px solid #0d6efd;
  border-radius:0 8px 8px 0;color:#444;font-size:.95rem
}
.single article blockquote p{margin-bottom:0}
.single article ul,.single article ol{margin-bottom:1.2rem}
.single article strong{color:#111;font-weight:700}
.single article em{color:#666}

/* Inline code */
code{
  font-family:"SF Mono",Monaco,Menlo,Consolas,monospace;
  font-size:.85em;background:#f1f3f5;color:#d63384;
  padding:.15em .4em;border-radius:3px;
  word-break:break-all
}
pre{
  background:#1e1e2e;color:#cdd6f4;padding:1.2rem 1.5rem;
  border-radius:8px;overflow-x:auto;margin:1.5rem 0;
  font-size:.85rem;line-height:1.6;
  -webkit-overflow-scrolling:touch
}
pre code{background:none;color:inherit;padding:0;font-size:inherit;word-break:normal}

/* ============================================
   7. TAGS
   ============================================ */
.post-tags{
  margin-top:2.5rem;padding-top:1.5rem;
  border-top:2px solid #f0f0f0
}
.post-tags::before{
  content:"文章标签";display:block;
  font-size:.78rem;color:#aaa;font-weight:600;
  text-transform:uppercase;letter-spacing:.05em;margin-bottom:.8rem
}
.tag-link{
  display:inline-block;font-size:.8rem;color:#555;
  background:#f0f3f7;padding:.25rem .75rem;border-radius:20px;
  margin:0 .4rem .4rem 0;font-weight:500;
  transition:all .15s
}
.tag-link:hover{
  background:#0d6efd;color:#fff;text-decoration:none
}

/* ============================================
   8. PREV / NEXT POST NAV
   ============================================ */
.post-nav{
  display:flex;justify-content:space-between;gap:1rem;
  margin-top:2.5rem;padding-top:1.5rem;
  border-top:2px solid #f0f0f0;font-size:.9rem
}
.post-nav a{
  color:#555;max-width:48%;overflow:hidden;
  white-space:nowrap;text-overflow:ellipsis
}
.post-nav a:hover{color:#0d6efd}
.prev-post::before{content:"上一篇";display:block;font-size:.72rem;color:#bbb;margin-bottom:.2rem}
.next-post::before{content:"下一篇";display:block;font-size:.72rem;color:#bbb;margin-bottom:.2rem;text-align:right}

/* ============================================
   9. HOME / ARCHIVE LIST
   ============================================ */
.home article,.archive article,.blog article{
  background:#fff;border-radius:10px;
  padding:1.8rem 2rem;margin-bottom:1.5rem;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
  border:1px solid #eee;
  transition:box-shadow .15s;
  overflow:hidden
}
.home article:hover,.archive article:hover,.blog article:hover{
  box-shadow:0 2px 8px rgba(0,0,0,.08)
}
.home article h2,.archive article h2,.blog article h2{
  font-size:1.35rem;margin:0 0 .3rem;border:none;padding:0
}
.home article .post-meta,.archive article .post-meta,.blog article .post-meta{
  margin-bottom:.8rem;padding-bottom:0;border:none
}
.home article p,.archive article p,.blog article p{
  color:#555;font-size:.95rem;line-height:1.65
}

/* ============================================
   10. PAGINATION
   ============================================ */
.nav-links{
  display:flex;justify-content:center;flex-wrap:wrap;gap:.6rem;
  margin-top:2rem;padding:1.5rem 0
}
.nav-links a,.nav-links span{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:2.4rem;height:2.4rem;padding:0 .7rem;
  border:1px solid #e0e0e0;border-radius:8px;
  font-size:.85rem;color:#555;font-weight:500
}
.nav-links a:hover{background:#0d6efd;color:#fff;border-color:#0d6efd;text-decoration:none}
.nav-links .current{background:#0d6efd;color:#fff;border-color:#0d6efd;font-weight:700}
.nav-links .dots{border:none;color:#bbb}

/* ============================================
   11. FOOTER
   ============================================ */
.site-footer{
  max-width:780px;margin:0 auto;padding:1.8rem 1.5rem;
  border-top:1px solid #e5e5e5;text-align:center;
  font-size:.78rem;color:#aaa
}
.site-footer p{margin:0}

/* ============================================
   12. RESPONSIVE — Tablet (≤768px)
   ============================================ */
@media (max-width:768px){
  html{font-size:17px}
  .nav-inner{flex-direction:column;align-items:flex-start;padding:.7rem 1.2rem}
  .nav-menu{flex-wrap:wrap;gap:.8rem 1.2rem}
  .single article,.page article{padding:1.8rem 1.4rem}
  .single article .article-cover{margin:-1.8rem -1.4rem 1.5rem}
  .home article,.archive article,.blog article{padding:1.4rem 1.2rem}
  .site-main{padding:1.5rem 1rem 2rem}
  .site-footer{padding:1.5rem 1rem}
}

/* ============================================
   13. RESPONSIVE — Mobile (≤480px)
   ============================================ */
@media (max-width:480px){
  html{font-size:16px}
  h1{font-size:1.6rem}
  h2{font-size:1.25rem}
  h3{font-size:1.1rem}
  .single article h2{font-size:1.2rem;margin-top:2rem;padding-top:1.2rem}
  .single article,.page article{
    padding:1.2rem 1rem;border-radius:0;border-left:none;border-right:none
  }
  .single article .article-cover{
    margin:-1.2rem -1rem 1.2rem;border-radius:0
  }
  .single article .article-cover img{border-radius:0}
  .home article,.archive article,.blog article{
    padding:1.2rem 1rem;border-radius:0;border-left:none;border-right:none;margin-bottom:.8rem
  }
  .site-main{padding:1rem .8rem 2rem}
  .site-footer{padding:1.2rem 1rem}
  .breadcrumb{font-size:.72rem}
  .post-meta{font-size:.76rem}
  .post-nav{flex-direction:column;gap:.8rem}
  .post-nav a{max-width:100%}
  .post-nav .prev-post::before{text-align:left}
  .post-nav .next-post::before{text-align:left}
  .tag-link{font-size:.75rem;padding:.2rem .6rem}
  .nav-links a,.nav-links span{min-width:2rem;height:2rem;font-size:.78rem;padding:0 .5rem}
}
