/*
Theme Name: 节点360博客
Theme URI: https://example.com/jiedian360
Author: 节点360
Author URI: https://example.com
Description: 面向节点推荐、科学上网教程与软件下载内容的现代 WordPress 博客主题。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jd360
Tags: blog, news, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #152033;
  --muted: #667085;
  --line: #e4e9f0;
  --brand: #0e7490;
  --brand-2: #0891b2;
  --brand-soft: #e6f7fa;
  --navy: #0b1829;
  --success: #159a6b;
  --warning: #e69018;
  --danger: #d54b4b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 35px rgba(20, 39, 68, .08);
  --container: 1180px;
  --font: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg: #09111d;
  --surface: #101c2b;
  --surface-2: #172536;
  --text: #ecf3fa;
  --muted: #98a9bb;
  --line: #243449;
  --brand: #22b8cf;
  --brand-2: #67d7e7;
  --brand-soft: #113541;
  --navy: #07101b;
  --shadow: 0 15px 40px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s, color .2s;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.container { width: min(calc(100% - 36px), var(--container)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { width: auto; height: auto; clip: auto; padding: 10px 14px; margin: 8px; background: var(--surface); z-index: 9999; }

.site-topbar { background: var(--navy); color: #c7d4e2; font-size: 13px; }
.topbar-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar-note { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar-note strong { color: #50d2df; margin-right: 8px; }
.topbar-links { display: flex; gap: 18px; white-space: nowrap; }
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 30px; }
.site-brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.custom-logo { max-height: 42px; width: auto; }
.custom-logo-link { display: block; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: #fff; font-size: 18px; font-weight: 900; background: linear-gradient(145deg, var(--brand-2), #155e75); box-shadow: 0 7px 20px rgba(8,145,178,.24); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 20px; font-weight: 900; letter-spacing: -.5px; }
.brand-tagline { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.main-nav a { display: block; padding: 10px 13px; border-radius: 9px; font-size: 15px; font-weight: 650; }
.main-nav .current-menu-item > a, .main-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.icon-button:hover { color: var(--brand); border-color: var(--brand); }
.menu-toggle { display: none; }
.search-panel { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(4,12,22,.72); backdrop-filter: blur(8px); padding: 12vh 18px; }
.search-panel.is-open { display: block; }
.search-modal { max-width: 720px; margin: auto; padding: 28px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.search-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search-modal h2 { margin: 0; font-size: 22px; }
.search-form { display: flex; gap: 10px; }
.search-field { width: 100%; min-height: 48px; padding: 0 15px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: var(--bg); outline: none; }
.search-field:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.button, .search-submit, input[type="submit"] { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 0; border-radius: 10px; color: #fff; background: var(--brand); font-weight: 750; cursor: pointer; }
.button:hover, .search-submit:hover { color: #fff; background: var(--brand-2); transform: translateY(-1px); }
.button-ghost { color: var(--text); border: 1px solid var(--line); background: var(--surface); }
.button-ghost:hover { color: var(--brand); border-color: var(--brand); background: var(--surface); }

.hero { padding: 54px 0 32px; background: linear-gradient(180deg, var(--brand-soft), transparent); }
.hero-grid { display: grid; grid-template-columns: 1.36fr .64fr; gap: 24px; }
.hero-main { position: relative; min-height: 388px; display: flex; align-items: flex-end; overflow: hidden; border-radius: 24px; background: var(--navy); box-shadow: var(--shadow); }
.hero-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; transition: transform .5s; }
.hero-main:hover img { transform: scale(1.035); }
.hero-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 10%, rgba(5,14,25,.92) 92%); }
.hero-content { position: relative; z-index: 2; padding: 38px; color: #fff; }
.eyebrow, .post-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px; color: #d9fbff; background: rgba(8,145,178,.78); font-size: 12px; font-weight: 800; letter-spacing: .4px; }
.hero-title { max-width: 720px; margin: 14px 0 10px; font-size: clamp(29px, 4vw, 46px); line-height: 1.2; letter-spacing: -1.2px; }
.hero-excerpt { max-width: 650px; margin: 0; color: #c7d4df; }
.post-meta { display: flex; flex-wrap: wrap; gap: 7px 17px; color: var(--muted); font-size: 13px; }
.hero-main .post-meta { margin-top: 18px; color: #b9c8d6; }
.hero-side { display: grid; gap: 18px; }
.quick-card { position: relative; min-height: 185px; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.quick-card::after { content: ""; position: absolute; width: 120px; height: 120px; right: -32px; bottom: -38px; border-radius: 50%; background: var(--brand-soft); }
.quick-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--brand); background: var(--brand-soft); font-size: 22px; }
.quick-card h2 { margin: 15px 0 7px; font-size: 20px; line-height: 1.35; }
.quick-card p { margin: 0; color: var(--muted); font-size: 14px; }
.quick-link { position: relative; z-index: 2; display: inline-block; margin-top: 12px; color: var(--brand); font-size: 14px; font-weight: 800; }

.topic-strip { padding: 14px 0 34px; }
.topic-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.topic-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.topic-item:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.topic-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.topic-item strong { display: block; font-size: 14px; }
.topic-item span { display: block; color: var(--muted); font-size: 11px; }

.content-section { padding: 30px 0 60px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; align-items: start; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-kicker { color: var(--brand); font-size: 12px; font-weight: 850; letter-spacing: 1.5px; text-transform: uppercase; }
.section-title { margin: 2px 0 0; font-size: 27px; line-height: 1.3; letter-spacing: -.5px; }
.section-link { color: var(--muted); font-size: 14px; font-weight: 650; }
.section-link:hover { color: var(--brand); }
.post-list { display: grid; gap: 18px; }
.post-card { display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 22px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .2s; }
.post-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); box-shadow: var(--shadow); }
.post-thumb { position: relative; min-height: 164px; overflow: hidden; border-radius: 12px; background: var(--surface-2); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.thumb-placeholder { width: 100%; height: 100%; min-height: 164px; display: grid; place-items: center; color: var(--brand); background: linear-gradient(145deg, var(--brand-soft), var(--surface-2)); font-size: 32px; font-weight: 900; }
.post-card-content { min-width: 0; padding: 3px 5px 3px 0; }
.post-card-title { margin: 9px 0 8px; font-size: 21px; line-height: 1.45; }
.post-card-title a:hover { color: var(--brand); }
.post-excerpt { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.read-more { color: var(--brand); font-size: 13px; font-weight: 800; }
.sticky .post-card { border-color: var(--brand); }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.page-numbers { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 14px; }
.page-numbers.current, .page-numbers:hover { color: #fff; border-color: var(--brand); background: var(--brand); }

.sidebar { position: sticky; top: 96px; display: grid; gap: 20px; }
.widget { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.widget-title { position: relative; margin: 0 0 17px; padding-left: 13px; font-size: 17px; }
.widget-title::before { content: ""; position: absolute; left: 0; top: .35em; width: 4px; height: 1.1em; border-radius: 4px; background: var(--brand); }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.widget li:last-child { border: 0; }
.widget select { width: 100%; padding: 10px; color: var(--text); border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.about-widget { color: #d7e3ed; border: 0; background: linear-gradient(150deg, #0e2639, #0b1829); }
.about-widget .widget-title { color: #fff; }
.about-widget p { margin: 0; color: #aebdca; font-size: 14px; }
.trust-list { display: grid; gap: 10px; margin-top: 18px; }
.trust-item { display: flex; gap: 10px; font-size: 13px; }
.trust-check { color: #57d3b0; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tagcloud a { padding: 5px 10px; border-radius: 7px; background: var(--surface-2); font-size: 12px !important; }

.archive-header { padding: 46px 0 28px; background: linear-gradient(180deg, var(--brand-soft), transparent); }
.breadcrumb { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.breadcrumb a { color: var(--brand); }
.archive-title { margin: 0; font-size: clamp(30px, 5vw, 45px); line-height: 1.25; }
.archive-description { max-width: 720px; margin: 10px 0 0; color: var(--muted); }

.article-layout { display: grid; grid-template-columns: minmax(0, 790px) 310px; justify-content: space-between; gap: 42px; padding: 44px 0 70px; }
.article { min-width: 0; }
.article-header { margin-bottom: 28px; }
.article-title { margin: 12px 0 14px; font-size: clamp(32px, 5vw, 48px); line-height: 1.24; letter-spacing: -1px; }
.article-cover { margin: 25px 0 30px; overflow: hidden; border-radius: 20px; background: var(--surface-2); }
.article-cover img { width: 100%; max-height: 500px; object-fit: cover; }
.article-content { font-size: 17px; }
.article-content > * { max-width: 100%; }
.article-content h2, .article-content h3, .article-content h4 { scroll-margin-top: 100px; margin: 2em 0 .7em; line-height: 1.35; }
.article-content h2 { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 27px; }
.article-content h3 { font-size: 22px; }
.article-content p { margin: 0 0 1.35em; }
.article-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.article-content blockquote { margin: 1.7em 0; padding: 18px 22px; border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; color: var(--muted); background: var(--brand-soft); }
.article-content pre { overflow-x: auto; padding: 20px; border-radius: 12px; color: #dce9f5; background: #0b1829; font-size: 14px; }
.article-content code { padding: 2px 6px; border-radius: 5px; background: var(--surface-2); font-size: .9em; }
.article-content pre code { padding: 0; background: none; }
.article-content table { width: 100%; margin: 22px 0; border-collapse: collapse; font-size: 14px; }
.article-content th, .article-content td { padding: 11px 13px; border: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--surface-2); }
.article-content img { border-radius: 12px; }
.article-content .wp-block-button__link { color: #fff; text-decoration: none; background: var(--brand); }
.article-content .alignwide { width: min(100vw - 36px, 1020px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.reading-progress { position: fixed; top: 0; left: 0; z-index: 500; width: 0; height: 3px; background: linear-gradient(90deg, var(--brand), #47d7c3); }
.article-note { display: flex; gap: 12px; margin: 24px 0; padding: 16px 18px; border: 1px solid #ecd7a8; border-radius: 11px; color: #765419; background: #fff8e8; font-size: 14px; }
[data-theme="dark"] .article-note { border-color: #584620; color: #e7c67d; background: #2d2719; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.article-tags a { padding: 5px 11px; border-radius: 7px; background: var(--surface-2); font-size: 13px; }
.author-box { display: flex; gap: 18px; margin-top: 30px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.author-box img { width: 64px; height: 64px; border-radius: 50%; }
.author-box h3 { margin: 0 0 4px; font-size: 17px; }
.author-box p { margin: 0; color: var(--muted); font-size: 14px; }
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.post-navigation a { display: block; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; }
.post-navigation .nav-next { text-align: right; }
.nav-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.toc { padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.toc-title { margin: 0 0 10px; font-size: 15px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 7px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.toc a.is-active { color: var(--brand); font-weight: 750; }

.software-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.software-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.software-head { display: flex; align-items: center; gap: 14px; }
.software-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg, var(--brand-2), #155e75); font-size: 23px; font-weight: 900; }
.software-card h2 { margin: 0; font-size: 19px; }
.software-platform { color: var(--muted); font-size: 12px; }
.software-card p { color: var(--muted); font-size: 14px; }
.software-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0; }
.software-meta span { padding: 3px 8px; border-radius: 6px; background: var(--surface-2); font-size: 11px; }

.comments-area { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.comments-title { font-size: 22px; }
.comment-list { padding: 0; list-style: none; }
.comment-list .children { list-style: none; }
.comment-body { margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.comment-author { display: flex; align-items: center; gap: 9px; }
.comment-author img { border-radius: 50%; }
.comment-metadata { margin: 4px 0 10px; color: var(--muted); font-size: 12px; }
.comment-form label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; padding: 11px 13px; color: var(--text); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }

.empty-state { padding: 58px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.empty-state-icon { color: var(--brand); font-size: 48px; }
.empty-state h2 { margin: 8px 0; }
.error-page { padding: 100px 0; text-align: center; }
.error-code { color: var(--brand); font-size: clamp(90px, 18vw, 180px); font-weight: 950; line-height: 1; opacity: .17; }
.error-page h1 { margin: -50px 0 8px; font-size: 34px; }

.site-footer { color: #acbbc9; background: var(--navy); }
.footer-main { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; padding: 55px 0 44px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { max-width: 340px; color: #8295a8; font-size: 14px; }
.footer-title { margin: 0 0 14px; color: #fff; font-size: 15px; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 7px 0; font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.08); color: #708397; font-size: 12px; }
.back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 80; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 11px; color: #fff; background: var(--brand); box-shadow: var(--shadow); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

@media (max-width: 1024px) {
  .main-nav { position: fixed; left: 18px; right: 18px; top: 82px; display: none; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
  .main-nav.is-open { display: block; }
  .main-nav ul { align-items: stretch; flex-direction: column; }
  .menu-toggle { display: grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; }
  .content-layout, .article-layout { grid-template-columns: minmax(0,1fr) 280px; gap: 24px; }
  .footer-main { grid-template-columns: 1.3fr repeat(2,1fr); }
  .footer-column:last-child { display: none; }
}

@media (max-width: 780px) {
  .topbar-links, .brand-tagline { display: none; }
  .header-inner { min-height: 66px; gap: 10px; }
  .header-actions { margin-left: auto; }
  .hero { padding-top: 30px; }
  .hero-main { min-height: 430px; }
  .hero-content { padding: 25px; }
  .hero-side, .topic-list, .software-grid { grid-template-columns: 1fr 1fr; }
  .content-layout, .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .post-card { grid-template-columns: 190px minmax(0, 1fr); }
  .article-layout { padding-top: 30px; }
  .article-title { font-size: 34px; }
  .article-sidebar { order: 2; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .site-topbar { display: none; }
  .main-nav { top: 73px; left: 12px; right: 12px; }
  .brand-name { font-size: 17px; }
  .hero-main { min-height: 405px; border-radius: 18px; }
  .hero-title { font-size: 29px; }
  .hero-excerpt { font-size: 14px; }
  .hero-side, .topic-list, .software-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 155px; }
  .post-card { grid-template-columns: 1fr; padding: 12px; }
  .post-thumb { min-height: 190px; }
  .post-card-content { padding: 3px; }
  .post-card-title { font-size: 19px; }
  .section-title { font-size: 23px; }
  .section-link { display: none; }
  .article-content { font-size: 16px; }
  .article-title { font-size: 30px; }
  .post-navigation { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
  .author-box { align-items: flex-start; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .search-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
