:root {
  color-scheme: dark;
  --background: #141312;
  --surface: #1d1c1a;
  --text: #f2efe9;
  --muted: #a49c90;
  --line: rgba(242, 239, 233, 0.12);
  --max-width: 1180px;
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(242, 239, 233, 0.92);
  color: #141312;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(20, 19, 18, 0.88);
  backdrop-filter: blur(18px);
}

.site-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

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

.hero {
  padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 64px) 0;
}

.hero-media {
  position: relative;
  height: clamp(380px, 74vh, 780px);
  overflow: hidden;
  background: var(--surface);
}

.hero-media::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 130px;
  background: linear-gradient(180deg, rgba(20, 19, 18, 0) 0%, rgba(20, 19, 18, 0.45) 100%);
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 7.5s ease;
  pointer-events: none;
  user-select: none;
}

.hero-slide.active img {
  transform: scale(1);
}

.hero-dots {
  position: absolute;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(14px, 2.4vw, 22px);
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(242, 239, 233, 0.38);
  cursor: pointer;
  transition: width 0.35s ease, background 0.35s ease;
}

.hero-dot.active {
  width: 24px;
  background: var(--text);
}

.hero-dot:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

.hero-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 clamp(42px, 7vw, 84px);
  border-bottom: 1px solid var(--line);
}

.hero-kicker {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero-title {
  margin: 10px 0 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
}

.hero-link {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-link:hover {
  color: var(--text);
  border-color: var(--text);
}

.hero-titles {
  display: grid;
  min-width: 0;
}

.hero-text {
  grid-area: 1 / 1;
  min-width: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-text.active {
  opacity: 1;
}

.section {
  padding: clamp(56px, 9vw, 110px) clamp(20px, 5vw, 64px);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: clamp(30px, 5vw, 52px);
}

.section-title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.section-link {
  color: var(--muted);
  font-size: 0.88rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.card {
  display: block;
}

.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--media-ratio, 3 / 2);
  overflow: hidden;
  background: var(--surface);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.media-shield {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.card:hover .media-frame img {
  transform: scale(1);
}

.card-meta {
  margin-top: 16px;
}

.card-title {
  font-size: 1rem;
  font-weight: 500;
}

.card-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
}

.page {
  min-height: 62vh;
  padding: clamp(38px, 7vw, 84px) clamp(20px, 5vw, 64px) clamp(70px, 10vw, 120px);
}

.page-heading {
  max-width: var(--max-width);
  margin: 0 auto clamp(34px, 6vw, 64px);
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 500;
}

.page-heading p {
  margin: 12px 0 0;
  max-width: 680px;
  color: var(--muted);
}

.content-grid,
.project-list {
  max-width: var(--max-width);
  margin: 0 auto;
}

.project-item {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  padding: clamp(30px, 5vw, 54px) 0;
  border-bottom: 1px solid var(--line);
}

.project-info h2 {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 500;
}

.project-info p {
  margin: 0;
  color: var(--muted);
}

.project-meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.article {
  max-width: 920px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: clamp(32px, 6vw, 64px);
}

.article-header h1 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
}

.article-meta {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.article-body {
  max-width: 680px;
  margin: clamp(36px, 6vw, 64px) auto;
  font-size: 1.02rem;
}

.article-body p {
  margin: 0 0 1.6em;
}

.photo-figure {
  margin: 0 0 clamp(34px, 5vw, 54px);
}

.photo-figure figcaption {
  max-width: 680px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 72px);
  max-width: var(--max-width);
  margin: 0 auto;
}

.about-name {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 500;
}

.about-role {
  margin: 12px 0 0;
  color: var(--muted);
}

.about-text p {
  margin: 0 0 1.5em;
  font-size: 1.02rem;
}

.contact-list {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.contact-label {
  color: var(--muted);
}

.empty-state {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: clamp(34px, 5vw, 54px) clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (max-width: 860px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-item {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 580px) {
  .site-header {
    min-height: 64px;
  }

  .site-title {
    font-size: 0.98rem;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 0.84rem;
  }

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

  .hero-media {
    height: clamp(300px, 56vh, 460px);
  }

  .hero-intro {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide img,
  .hero-text {
    transition: none;
  }

  .hero-slide img {
    transform: none;
  }
}
