:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --bg-2: #f0efeb;
  --text: #101216;
  --text-muted: #4d525b;
  --line: rgba(16, 18, 22, 0.12);
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #ffffff;
  --accent: #1d4ed8;
  --accent-soft: #ed724f;
  --radius: 8px;
  --shadow-soft: 0 16px 32px rgba(31, 42, 68, 0.08);
  --shell: min(1120px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

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

a {
  color: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.ambient-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.ambient-blob {
  position: absolute;
  filter: blur(40px);
  opacity: 0.86;
  pointer-events: none;
}

.ambient-blob-1 {
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, 85vw);
  aspect-ratio: 2.6 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 15% 45%, rgba(134, 196, 192, 0.44), transparent 46%),
    radial-gradient(circle at 51% 39%, rgba(238, 127, 92, 0.65), transparent 52%),
    radial-gradient(circle at 85% 25%, rgba(46, 79, 140, 0.66), transparent 44%);
}

.ambient-blob-2 {
  right: -90px;
  bottom: -110px;
  width: min(460px, 55vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 38%, rgba(250, 199, 180, 0.46), transparent 48%),
    radial-gradient(circle at 60% 65%, rgba(178, 204, 255, 0.55), transparent 55%);
}

.ambient-noise {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(19, 27, 44, 0.04) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  opacity: 0.25;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 9;
  backdrop-filter: saturate(120%) blur(8px);
  background: linear-gradient(180deg, rgba(246, 246, 244, 0.86), rgba(246, 246, 244, 0.54));
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(13, 18, 30, 0.28);
  border-radius: 50%;
  font-weight: 600;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.top-nav a {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: #333842;
  border: 1px solid transparent;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  border-color: rgba(13, 18, 30, 0.16);
  background-color: rgba(255, 255, 255, 0.8);
  outline: none;
}

.top-nav a.is-active {
  border-color: rgba(13, 18, 30, 0.26);
  background-color: rgba(255, 255, 255, 0.95);
  color: #101216;
}

main {
  padding-block: 24px 70px;
}

.hero {
  min-height: calc(68dvh - 74px);
  display: grid;
  align-content: center;
  gap: 20px;
  position: relative;
  padding-block: 36px 96px;
}

.hero-kicker {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #666e7b;
  margin: 0;
}

.hero-title {
  margin: 0;
  font-family: "Didot", "Times New Roman", "STSong", serif;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.05;
  max-width: 14ch;
}

.hero-subtitle {
  margin: 0;
  max-width: 580px;
  color: var(--text-muted);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-signature {
  position: absolute;
  left: 0;
  bottom: 32px;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #525865;
}

.section {
  padding-block: 30px 26px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-family: "Didot", "Times New Roman", "STSong", serif;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.1;
}

.inline-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #384352;
  font-size: 14px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 100%;
}

.feature-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.feature-meta {
  padding: 14px;
}

.feature-meta h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.feature-meta p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 14px;
}

.page-head {
  padding: 30px 0 18px;
}

.page-head h1 {
  margin: 6px 0 10px;
  font-family: "Didot", "Times New Roman", "STSong", serif;
  font-size: clamp(36px, 4.3vw, 62px);
  line-height: 1.06;
}

.page-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.7;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-solid);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  min-height: 280px;
  box-shadow: var(--shadow-soft);
  align-items: stretch;
}

.project-cover {
  margin: 0;
  border-right: 1px solid var(--line);
  background: #eff2f8;
  overflow: hidden;
  height: clamp(260px, 32vw, 380px);
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.project-body {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-body h2 {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.26;
}

.project-body p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
}

.tags li {
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 999px;
  color: #2c3340;
  background: #f8fafc;
}

.project-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.btn-primary {
  background: #15181d;
  color: #f8f8f7;
  border-color: #15181d;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #222831;
  border-color: #222831;
}

.btn-ghost {
  border-color: rgba(16, 18, 22, 0.22);
  background: rgba(255, 255, 255, 0.86);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: rgba(16, 18, 22, 0.4);
  background: #ffffff;
}

.btn-text {
  padding-inline: 4px;
  color: #1a2f63;
}

.about-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.about-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.about-block h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.7;
}

.paper-cover {
  background: #f7f7f6;
}

.site-footer {
  padding-bottom: 34px;
}

.site-footer p {
  margin: 0;
  border-top: 1px solid var(--line);
  color: #60697a;
  font-size: 13px;
  padding-top: 14px;
}

.media-modal {
  width: min(1140px, calc(100vw - 30px));
  max-width: 1140px;
  border: none;
  border-radius: 10px;
  padding: 0;
  background: #f4f5f7;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.32);
}

.media-modal::backdrop {
  background: rgba(7, 11, 21, 0.72);
  backdrop-filter: blur(2px);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(16, 18, 22, 0.25);
  background: rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.modal-close i {
  width: 16px;
  height: 16px;
}

.modal-content {
  min-height: 500px;
}

.modal-content > img,
.modal-content > iframe {
  width: 100%;
  height: min(78dvh, 860px);
  object-fit: contain;
  border: 0;
  background: #ffffff;
}

.modal-gallery {
  width: 100%;
  height: min(78dvh, 860px);
  overflow: auto;
  background: #ffffff;
  padding: 10px;
}

.modal-gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.modal-gallery img + img {
  margin-top: 10px;
}

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

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

@media (max-width: 960px) {
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-cover {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    height: 230px;
  }

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

@media (max-width: 700px) {
  :root {
    --shell: min(1120px, calc(100vw - 28px));
  }

  .nav-wrap {
    height: auto;
    padding-block: 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    gap: 8px;
  }

  .top-nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero {
    min-height: calc(62dvh - 74px);
    padding-bottom: 64px;
  }

  .hero-signature {
    bottom: 18px;
  }

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

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
