/* ===========================================================
   oruola.top — 单页个人主页
   零外部依赖：系统字体 + 纯 CSS，不请求任何第三方资源
   =========================================================== */

/* ---------- 主题变量 ---------- */
:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-soft: #13161b;
  --fg: #e9ecf1;
  --fg-soft: #a3acba;
  --line: #252b34;
  --accent: #7aa2ff;
  --accent-2: #6ee7d0;
  --radius: 14px;
  --maxw: 720px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfbfd;
  --bg-soft: #f2f3f7;
  --fg: #14171c;
  --fg-soft: #5a6270;
  --line: #e2e5eb;
  --accent: #3b63d6;
  --accent-2: #0f9b8e;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 顶部一层很淡的光，深色下有质感，浅色下几乎看不见 */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 480px;
  background: radial-gradient(60% 100% at 50% 0%,
    color-mix(in srgb, var(--accent) 16%, transparent) 0%,
    transparent 70%);
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-soft);
}

/* ---------- 跳过导航（键盘 / 读屏） ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--accent);
  color: #06080c;
  border-radius: 0 0 8px 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* ---------- 顶栏 ---------- */
.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px clamp(18px, 5vw, 24px) 8px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--fg);
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}
.site-nav a {
  color: var(--fg-soft);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

.theme-toggle {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  color: var(--fg-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--accent); }

/* ---------- 版心 ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 24px);
}

/* ---------- 首屏 ---------- */
.hero {
  padding: clamp(40px, 10vw, 76px) 0 clamp(28px, 6vw, 44px);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.hero h1 {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 700;
  background: linear-gradient(100deg, var(--fg) 10%, var(--accent) 55%, var(--accent-2) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 14px 0 0;
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--fg-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #05070b;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- 区块 ---------- */
.section {
  padding: clamp(26px, 5vw, 38px) 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
  margin-bottom: 18px;
}

.section p { color: var(--fg-soft); }
.section p:last-child { margin-bottom: 0; }

/* ---------- 卡片 ---------- */
.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.card {
  padding: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--fg-soft);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.tags span {
  font-size: 0.75rem;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--fg-soft);
}

/* ---------- 链接列表 ---------- */
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.link-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.link-list span {
  flex: none;
  width: 5.5em;
  color: var(--fg-soft);
  font-size: 0.85rem;
}
.link-list a {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  overflow-wrap: anywhere;
}
.link-list a:hover { border-bottom-color: var(--accent); }

/* ---------- 页脚 ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px clamp(18px, 5vw, 24px) 48px;
  border-top: 1px solid var(--line);
  color: var(--fg-soft);
  font-size: 0.82rem;
}
.site-footer p { margin: 0; }

/* ---------- 焦点可见（无障碍） ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 尊重系统「减少动态效果」 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- 窄屏微调 ---------- */
@media (max-width: 420px) {
  .site-nav { gap: 12px; font-size: 0.85rem; }
  .link-list li { display: block; }
  .link-list span { display: block; width: auto; margin-bottom: 2px; }
}

/* ---------- 404 页 ---------- */
.page-404 main.notfound {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding-top: 10vh;
}
.notfound h1 { font-size: clamp(2rem, 7vw, 3rem); }
.notfound .lede { margin-inline: auto; }
.hero-actions-center { justify-content: center; }
