/* 杨均豪 · AI 求职作品集 — 暖色深调高级印刷感视觉系统 */

:root {
  --paper: #17130f;
  --paper-2: #201a14;
  --paper-3: #29211a;
  --ink: #f3ede2;
  --ink-2: #cbbfa9;
  --ink-3: #9d927e;
  --line: rgba(243, 237, 226, 0.14);
  --line-soft: rgba(243, 237, 226, 0.08);
  --gold: #d9a860;
  --red: #d0605e;
  --radius: 8px;
  --font-display: "Noto Serif SC", "SimSun", "Songti SC", serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Mono", Consolas, monospace;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(217, 168, 96, 0.32); color: var(--ink); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: rgba(243, 237, 226, 0.18); border: 3px solid var(--paper); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(243, 237, 226, 0.3); }

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

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 页面骨架 ---------- */
.page { max-width: var(--maxw); margin: 0 auto; padding: 0 40px 72px; }
section { scroll-margin-top: 72px; }
.section {
  padding: 64px 0 8px;
}
.section-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 30px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  letter-spacing: 0.06em;
  color: var(--ink);
  line-height: 1.3;
}
.section-title::after {
  content: ""; display: inline-block; width: 34px; height: 2px;
  background: var(--gold); margin-left: 18px; vertical-align: 0.4em;
}
.section-note { font-size: 14px; color: var(--ink-3); margin: -16px 0 26px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23, 19, 15, 0.92);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(8px);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 40px;
  display: flex; align-items: center; gap: 28px;
}
.brand {
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  color: var(--ink); text-decoration: none; letter-spacing: 0.08em;
}
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 14.5px;
  padding: 7px 10px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--gold); border-bottom-color: var(--gold); }
.top-download {
  font-size: 14px; padding: 9px 16px; border: 1px solid var(--ink);
  border-radius: 6px; color: var(--ink); background: transparent;
}
.top-download:hover { background: var(--ink); color: var(--paper); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 24px; border-radius: 6px; border: 1px solid var(--ink);
  font-family: var(--font-body); font-size: 15px; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.7; fill: none; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--paper); font-weight: 500; }
.btn-primary:hover { background: #e5bd7e; border-color: #e5bd7e; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 英雄区 ---------- */
.hero { padding: 96px 0 40px; }
.hero-inner { max-width: 860px; }
.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.hero-role {
  margin-top: 18px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: 0.1em;
  color: var(--ink-2);
  font-weight: 500;
}
.hero-spec {
  margin-top: 14px;
  font-family: var(--font-mono); font-size: 14px;
  color: var(--ink-3);
}
.hero-lede {
  margin-top: 26px;
  max-width: 640px;
  font-size: 16px;
  color: var(--ink-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* ---------- 关于 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.panel-title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600;
  letter-spacing: 0.12em; color: var(--ink);
  margin-bottom: 18px;
}
.spec { display: flex; flex-direction: column; }
.spec-row {
  display: flex; gap: 16px; padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row dt { flex: 0 0 96px; font-size: 13px; color: var(--ink-3); letter-spacing: 0.06em; }
.spec-row dd { font-size: 15px; color: var(--ink); }
.lede { font-size: 16px; color: var(--ink-2); }
.callouts { list-style: none; margin-top: 22px; }
.callouts li {
  position: relative; padding: 9px 0 9px 22px;
  font-size: 15px; color: var(--ink-2);
  border-bottom: 1px solid var(--line-soft);
}
.callouts li:last-child { border-bottom: 0; }
.callouts li::before {
  content: ""; position: absolute; left: 2px; top: 1.28em;
  width: 7px; height: 7px; background: var(--red); border-radius: 50%;
}

/* ---------- 技能 ---------- */
.table-wrap { overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 660px; }
.spec-table th {
  text-align: left; padding: 0 0 12px; font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.12em; color: var(--ink-3);
  border-bottom: 1px solid var(--ink);
}
.spec-table td {
  padding: 16px 24px 16px 0; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2); line-height: 1.7;
}
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.spec-table td.mono { font-size: 13px; color: var(--ink-3); white-space: nowrap; }

/* ---------- 作品 ---------- */
.works-grid, .videos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.work { position: relative; }
.work-media {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: var(--paper-2); aspect-ratio: 3 / 4; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.work-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.work-media:hover img { transform: scale(1.015); }
.work-zoom {
  position: absolute; right: 12px; top: 12px; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(23, 19, 15, 0.82); color: var(--ink);
}
.work-zoom svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.7; fill: none; }
.work figcaption {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px;
  padding: 12px 2px 0;
}
.fig-no { grid-column: 1; grid-row: 1 / span 2; align-self: center; color: var(--ink-3); font-size: 12px; letter-spacing: 0.08em; }
.fig-name { font-size: 15px; color: var(--ink); font-weight: 500; }
.fig-meta { grid-column: 2; font-size: 12px; color: var(--ink-3); }
.work video {
  width: 100%; aspect-ratio: 16 / 9; display: block; background: #111;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.videos-grid { margin-top: 8px; }

/* ---------- 履历 ---------- */
.ledger { display: flex; flex-direction: column; gap: 40px; }
.ledger-group { }
.entry { padding: 18px 0 4px; }
.entry + .entry { border-top: 1px solid var(--line-soft); margin-top: 6px; }
.entry-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.entry-name { font-size: 16.5px; font-weight: 600; color: var(--ink); letter-spacing: 0.02em; }
.entry-role { font-size: 13px; color: var(--gold); letter-spacing: 0.06em; }
.entry-date { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); }
.entry-points { list-style: none; margin: 10px 0 4px; display: flex; flex-direction: column; gap: 7px; }
.entry-points li {
  position: relative; padding-left: 18px; font-size: 14.5px; color: var(--ink-2);
}
.entry-points li::before {
  content: ""; position: absolute; left: 1px; top: 0.8em;
  width: 8px; height: 1px; background: var(--ink-3);
}
.honors { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.honor em { font-style: normal; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); margin-left: 6px; }

/* ---------- 问答 ---------- */
.qa {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-2); overflow: hidden;
}
.qa-log {
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px; max-height: 560px; overflow-y: auto;
}
.msg { display: flex; gap: 12px; max-width: 86%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-stamp {
  flex: 0 0 26px; height: 26px; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--red); border-radius: 4px;
  color: var(--red); font-size: 12px; letter-spacing: 0.02em;
  font-family: var(--font-display);
}
.msg.user .msg-stamp { border-color: var(--ink-3); color: var(--ink-3); }
.msg-body {
  padding: 4px 0; font-size: 15px; color: var(--ink);
}
.msg.user .msg-body { text-align: right; }
.msg-body .cite {
  display: block; margin-top: 8px; font-size: 12px;
  color: var(--ink-3); letter-spacing: 0.04em;
}
.msg-body p + p { margin-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; }
.chip {
  border: 0; background: none; padding: 2px 0;
  color: var(--gold); font-size: 13.5px; letter-spacing: 0.02em;
  border-bottom: 1px solid transparent; cursor: pointer; font-family: var(--font-body);
}
.chip:hover { border-bottom-color: var(--gold); }
.qa-form {
  display: flex; gap: 12px; padding: 16px 20px;
  border-top: 1px solid var(--line-soft); background: var(--paper);
}
.qa-form input {
  flex: 1; min-width: 0; padding: 12px 14px;
  background: var(--paper-3); border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); font-size: 15px; font-family: var(--font-body); caret-color: var(--gold);
}
.qa-form input::placeholder { color: var(--ink-3); }
.qa-form input:focus { outline: none; border-color: var(--gold); }

/* ---------- 联系 / 页脚 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start; }
.contact-actions { display: flex; flex-direction: column; gap: 12px; }
.footer {
  max-width: var(--maxw); margin: 40px auto 0; padding: 22px 40px 0;
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 13px; letter-spacing: 0.04em; color: var(--ink-3);
  border-top: 1px solid var(--line-soft);
}

/* ---------- 灯箱 ---------- */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: none; max-height: none;
  width: min(1080px, 92vw); margin: auto;
}
.lightbox::backdrop { background: rgba(20, 22, 28, 0.9); }
.lightbox img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.lightbox-close {
  position: absolute; right: -12px; top: -12px; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--paper);
  color: var(--ink); cursor: pointer; line-height: 1;
}
.lightbox-close svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.7; fill: none; }
.lightbox-cap { color: var(--ink-2); text-align: center; margin-top: 12px; font-size: 14px; letter-spacing: 0.06em; }

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

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-2, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .works-grid, .videos-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .page, .topbar-inner, .footer { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 620px) {
  .works-grid, .videos-grid { grid-template-columns: 1fr; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin-left: 0; }
  .top-download { margin-left: auto; }
  .hero { padding-top: 64px; }
  .qa-log { padding: 18px 16px; }
  .msg { max-width: 96%; }
  .footer { flex-direction: column; gap: 6px; }
  .section { padding-top: 48px; }
}
