:root {
  --bg: #f6f3ee;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: #ffffff;
  --text: #1b1a18;
  --muted: #69635c;
  --line: rgba(27, 26, 24, 0.12);
  --accent: #ff6b3d;
  --accent-2: #0ea5a2;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 20px 50px rgba(14, 12, 9, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 107, 61, 0.24), transparent 38%),
    radial-gradient(circle at 86% 20%, rgba(14, 165, 162, 0.18), transparent 32%),
    radial-gradient(circle at 60% 82%, rgba(255, 205, 127, 0.24), transparent 42%),
    linear-gradient(160deg, #f8f5f0 0%, #f4efe7 100%);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(23, 21, 19, 0.02) 0,
    rgba(23, 21, 19, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.topbar,
main,
.footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 9;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.56);
}

.brand {
  font-family: "Syne", "Noto Sans SC", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.topbar nav {
  display: flex;
  gap: 22px;
}

.topbar nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.93rem;
}

.topbar nav a:hover {
  color: var(--accent);
}

.ghost-btn {
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  font-size: 0.9rem;
}

main {
  padding: 42px 0 60px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 26px;
  align-items: end;
}

.badge {
  grid-column: 1 / -1;
  margin: 0;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Syne", "Noto Sans SC", sans-serif;
  font-size: clamp(2.2rem, 8vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(90deg, #0f766e, #ff6b3d 54%, #b91c1c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  margin: 12px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.solid-btn,
.link-btn {
  text-decoration: none;
}

.solid-btn {
  background: linear-gradient(120deg, #ff7a4d, #ff5c2f);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(255, 107, 61, 0.32);
}

.link-btn {
  color: var(--text);
  padding: 11px 0;
  font-weight: 600;
}

.hero-panel {
  align-self: stretch;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-panel ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.hero-panel li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #faf9f7;
}

section {
  margin-top: 78px;
}

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

.section-head p {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.section-head h2 {
  margin: 5px 0 0;
  font-family: "Syne", "Noto Sans SC", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.7rem);
}

.feature-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  box-shadow: var(--shadow);
}

.feature-cover {
  padding: 26px;
  min-height: 240px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 174, 123, 0.55), transparent 46%),
    linear-gradient(130deg, #0f766e, #155e75 38%, #102129);
  color: #fff;
}

.feature-cover span {
  font-family: "Syne", sans-serif;
  font-size: 0.95rem;
  opacity: 0.82;
}

.feature-cover h3 {
  margin: 22px 0 6px;
  font-family: "Syne", "Noto Sans SC", sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  line-height: 0.95;
}

.feature-cover p {
  margin: 0;
  opacity: 0.9;
}

.feature-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.feature-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.meta-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-tags span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #faf7f2;
  font-size: 0.86rem;
}

.section-head.compact {
  align-items: start;
}

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

.filter {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
}

.filter.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

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

.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
  box-shadow: 0 10px 30px rgba(23, 18, 13, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(23, 18, 13, 0.12);
}

.work-card h3 {
  margin: 12px 0 6px;
  font-family: "Syne", "Noto Sans SC", sans-serif;
  font-size: 1.23rem;
}

.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.work-card span {
  margin-top: 12px;
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.thumb {
  height: 156px;
  border-radius: 12px;
}

.project-thumb {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1e242c;
  cursor: zoom-in;
}

.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 182, 116, 0.16), transparent 44%),
    linear-gradient(150deg, rgba(16, 20, 28, 0.26), rgba(8, 12, 18, 0.44));
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.work-card:hover .project-thumb::after {
  opacity: 0.2;
}

.web-a {
  background-image:
    linear-gradient(140deg, rgba(12, 54, 62, 0.46), rgba(20, 28, 34, 0.52)),
    radial-gradient(circle at 14% 18%, rgba(255, 160, 102, 0.26), transparent 44%),
    url("../images/huabu.png");
  background-size: cover, cover, contain;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-color: #102129;
  filter: saturate(1.04) contrast(1.02);
}

.web-b {
  background: linear-gradient(130deg, #14b8a6, #0ea5e9 50%, #1d4ed8);
}

.mini-a {
  background: linear-gradient(120deg, #fbbf24, #ef4444);
}

.mini-b {
  background: linear-gradient(120deg, #22c55e, #0891b2);
}

.game-a {
  background-image:
    linear-gradient(145deg, rgba(18, 22, 32, 0.4), rgba(16, 41, 55, 0.34)),
    radial-gradient(circle at 12% 16%, rgba(255, 183, 120, 0.24), transparent 42%);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-color: #17212c;
}

.game-b {
  background: linear-gradient(120deg, #2563eb, #0d9488, #84cc16);
}

.work-card:hover .thumb {
  filter: none;
}

.work-card:hover .web-a {
  background-image: url("../images/huabu.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.work-card:hover .game-a {
  background-image:
    linear-gradient(145deg, rgba(18, 22, 32, 0.4), rgba(16, 41, 55, 0.34)),
    radial-gradient(circle at 12% 16%, rgba(255, 183, 120, 0.24), transparent 42%);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.work-card.hidden {
  display: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.about-grid p {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  color: #3d3934;
}

.footer {
  margin: 28px auto 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.footer p,
.footer a {
  margin: 0;
  color: var(--muted);
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (max-width: 980px) {
  .hero,
  .feature-card,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel {
    min-height: auto;
  }

  .section-head.compact {
    align-items: end;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .topbar {
    width: min(1120px, calc(100% - 20px));
    gap: 8px;
    padding: 8px 10px;
  }

  .topbar nav {
    display: none;
  }

  main,
  .footer {
    width: min(1120px, calc(100% - 20px));
  }

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

  .hero-actions {
    flex-wrap: wrap;
  }

  .footer {
    flex-direction: column;
  }
}








.preview-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.preview-lightbox[hidden] {
  display: none;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(247, 125, 71, 0.2), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(65, 193, 189, 0.16), transparent 30%),
    rgba(8, 10, 12, 0.8);
  backdrop-filter: blur(8px);
}

.preview-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 48px));
  height: min(860px, calc(100vh - 48px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(22, 28, 36, 0.96), rgba(13, 18, 24, 0.98));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.55);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "top"
    "main"
    "thumbs";
  gap: 12px;
}

.preview-dialog.with-introduction {
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "top top"
    "main side"
    "thumbs side";
  column-gap: 14px;
}

.preview-topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-right: 48px;
}

.preview-meta {
  margin: 0;
  color: rgba(241, 245, 250, 0.95);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.preview-count {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(241, 245, 250, 0.88);
  font-size: 0.82rem;
}

.preview-main {
  grid-area: main;
  position: relative;
  min-height: 0;
  min-width: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 14% 14%, rgba(245, 122, 67, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(17, 23, 31, 0.95), rgba(10, 14, 19, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-image {
  display: block;
  width: calc(100% - 42px);
  height: calc(100% - 42px);
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.18s ease, transform 0.22s ease, filter 0.22s ease;
}

.preview-image.is-switching {
  opacity: 0.2;
  transform: scale(0.986);
  filter: blur(1px);
}

.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.84);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.preview-nav.prev {
  left: 12px;
}

.preview-nav.next {
  right: 12px;
}

.preview-nav:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.04);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(18, 24, 32, 0.94);
}

.preview-nav:disabled {
  opacity: 0.33;
  cursor: not-allowed;
}

.preview-thumbs {
  grid-area: thumbs;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  min-height: 0;
  scrollbar-width: thin;
}

.preview-thumb {
  flex: 0 0 104px;
  width: 104px;
  height: 66px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0;
  background: rgba(15, 21, 29, 0.96);
  cursor: pointer;
  opacity: 0.72;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.preview-thumb:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.preview-thumb.active {
  border-color: rgba(255, 255, 255, 0.92);
  opacity: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-instruction {
  grid-area: side;
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px 14px 12px;
  max-height: none;
  overflow: auto;
  display: none;
  background: linear-gradient(180deg, rgba(25, 32, 41, 0.94), rgba(14, 20, 28, 0.96));
}

.preview-dialog.with-introduction .preview-instruction {
  display: block;
}

.preview-instruction h4 {
  margin: 0 0 10px;
  color: rgba(245, 248, 252, 0.96);
  font-size: 1rem;
  line-height: 1.4;
}

.preview-instruction p {
  margin: 0;
  color: rgba(224, 232, 241, 0.9);
  font-size: 0.92rem;
  line-height: 1.72;
  white-space: pre-wrap;
}

.preview-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.84);
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.preview-close:hover {
  transform: scale(1.04);
  background: rgba(20, 26, 34, 0.95);
}

.preview-trigger {
  cursor: zoom-in;
}

@media (max-width: 640px) {
  .preview-dialog {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    padding: 10px;
    gap: 10px;
  }

  .preview-dialog.with-introduction {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "top"
      "main"
      "side"
      "thumbs";
    column-gap: 0;
  }

  .preview-dialog.with-introduction .preview-instruction {
    padding: 10px;
    max-height: 130px;
  }

  .preview-topbar {
    padding-right: 40px;
  }

  .preview-meta {
    font-size: 0.82rem;
  }

  .preview-nav {
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
  }

  .preview-image {
    width: calc(100% - 28px);
    height: calc(100% - 28px);
  }

  .preview-thumb {
    flex-basis: 88px;
    width: 88px;
    height: 56px;
  }
}












