/*
Theme Name: Nexus Tech
Theme URI: https://example.com/nexus-tech
Author: Codex
Author URI: https://openai.com/
Description: 深色科技风中文资讯 WordPress 主题，支持特色图、栏目、作者、分页、上下文导航与同栏目推荐。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: nexus-tech
*/

:root {
  --bg: #050b14;
  --bg-soft: #08111f;
  --panel: rgba(12, 25, 43, .82);
  --panel-solid: #0c192b;
  --line: rgba(123, 216, 255, .14);
  --line-strong: rgba(0, 229, 255, .38);
  --text: #eef9ff;
  --muted: #8ea9ba;
  --cyan: #00e5ff;
  --violet: #8a6cff;
  --shadow: 0 22px 70px rgba(0, 0, 0, .3);
  --radius: 18px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 6%, rgba(0, 229, 255, .09), transparent 26rem),
    radial-gradient(circle at 88% 16%, rgba(138, 108, 255, .09), transparent 25rem),
    var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
  z-index: -1;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.container { width: min(calc(100% - 40px), 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;
}
.skip-link:focus {
  position: fixed; left: 16px; top: 16px; width: auto; height: auto; margin: 0;
  padding: 10px 16px; clip: auto; background: var(--cyan); color: #031018; z-index: 9999;
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 11, 20, .86);
  backdrop-filter: blur(18px);
}
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
  width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: linear-gradient(135deg, rgba(0,229,255,.25), rgba(138,108,255,.2));
  box-shadow: inset 0 0 14px rgba(0,229,255,.18), 0 0 22px rgba(0,229,255,.12);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 8px; border: 2px solid var(--cyan);
  transform: rotate(45deg); border-radius: 2px;
}
.brand-name { font-size: 19px; }
.brand-name span { color: var(--cyan); }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.primary-nav a { color: #b6cbd8; font-size: 14px; font-weight: 600; transition: color .2s; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--cyan); }
.menu-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); background: var(--panel); cursor: pointer;
}

.site-main { min-height: 70vh; }
.hero { padding: 68px 0 38px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px;
  color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 22px; }
.hero-lead, .hero-side-card, .post-card, .section-panel, .article-shell {
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow);
}
.hero-lead { position: relative; min-height: 500px; border-radius: 26px; overflow: hidden; }
.hero-lead::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3,8,16,.05) 22%, rgba(3,8,16,.92) 92%);
}
.hero-lead img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 38px; }
.post-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.category-pill {
  display: inline-flex; align-items: center; min-height: 25px; padding: 3px 10px; border: 1px solid rgba(0,229,255,.3);
  border-radius: 999px; color: var(--cyan); background: rgba(0,229,255,.08); font-weight: 700;
}
.hero-title { max-width: 760px; margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.15; letter-spacing: -.045em; }
.hero-side { display: grid; gap: 18px; }
.hero-side-card { display: grid; grid-template-columns: 126px 1fr; gap: 18px; align-items: center; border-radius: var(--radius); padding: 14px; }
.hero-side-card .thumb { aspect-ratio: 1.05; border-radius: 12px; overflow: hidden; }
.hero-side-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-side-card h3 { margin: 5px 0 0; font-size: 17px; line-height: 1.4; }

.content-section { padding: 44px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.035em; }
.section-heading p { margin: 7px 0 0; color: var(--muted); }
.section-more { color: var(--cyan); font-size: 13px; font-weight: 700; white-space: nowrap; }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card { border-radius: var(--radius); overflow: hidden; transition: transform .22s, border-color .22s; }
.post-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.post-card-thumb { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-soft); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-thumb img { transform: scale(1.035); }
.post-card-body { padding: 20px; }
.post-card h3 { margin: 0 0 16px; font-size: 19px; line-height: 1.45; letter-spacing: -.02em; }
.post-card h3 a:hover { color: var(--cyan); }
.post-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.author { display: inline-flex; align-items: center; gap: 7px; }
.author-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.category-block { padding-top: 20px; }
.category-block + .category-block { border-top: 1px solid var(--line); margin-top: 48px; }

.archive-header { padding: 70px 0 30px; }
.archive-header h1 { margin: 0; font-size: clamp(36px, 6vw, 64px); letter-spacing: -.055em; }
.archive-description { max-width: 680px; margin-top: 14px; color: var(--muted); }
.pagination { margin: 42px 0 14px; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.page-numbers {
  display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--panel);
}
.page-numbers.current, .page-numbers:hover { border-color: var(--cyan); color: #021117; background: var(--cyan); }
.no-results { padding: 70px 0; text-align: center; color: var(--muted); }

.single-wrap { padding: 54px 0 80px; }
.article-shell { border-radius: 26px; overflow: hidden; }
.article-hero { position: relative; min-height: 520px; display: flex; align-items: end; }
.article-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,8,16,.12), #07101d 96%); }
.article-header { position: relative; z-index: 2; width: min(880px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 52px; }
.article-header h1 { margin: 12px 0 20px; font-size: clamp(34px, 5.4vw, 66px); line-height: 1.12; letter-spacing: -.055em; }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; color: #a9bdc9; font-size: 13px; }
.article-content {
  width: min(780px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 42px;
  color: #c7d6df; font-size: 17px;
}
.article-content > *:first-child { margin-top: 0; }
.article-content h2, .article-content h3 { color: var(--text); line-height: 1.3; margin-top: 2.2em; }
.article-content a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.article-content blockquote { margin: 2em 0; padding: 20px 24px; border-left: 3px solid var(--cyan); background: rgba(0,229,255,.06); }
.article-content pre { overflow-x: auto; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #030810; }
.article-content img { border-radius: 14px; }
.post-navigation { width: min(980px, calc(100% - 48px)); margin: 10px auto 52px; border-top: 1px solid var(--line); padding-top: 28px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-navigation a { display: block; min-height: 106px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8,17,31,.7); }
.post-navigation a:hover { border-color: var(--line-strong); }
.post-navigation .nav-next { text-align: right; }
.nav-subtitle { display: block; margin-bottom: 8px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.nav-title { display: block; font-weight: 700; line-height: 1.4; }
.recommended { width: min(1080px, calc(100% - 48px)); margin: 0 auto 52px; }
.recommended .posts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.page-content { width: min(860px, 100%); margin: 60px auto; padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.page-content h1 { margin-top: 0; }

.site-footer { border-top: 1px solid var(--line); padding: 52px 0 30px; background: rgba(3,8,15,.76); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: start; }
.footer-copy { max-width: 520px; color: var(--muted); }
.footer-nav ul { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: var(--muted); font-size: 13px; }
.copyright { margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--line); color: #637b8b; font-size: 12px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recommended .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .header-inner { min-height: 66px; }
  .menu-toggle { display: grid; place-items: center; }
  .primary-nav { display: none; position: absolute; left: 14px; right: 14px; top: calc(100% + 8px); padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #081321; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; gap: 4px; }
  .primary-nav a { display: block; padding: 10px; }
  .hero { padding-top: 38px; }
  .hero-lead { min-height: 470px; }
  .hero-content { padding: 24px; }
  .hero-title { font-size: 32px; }
  .hero-side { grid-template-columns: 1fr; }
  .posts-grid, .recommended .posts-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; }
  .article-hero { min-height: 500px; }
  .article-header { width: calc(100% - 32px); padding-bottom: 34px; }
  .article-header h1 { font-size: 36px; }
  .article-content { width: calc(100% - 32px); padding-top: 38px; }
  .post-navigation { width: calc(100% - 32px); }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
  .recommended { width: calc(100% - 32px); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-nav ul { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .hero-side-card { grid-template-columns: 100px 1fr; gap: 13px; }
  .hero-side-card h3 { font-size: 15px; }
  .article-header h1 { font-size: 31px; }
}

