/* Coprexist 组织站 —— 双主题（默认跟随系统，可手动切换） */
:root {
  --bg: #08070f;
  --bg-elev: #0d0b16;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ece9f6;
  --muted: #a09ab8;
  --primary: #a78bfa;
  --accent: #f0b46a;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(8, 7, 15, 0.78);
  --ring: rgba(167, 139, 250, 0.22);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f6fb;
  --bg-elev: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1eff8;
  --border: rgba(24, 20, 38, 0.1);
  --border-strong: rgba(24, 20, 38, 0.18);
  --text: #171326;
  --muted: #5b556e;
  --primary: #6d4df6;
  --accent: #b8721a;
  --shadow: 0 18px 40px rgba(24, 20, 38, 0.1);
  --header-bg: rgba(247, 246, 251, 0.82);
  --ring: rgba(109, 77, 246, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; }

.container { width: min(1080px, 100% - 48px); margin-inline: auto; }

/* ── 顶栏 ── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: 0.01em; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 14.5px; color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--text); border: 1px solid var(--border-strong);
  padding: 6px 14px; border-radius: 999px;
}
.nav-cta:hover { border-color: var(--primary); }

.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px; margin-left: 18px;
  color: var(--muted); background: var(--panel); cursor: pointer;
  border: 1px solid var(--border); border-radius: 50%;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--primary); }
.theme-toggle .icon-light { display: none; }
[data-theme="light"] .theme-toggle .icon-light { display: block; }
[data-theme="light"] .theme-toggle .icon-dark { display: none; }

/* ── Hero ── */
.hero { padding: clamp(64px, 10vw, 118px) 0 clamp(48px, 7vw, 86px); }
.eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); border: 1px solid var(--ring); background: var(--panel);
  border-radius: 999px; padding: 4px 12px; margin-bottom: 20px;
}
.hero h1 {
  margin: 0 0 22px; font-size: clamp(2.4rem, 6.4vw, 4.3rem); line-height: 1.12; letter-spacing: -0.02em;
}
.grad {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { max-width: 640px; margin: 0 0 32px; font-size: clamp(16px, 1.6vw, 18.5px); color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 22px;
  border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--primary); }
.btn-primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(120deg, #7c5cff, #a78bfa);
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.32);
}

/* ── 区块 ── */
.section { padding: clamp(48px, 7vw, 76px) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 30px; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.25; letter-spacing: -0.01em; }

.two-col, .three-col, .projects { display: grid; gap: 20px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.projects { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px 24px 22px; box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.two-col .card:hover { border-color: var(--primary); transform: translateY(-2px); }
.card h3 { margin: 0 0 10px; font-size: 18px; }
.card p { margin: 0 0 10px; font-size: 14.8px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }

.project { display: flex; flex-direction: column; padding: 20px 22px; }
.project:hover { border-color: var(--primary); transform: translateY(-2px); }
.project .tag {
  align-self: flex-start; font-size: 11.5px; letter-spacing: 0.08em;
  color: var(--primary); border: 1px solid var(--ring); border-radius: 999px;
  padding: 2px 9px; margin-bottom: 12px;
}
.project h3 { margin: 0 0 8px; font-size: 16.5px; }
.project p { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.project .link { margin-top: auto; font-size: 12.5px; color: var(--muted); word-break: break-all; }

.point h3 { margin: 0 0 8px; font-size: 16.5px; color: var(--primary); }
.point p { margin: 0; font-size: 14.5px; color: var(--muted); }

.muted { color: var(--muted); }

/* ── 联系 ── */
.contact {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, var(--panel));
}
.contact-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(34px, 5vw, 54px) 0;
}
.contact h2 { margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2rem); }
.contact p { margin: 0; }

.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0; font-size: 13.5px; color: var(--muted);
}
.footer-inner a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

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

@media (max-width: 820px) {
  .nav { gap: 16px; }
  .nav a:not(.nav-cta) { display: none; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .contact-inner, .footer-inner { flex-direction: column; align-items: flex-start; }
  .container { width: calc(100% - 32px); }
}
