:root {
  --bg: #f5f2ea;
  --paper: #fffaf1;
  --ink: #171717;
  --muted: #535353;
  --line: #d7cebd;
  --accent: #0d7f7c;
  --accent-strong: #0a5c5a;
  --sun: #f3a343;
  --shadow: 0 12px 40px rgba(29, 28, 26, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 10% 15%, #fff6d8 0%, transparent 30%),
    radial-gradient(circle at 90% 5%, #d2f0ef 0%, transparent 25%),
    var(--bg);
  font-family: "Noto Sans SC", sans-serif;
  line-height: 1.7;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(transparent 95%, rgba(13, 127, 124, 0.05) 95%),
    linear-gradient(90deg, transparent 95%, rgba(13, 127, 124, 0.05) 95%);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 90%);
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 250, 241, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.brand {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(140deg, var(--accent) 0%, var(--accent-strong) 100%);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
  background: #ece4d3;
}

main {
  width: min(1024px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.hero {
  background: linear-gradient(135deg, #fffaf1 0%, #fffef8 60%, #f0fffd 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0;
  font-family: "ZCOOL XiaoWei", serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
}

.subtitle {
  max-width: 720px;
  color: #333;
  font-size: 1.05rem;
}

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

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn-solid {
  color: #fff;
  background: linear-gradient(140deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.btn-ghost {
  color: var(--accent-strong);
  background: #e2f2f1;
}

.privacy-note {
  background: #fff3dd;
  border: 1px dashed #e0bb85;
  border-radius: 12px;
  padding: 12px 14px;
  color: #5f4521;
}

.stats {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stats li {
  background: #f2f8f7;
  border: 1px solid #cce2e1;
  border-radius: 14px;
  padding: 14px;
  font-weight: 600;
}

.stats span {
  display: block;
  font-size: 1.6rem;
  color: var(--accent-strong);
  font-weight: 900;
}

.section {
  margin-top: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.section h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.section p {
  margin: 8px 0;
  color: #2b2b2b;
}

.skill-grid,
.project-grid,
.edu-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  border: 1px solid #e3d9c7;
  border-radius: 14px;
  background: #fffcf5;
  padding: 14px 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: #454545;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  border-left: 4px solid var(--sun);
  padding: 6px 0 6px 14px;
}

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

.time {
  margin: 4px 0 8px;
  color: var(--muted);
  font-weight: 600;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #cdc2af;
  border-radius: 999px;
  padding: 7px 12px;
  background: #f8f0e3;
  color: #5c4d31;
  font-weight: 700;
  cursor: pointer;
}

.chip.is-active {
  background: #0d7f7c;
  border-color: #0d7f7c;
  color: #fff;
}

.project.is-hidden {
  display: none;
}

.achievement {
  margin-top: 16px;
  border-top: 1px solid #e5d9c6;
  padding-top: 12px;
}

.achievement h3 {
  margin: 0 0 8px;
}

.achievement ul {
  margin: 0;
  padding-left: 18px;
}

.contact {
  text-align: center;
}

.contact a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

.contact a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  text-align: center;
  color: #5f5f5f;
  padding: 10px 0 30px;
}

.site-footer a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

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

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

.compact .card p,
.compact .timeline-item p,
.compact .subtitle {
  display: none;
}

@media (max-width: 680px) {
  .site-header {
    padding: 12px;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    gap: 8px;
  }

  main {
    width: calc(100% - 18px);
    margin-top: 14px;
  }
}
