:root {
  color-scheme: light;
  --wallpaper: url("assets/wallpaper-sunny.jpg");
  --ink: #172230;
  --ink-soft: #526170;
  --paper: #f6fbfb;
  --paper-solid: #ffffff;
  --glass: rgba(255, 255, 255, 0.52);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.72);
  --line: rgba(23, 34, 48, 0.12);
  --shadow: 0 18px 48px rgba(27, 52, 69, 0.16);
  --accent: #0b9b9c;
  --accent-dark: #087779;
  --coral: #e66f72;
  --yellow: #d99d2b;
  --success: #2e8c66;
  --backdrop: rgba(240, 249, 249, 0.36);
  --section-bg: rgba(242, 249, 249, 0.88);
  --header-text: #13202d;
}

html[data-theme="night"] {
  color-scheme: dark;
  --wallpaper: url("assets/wallpaper-night.jpg");
  --ink: #eef6f7;
  --ink-soft: #b7c4cd;
  --paper: #101a29;
  --paper-solid: #162132;
  --glass: rgba(15, 27, 43, 0.56);
  --glass-strong: rgba(15, 27, 43, 0.76);
  --glass-border: rgba(176, 221, 226, 0.2);
  --line: rgba(213, 235, 237, 0.14);
  --shadow: 0 20px 54px rgba(2, 8, 18, 0.35);
  --accent: #5bd0d0;
  --accent-dark: #84e4df;
  --coral: #ff8c98;
  --yellow: #ffd376;
  --success: #72d6ad;
  --backdrop: rgba(6, 13, 25, 0.35);
  --section-bg: rgba(13, 24, 39, 0.91);
  --header-text: #f3fbfc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  letter-spacing: 0;
  line-height: 1.65;
  overflow-x: hidden;
  transition: color 240ms ease, background-color 240ms ease;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  color: inherit;
}

svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 1.9;
}

.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;
}

.site-bg,
.ambient-shade {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

.site-bg {
  background-image: var(--wallpaper);
  background-position: center;
  background-size: cover;
  transition: background-image 420ms ease;
}

.ambient-shade {
  z-index: -2;
  background: var(--backdrop);
  transition: background-color 240ms ease;
}

.glass {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
}

.glass-inline {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  box-shadow: 0 8px 24px rgba(20, 40, 55, 0.11);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
  transition: width 80ms linear;
}

.site-header {
  position: fixed;
  inset: 14px 0 auto;
  z-index: 100;
  padding: 0 22px;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, 100%);
  min-height: 64px;
  margin: 0 auto;
  padding: 8px 10px 8px 16px;
  border-radius: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 180px;
  gap: 10px;
  color: var(--header-text);
}

.brand-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  background: var(--accent);
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.95rem;
}

.brand small {
  color: var(--ink-soft);
  font-size: 0.62rem;
  line-height: 1.1;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  min-width: 58px;
  padding: 8px 10px;
  color: var(--ink-soft);
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
}

.nav-link::after {
  position: absolute;
  right: 14px;
  bottom: 3px;
  left: 14px;
  height: 2px;
  content: "";
  background: var(--coral);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  min-width: 180px;
  justify-content: flex-end;
  gap: 8px;
}

.weather-control {
  display: inline-flex;
  min-width: 108px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  gap: 7px;
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  color: var(--ink);
  background: var(--glass-strong);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 800;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.weather-control:hover,
.weather-control:focus-visible {
  color: #ffffff;
  background: var(--accent);
  transform: translateY(-2px);
}

.weather-control:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.weather-control svg {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
}

.icon-button,
.back-to-top {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 7px;
  color: var(--ink);
  background: var(--glass-strong);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.icon-button:hover,
.back-to-top:hover {
  color: #ffffff;
  background: var(--accent);
  transform: translateY(-2px);
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 30;
  padding: 4px 7px;
  border-radius: 4px;
  color: #ffffff;
  background: #172230;
  content: attr(data-tooltip);
  font-size: 0.68rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.menu-button {
  display: none;
}

.mobile-menu {
  display: none;
  width: min(520px, calc(100% - 44px));
  margin: 8px auto 0;
  padding: 8px;
  border-radius: 8px;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--ink-soft);
  font-weight: 700;
}

.mobile-menu a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.14);
}

.hero {
  position: relative;
  min-height: 91svh;
  padding: 112px 22px 72px;
}

.hero-inner,
.section-inner,
.footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  min-height: calc(91svh - 184px);
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.68fr);
  align-items: center;
  gap: 58px;
}

.hero-copy {
  max-width: 710px;
  color: var(--header-text);
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.22);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 12px;
  gap: 8px;
  border-radius: 7px;
  color: var(--header-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35b784;
  box-shadow: 0 0 0 5px rgba(53, 183, 132, 0.18);
}

.hero-kicker {
  margin: 26px 0 0;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero h1 {
  max-width: 100%;
  margin: 2px 0 0;
  color: var(--header-text);
  font-size: 4.75rem;
  line-height: 1.1;
}

.hero-role {
  margin: 8px 0 0;
  color: var(--header-text);
  font-size: 1.15rem;
  font-weight: 800;
}

.hero-role span {
  margin: 0 8px;
  color: var(--coral);
}

.hero-intro {
  max-width: 650px;
  margin: 19px 0 0;
  color: var(--header-text);
  font-size: 1rem;
  font-weight: 600;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #ffffff;
  background: var(--accent-dark);
  box-shadow: 0 12px 30px rgba(9, 120, 121, 0.22);
}

.button-primary:hover {
  background: var(--coral);
  box-shadow: 0 14px 34px rgba(197, 82, 91, 0.24);
}

.button-glass {
  color: var(--header-text);
  border-color: var(--glass-border);
  background: var(--glass-strong);
  backdrop-filter: blur(18px) saturate(150%);
}

.hero-stats {
  display: flex;
  margin: 34px 0 0;
  padding: 0;
  gap: 28px;
}

.hero-stats div {
  position: relative;
  min-width: 82px;
}

.hero-stats div:not(:last-child)::after {
  position: absolute;
  top: 8px;
  right: -15px;
  width: 1px;
  height: 38px;
  content: "";
  background: rgba(23, 34, 48, 0.2);
}

.hero-stats dt {
  color: var(--header-text);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.1;
}

.hero-stats dd {
  margin: 3px 0 0;
  color: var(--header-text);
  font-size: 0.74rem;
  font-weight: 700;
}

.profile-card {
  align-self: center;
  padding: 22px;
  border-radius: 8px;
}

.profile-top {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 16px;
  align-items: center;
}

.profile-top img {
  width: 94px;
  height: 94px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(16, 31, 44, 0.18);
}

.profile-label,
.section-index {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 900;
}

.profile-card h2 {
  margin: 3px 0 5px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.profile-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.skill-cloud,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-cloud {
  margin-top: 20px;
}

.skill-cloud span,
.tag-row span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.13);
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-meta {
  display: grid;
  margin-top: 18px;
  padding: 14px 0;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 8px;
}

.profile-meta span {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  text-align: center;
}

.profile-meta svg {
  color: var(--accent);
}

.weather-status {
  display: flex;
  min-height: 35px;
  align-items: center;
  margin: 14px 0 13px;
  padding: 7px 9px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  line-height: 1.45;
}

.weather-status svg {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  color: var(--accent);
}

.weather-status.is-loading svg {
  animation: rotate 1.2s linear infinite;
}

.weather-status.is-error {
  color: var(--coral);
}

.weather-status.is-error svg {
  color: var(--coral);
}

.text-link,
.card-link,
.project-link,
.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.text-link {
  margin-top: 15px;
  font-size: 0.82rem;
}

.text-link:hover,
.card-link:hover,
.project-link:hover,
.repo-link:hover {
  color: var(--coral);
}

.scroll-cue {
  position: absolute;
  bottom: 23px;
  left: 50%;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 4px 10px;
  gap: 7px;
  border-radius: 7px;
  color: var(--header-text);
  font-size: 0.66rem;
  font-weight: 800;
  transform: translateX(-50%);
}

.scroll-cue svg:last-child {
  animation: nudge-down 1.4s ease-in-out infinite;
}

.content-band {
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: var(--section-bg);
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
}

.articles-section,
.timeline-section,
.projects-section,
.about-section {
  padding: 92px 22px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  align-items: end;
  gap: 30px;
  margin-bottom: 30px;
}

.section-heading h2,
.about-copy h2 {
  margin: 3px 0 0;
  font-size: 2.15rem;
  line-height: 1.25;
}

.section-heading > p {
  margin: 0;
  color: var(--ink-soft);
  text-align: right;
}

.article-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  gap: 12px;
}

.search-box {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 0 11px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.search-box svg {
  flex: 0 0 auto;
  color: var(--ink-soft);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-box input::placeholder {
  color: var(--ink-soft);
}

kbd {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink-soft);
  background: var(--glass-strong);
  font-size: 0.7rem;
}

.filter-tabs {
  display: flex;
  align-items: center;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.filter-button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 4px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
  color: #ffffff;
  background: var(--accent);
}

.result-count {
  min-width: 42px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-align: right;
}

.article-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.core-project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-card,
.project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-solid);
  box-shadow: 0 14px 34px rgba(17, 37, 52, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.article-card:hover,
.project-card:hover {
  border-color: rgba(11, 155, 156, 0.38);
  box-shadow: 0 20px 42px rgba(17, 37, 52, 0.15);
  transform: translateY(-5px);
}

.article-card[hidden] {
  display: none;
}

.article-cover {
  position: relative;
  display: flex;
  height: 126px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 17px;
  color: #ffffff;
  overflow: hidden;
}

.article-cover::after {
  position: absolute;
  top: -26px;
  right: 18px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  content: "";
  transform: rotate(18deg);
}

.article-cover svg {
  position: relative;
  z-index: 1;
  width: 2.2rem;
  height: 2.2rem;
}

.article-cover span {
  position: relative;
  z-index: 1;
  font-size: 0.66rem;
  font-weight: 900;
}

.cover-data { background: #168e92; }
.cover-auto { background: #d86670; }
.cover-ops { background: #344f70; }
.cover-ai { background: #765b8f; }
.cover-sql { background: #c28c2d; }
.cover-security { background: #34705c; }

.article-body {
  display: flex;
  min-height: 222px;
  flex-direction: column;
  padding: 18px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.article-meta span {
  color: var(--accent-dark);
  font-weight: 800;
}

.article-card h3,
.project-card h3 {
  margin: 12px 0 8px;
  font-size: 1.05rem;
  line-height: 1.45;
}

.article-card p,
.project-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.card-link {
  align-self: flex-start;
  margin: auto 0 0;
  padding: 9px 0 0;
  font-size: 0.78rem;
}

.empty-state {
  display: grid;
  min-height: 200px;
  margin-top: 22px;
  place-items: center;
  align-content: center;
  border-radius: 8px;
  color: var(--ink-soft);
}

.empty-state[hidden] {
  display: none;
}

.empty-state svg {
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.projects-section {
  position: relative;
  color: #eef7f8;
  background: rgba(8, 18, 31, 0.76);
  backdrop-filter: blur(12px);
}

.light-heading .section-index {
  color: #7be1de;
}

.light-heading p {
  color: #c4d2d8;
}

.project-card {
  position: relative;
  padding: 24px;
  color: var(--ink);
  background: var(--glass-strong);
}

.featured-project {
  border-top: 3px solid var(--coral);
}

.project-number {
  position: absolute;
  top: 15px;
  right: 18px;
  color: var(--line);
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
}

.project-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
}

.project-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-coral { background: var(--coral); }
.icon-cyan { background: var(--accent); }
.icon-yellow { background: var(--yellow); }
.icon-vibe { background: #5f6ead; }

.project-state {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 800;
}

.project-state.done { color: var(--success); }
.project-state.building { color: var(--yellow); }
.project-state.prototype { color: #5f6ead; }
.project-state svg { width: 0.9rem; height: 0.9rem; }
.project-state.building svg { animation: rotate 2.4s linear infinite; }

.project-card h3 {
  margin-top: 8px;
  font-size: 1.15rem;
}

.project-metrics {
  display: flex;
  margin: 20px 0 15px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 22px;
}

.project-metrics span {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.project-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.project-link {
  padding: 0;
  font-size: 0.82rem;
}

.project-actions {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  gap: 12px;
}

.repo-link {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.vibe-showcase {
  margin-top: 48px;
  padding-top: 34px;
  border-top: 1px solid rgba(238, 247, 248, 0.18);
}

.vibe-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: 28px;
}

.vibe-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9ee6df;
  font-size: 0.7rem;
  font-weight: 900;
}

.vibe-label svg {
  width: 1rem;
  height: 1rem;
}

.vibe-heading h3 {
  margin: 8px 0 0;
  color: #ffffff;
  font-size: 1.5rem;
}

.vibe-heading p {
  margin: 0;
  color: #c4d2d8;
  font-size: 0.84rem;
  line-height: 1.75;
}

.vibe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.vibe-project-card {
  display: flex;
  flex-direction: column;
}

.galpatcher-card {
  border-top: 3px solid #5f6ead;
}

.ops-card {
  border-top: 3px solid var(--yellow);
}

.grader-card {
  border-top: 3px solid var(--coral);
}

.toolbox-card {
  border-top: 3px solid var(--accent);
}

.tag-row .vibe-tag {
  border-color: rgba(95, 110, 173, 0.42);
  color: #4d5e9c;
  background: rgba(95, 110, 173, 0.1);
}

.vibe-project-card .project-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 22px;
}

.vibe-project-card .project-link {
  margin-right: auto;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  position: absolute;
  top: 9px;
  bottom: 14px;
  left: 104px;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 42px;
  padding: 0 0 34px;
}

.timeline-item::before {
  position: absolute;
  top: 8px;
  left: 99px;
  width: 11px;
  height: 11px;
  border: 3px solid var(--section-bg);
  border-radius: 50%;
  content: "";
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(230, 111, 114, 0.18);
}

.timeline-item time {
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 900;
  text-align: right;
}

.timeline-item h3 {
  margin: 0;
  font-size: 1.02rem;
}

.timeline-item p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.about-section {
  background: rgba(8, 18, 31, 0.78);
  color: #eef7f8;
  backdrop-filter: blur(12px);
}

.about-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 72px;
}

.about-copy .section-index {
  color: #7be1de;
}

.about-copy h2 {
  max-width: 500px;
  font-size: 2.35rem;
}

.about-copy > p {
  max-width: 610px;
  color: #c4d2d8;
}

.about-points {
  display: grid;
  margin-top: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.about-points span {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  color: #dbe8eb;
  font-size: 0.82rem;
}

.about-points svg {
  color: #7be1de;
}

.contact-panel {
  padding: 26px;
  border-radius: 8px;
  color: var(--ink);
}

.contact-panel h3 {
  margin: 5px 0;
  font-size: 1.3rem;
}

.contact-panel > p {
  margin: 0 0 17px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.contact-button {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 28px 1fr 22px;
  align-items: center;
  margin-top: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  text-align: left;
}

.contact-button:hover {
  border-color: var(--accent);
  background: rgba(11, 155, 156, 0.08);
}

.contact-button > svg:first-child {
  color: var(--accent);
}

.contact-button > svg:last-child {
  color: var(--ink-soft);
}

.contact-button span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-button small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.resume-button {
  width: 100%;
  margin-top: 14px;
}

footer {
  padding: 25px 22px;
  color: #aebfc6;
  background: #08121f;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.75rem;
}

.footer-inner a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dbe8eb;
}

.footer-beian {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  font-size: 0.72rem;
  color: #8aa0a8;
}

.footer-beian a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8aa0a8;
  transition: color 0.2s ease;
}

.footer-beian a:hover {
  color: #dbe8eb;
}

.footer-beian img {
  height: 14px;
  width: auto;
  display: block;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.article-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(82svh, 820px);
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  overflow: visible;
}

.article-dialog::backdrop {
  background: rgba(5, 12, 22, 0.66);
  backdrop-filter: blur(8px);
}

.dialog-shell {
  position: relative;
  max-height: min(82svh, 820px);
  padding: 34px;
  border-radius: 8px;
  overflow-y: auto;
}

.dialog-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 3;
}

.dialog-meta {
  padding-right: 54px;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
}

.article-dialog h2 {
  margin: 7px 54px 20px 0;
  font-size: 1.8rem;
  line-height: 1.35;
}

.dialog-content {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.dialog-content h3 {
  margin: 24px 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.dialog-content p,
.dialog-content ul {
  margin: 8px 0;
}

.dialog-content code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--coral);
  background: rgba(255, 255, 255, 0.08);
}

.dialog-content a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  margin-top: 5px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
}

.dialog-content a:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 78px;
  z-index: 130;
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  color: #ffffff;
  background: #172230;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.petal-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.petal-field span {
  position: absolute;
  top: -28px;
  width: 11px;
  height: 7px;
  border-radius: 7px 2px 7px 2px;
  background: rgba(255, 176, 190, 0.72);
  animation: fall 13s linear infinite;
}

.petal-field span:nth-child(1) { left: 8%; animation-delay: -2s; }
.petal-field span:nth-child(2) { left: 24%; animation-delay: -8s; animation-duration: 17s; }
.petal-field span:nth-child(3) { left: 43%; animation-delay: -5s; animation-duration: 14s; }
.petal-field span:nth-child(4) { left: 61%; animation-delay: -10s; animation-duration: 19s; }
.petal-field span:nth-child(5) { left: 77%; animation-delay: -4s; animation-duration: 16s; }
.petal-field span:nth-child(6) { left: 92%; animation-delay: -12s; animation-duration: 18s; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes nudge-down {
  0%, 100% { transform: translateY(-1px); }
  50% { transform: translateY(4px); }
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

@keyframes fall {
  0% { transform: translate3d(0, -30px, 0) rotate(0deg); }
  50% { transform: translate3d(35px, 52vh, 0) rotate(190deg); }
  100% { transform: translate3d(-22px, 105vh, 0) rotate(380deg); }
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .brand,
  .nav-actions {
    min-width: 0;
  }

  .weather-control {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  .weather-control span {
    display: none;
  }

  .menu-button {
    display: inline-grid;
  }

  .mobile-menu.open {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }

  .mobile-menu a {
    justify-content: center;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .article-toolbar {
    grid-template-columns: 1fr auto;
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .article-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-layout {
    gap: 40px;
  }
}

@media (max-width: 760px) {
  .site-bg {
    background-position: 70% center;
  }

  .site-header {
    inset: 10px 0 auto;
    padding: 0 12px;
  }

  .nav-shell {
    min-height: 58px;
    padding-left: 11px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .mobile-menu {
    width: calc(100% - 24px);
  }

  .mobile-menu.open {
    grid-template-columns: 1fr;
  }

  .mobile-menu a {
    justify-content: flex-start;
  }

  .hero {
    min-height: 88svh;
    padding: 98px 16px 42px;
  }

  .hero-inner {
    min-height: calc(88svh - 140px);
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-copy {
    padding-top: 30px;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .hero-intro {
    max-width: 94%;
  }

  .profile-card {
    display: none;
  }

  .scroll-cue {
    display: none;
  }

  .articles-section,
  .timeline-section,
  .projects-section,
  .about-section {
    padding: 70px 16px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .section-heading > p {
    text-align: left;
  }

  .article-grid,
  .project-grid,
  .vibe-grid,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .vibe-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .article-card,
  .project-card {
    max-width: 560px;
  }

  .about-layout {
    gap: 34px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .brand strong {
    font-size: 0.86rem;
  }

  .brand small {
    display: none;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-role {
    max-width: 330px;
    font-size: 1rem;
  }

  .hero-role span {
    margin: 0 3px;
  }

  .hero-actions .button {
    flex: 1 1 145px;
  }

  .hero-stats {
    justify-content: space-between;
    gap: 12px;
  }

  .hero-stats div {
    min-width: 0;
  }

  .hero-stats div:not(:last-child)::after {
    right: -7px;
  }

  .profile-top {
    grid-template-columns: 78px 1fr;
  }

  .profile-top img {
    width: 78px;
    height: 78px;
  }

  .profile-meta {
    grid-template-columns: 1fr;
  }

  .profile-meta span {
    display: flex;
    justify-content: flex-start;
  }

  .article-toolbar {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
  }

  .filter-button {
    min-width: 0;
    padding: 0 4px;
  }

  .result-count {
    text-align: left;
  }

  .article-body {
    min-height: 208px;
  }

  .timeline::before {
    left: 72px;
  }

  .timeline-item {
    grid-template-columns: 56px 1fr;
    gap: 32px;
  }

  .timeline-item::before {
    left: 67px;
  }

  .about-points {
    grid-template-columns: 1fr;
  }

  .dialog-shell {
    padding: 24px 20px;
  }

  .article-dialog h2 {
    font-size: 1.42rem;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }

  .toast {
    right: 14px;
    bottom: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
