:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --accent: #059669;
  --accent-strong: #047857;
  --accent-soft: #ecfdf5;
  --ring: rgba(5, 150, 105, 0.35);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.18);
  --container: 1120px;
  --radius: 22px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  background: rgba(248, 250, 252, 0.94);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--text);
  color: #34d399;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.brand-name {
  font-size: 1.05rem;
}

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

.site-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  place-items: center;
  align-content: center;
}

.nav-toggle .bars {
  display: grid;
  gap: 4px;
}

.nav-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 132px) 0 clamp(56px, 8vw, 88px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.accent {
  background: linear-gradient(115deg, #059669 10%, #0d9488 55%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 560px;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.hero-tags li {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.18), rgba(14, 165, 233, 0.08) 45%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(5, 150, 105, 0.55);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  border-color: #cbd5e1;
}

/* Sections */

.section {
  padding: clamp(64px, 9vw, 104px) 0;
  scroll-margin-top: 88px;
}

.section--muted {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 660px;
  margin-bottom: 36px;
}

.section-head h2,
.about-copy h2,
.contact-copy h2 {
  margin-top: 12px;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-desc {
  margin-top: 14px;
  color: var(--text-muted);
}

/* Works */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
}

.work-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.work-card--placeholder {
  border-style: dashed;
  background: #fcfdff;
}

.work-card--placeholder:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.work-visual {
  position: relative;
  min-height: 240px;
  overflow: hidden;
}

.work-card--featured .work-visual {
  min-height: 340px;
}

.work-visual--moon {
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 20% 15%, #134e4a 0%, #0f172a 55%, #020617 100%);
}

.work-visual--moon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
}

.work-visual--moon::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 24px;
  width: 120px;
  height: 60px;
  border-radius: 3px;
  opacity: 0.55;
  background:
    linear-gradient(#34d399, #34d399) 0 0 / 56px 6px no-repeat,
    linear-gradient(#475569, #475569) 0 18px / 96px 6px no-repeat,
    linear-gradient(#475569, #475569) 0 36px / 72px 6px no-repeat,
    linear-gradient(#475569, #475569) 0 54px / 88px 6px no-repeat;
}

.work-monogram {
  position: relative;
  z-index: 1;
  color: #ecfdf5;
  font-size: clamp(5rem, 12vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  text-shadow: 0 0 60px rgba(16, 185, 129, 0.45);
}

.work-visual-label {
  position: absolute;
  bottom: 20px;
  left: 24px;
  z-index: 1;
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.work-visual--placeholder {
  display: grid;
  place-items: center;
  min-height: 160px;
  border-bottom: 1px dashed var(--border);
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
}

.work-visual--placeholder svg {
  width: 56px;
  height: 56px;
  color: #94a3b8;
}

.work-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(22px, 3vw, 30px);
}

.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pill-live {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.pill-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.pill-muted {
  background: var(--surface-soft);
  color: var(--text-soft);
}

.work-year {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.work-body h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.work-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag-list li {
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.76rem;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.work-link span {
  transition: transform 0.15s ease;
}

.work-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.work-link:hover span {
  transform: translate(2px, -2px);
}

.work-pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.about-copy p {
  max-width: 52ch;
  margin-top: 16px;
  color: var(--text-muted);
}

.skill-groups {
  border-top: 1px solid var(--border);
}

.skill-group {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.skill-group h3 {
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.skill-group p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Contact */

.contact-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 24px;
  background: #0f172a;
  color: #f8fafc;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35), transparent 65%);
  pointer-events: none;
}

.contact-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.contact-copy .eyebrow {
  color: #6ee7b7;
}

.contact-copy h2 {
  color: #f8fafc;
}

.contact-copy p {
  margin-top: 12px;
  color: #cbd5e1;
}

.contact-email {
  display: inline-block;
  margin-top: 18px;
  color: #a7f3d0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  text-decoration: none;
}

.contact-email:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-card .btn {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Footer */

.site-footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.82rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */

@media (max-width: 900px) {
  .work-card--featured {
    grid-template-columns: 1fr;
  }

  .work-card--featured .work-visual {
    min-height: 240px;
  }

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

@media (max-width: 720px) {
  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
    border-radius: 10px;
  }

  .site-nav a:hover {
    background: var(--surface-soft);
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-actions .btn {
    width: 100%;
  }

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

/* Lab entry card */

.work-card--lab {
  color: inherit;
  text-decoration: none;
}

.work-card--lab .work-link {
  margin-top: 2px;
}

.work-card--lab:hover .work-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.work-visual--lab {
  position: relative;
  display: grid;
  min-height: 160px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(120% 120% at 20% 0%, #115e59 0%, #0f172a 62%, #020617 100%);
  color: #ecfdf5;
}

.work-visual--lab::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 25%, transparent 75%);
  mask-image: radial-gradient(circle at 50% 50%, #000 25%, transparent 75%);
}

.lab-mini-window {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 6px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.65);
}

.lab-mini-window i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  opacity: 0.85;
}

.lab-mini-window i:nth-child(2) {
  background: #fbbf24;
}

.lab-mini-window i:nth-child(3) {
  background: #60a5fa;
}

.work-card--lab .work-visual-label {
  position: absolute;
  z-index: 1;
  bottom: 16px;
  left: 20px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 备案号：保持页脚低调，不抢主内容 */
.filing {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

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

.filing a:hover {
  color: #0f766e;
  text-decoration: underline;
}
