/*
Theme Name: Breeze
Theme URI: https://naslog.com
Author: naslog
Description: 全屏横幅、浮动卡片、深浅色切换与文章目录的博客主题，视觉语言参考 Fluid。
Version: 1.0.2
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: breeze
Tags: blog, one-column, custom-menu, custom-header, featured-images, threaded-comments, translation-ready
*/

/* ---------- tokens ---------- */
:root {
  --bg: #eeeeee;
  --board: #ffffff;
  --text: #3c4858;
  --sec: #718096;
  --heading: #1a202c;
  --link: #0366d6;
  --hover: #30a9de;
  --line: #eaecef;
  --nav: #2f4154;
  --nav-text: #ffffff;
  --code-bg: #f6f8fa;
  --inline-bg: rgba(175,184,193,.2);
  --shadow: 0 12px 15px 0 rgba(0,0,0,.24), 0 17px 50px 0 rgba(0,0,0,.19);
  --nav-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12);
  --radius: .5rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --wrap: 1140px;
  --measure: 920px;
}

[data-theme="dark"] {
  --bg: #181c27;
  --board: #252d38;
  --text: #c4c6c9;
  --sec: #a7a9ad;
  --heading: #d7dbe0;
  --link: #1589e9;
  --hover: #30a9de;
  --line: #435266;
  --nav: #1f3144;
  --nav-text: #d0d0d0;
  --code-bg: #1e2530;
  --inline-bg: rgba(110,118,129,.4);
  --shadow: 0 12px 15px 0 rgba(0,0,0,.4), 0 17px 50px 0 rgba(0,0,0,.35);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-size: clamp(16px, calc(0.16vw + 13px), 18px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.8;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
  padding-top: 0;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--hover); }

img { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--hover); outline-offset: 3px; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; color: #000; padding: .5rem 1rem; z-index: 200; }

/* ---------- navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: .9rem 0;
  background: transparent;
  transition: background-color .35s ease, box-shadow .35s ease, padding .3s ease;
}
.navbar.solid,
body:not(.has-banner) .navbar {
  background: var(--nav);
  box-shadow: var(--nav-shadow);
  padding: .55rem 0;
}

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--nav-text);
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand:hover { color: var(--nav-text); opacity: .85; }

.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links ul { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--nav-text);
  font-size: .875rem;
  text-decoration: none;
  opacity: .88;
  transition: opacity .2s ease, color .2s ease;
}
.nav-links a:hover { opacity: 1; color: var(--hover); }
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a { opacity: 1; }

.nav-actions { display: flex; align-items: center; gap: .35rem; }

.icon-btn {
  display: grid; place-items: center;
  width: 2.2rem; height: 2.2rem;
  border: 0; border-radius: .3rem;
  background: transparent; color: var(--nav-text);
  cursor: pointer; opacity: .85;
  transition: background-color .2s ease, opacity .2s ease;
}
.icon-btn:hover { opacity: 1; background: rgba(255,255,255,.12); }
.icon-btn svg { width: 1.1rem; height: 1.1rem; }
.icon-btn .icon-moon { display: none; }
[data-theme="dark"] .icon-btn .icon-sun { display: none; }
[data-theme="dark"] .icon-btn .icon-moon { display: block; }

.nav-toggle { display: none; }

/* ---------- banner ---------- */
.banner {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2f4154;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.banner.short { min-height: 62vh; }

.banner.no-image {
  background-image:
    radial-gradient(60% 50% at 50% 0%, rgba(48,169,222,.22), transparent 70%),
    radial-gradient(50% 40% at 85% 90%, rgba(47,65,84,.9), transparent 70%),
    linear-gradient(160deg, #35495e 0%, #2f4154 45%, #24313f 100%);
}
.banner-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,.22) 45%, rgba(0,0,0,.42) 100%);
  pointer-events: none;
}
.banner.no-image .banner-mask { background: rgba(0,0,0,.08); }

.banner-text {
  position: relative;
  z-index: 2;
  width: 80%;
  max-width: 960px;
  color: #fff;
  text-align: center;
}
.banner-title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.5;
  font-weight: 700;
  margin: 0 0 .6rem;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
  text-wrap: balance;
}
.banner-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  line-height: 1.7;
  margin: 0;
  opacity: .98;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.banner-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem 1rem;
  margin-top: .9rem;
  font-size: .9rem;
  opacity: .88;
}
.banner-meta a { color: #fff; text-decoration: none; }
.banner-meta a:hover { text-decoration: underline; }
.banner-meta svg { width: 1rem; height: 1rem; flex: none; }
.banner-meta .item { display: inline-flex; align-items: center; gap: .3rem; }

.typed-cursor { display: inline-block; width: 1px; height: 1em; background: currentColor; margin-left: 2px; vertical-align: -.12em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.scroll-down {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #fff;
  opacity: .8;
  animation: bounce 1.8s infinite;
}
.scroll-down svg { width: 1.5rem; height: 1.5rem; }
@keyframes bounce { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- board ---------- */
.board-wrap {
  position: relative;
  z-index: 3;
  margin-top: -3rem;
  padding-bottom: 3rem;
}
.board {
  max-width: var(--wrap);
  margin: 0 auto;
  background: var(--board);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 3rem 0 2rem;
  transition: background-color .2s ease;
}
.board-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- index list ---------- */
.index-item { margin-bottom: 2.6rem; }
.index-item:last-of-type { margin-bottom: 1.5rem; }

.index-title {
  font-size: 1.5rem;
  line-height: 1.45;
  font-weight: 700;
  margin: 0 0 .3rem;
  color: var(--heading);
  text-wrap: balance;
}
.index-title a { color: inherit; text-decoration: none; }
.index-title a:hover { color: var(--hover); }

.index-excerpt {
  display: block;
  color: var(--sec);
  font-size: .96rem;
  line-height: 1.6;
  margin: .5rem 0;
  text-decoration: none;
}
.index-excerpt .clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.index-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  font-size: .875rem;
  color: var(--sec);
}
.index-meta a { color: var(--sec); }
.index-meta a:hover { color: var(--hover); }
.index-meta .item { display: inline-flex; align-items: center; gap: .35rem; }
.index-meta svg { width: .95rem; height: .95rem; opacity: .85; }

.page-head { margin-bottom: 2.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 1.4rem; margin: 0; color: var(--heading); }

/* ---------- article ---------- */
.entry-header { margin-bottom: 2rem; }
.entry-header .entry-title { display: none; }

.entry-content { font-size: 1rem; line-height: 1.85; color: var(--text); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.1rem; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
  color: var(--heading);
  line-height: 1.5;
  font-weight: 700;
  margin: 2.2rem 0 .9rem;
  scroll-margin-top: 5rem;
}
.entry-content h1 { font-size: 1.7rem; }
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content h4 { font-size: 1.08rem; }

.entry-content a { color: var(--link); text-decoration: underline; text-underline-offset: .15em; }
.entry-content a:hover { color: var(--hover); }

.entry-content img { border-radius: .25rem; }
.entry-content figure { margin: 1.6rem 0; }
.entry-content figcaption { font-size: .85rem; color: var(--sec); text-align: center; margin-top: .5rem; }

.entry-content blockquote {
  margin: 1.6rem 0;
  padding: .2rem 0 .2rem 1rem;
  border-left: .25rem solid var(--line);
  color: var(--sec);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--inline-bg);
  border-radius: .25rem;
  padding: .15em .35em;
}
.entry-content pre {
  background: var(--code-bg);
  border-radius: .35rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: .875rem;
  line-height: 1.7;
  margin: 1.5rem 0;
}
.entry-content pre code { background: none; padding: 0; font-size: 1em; }

.entry-content ul, .entry-content ol { margin: 0 0 1.1rem; padding-left: 1.5rem; }
.entry-content li { margin-bottom: .35rem; }

.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .92rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: .5rem .75rem; border: 1px solid var(--line); }
.entry-content th { background: var(--code-bg); font-weight: 600; }

.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.entry-content .wp-block-button__link {
  background: var(--link); color: #fff; border-radius: .3rem;
  padding: .55rem 1rem; text-decoration: none;
}
.entry-content .alignleft { float: left; margin: .3rem 1.2rem .8rem 0; }
.entry-content .alignright { float: right; margin: .3rem 0 .8rem 1.2rem; }
.entry-content .aligncenter { display: block; margin: 1.4rem auto; }
.entry-content .wp-caption-text { font-size: .85rem; color: var(--sec); text-align: center; }

/* ---------- toc ---------- */
.toc {
  border: 1px solid var(--line);
  background: var(--code-bg);
  border-radius: .35rem;
  padding: .7rem 1rem;
  margin: 0 0 1.8rem;
  font-size: .9rem;
}
.toc summary { cursor: pointer; font-weight: 600; color: var(--heading); }
.toc ol { margin: .6rem 0 .2rem 1.1rem; padding: 0; }
.toc li { margin: .25rem 0; line-height: 1.6; }
.toc a { color: var(--sec); }
.toc a:hover { color: var(--hover); }

/* ---------- pager ---------- */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.pager a {
  font-size: .875rem;
  color: var(--sec);
  border: 1px solid var(--line);
  border-radius: .3rem;
  padding: .45rem .9rem;
  text-decoration: none;
}
.pager a:hover { color: var(--hover); border-color: var(--hover); }
.pager .next { margin-left: auto; }

.pagination { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.pagination .page-numbers {
  display: inline-block; padding: .35rem .7rem; border: 1px solid var(--line);
  border-radius: .3rem; font-size: .85rem; color: var(--sec); text-decoration: none;
}
.pagination .page-numbers.current { background: var(--nav); border-color: var(--nav); color: #fff; }
.pagination .page-numbers:hover { color: var(--hover); border-color: var(--hover); }

/* ---------- comments ---------- */
.comments-area { margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.comments-title, .comment-reply-title { font-size: 1.15rem; color: var(--heading); margin: 0 0 1.2rem; }
.comments-title span { color: var(--sec); font-size: .85rem; font-weight: 400; margin-left: .4rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 1.2rem; padding: 0; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .7rem; margin-bottom: .35rem; font-size: .875rem; }
.comment-author { display: flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--heading); }
.comment-author .avatar { width: 1.5rem; height: 1.5rem; border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .8rem; color: var(--sec); }
.comment-metadata a { color: var(--sec); }
.comment-content { font-size: .95rem; line-height: 1.8; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: .2rem; font-size: .82rem; }
.comment-respond { margin-top: 2rem; }
.comment-notes, .logged-in-as { font-size: .85rem; color: var(--sec); }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; font-size: .85rem; color: var(--sec); margin-bottom: .35rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: .3rem;
  background: var(--bg); color: var(--text); font: inherit; font-size: .92rem;
}
.comment-form .submit {
  background: var(--nav); color: #fff; border: 0; border-radius: .3rem;
  padding: .55rem 1.1rem; font: inherit; font-size: .9rem; cursor: pointer;
}
.comment-form .submit:hover { background: var(--link); }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; color: var(--sec); }
.comment-form-cookies-consent input { margin-top: .4rem; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: .85rem;
  color: var(--sec);
}
.site-footer a { color: var(--sec); }
.site-footer a:hover { color: var(--hover); }
.footer-links { display: flex; justify-content: center; gap: 1.2rem; margin-top: .4rem; }
.footer-links ul { display: flex; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }

/* ---------- search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24,28,39,.94);
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 18vh 1.5rem 0;
}
.search-overlay.open { display: flex; }
.search-box { width: 100%; max-width: 640px; }
.search-box .search-form { display: flex; gap: .5rem; }
.search-box input[type="search"] {
  flex: 1; background: transparent; border: 0; border-bottom: 2px solid rgba(255,255,255,.35);
  color: #fff; font-size: 1.4rem; padding: .7rem .2rem; font-family: inherit;
}
.search-box input[type="search"]::placeholder { color: rgba(255,255,255,.45); }
.search-box input[type="search"]:focus { outline: none; border-bottom-color: var(--hover); }
.search-box button[type="submit"] {
  background: transparent; border: 0; color: #fff; cursor: pointer; padding: 0 .4rem;
}
.search-box button svg { width: 1.3rem; height: 1.3rem; }
.search-hint { color: rgba(255,255,255,.45); font-size: .82rem; margin-top: .9rem; }

/* ---------- responsive ---------- */
@media (max-width: 62rem) {
  .nav-links { gap: 1rem; }
  .nav-links ul { gap: 1rem; }
}

@media (max-width: 48rem) {
  .nav-toggle { display: grid; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--nav);
    box-shadow: var(--nav-shadow);
    padding: .8rem 1.5rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
  }
  .nav-links.open { display: flex; }
  .nav-links ul { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .55rem 0; font-size: .95rem; }
  .banner { min-height: 86vh; }
  .banner.short { min-height: 55vh; }
  .board-wrap { margin-top: -2rem; }
  .board { border-radius: .4rem; padding: 2rem 0 1.5rem; }
  .board-inner { padding: 0 1.25rem; }
  .index-title { font-size: 1.22rem; }
  .entry-content { font-size: .98rem; }
}

@media (min-width: 120rem) {
  :root { --wrap: 1240px; --measure: 980px; }
  .index-title { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
