:root {
  color-scheme: dark;
  --ink: #f8efe0;
  --muted: #c8d0d7;
  --dim: #8f9cac;
  --line: rgba(248, 239, 224, 0.16);
  --paper: #efe2ca;
  --blue-950: #07111f;
  --blue-900: #0b192b;
  --blue-800: #112843;
  --blue-700: #163a5c;
  --warm: #d8a263;
  --rust: #b86947;
  --green: #78936f;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(7, 17, 31, 0.8), rgba(7, 17, 31, 0.94)),
    url("assets/profile/网页背景色调参考.JPG") center top / cover fixed,
    var(--blue-950);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 14% 20%, rgba(216, 162, 99, 0.16), transparent 24rem);
  background-size: 100% 8px, auto;
  mix-blend-mode: soft-light;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-weight: 800;
}

.brand span:first-child {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 1.35rem;
}

.brand span:last-child {
  color: var(--warm);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: clamp(0.9rem, 3vw, 2.2rem);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

nav a:hover {
  color: var(--ink);
}

main {
  overflow: hidden;
}

.hero {
  min-height: calc(100vh - 4.2rem);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 5vw, 4rem);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(46vw, 43rem);
  margin-left: clamp(0rem, 1.2vw, 1.5rem);
  padding: clamp(1.4rem, 2.6vw, 2.5rem);
  border: 1px solid rgba(248, 239, 224, 0.2);
  border-radius: var(--radius);
  background: rgba(7, 17, 31, 0.36);
  box-shadow: 0 1.6rem 5rem rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(2px);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.9) contrast(1.04) brightness(0.82);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.34) 0%, rgba(7, 17, 31, 0.24) 36%, rgba(7, 17, 31, 0.1) 62%, rgba(7, 17, 31, 0.16) 100%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.12), rgba(7, 17, 31, 0.38));
}

.hero-caption {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 2;
  margin: 0;
  color: rgba(248, 239, 224, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1,
h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  font-weight: 700;
}

h1 {
  max-width: 9em;
  font-size: clamp(2.2rem, 4.2vw, 4.4rem);
  line-height: 1.08;
}

h1 span {
  display: block;
}

.title-indent {
  padding-left: 2em;
}

h2 {
  font-size: clamp(2.3rem, 5.6vw, 5rem);
  line-height: 1;
}

h3 {
  font-size: 1.2rem;
}

.identity {
  margin: 1.1rem 0 0;
  color: var(--paper);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 800;
}

.intro {
  max-width: 39rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 1.05rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  background: var(--paper);
  color: var(--blue-950);
}

.button.ghost {
  color: var(--paper);
}

.button.pending {
  border-style: dashed;
  color: var(--dim);
}

.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 5vw, 4rem);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.work-card {
  min-width: 0;
}

.work-card.featured {
  grid-column: span 2;
}

.poster {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(248, 239, 224, 0.18);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-position: center;
  background-size: cover;
  transition: transform 180ms ease, border-color 180ms ease;
}

.poster:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 239, 224, 0.46);
}

.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22) 1px, transparent 1px);
  background-size: 100% 7px, 5px 100%;
  mix-blend-mode: soft-light;
}

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56%;
  background: linear-gradient(180deg, transparent, rgba(7, 17, 31, 0.9));
}

.cover-moon {
  background-image:
    linear-gradient(180deg, rgba(7, 17, 31, 0.03), rgba(7, 17, 31, 0.18)),
    url("assets/works/中秋快乐/《中秋快乐》封面.jpg");
}

.cover-future {
  background-image:
    linear-gradient(180deg, rgba(7, 17, 31, 0.03), rgba(7, 17, 31, 0.16)),
    url("assets/works/未来赞美诗/未来赞美诗封面.jpg");
}

.cover-star {
  background-image:
    linear-gradient(180deg, rgba(7, 17, 31, 0.02), rgba(7, 17, 31, 0.16)),
    url("assets/works/星河入梦/星河入梦封面.jpg");
}

.cover-chicken {
  background-image:
    linear-gradient(180deg, rgba(7, 17, 31, 0.04), rgba(7, 17, 31, 0.18)),
    url("assets/works/北京的鸡/北京的鸡封面.JPG");
}

.cover-shadow {
  background-image:
    linear-gradient(180deg, rgba(7, 17, 31, 0.05), rgba(7, 17, 31, 0.18)),
    url("assets/works/暗香/暗香AI海报-带片名.png");
}

.cover-coconut {
  background-image:
    linear-gradient(180deg, rgba(7, 17, 31, 0.03), rgba(7, 17, 31, 0.18)),
    url("assets/works/公交牌椰汁/公交牌椰汁封面.jpg");
}

.cover-ai {
  background-image:
    linear-gradient(180deg, rgba(7, 17, 31, 0.03), rgba(7, 17, 31, 0.18)),
    url("assets/works/I-AM/IAM封面.png");
}

.cover-shadow,
.cover-ai {
  background-position: center;
}

.role {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 2;
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 800;
}

.cover-coconut .role {
  color: var(--blue-900);
}

.play-mark {
  position: relative;
  z-index: 2;
  width: 4.8rem;
  height: 4.8rem;
  border: 1px solid rgba(248, 239, 224, 0.58);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(7, 17, 31, 0.28);
  font-size: 0.82rem;
  font-weight: 800;
}

.work-meta {
  padding-top: 1rem;
}

.work-meta p {
  color: var(--muted);
  line-height: 1.65;
}

.work-meta p:first-child {
  margin: 0 0 0.5rem;
  color: var(--dim);
  font-size: 0.82rem;
  font-weight: 700;
}

.resume {
  background: rgba(7, 17, 31, 0.66);
}

.resume-timeline {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

.resume-timeline::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  left: min(27vw, 19rem);
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(248, 239, 224, 0.26), transparent);
}

.resume-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(8rem, 0.27fr) 2.5rem minmax(0, 0.73fr);
  gap: clamp(1rem, 2.4vw, 2.4rem);
  align-items: center;
  min-height: 12rem;
  padding: clamp(1.5rem, 3.2vw, 2.8rem) 0;
}

.resume-logo {
  justify-self: center;
  width: clamp(6.5rem, 13vw, 10rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(248, 239, 224, 0.22);
  border-radius: 28%;
  overflow: hidden;
  background: rgba(248, 239, 224, 0.92);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
}

.resume-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: drop-shadow(0 1rem 2rem rgba(0, 0, 0, 0.2));
}

.resume-node {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 1.05rem;
  height: 1.05rem;
  border: 4px solid rgba(248, 239, 224, 0.28);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 0.55rem rgba(248, 239, 224, 0.08);
}

.resume-copy {
  max-width: 46rem;
}

.resume-org {
  margin: 0 0 0.55rem;
  color: var(--dim);
  font-size: clamp(0.92rem, 1.35vw, 1.08rem);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.resume-copy h3 {
  color: var(--ink);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  font-size: clamp(1.95rem, 3.8vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
}

.resume-title-compact {
  white-space: nowrap;
}

.resume-meta {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: clamp(0.92rem, 1.45vw, 1.14rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.about {
  padding-top: clamp(3rem, 7vw, 6rem);
}

.about-panel {
  display: grid;
  grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid rgba(248, 239, 224, 0.18);
  border-radius: var(--radius);
  background: rgba(239, 226, 202, 0.08);
}

.about-copy p {
  margin-top: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.85;
}

.contact-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

#contact-value {
  color: var(--paper);
  font-size: 1.15rem;
  font-weight: 900;
}

.film-dialog {
  width: min(66rem, calc(100vw - 2rem));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: #081320;
  color: var(--ink);
}

.film-dialog::backdrop {
  background: rgba(0, 0, 0, 0.76);
}

.film-dialog[open] {
  display: grid;
  grid-template-columns: minmax(16rem, 0.54fr) minmax(0, 0.46fr);
  gap: 1.4rem;
}

.close-dialog {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(7, 17, 31, 0.72);
  color: var(--ink);
  cursor: pointer;
}

.video-shell {
  min-height: 22rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, #132641, #07111f);
}

.video-shell iframe {
  width: 100%;
  height: 100%;
  min-height: 22rem;
  border: 0;
  display: block;
}

.video-fallback {
  height: 100%;
  min-height: 22rem;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.dialog-copy {
  padding: 0.4rem 0.4rem 0.4rem 0;
}

#dialog-description,
.dialog-awards {
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-line;
}

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

@media (max-width: 860px) {
  .about-panel,
  .film-dialog[open] {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: calc(100vh - 5rem);
    align-items: end;
  }

  .hero-copy {
    width: min(100%, 38rem);
    margin-left: 0;
  }

  .hero-image {
    object-position: 62% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(7, 17, 31, 0.52), rgba(7, 17, 31, 0.22)),
      linear-gradient(180deg, rgba(7, 17, 31, 0.08), rgba(7, 17, 31, 0.72));
  }

  .hero-caption {
    display: none;
  }

  .section-head {
    display: block;
  }

}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .work-grid,
  .work-card.featured {
    display: block;
  }

  .work-card + .work-card {
    margin-top: 2rem;
  }

  .resume-timeline::before {
    left: 4.4rem;
  }

  .resume-timeline li {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    min-height: auto;
    padding-left: 6.1rem;
  }

  .resume-logo {
    position: absolute;
    left: 0;
    top: 1.8rem;
    width: 3.8rem;
  }

  .resume-node {
    position: absolute;
    left: 3.9rem;
    top: 3.15rem;
  }

  .resume-copy h3 {
    font-size: clamp(1.85rem, 8.5vw, 2.7rem);
  }

  .resume-copy .resume-title-compact {
    font-size: clamp(1.38rem, 6.6vw, 2.12rem);
  }

  .resume-download {
    margin-top: 1rem;
  }
}
