/* ============================================================
   liu.pro — 放鹅的刘工 | Liu the Gooseherd · Engineer
   工程风暗色主题 · Engineering dark theme
   ============================================================ */

:root {
  --bg: #0b0f14;
  --bg-grid: rgba(120, 150, 190, 0.055);
  --panel: #111823;
  --panel-2: #0e1520;
  --border: #223047;
  --border-soft: #1a2536;
  --text: #d7dee8;
  --muted: #8b98ac;
  --faint: #5c6b80;
  --accent: #e8b04b;      /* amber 琥珀 */
  --accent-2: #56b6c2;    /* teal 青 */
  --green: #7fc47f;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --sans: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection { background: rgba(232, 176, 75, 0.28); }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- i18n visibility ---------- */
html[data-lang="zh"] .lang-en { display: none !important; }
html[data-lang="en"] .lang-zh { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.brand .prompt { color: var(--accent); }
.brand .path { color: var(--accent-2); }
.brand:hover { text-decoration: none; }

.site-nav { display: flex; gap: 4px; flex: 1; }

.site-nav a {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.site-nav a.active {
  color: var(--accent);
  border-color: var(--border);
  background: var(--panel);
}
.site-nav a.active::before { content: "> "; color: var(--faint); }

/* language toggle */
.lang-toggle { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.lang-toggle button {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 5px 12px;
  background: transparent;
  color: var(--muted);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-toggle button + button { border-left: 1px solid var(--border); }
.lang-toggle button:hover { color: var(--text); }
.lang-toggle button.active { background: var(--accent); color: #14100a; font-weight: 700; }

/* ---------- Layout ---------- */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  width: 100%;
  flex: 1;
}

/* ---------- Typography helpers ---------- */
.sec-label {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.sec-label::before { content: "// "; color: var(--faint); }

h1.page-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}
h2.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 48px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--mono);
}
h2.section-title .no { color: var(--accent); margin-right: 10px; }
h3.sub-title { font-size: 17px; font-weight: 700; margin: 26px 0 12px; color: var(--accent-2); }

.subtitle { color: var(--muted); font-size: 17px; max-width: 720px; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* ---------- Hero (home) ---------- */
.hero { padding: 40px 0 24px; }

.hero-terminal {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--faint);
  margin-bottom: 22px;
}
.hero-terminal .cmd { color: var(--accent-2); }
.hero-terminal .cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero h1 {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.hero .alias {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 17px;
  margin-top: 12px;
}
.hero .slogan {
  margin-top: 22px;
  font-size: 19px;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  max-width: 680px;
}
.hero .intro { margin-top: 24px; color: var(--muted); max-width: 760px; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 22px 20px;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .card-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .card-link { font-family: var(--mono); font-size: 13px; display: inline-block; margin-top: 14px; color: var(--accent-2); }

/* data panel */
.data-panel {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 36px;
  overflow: hidden;
}
.data-panel .dp-header {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel);
}
.data-panel .dp-header .dots { color: var(--faint); margin-right: 10px; }
.data-panel dl { padding: 16px 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 32px; }
.data-panel dt { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.data-panel dd { font-size: 14.5px; margin-bottom: 8px; }

/* ---------- CV timeline ---------- */
.timeline { position: relative; margin-top: 10px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 130px;
  top: 8px; bottom: 8px;
  width: 1px;
  background: var(--border);
}
.tl-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 44px;
  padding: 18px 0;
  position: relative;
}
.tl-item::after {
  content: "";
  position: absolute;
  left: 126px; top: 30px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.tl-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-align: right;
  padding-top: 4px;
  line-height: 1.6;
}
.tl-body h3 { font-size: 17px; margin-bottom: 2px; }
.tl-role { font-size: 14px; color: var(--accent-2); font-family: var(--mono); margin-bottom: 10px; }
.tl-body ul { margin: 8px 0 0 20px; color: var(--muted); font-size: 14.5px; }
.tl-body li { margin: 4px 0; }
.tl-body p { color: var(--muted); font-size: 14.5px; }
.tl-note { font-size: 13px; color: var(--faint); margin-top: 6px; }
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 8px;
  margin: 3px 4px 0 0;
  background: var(--panel-2);
}

/* ---------- Article (worldview) ---------- */
.article { max-width: 860px; }
.article .version-badge {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: inline-block;
  padding: 4px 12px;
  background: var(--panel);
  margin-bottom: 24px;
}
.article .authors {
  font-size: 14.5px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px 18px;
  margin: 18px 0 36px;
}
.article .authors strong { color: var(--text); }
.article h2 { scroll-margin-top: 80px; }
.article p { margin: 12px 0; }
.article ol, .article ul { margin: 12px 0 12px 24px; }
.article li { margin: 7px 0; }
.article blockquote {
  border-left: 3px solid var(--accent-2);
  background: var(--panel-2);
  padding: 12px 18px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: 14.5px;
}
.article strong { color: var(--text); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}
.contact-card .c-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.contact-card .c-value {
  font-family: var(--mono);
  font-size: 19px;
  color: var(--text);
  margin-top: 10px;
  word-break: break-all;
}
.contact-card .c-value a { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  background: var(--panel-2);
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 24px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; }
  .hero h1 { font-size: 34px; }
  .timeline::before { left: 6px; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; padding-left: 26px; }
  .tl-item::after { left: 2px; top: 26px; }
  .tl-date { text-align: left; }
  .page { padding: 36px 16px 60px; }
}
