:root {
  --bg: #07090d;
  --bg-elev: #0e1218;
  --panel: rgba(18, 24, 33, 0.86);
  --ink: #e8eef6;
  --muted: #8b9aab;
  --dim: #5c6b7c;
  --line: rgba(148, 176, 204, 0.14);
  --line-strong: rgba(110, 231, 210, 0.35);
  --accent: #5eead4;
  --accent-2: #7dd3fc;
  --accent-dim: rgba(94, 234, 212, 0.12);
  --danger-soft: #f87171;
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  --mono: "Cascadia Code", "SF Mono", "JetBrains Mono", "Consolas", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Atmosphere: grid + soft glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(94, 234, 212, 0.16), transparent 55%),
    radial-gradient(700px 420px at 90% 8%, rgba(125, 211, 252, 0.10), transparent 50%),
    radial-gradient(600px 500px at 50% 100%, rgba(94, 234, 212, 0.05), transparent 55%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 176, 204, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 176, 204, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #a7f3e8; }

.wrap {
  width: min(980px, 92%);
  margin: 0 auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 9, 13, 0.72);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover { text-decoration: none; color: inherit; }

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  color: #041312;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 8px 24px rgba(94, 234, 212, 0.22);
}

.brand-text { display: flex; flex-direction: column; gap: 0.05rem; }

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f4f8fc;
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.06em;
  font-family: var(--mono);
}

.nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--line-strong);
  background: var(--accent-dim);
}

/* —— Main —— */
main {
  flex: 1;
  padding: 2.75rem 0 3.5rem;
}

.hero {
  position: relative;
  padding: 2.25rem 0 2.5rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.18;
  font-weight: 720;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  max-width: 12em;
  background: linear-gradient(180deg, #ffffff 10%, #b7c5d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero > p {
  color: var(--muted);
  max-width: 38em;
  font-size: 1.05rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.chip {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

.chip strong {
  color: var(--accent-2);
  font-weight: 600;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.section-head h2 {
  font-size: 0.85rem;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  border: 0;
  padding: 0;
  margin: 0;
}

.card-list { display: grid; gap: 1rem; }

.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.45rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.card:hover {
  border-color: rgba(94, 234, 212, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  color: inherit;
}

.card:hover::before { opacity: 1; }

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 0.4rem;
  color: #f3f7fb;
}

.card .excerpt { color: var(--muted); font-size: 0.95rem; }
.card .date {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--dim);
}

.prose {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.8rem;
}

.prose h2 {
  font-size: 1.05rem;
  margin: 0 0 0.85rem;
  padding: 0;
  border: 0;
  color: #f0f5fa;
}

.prose p + p { margin-top: 0.9rem; }
.prose ul { margin: 0.9rem 0 0.9rem 1.2rem; color: var(--muted); }
.prose li { margin: 0.4rem 0; }
.prose .lead { color: var(--muted); font-size: 1.02rem; }
.prose p { color: #c5d0dc; }

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.info-table th {
  width: 7.2em;
  color: var(--dim);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.info-table td { color: var(--ink); }

.note {
  margin-top: 1.35rem;
  padding: 0.95rem 1.05rem;
  background: var(--accent-dim);
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 10px;
  color: #b7f0e4;
  font-size: 0.9rem;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.9);
  padding: 1.6rem 0 1.9rem;
  color: var(--dim);
  font-size: 0.86rem;
  text-align: center;
}

.site-footer .beian { margin-top: 0.45rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
  .nav { width: 100%; }
  .prose { padding: 1.2rem 1.15rem; }
  .hero { padding-top: 1.5rem; }
}

/* —— Experience timeline —— */
.timeline { display: grid; gap: 0; }
.tl-item {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.25rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.tl-item:last-child { border-bottom: 0; }
.tl-when {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  padding-top: 0.25rem;
}
.tl-body h3 {
  font-size: 1.15rem;
  color: #f3f7fb;
  margin-bottom: 0.2rem;
}
.tl-role {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}
.tl-body ul {
  margin: 0 0 0 1.1rem;
  color: #c5d0dc;
  font-size: 0.95rem;
}
.tl-body li { margin: 0.35rem 0; }
.tl-body strong { color: #e8eef6; font-weight: 600; }

@media (max-width: 640px) {
  .tl-item { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* —— Favorites link grid —— */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.8rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.05rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.link-card:hover {
  border-color: rgba(94, 234, 212, 0.35);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.link-card .lc-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #f3f7fb;
}

.link-card .lc-host {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  word-break: break-all;
}

.fav-section { margin-bottom: 2.4rem; }
