﻿:root {
  --ink: #101a25;
  --muted: #657080;
  --paper: #f4f6f3;
  --surface: #ffffff;
  --deep: #08131f;
  --navy: #17334f;
  --blue: #2e74b8;
  --teal: #249b91;
  --mint: #dceee6;
  --amber: #f5b946;
  --coral: #db6b58;
  --line: rgba(16, 26, 37, 0.13);
  --line-dark: rgba(255, 255, 255, 0.15);
  --title-fade-unified: linear-gradient(180deg, #ffffff 0%, #eef4f7 18%, #becad2 40%, #6d7d88 66%, rgba(30, 43, 54, 0.72) 100%);
  --title-cn-metal: linear-gradient(180deg, #ffffff 0%, #edf4f7 18%, #ccd7dd 38%, #7b8b96 62%, #263744 100%);
  --skill-en-metal: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(229, 236, 240, 0.68) 24%, rgba(174, 187, 196, 0.38) 56%, rgba(64, 78, 90, 0.1) 100%);
  --title-fade-light: var(--title-fade-unified);
  --title-fade-dark: var(--title-fade-unified);
  --title-cn-light: #f2f4f4;
  --title-cn-dark: #303741;
  --section-tech-blue: #071522;
  --title-depth-shadow: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16)) drop-shadow(0 13px 20px rgba(0, 0, 0, 0.48));
  --radius: 8px;
  --shadow: 0 28px 70px rgba(12, 32, 52, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--section-tech-blue);
  background-size: 48px 48px;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  line-height: 1.68;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px clamp(12px, 2.2vw, 34px);
  color: #f9fbf7;
  background: rgba(8, 19, 31, 0.82);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(18px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-actions::-webkit-scrollbar {
  display: none;
}

.nav-button,
.filter-button,
.action-button,
.text-button {
  border-radius: var(--radius);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    font-size 180ms ease;
}

.nav-button {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 12px;
  color: rgba(249, 251, 247, 0.72);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 760;
}

.auth-button,
.register-button,
.logout-button,
.modal-close,
.delete-button {
  border-radius: var(--radius);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.auth-button,
.register-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 8px 15px;
  color: #f8fbf4;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-actions .logout-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 8px 15px;
  color: #f8fbf4;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.header-actions .logout-button:hover {
  color: var(--deep);
  background: #75e4ff;
  border-color: #75e4ff;
  box-shadow: 0 14px 28px rgba(117, 228, 255, 0.18);
  transform: translateY(-1px);
}

.header-actions .logout-button[hidden] {
  display: none;
}

.auth-button:hover,
.register-button:hover,
.auth-button.is-logged-in {
  color: var(--deep);
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 14px 28px rgba(245, 185, 70, 0.18);
  transform: translateY(-1px);
}

.register-button[hidden] {
  display: none;
}

.nav-button::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 4px;
  left: 12px;
  height: 2px;
  background: var(--amber);
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.nav-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-button.is-active {
  color: var(--deep);
  background: var(--amber);
  border-color: var(--amber);
  font-size: 1.02rem;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(245, 185, 70, 0.18);
}

.nav-button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
  background: rgba(8, 19, 31, 0.42);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: clamp(84px, 10vw, 128px) clamp(22px, 6vw, 92px) clamp(76px, 8vw, 96px);
  background: var(--deep);
  --hero-pan-x: 0px;
  --hero-pan-y: 0px;
  --poster-wash-x: 14%;
  --poster-wash-y: 18%;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  z-index: 1;
  background:
    radial-gradient(circle at var(--poster-wash-x) var(--poster-wash-y), rgba(255, 92, 183, 0.42), transparent 30%),
    radial-gradient(circle at 82% 62%, rgba(69, 202, 255, 0.34), transparent 34%),
    linear-gradient(120deg, rgba(255, 188, 53, 0.18), transparent 42%, rgba(29, 148, 255, 0.16));
  mix-blend-mode: screen;
  opacity: 0.86;
  will-change: opacity, transform;
}

.hero::after {
  z-index: 2;
  background:
    linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.08) 45%, transparent 58%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 92px);
  opacity: 0.34;
  transform: translateX(-14%);
  will-change: transform, opacity;
}

.hero-art,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  z-index: 0;
  object-fit: cover;
  object-position: calc(54% + var(--hero-pan-x)) calc(50% + var(--hero-pan-y));
  transform: scale(1.025);
  transition: object-position 260ms ease-out;
}

.hero-shade {
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(3, 9, 16, 0.96) 0%, rgba(6, 16, 27, 0.88) 37%, rgba(6, 16, 27, 0.54) 62%, rgba(6, 16, 27, 0.16) 88%),
    linear-gradient(180deg, rgba(3, 9, 16, 0.08), rgba(3, 9, 16, 0.54));
}

.hero-content {
  position: relative;
  z-index: 4;
  width: min(980px, 100%);
  color: #fff;
  opacity: 1;
  transform: translateY(0);
}

.admin-inline-form {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 24px;
  padding: 18px;
  color: #f4f8f6;
  background: rgba(4, 12, 20, 0.72);
  border: 1px solid rgba(117, 228, 255, 0.22);
  border-radius: var(--radius);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 20px 58px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
}

.admin-inline-form[hidden] {
  display: none;
}

.hero-admin-form {
  grid-template-columns: minmax(420px, 1.08fr) minmax(320px, 0.92fr);
  width: min(1120px, calc(100% - clamp(44px, 12vw, 184px)));
  margin-right: auto;
  margin-left: clamp(22px, 6vw, 92px);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
}

.hero-admin-form h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-admin-form h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(117, 228, 255, 0.42), transparent);
}

.hero-admin-group {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(117, 228, 255, 0.08), transparent 46%),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(117, 228, 255, 0.16);
  border-radius: var(--radius);
}

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

.hero-admin-copy label:last-child {
  grid-column: 1 / -1;
}

.hero-admin-media {
  align-content: start;
}

.hero-admin-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr);
  justify-content: end;
}

.admin-inline-form h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #f4f8f6;
  font-size: 1.18rem;
}

.admin-inline-form label {
  display: grid;
  gap: 7px;
  color: rgba(244, 248, 246, 0.78);
  font-weight: 850;
}

.form-hint {
  color: rgba(180, 205, 214, 0.72);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.45;
}

.admin-inline-form .checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.admin-inline-form .checkbox-field input {
  width: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: #75e4ff;
}

.admin-inline-form input,
.admin-inline-form textarea,
.admin-inline-form select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: #f4f7f5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  font: inherit;
}

.document-edit-form label select,
.game-admin-form label select,
.admin-inline-form label select {
  color: #f8fbf4;
  background-color: #142230;
  border-color: rgba(117, 228, 255, 0.38);
  font-weight: 900;
  color-scheme: dark;
}

.document-edit-form label select:focus,
.game-admin-form label select:focus,
.admin-inline-form label select:focus {
  outline: 2px solid rgba(117, 228, 255, 0.32);
  outline-offset: 2px;
  border-color: #75e4ff;
}

.document-edit-form label select option,
.game-admin-form label select option,
.admin-inline-form label select option {
  color: #f8fbf4;
  background: #07131f;
  font-weight: 900;
}

.document-edit-form label select option:checked,
.game-admin-form label select option:checked,
.admin-inline-form label select option:checked {
  color: #02111e;
  background: #75e4ff;
}

.admin-inline-form textarea {
  resize: vertical;
}

.admin-inline-form .wide-field {
  grid-column: span 2;
}

.eyebrow,
.section-kicker,
.section-label span,
.work-topline,
.project-meta,
.skill-mark {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 -0.08em;
  color: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.95rem, 3.5vw, 3.85rem);
  font-weight: 900;
  line-height: 0.9;
  background: var(--title-fade-light);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.42));
  -webkit-text-stroke: 0;
  -webkit-text-fill-color: transparent;
}

.hero h1 {
  margin: 0;
  color: #f7fbff;
  font-size: clamp(3.3rem, 7.4vw, 7.1rem);
  line-height: 1;
  font-weight: 950;
  word-break: keep-all;
  background: none;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  -webkit-text-fill-color: currentColor;
}

.hero-copy {
  width: min(830px, 100%);
  margin: 18px 0 0;
  color: rgba(244, 248, 246, 0.9);
  font-size: clamp(1.06rem, 1.6vw, 1.24rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.48);
}

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

.action-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid transparent;
  font-weight: 900;
}

.action-button.primary {
  color: var(--deep);
  background: var(--amber);
  box-shadow: 0 16px 32px rgba(245, 185, 70, 0.24);
}

.action-button.primary::after {
  content: "";
  position: absolute;
  top: -64%;
  left: -42%;
  width: 42%;
  height: 230%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  transform: rotate(18deg) translateX(-160%);
  transition: transform 520ms ease;
}

.action-button.primary:hover {
  color: #fff;
  background: var(--coral);
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(219, 107, 88, 0.28);
}

.action-button.primary:hover::after {
  transform: rotate(18deg) translateX(420%);
}

.action-button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.36);
}

.action-button.secondary:hover {
  color: var(--deep);
  background: var(--mint);
  border-color: var(--mint);
  transform: translateY(-2px);
}

.action-button.danger {
  color: #ffd7d2;
  background: rgba(255, 93, 76, 0.1);
  border-color: rgba(255, 128, 112, 0.42);
}

.action-button.danger:hover {
  color: #1b0806;
  background: #ff8a7a;
  border-color: #ff8a7a;
  transform: translateY(-2px);
}

.action-button:disabled {
  color: rgba(244, 248, 246, 0.42);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.section {
  position: relative;
  padding: clamp(70px, 9vw, 116px) clamp(20px, 6vw, 92px);
  color: #f4f7f5;
  background: var(--section-tech-blue);
}

.section-label {
  display: grid;
  gap: 8px;
  align-items: start;
  margin-bottom: 34px;
  color: var(--muted);
}

.section-label span {
  margin-bottom: 0;
  color: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 3.2rem);
  font-weight: 950;
  line-height: 0.92;
  background: var(--title-fade-dark);
  -webkit-background-clip: text;
  background-clip: text;
  filter: var(--title-depth-shadow);
  -webkit-text-fill-color: transparent;
}

.section-label strong {
  color: transparent;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.08;
  background: var(--title-cn-metal);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: var(--title-depth-shadow);
  -webkit-text-fill-color: transparent;
}

.section-label::before {
  content: none;
}

.works-title h2,
.works-head p,
.project-intro p,
.contact-section p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.section > p,
.works-head p {
  color: rgba(244, 248, 246, 0.76);
}

.advantage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.advantage-card,
.work-card,
.skill-column {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  transform: translate3d(0, 0, 0);
  transition:
    background-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.motion-ready .work-card::before,
.motion-ready .skill-column::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0%, rgba(126, 228, 255, 0.18) 38%, rgba(255, 188, 53, 0.14) 52%, transparent 68%),
    radial-gradient(circle at 18% 12%, rgba(255, 92, 183, 0.12), transparent 36%);
  opacity: 0;
  transform: translateX(-24%) skewX(-8deg);
}

.motion-ready .work-card > *,
.motion-ready .skill-column > * {
  position: relative;
  z-index: 1;
}

.advantage-card::after,
.work-card::after,
.project-panel::after,
.skill-column::after {
  content: none;
}

.advantage-card:hover,
.work-card:hover,
.skill-column:hover {
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.advantage-card {
  min-height: 235px;
  padding: 28px;
}

.card-icon {
  display: inline-flex;
  color: var(--teal);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-weight: 950;
}

.advantage-card h3,
.work-card h3,
.skill-column h3,
.timeline-item strong {
  margin: 20px 0 8px;
  font-size: 1.26rem;
  line-height: 1.24;
}

.advantage-card p,
.work-card p,
.skill-column p,
.timeline-item span {
  margin: 0;
  color: var(--muted);
}

.works-section {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #fff;
  background: var(--section-tech-blue);
}

.works-title {
  margin-top: 18px;
  margin-bottom: 16px;
  padding-top: 12px;
}

.works-title span {
  display: block;
  margin: 0 0 0.12em;
  color: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.65vw, 1.9rem);
  font-weight: 950;
  line-height: 0.92;
  background: var(--title-fade-dark);
  -webkit-background-clip: text;
  background-clip: text;
  filter: var(--title-depth-shadow);
  -webkit-text-fill-color: transparent;
}

.works-title h2 {
  display: inline-block;
  margin: 0;
  color: transparent;
  font-size: clamp(1.72rem, 3.25vw, 3.15rem);
  line-height: 1.02;
  background: var(--title-cn-metal);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: var(--title-depth-shadow);
  -webkit-text-fill-color: transparent;
}

.works-head {
  width: min(920px, 100%);
  margin-bottom: 24px;
}

.works-head p {
  color: rgba(255, 255, 255, 0.7);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.filter-button {
  min-height: 42px;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.filter-button:hover {
  color: #fff;
  background: rgba(36, 155, 145, 0.22);
  border-color: rgba(36, 155, 145, 0.58);
}

.filter-button.is-active {
  color: var(--deep);
  background: var(--amber);
  border-color: var(--amber);
  font-size: 1.06rem;
  box-shadow: 0 14px 30px rgba(245, 185, 70, 0.2);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 198px;
  gap: 14px;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
}

.document-admin-panel {
  display: grid;
  grid-template-columns: minmax(280px, min(720px, 100%));
  gap: 14px;
  justify-content: center;
  margin-top: 26px;
}

.document-admin-panel[hidden] {
  display: none;
}

.document-edit-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  color: #f4f8f6;
  background: rgba(4, 12, 20, 0.58);
  border: 1px solid rgba(117, 228, 255, 0.22);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.document-edit-form h3 {
  margin: 0;
  color: #f4f8f6;
  font-size: 1.18rem;
}

.document-edit-form label {
  display: grid;
  gap: 7px;
  color: rgba(244, 248, 246, 0.76);
  font-weight: 850;
}

.document-edit-form input,
.document-edit-form select {
  min-height: 42px;
  padding: 8px 10px;
  color: #f4f7f5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  font: inherit;
}

.work-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 16px;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.work-card.featured {
  grid-row: auto;
  min-height: 0;
  background:
    linear-gradient(145deg, rgba(245, 185, 70, 0.12), transparent 42%),
    #fff;
}

.work-card.is-hidden {
  display: none;
}

.work-topline,
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--blue);
  font-size: 0.98rem;
}

.work-topline {
  margin-bottom: 0;
}

.work-card ul {
  margin: 20px 0 24px;
  padding-left: 18px;
  color: var(--ink);
  overflow: hidden;
}

.work-card h3,
.work-summary,
.work-card > p:not(.file-meta):not(.empty-card-note):not(.work-summary) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.work-card h3 {
  max-width: 15em;
  margin: 2px 0 0;
  font-size: clamp(1.04rem, 1.02vw, 1.16rem);
  line-height: 1.2;
  -webkit-line-clamp: 1;
}

.work-summary {
  max-width: 15em;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
  -webkit-line-clamp: 3;
}

.work-card > p:not(.file-meta):not(.empty-card-note):not(.work-summary) {
  -webkit-line-clamp: 3;
}

.work-card .file-meta {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  word-break: break-all;
}

.work-card .empty-card-note {
  margin-top: auto;
}

.text-button {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  padding: 8px 0;
  color: var(--blue);
  border-bottom: 2px solid rgba(46, 116, 184, 0.24);
  font-weight: 900;
}

.text-button:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
  transform: translateX(3px);
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
}

.doc-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 11px;
  color: var(--blue);
  background: rgba(46, 116, 184, 0.08);
  border: 1px solid rgba(46, 116, 184, 0.18);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.doc-action:hover {
  color: var(--deep);
  background: var(--amber);
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(245, 185, 70, 0.18);
}

.doc-action-download {
  color: #087f86;
  background: rgba(36, 155, 145, 0.1);
  border-color: rgba(36, 155, 145, 0.2);
}

.doc-action-share {
  color: #37c8ff;
  background: rgba(55, 200, 255, 0.12);
  border-color: rgba(55, 200, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.doc-action-share:hover {
  color: #07111c;
  background: linear-gradient(135deg, #79e8ff, #f5b946);
  border-color: rgba(121, 232, 255, 0.82);
  box-shadow: 0 14px 30px rgba(55, 200, 255, 0.24);
}

.doc-action:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.doc-action-delete {
  color: #fff;
  background: rgba(219, 107, 88, 0.92);
  border-color: rgba(219, 107, 88, 0.95);
}

.doc-action-delete:hover {
  color: #fff;
  background: #c85242;
  border-color: #c85242;
  box-shadow: 0 12px 24px rgba(219, 107, 88, 0.22);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 44px;
  margin-top: auto;
  padding-top: clamp(58px, 7vw, 116px);
  padding-bottom: 8px;
}

.pager[hidden] {
  display: none !important;
}

.page-button {
  width: 40px;
  height: 40px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.page-button:hover:not(:disabled) {
  color: var(--deep);
  background: var(--amber);
  border-color: var(--amber);
  transform: translateY(-2px);
}

.page-button:disabled {
  cursor: default;
  opacity: 0.32;
}

.page-status {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-width: 64px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-weight: 850;
}

.page-index-button {
  min-width: 38px;
  height: 34px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.page-index-button:hover,
.page-index-button.is-active {
  color: var(--deep);
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 12px 24px rgba(245, 185, 70, 0.18);
}

.page-index-button:hover {
  transform: translateY(-2px);
}

.upload-desk {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.6fr);
  gap: 18px;
  margin-top: 18px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.upload-desk h3 {
  margin: 8px 0 0;
  color: #fff;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
}

.upload-desk p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.66);
}

.upload-list,
.admin-list {
  display: grid;
  gap: 10px;
}

.upload-item,
.admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}

.upload-item h4,
.admin-item h4 {
  margin: 0;
  font-size: 1.05rem;
}

.upload-item p,
.admin-item p,
.file-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.file-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue);
  font-weight: 900;
}

.file-link:hover {
  color: var(--teal);
}

.empty-state {
  padding: 18px;
  color: rgba(255, 255, 255, 0.68);
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.edit-button,
.delete-button,
.logout-button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.edit-button {
  color: var(--deep);
  background: var(--mint);
}

.delete-button {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral);
}

.edit-button:hover,
.delete-button:hover,
.logout-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(12, 32, 52, 0.12);
}

.project-section {
  background: var(--section-tech-blue);
}

.project-section .section-label {
  gap: 8px;
  margin-bottom: 18px;
}

.project-carousel {
  display: grid;
  gap: 16px;
}

.project-admin-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-top: 20px;
}

.project-edit-group,
.project-edit-cards {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(117, 228, 255, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(117, 228, 255, 0.16);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.project-edit-group h4,
.project-edit-cards h4 {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #f4f8f6;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
}

.project-edit-group h4::after,
.project-edit-cards h4::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(117, 228, 255, 0.34), transparent);
}

.project-edit-main {
  grid-column: span 8;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-edit-media {
  grid-column: span 4;
  align-content: start;
}

.project-edit-media label:not(.checkbox-field) {
  padding-bottom: 2px;
}

.project-edit-media input[type="file"] {
  min-height: 46px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(117, 228, 255, 0.22);
}

.project-admin-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(132px, 0.28fr));
  gap: 12px;
  align-items: stretch;
}

.project-edit-cards {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-mini-card-edit {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 12px;
  background: rgba(2, 12, 20, 0.42);
  border: 1px solid rgba(117, 228, 255, 0.13);
  border-radius: var(--radius);
}

.project-mini-card-edit textarea {
  min-height: 86px;
}

.project-viewport {
  display: grid;
  position: relative;
}

.project-switcher {
  display: grid;
  grid-auto-columns: minmax(120px, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  width: min(760px, 74%);
  max-width: 100%;
  margin: 14px auto 0;
  padding: 0 0 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(117, 228, 255, 0.52) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.project-tab {
  height: 10px;
  padding: 0;
  background: rgba(126, 228, 255, 0.24);
  border: 1px solid rgba(126, 228, 255, 0.32);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
  transform 180ms ease;
}

.project-tab:hover {
  background: rgba(126, 228, 255, 0.48);
  border-color: rgba(126, 228, 255, 0.76);
}

.project-tab.is-active {
  background: #7ee4ff;
  border-color: #7ee4ff;
  box-shadow: 0 0 18px rgba(126, 228, 255, 0.3);
}

.project-slide {
  grid-area: 1 / 1;
}

.project-slide:not(.is-active) {
  display: none;
}

.project-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 56px);
  min-height: clamp(540px, 46vw, 680px);
  padding: clamp(42px, 6vw, 86px) clamp(34px, 6vw, 76px) clamp(34px, 5vw, 64px);
  color: #fff;
  background: var(--deep);
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.project-panel-text-only {
  justify-content: space-between;
}

.project-panel-text-only .project-content {
  width: min(760px, 54%);
  flex-basis: 54%;
}

.project-panel-text-only .timeline-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-cover,
.project-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.project-cover {
  z-index: 0;
  object-fit: cover;
  object-position: center;
  background: #030910;
  will-change: transform;
}

.project-overlay {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3, 9, 16, 0.94) 0%, rgba(3, 9, 16, 0.82) 34%, rgba(3, 9, 16, 0.46) 58%, rgba(3, 9, 16, 0.12) 100%),
    linear-gradient(180deg, rgba(3, 9, 16, 0.18), rgba(3, 9, 16, 0.58));
}

.project-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: clamp(20px, 3.2vw, 34px);
  flex: 1 1 54%;
  width: min(760px, 54%);
  margin-top: 0;
}

.project-side {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  flex: 0 1 42%;
  width: min(640px, 42%);
  min-width: 320px;
  align-content: center;
}

.project-side[hidden],
.project-media-card[hidden],
.bilibili-qr[hidden] {
  display: none;
}

.project-media-card {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(4, 12, 20, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
  will-change: clip-path, transform;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.project-media-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(3, 9, 16, 0.28), rgba(3, 9, 16, 0));
}

.project-media-card::after {
  content: none;
}

.project-media-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 28px 78px rgba(0, 0, 0, 0.42),
    0 0 26px rgba(0, 0, 0, 0.2);
}

.project-media-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #030910;
  will-change: transform;
}

.bilibili-card {
  --tilt-x: 50%;
  --tilt-y: 50%;
  --edge-x: 50%;
  --edge-y: 50%;
  --edge-opacity: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 16px;
  color: #f4f7f5;
  background: linear-gradient(135deg, rgba(7, 18, 30, 0.86), rgba(7, 18, 30, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.bilibili-card[hidden] {
  display: none;
}

.bilibili-card.is-single {
  justify-content: center;
  min-height: 124px;
  text-align: center;
}

.bilibili-card.is-single.has-bv {
  justify-content: flex-start;
  text-align: left;
}

.bilibili-card.is-single.has-qr {
  justify-content: center;
}

.bilibili-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 2px;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--edge-x) var(--edge-y),
    rgba(255, 255, 255, 1) 0%,
    rgba(117, 228, 255, 0.95) 14%,
    rgba(29, 148, 255, 0.72) 32%,
    rgba(12, 72, 150, 0.26) 58%,
    transparent 76%
  );
  border-radius: inherit;
  opacity: var(--edge-opacity);
  transition: opacity 180ms ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.bilibili-card:hover {
  border-color: rgba(126, 228, 255, 0.62);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(117, 228, 255, 0.24),
    0 0 44px rgba(29, 148, 255, 0.18);
  transform: translateY(-5px);
}

.bilibili-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.bilibili-copy span {
  color: rgba(244, 248, 246, 0.58);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.bilibili-copy strong {
  color: #fff;
  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
  line-height: 1.15;
}

.bilibili-copy a {
  width: fit-content;
  color: #8fe7ff;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.94rem;
  font-weight: 900;
  text-decoration: none;
  transition: color 180ms ease;
}

.bilibili-copy a:hover {
  color: var(--gold);
}

.bilibili-qr {
  position: relative;
  z-index: 2;
  width: clamp(76px, 7vw, 98px);
  aspect-ratio: 1;
  padding: 6px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.project-meta span {
  padding: 8px 14px;
  color: #f4f7f5;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.project-intro h2 {
  margin: 20px 0 0;
  color: var(--title-cn-light);
  font-size: clamp(1.85rem, 3.05vw, 3rem);
  line-height: 1.06;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  -webkit-text-fill-color: currentColor;
}

.project-intro p {
  width: min(100%, 880px);
  max-width: none;
  margin: 0;
  padding-left: 0;
  color: rgba(244, 248, 246, 0.82);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.78;
  text-align: justify;
  text-align-last: left;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  text-wrap: auto;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: transparent;
  border: 0;
}

.timeline-item {
  --edge-x: 50%;
  --edge-y: 50%;
  --edge-opacity: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 142px;
  min-height: 142px;
  padding: 20px 22px;
  background: rgba(4, 12, 20, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.timeline-item::before {
  content: none;
}

.timeline-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 2px;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--edge-x) var(--edge-y),
    rgba(255, 255, 255, 1) 0%,
    rgba(117, 228, 255, 0.95) 14%,
    rgba(29, 148, 255, 0.72) 32%,
    rgba(12, 72, 150, 0.26) 58%,
    transparent 76%
  );
  border-radius: inherit;
  opacity: var(--edge-opacity);
  transition: opacity 180ms ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.timeline-item:hover {
  border-color: rgba(126, 228, 255, 0.62);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(117, 228, 255, 0.24),
    0 0 44px rgba(29, 148, 255, 0.18);
  transform: translateY(-5px);
}

.timeline-item strong {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 0;
  flex: 0 0 auto;
  color: #f4f7f5;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.timeline-item span {
  position: relative;
  z-index: 2;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 8px;
  color: rgba(244, 248, 246, 0.76);
  font-size: 0.98rem;
  line-height: 1.72;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(117, 228, 255, 0.48) rgba(255, 255, 255, 0.06);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - 12px), rgba(0, 0, 0, 0.28) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - 12px), rgba(0, 0, 0, 0.28) 100%);
}

.timeline-item span::-webkit-scrollbar {
  width: 4px;
}

.timeline-item span::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.timeline-item span::-webkit-scrollbar-thumb {
  background: rgba(117, 228, 255, 0.54);
  border-radius: 999px;
}

.timeline-item:hover span {
  -webkit-mask-image: none;
  mask-image: none;
}

.skills-section {
  background: var(--section-tech-blue);
}

.skills-section .section-label {
  margin-bottom: 14px;
}

.skill-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: transparent;
  border: 0;
}

.skill-layout[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
}

.skill-layout[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
}

.skill-layout[data-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
}

.skill-layout.is-scrollable {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(100, 214, 255, 0.65) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.skill-layout.is-scrollable::-webkit-scrollbar {
  height: 8px;
}

.skill-layout.is-scrollable::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.skill-layout.is-scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(120, 230, 255, 0.88), rgba(38, 143, 255, 0.72));
  border-radius: 999px;
}

.skill-layout.is-scrollable .skill-column {
  flex: 0 0 min(360px, calc((100% - 42px) / 4));
  min-width: 280px;
  scroll-snap-align: start;
}

.skill-column {
  --edge-x: 50%;
  --edge-y: 50%;
  --edge-opacity: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 346px;
  height: 100%;
  padding: 34px 24px 24px;
  color: #f4f7f5;
  background: rgba(4, 12, 20, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
}

.skill-column::before,
.motion-ready .skill-column::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  width: min(46%, 176px);
  height: 58px;
  pointer-events: none;
  opacity: 0.42;
  background:
    linear-gradient(90deg, rgba(117, 228, 255, 0.42), rgba(117, 228, 255, 0.08) 42%, transparent 42%) 0 6px / 42px 2px repeat-x,
    linear-gradient(90deg, rgba(117, 228, 255, 0.28), rgba(117, 228, 255, 0.06) 54%, transparent 54%) 0 28px / 54px 2px repeat-x,
    linear-gradient(90deg, rgba(245, 185, 70, 0.34), rgba(245, 185, 70, 0.04) 38%, transparent 38%) 12px 48px / 46px 2px repeat-x;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.skill-column::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 2px;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--edge-x) var(--edge-y),
    rgba(255, 255, 255, 1) 0%,
    rgba(117, 228, 255, 0.95) 14%,
    rgba(29, 148, 255, 0.72) 32%,
    rgba(12, 72, 150, 0.26) 58%,
    transparent 76%
  );
  border-radius: inherit;
  opacity: var(--edge-opacity);
  transition: opacity 180ms ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.skill-column:hover {
  background: rgba(4, 12, 20, 0.68);
  border-color: rgba(126, 228, 255, 0.62);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(117, 228, 255, 0.24),
    0 0 44px rgba(29, 148, 255, 0.18);
  transform: translateY(-5px);
}

.skill-mark {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  min-height: 1.1em;
  margin-bottom: 2px;
  color: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.96rem, 1.18vw, 1.28rem);
  font-weight: 900;
  line-height: 0.82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  background: var(--skill-en-metal);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.08)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.34));
  -webkit-text-fill-color: transparent;
}

.skill-column:nth-child(2) .skill-mark {
  background: var(--skill-en-metal);
  -webkit-background-clip: text;
  background-clip: text;
}

.skill-column:nth-child(3) .skill-mark {
  background: var(--skill-en-metal);
  -webkit-background-clip: text;
  background-clip: text;
}

.skill-column:nth-child(4) .skill-mark {
  background: var(--skill-en-metal);
  -webkit-background-clip: text;
  background-clip: text;
}

.skill-column h3 {
  position: relative;
  z-index: 2;
  min-height: 2.36em;
  margin: 0 0 6px;
  color: #f3f7f8;
  font-size: clamp(1.48rem, 1.78vw, 1.94rem);
  line-height: 1.18;
  font-weight: 950;
  display: flex;
  align-items: flex-start;
  background: none;
  text-shadow: 0 12px 22px rgba(0, 0, 0, 0.34);
  filter: none;
  -webkit-text-fill-color: currentColor;
}

.skill-column p {
  position: relative;
  z-index: 2;
  margin-top: 0;
  color: rgba(244, 248, 246, 0.76);
  font-size: 1rem;
  line-height: 1.68;
}

.skill-card-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.skill-card-actions button {
  min-height: 30px;
  padding: 5px 10px;
  color: rgba(244, 248, 246, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(117, 228, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
}

.skill-card-actions button:hover {
  color: var(--deep);
  background: #75e4ff;
  border-color: #75e4ff;
}

.skill-card-actions .skill-delete-button:hover {
  color: #fff;
  background: rgba(219, 107, 88, 0.84);
  border-color: rgba(219, 107, 88, 0.95);
}

.skill-edit-form {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
}

.skill-edit-form input,
.skill-edit-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  color: #f4f7f5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  font: inherit;
}

.skill-edit-form textarea {
  resize: vertical;
  line-height: 1.55;
}

.section-kicker {
  margin: 0 0 0.12em;
  color: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 2.05rem);
  font-weight: 900;
  line-height: 1;
  background: var(--title-fade-dark);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.works-section .section-kicker,
.contact-section .section-kicker {
  background: var(--title-fade-light);
  -webkit-background-clip: text;
  background-clip: text;
}

.games-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  background: var(--section-tech-blue);
}

.games-section .section-label {
  margin-bottom: 0;
}

.games-board {
  display: grid;
  gap: 18px;
  margin-top: 0;
}

.game-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.game-tab {
  min-height: 42px;
  padding: 8px 18px;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.game-tab:hover,
.game-tab.is-active {
  color: var(--deep);
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 14px 30px rgba(245, 185, 70, 0.2);
  transform: translateY(-2px);
}

.game-preview {
  min-height: 112px;
}

.game-card-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(86px, 1fr));
  gap: 10px;
}

.game-card {
  --edge-x: 50%;
  --edge-y: 50%;
  --edge-opacity: 0;
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  color: #fff;
  background: rgba(4, 12, 20, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 2px;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--edge-x) var(--edge-y),
    rgba(255, 255, 255, 1) 0%,
    rgba(117, 228, 255, 0.95) 14%,
    rgba(29, 148, 255, 0.72) 32%,
    rgba(12, 72, 150, 0.26) 58%,
    transparent 76%
  );
  border-radius: inherit;
  opacity: var(--edge-opacity);
  transition: opacity 180ms ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.game-card:hover {
  background: rgba(4, 12, 20, 0.68);
  border-color: rgba(126, 228, 255, 0.62);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.26),
    0 0 20px rgba(117, 228, 255, 0.22),
    0 0 38px rgba(29, 148, 255, 0.16);
  transform: translateY(-3px);
}

.game-card > * {
  position: relative;
  z-index: 2;
}

.game-card strong {
  font-size: 0.94rem;
  line-height: 1.32;
  word-break: break-word;
}

.game-add-card {
  cursor: pointer;
  text-align: left;
  border-style: dashed;
  background: rgba(117, 228, 255, 0.08);
}

.game-add-card strong {
  color: #75e4ff;
}

.game-hours {
  margin-top: 2px;
  color: rgba(117, 228, 255, 0.9);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
}

.game-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.game-card-actions button {
  min-height: 28px;
  padding: 4px 8px;
  color: rgba(244, 248, 246, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
}

.game-card-actions button:hover {
  color: var(--deep);
  background: var(--amber);
  border-color: var(--amber);
}

.game-card-actions .game-card-delete {
  color: rgba(255, 215, 210, 0.95);
  border-color: rgba(219, 107, 88, 0.42);
}

.game-card-actions .game-card-delete:hover {
  color: #fff;
  background: rgba(219, 107, 88, 0.78);
  border-color: rgba(219, 107, 88, 0.95);
}

.game-admin-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  background: rgba(4, 12, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.game-admin-form[hidden],
.login-panel[hidden],
.admin-panel[hidden] {
  display: none;
}

.game-admin-form label {
  display: grid;
  gap: 6px;
  color: rgba(244, 248, 246, 0.76);
  font-weight: 850;
}

.game-admin-form input,
.game-admin-form select {
  min-height: 42px;
  padding: 8px 10px;
  color: #f4f7f5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  font: inherit;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.44fr) minmax(520px, 1fr);
  align-content: center;
  align-items: center;
  gap: clamp(32px, 6vw, 86px);
  min-height: min(620px, calc(100vh - 72px));
  color: #fff;
  background: var(--section-tech-blue);
}

.contact-section p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-copy {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}

.section:not(.hero) .section-label > span,
.section:not(.hero) .section-label > strong,
.works-section .works-title > span,
.works-section .works-title > h2,
.skills-section .skill-column .skill-mark,
.skills-section .skill-column h3 {
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  -webkit-text-fill-color: transparent;
}

.section:not(.hero) .section-label > span,
.works-section .works-title > span {
  background-image: var(--title-fade-dark);
  filter: var(--title-depth-shadow);
}

.section:not(.hero) .section-label > strong,
.works-section .works-title > h2 {
  background-image: var(--title-cn-metal);
  filter: var(--title-depth-shadow);
}

.works-section .works-title > span {
  display: block;
  margin-bottom: 0.12em;
  font-size: clamp(1.72rem, 2.9vw, 3.08rem);
  font-weight: 950;
}

.works-section .works-title > h2 {
  font-size: clamp(2.28rem, 4.25vw, 4.35rem);
}

.skills-section .skill-column .skill-mark {
  background-image: var(--skill-en-metal);
  font-size: clamp(0.96rem, 1.18vw, 1.28rem);
  line-height: 0.82;
  margin-bottom: 2px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16)) drop-shadow(0 7px 11px rgba(0, 0, 0, 0.38));
}

.skills-section .skill-column h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #f3f7f8;
  background-image: none;
  filter: none;
  text-shadow: 0 12px 22px rgba(0, 0, 0, 0.34);
  -webkit-text-fill-color: currentColor;
}

/* Front title tuning: left-aligned, tighter stacked titles with a natural right-side offset. */
.eyebrow,
.section-kicker,
.section:not(.hero) .section-label > span,
.works-section .works-title > span,
.skills-section .skill-column .skill-mark {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  background-image: var(--skill-en-metal);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.14)) drop-shadow(0 7px 11px rgba(0, 0, 0, 0.38));
  -webkit-text-fill-color: transparent;
}

.hero .eyebrow {
  margin-bottom: -0.1em;
}

.section-label {
  gap: 2px;
  margin-bottom: 28px;
}

.section:not(.hero) .section-label > span,
.section:not(.hero) .section-label > strong,
.works-section .works-title > span,
.works-section .works-title > h2 {
  display: block;
  width: fit-content;
  justify-self: start;
}

.section:not(.hero) .section-label > span,
.works-section .works-title > span {
  max-width: min(84%, 22em);
}

.section:not(.hero) .section-label > strong,
.works-section .works-title > h2 {
  max-width: min(100%, 24em);
}

.section:not(.hero) .section-label > span {
  margin-bottom: -0.1em;
}

.works-section .works-title > span {
  display: block;
  margin-bottom: -0.08em;
}

.section-kicker {
  margin-bottom: -0.08em;
}

.skills-section .skill-column .skill-mark {
  display: block;
  width: auto;
  margin-bottom: -0.12em;
  line-height: 0.95;
  white-space: nowrap;
}

.skills-section .skill-column h3 {
  min-height: 1.28em;
  margin-bottom: 8px;
}

.skills-section .skill-column p {
  margin-top: 0;
  line-height: 1.58;
}

.skills-section .section-label > span {
  max-width: 72%;
}

.skills-section .section-label > strong {
  max-width: 100%;
}

.contact-info-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 34px);
  width: 100%;
  margin-top: 0;
}

.contact-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 0;
  padding: 8px 0;
  color: #f4f8f6;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #75e4ff;
  background: transparent;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 0 12px rgba(117, 228, 255, 0.42));
}

.contact-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-card small {
  display: block;
  color: rgba(117, 228, 255, 0.82);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-card strong {
  display: block;
  margin-top: 2px;
  color: #f4f8f6;
  font-size: clamp(0.95rem, 1.2vw, 1.18rem);
  line-height: 1.35;
  word-break: break-all;
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  background: rgba(8, 19, 31, 0.055);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-form h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--title-cn-dark);
  font-size: 1.15rem;
}

.profile-form label {
  display: grid;
  gap: 8px;
  font-weight: 850;
}

.profile-form input {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.profile-form[hidden] {
  display: none;
}

.contact-edit-form {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 8px;
  color: #f4f8f6;
  background: rgba(4, 12, 20, 0.46);
  border-color: rgba(117, 228, 255, 0.22);
}

.contact-edit-form h3 {
  color: #f4f8f6;
}

.contact-edit-form label {
  color: rgba(244, 248, 246, 0.78);
}

.contact-edit-form input {
  color: #f4f7f5;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.back-top-button {
  position: fixed;
  right: clamp(18px, 3vw, 38px);
  bottom: clamp(18px, 3vw, 38px);
  z-index: 45;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--deep);
  background: var(--amber);
  border: 1px solid rgba(245, 185, 70, 0.88);
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(245, 185, 70, 0.22);
  cursor: pointer;
  font: inherit;
  font-size: 1.45rem;
  font-weight: 950;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.92);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    background-color 180ms ease;
}

.back-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-top-button:hover {
  background: #75e4ff;
  border-color: #75e4ff;
  transform: translateY(-2px) scale(1.04);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 10, 18, 0.72);
  backdrop-filter: blur(14px);
}

.modal-backdrop[hidden] {
  display: none;
}

.auth-modal {
  position: relative;
  width: min(880px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  padding: clamp(24px, 4vw, 38px);
  color: var(--ink);
  background: #f9fbf7;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.36);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
  background: var(--deep);
  border-color: var(--deep);
}

.login-panel,
.admin-panel {
  display: grid;
  gap: 16px;
}

.login-panel h2,
.admin-panel h2 {
  margin: 0;
  color: var(--title-cn-dark);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.1;
  -webkit-text-fill-color: currentColor;
}

.auth-mode-switch {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  background: rgba(3, 15, 24, 0.08);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-mode-button {
  min-width: 76px;
  padding: 8px 14px;
  color: rgba(25, 36, 47, 0.7);
  background: transparent;
  border: 0;
  border-radius: calc(var(--radius) - 3px);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.auth-mode-button:hover,
.auth-mode-button.is-active {
  color: var(--deep);
  background: var(--amber);
  box-shadow: 0 12px 26px rgba(245, 185, 70, 0.18);
}

.auth-helper {
  margin: -4px 0 2px;
  color: rgba(43, 56, 71, 0.72);
  font-weight: 720;
  line-height: 1.7;
}

.login-panel label,
.admin-form label {
  display: grid;
  gap: 8px;
  font-weight: 850;
}

.login-panel input,
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.login-panel input:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: 2px solid rgba(245, 185, 70, 0.42);
  border-color: var(--amber);
}

.login-error {
  min-height: 1.5em;
  margin: 0;
  color: var(--coral);
  font-weight: 850;
}

.admin-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.admin-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-list {
  margin-top: 4px;
}

.logout-button {
  color: var(--deep);
  background: var(--mint);
}

.motion-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.motion-mask > span {
  display: inline-block;
  color: inherit;
  -webkit-text-fill-color: inherit;
}


.motion-ready .section-label,
.motion-ready .works-title {
  will-change: opacity;
}

.motion-ready .filter-bar,
.motion-ready .filter-button,
.motion-ready .work-card,
.motion-ready .project-panel,
.motion-ready .project-admin-form,
.motion-ready .hero-admin-form,
.motion-ready .document-admin-panel,
.motion-ready .document-edit-form,
.motion-ready .skill-column,
.motion-ready .games-board,
.motion-ready .game-tab,
.motion-ready .game-card,
.motion-ready .game-admin-form,
.motion-ready .contact-card,
.motion-ready .contact-edit-form,
.motion-ready .upload-desk {
  will-change: transform, opacity, clip-path;
}

.reveal-ready {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 660ms ease,
    transform 660ms cubic-bezier(0.19, 1, 0.22, 1);
}

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

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

  .nav-actions {
    width: 100%;
  }

  .project-panel,
  .games-section {
    grid-template-columns: 1fr;
  }

  .project-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .project-content {
    width: min(760px, 100%);
    margin-top: 0;
  }

  .project-side {
    width: min(760px, 100%);
    max-width: none;
    min-width: 0;
  }

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

  .work-grid {
    grid-template-columns: repeat(2, minmax(268px, 318px));
    grid-auto-rows: 218px;
    justify-content: center;
  }

  .game-card-grid {
    grid-template-columns: repeat(5, minmax(86px, 1fr));
  }

  .game-admin-form {
    grid-template-columns: 1fr 1fr;
  }

  .admin-inline-form,
  .document-admin-panel,
  .project-admin-form {
    grid-template-columns: 1fr 1fr;
  }

  .project-edit-main,
  .project-edit-media,
  .project-edit-cards,
  .project-admin-actions {
    grid-column: 1 / -1;
  }

  .project-edit-main,
  .project-edit-cards {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .hero-admin-form {
    width: calc(100% - 44px);
    margin-left: 22px;
  }

  .admin-inline-form .wide-field {
    grid-column: 1 / -1;
  }

  .contact-section,
  .profile-form {
    grid-template-columns: 1fr;
  }

  .contact-info-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background-size: 34px 34px;
  }

  .hero {
    min-height: 78vh;
    padding-top: 72px;
  }

  .hero-art {
    object-position: 63% center;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(3, 9, 16, 0.96) 0%, rgba(6, 16, 27, 0.86) 58%, rgba(6, 16, 27, 0.42) 100%),
      linear-gradient(90deg, rgba(3, 9, 16, 0.68), rgba(3, 9, 16, 0.1));
  }

  .hero h1 {
    font-size: clamp(2.75rem, 13vw, 4.3rem);
  }

  .eyebrow {
    margin-bottom: -2px;
    font-size: clamp(1.55rem, 7.2vw, 2.25rem);
  }

  .section-label,
  .advantage-grid,
  .work-grid,
  .timeline-grid,
  .skill-layout {
    grid-template-columns: 1fr;
  }

  .upload-desk,
  .upload-item,
  .admin-item,
  .contact-info-list {
    grid-template-columns: 1fr;
  }

  .item-actions {
    justify-content: flex-start;
  }

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

  .game-admin-form {
    grid-template-columns: 1fr;
  }

  .admin-inline-form,
  .document-admin-panel,
  .project-admin-form,
  .project-edit-main,
  .project-edit-media,
  .project-edit-cards,
  .project-admin-actions {
    grid-template-columns: 1fr;
  }

  .project-panel-text-only .timeline-grid {
    grid-template-columns: 1fr;
  }

  .section-label {
    gap: 4px;
  }

  .section-label span,
  .section-label strong {
    grid-column: 1;
    grid-row: auto;
  }

  .work-card.featured {
    grid-row: auto;
    min-height: 0;
  }

  .work-grid {
    grid-template-columns: minmax(268px, 318px);
    grid-auto-rows: 218px;
    gap: 12px;
    justify-content: center;
  }

  .work-card {
    padding: 18px;
  }

  .pager {
    padding-top: 54px;
  }

  .project-panel {
    min-height: auto;
    padding-top: 40px;
  }

  .project-meta span {
    padding: 7px 11px;
    font-size: 0.82rem;
  }

  .bilibili-card {
    align-items: flex-start;
    padding: 14px;
  }

  .bilibili-qr {
    width: 78px;
    flex: 0 0 auto;
  }

  .project-overlay {
    background:
      linear-gradient(180deg, rgba(3, 9, 16, 0.9) 0%, rgba(3, 9, 16, 0.76) 62%, rgba(3, 9, 16, 0.42) 100%),
      linear-gradient(90deg, rgba(3, 9, 16, 0.8), rgba(3, 9, 16, 0.28));
  }

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

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

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

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 20px 28px;
  color: rgba(229, 237, 244, 0.68);
  background: #061724;
  font-size: 0.9rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-footer a:hover {
  color: #4fc3e8;
}



body.is-document-view {
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at 70% 0%, rgba(75, 199, 255, 0.16), transparent 34%), #07111c;
}

body.is-document-view .site-header,
body.is-document-view main,
body.is-document-view .back-top-button,
body.is-document-view .modal-backdrop {
  display: none !important;
}

.document-viewer {
  min-height: 100vh;
  padding: 0;
  color: var(--paper);
  background: radial-gradient(circle at 70% 0%, rgba(75, 199, 255, 0.16), transparent 34%), #07111c;
}

.document-viewer[hidden] {
  display: none !important;
}

.document-viewer-inner {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
}

.document-viewer.is-compact {
  display: grid;
  align-items: center;
  padding: clamp(8px, 1.5vw, 18px);
  cursor: zoom-out;
}

.document-viewer.is-compact .document-viewer-inner {
  width: min(1520px, 100%);
  min-height: min(920px, calc(100vh - 48px));
  border: 1px solid rgba(75, 199, 255, 0.22);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.42);
  cursor: default;
}

.document-viewer.is-compact .document-viewer-head {
  padding: 18px 24px;
}

.document-viewer.is-compact .document-viewer-head h1 {
  font-size: clamp(1.5rem, 2.8vw, 2.8rem);
}

.document-viewer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: clamp(18px, 2.6vw, 32px) clamp(22px, 4vw, 58px);
  border: 0;
  border-bottom: 1px solid rgba(75, 199, 255, 0.22);
  border-radius: 0;
  background: linear-gradient(135deg, rgba(15, 30, 43, 0.96), rgba(6, 16, 26, 0.99));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.document-viewer-head p {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 900;
}

.document-viewer-head h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4.8rem);
  line-height: 1;
  color: #f4f8f6;
}

.document-viewer-head span,
.document-viewer-head small {
  display: block;
  margin-top: 12px;
  color: rgba(236, 244, 248, 0.76);
  line-height: 1.65;
}

.document-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.document-viewer-preview {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(220, 242, 255, 0.18);
  border-width: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.document-viewer-preview iframe,
.document-viewer-preview img {
  display: block;
  width: 100%;
  height: calc(100vh - 186px);
  min-height: 520px;
  border: 0;
  object-fit: contain;
  background: #f7fafc;
}

.document-viewer.is-compact .document-viewer-preview iframe,
.document-viewer.is-compact .document-viewer-preview img {
  height: min(620px, calc(100vh - 238px));
  min-height: 420px;
}

.document-viewer-preview.is-archive {
  padding: clamp(22px, 4vw, 54px);
  color: #eaf3f7;
  background:
    radial-gradient(circle at 80% 0%, rgba(75, 199, 255, 0.12), transparent 34%),
    #07111c;
}

.archive-loading {
  display: grid;
  min-height: 360px;
  place-items: center;
  color: rgba(236, 244, 248, 0.76);
  font-weight: 900;
}

/* Document preview skeleton - replaces loading text */
.preview-skeleton {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 32px;
}

/* 进度条：从 0% 推进到 100%，满即加载完成 */
.preview-skeleton-progress {
  width: 100%;
  max-width: 420px;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.preview-skeleton-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #f5b946 0%, #ff8a3d 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(245, 185, 70, 0.45);
  animation: skeleton-progress 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes skeleton-progress {
  0%   { width: 0; }
  55%  { width: 72%; }
  82%  { width: 90%; }
  100% { width: 100%; }
}

.preview-skeleton-progress-hint {
  margin-top: 14px;
  color: rgba(220, 242, 255, 0.4);
  font-size: 0.78rem;
  text-align: center;
  letter-spacing: 0.04em;
}

.preview-skeleton-loading-text {
  color: rgba(220, 242, 255, 0.65);
  font-size: 0.875rem;
  margin-bottom: 20px;
  text-align: center;
  white-space: nowrap;
}

.archive-intro {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.archive-intro strong {
  font-size: clamp(1.6rem, 3vw, 3rem);
  line-height: 1;
}

.archive-intro span {
  color: rgba(236, 244, 248, 0.68);
  font-weight: 760;
}

.archive-file-list {
  display: grid;
  gap: 12px;
}

.archive-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(16, 32, 45, 0.92), rgba(8, 18, 29, 0.96));
  border: 1px solid rgba(75, 199, 255, 0.18);
  border-radius: 10px;
}

.archive-file-item.is-folder {
  border-color: rgba(75, 199, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(75, 199, 255, 0.14), rgba(16, 32, 45, 0.92) 42%),
    rgba(8, 18, 29, 0.96);
}

.folder-empty-note {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 28px;
  color: rgba(236, 244, 248, 0.66);
  border: 1px dashed rgba(75, 199, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.archive-file-meta {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.archive-file-meta strong,
.archive-file-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-file-meta strong {
  color: #f4f8f6;
  font-size: 1.05rem;
}

.archive-file-meta span {
  color: rgba(236, 244, 248, 0.58);
  font-size: 0.92rem;
}

.archive-file-actions,
.archive-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.archive-preview-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  padding: 12px;
  background: transparent;
}

.archive-back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.archive-back-arrow:hover {
  color: #fff;
  background: rgba(36, 155, 145, 0.28);
  border-color: rgba(36, 155, 145, 0.65);
  box-shadow: 0 6px 18px rgba(36, 155, 145, 0.18);
  transform: translateX(-2px);
}

.archive-back-arrow:active {
  transform: translateX(0);
}

.spreadsheet-preview,
.docx-preview {
  min-height: calc(100vh - 186px);
  padding: clamp(22px, 4vw, 48px);
  color: #172331;
  background: #f6f8fa;
}

.document-viewer.is-compact .spreadsheet-preview,
.document-viewer.is-compact .docx-preview {
  min-height: min(620px, calc(100vh - 238px));
}

.document-viewer.is-compact .spreadsheet-table-wrap {
  max-height: min(500px, calc(100vh - 350px));
}

.spreadsheet-preview-title {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.spreadsheet-preview-title strong,
.docx-preview h3 {
  color: #121b26;
  font-size: clamp(1.35rem, 2.2vw, 2.25rem);
  line-height: 1.15;
}

.spreadsheet-preview-title span {
  color: #5b6b7c;
  font-weight: 800;
}

.spreadsheet-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 310px);
  background: #fff;
  border: 1px solid #d8e1ea;
  border-radius: 10px;
}

.spreadsheet-preview table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.spreadsheet-preview th,
.spreadsheet-preview td {
  max-width: 260px;
  padding: 10px 12px;
  color: #172331;
  border: 1px solid #e1e7ee;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spreadsheet-preview th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eaf2f9;
  color: #0b3354;
  font-weight: 900;
}

.docx-preview {
  max-width: 1400px;
  margin: 0 auto;
  line-height: 1.78;
}

.docx-preview h3 {
  margin: 0 0 20px;
}

.docx-preview p,
.docx-preview li {
  color: #26384a;
}

.docx-preview table {
  width: 100%;
  border-collapse: collapse;
}

.docx-preview td,
.docx-preview th {
  padding: 9px 10px;
  border: 1px solid #d8e1ea;
}

/* ===== DOCX 分栏布局（左侧目录 + 右侧 HTML 内容）===== */
.docx-viewer-layout {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: transparent;
  overflow: hidden;
}

/* 顶部横条：隐藏，释放视口空间（用户反馈"上面的白边"占空间） */
.docx-viewer-topbar {
  display: none;
}

/* body 容器：左侧目录 + 右侧内容 */
.docx-viewer-body {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.docx-toc-sidebar {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  background: rgba(7, 17, 28, 0.92);
  border-right: 1px solid rgba(220, 242, 255, 0.12);
  overflow: hidden;
}

/* 文档标题：左对齐，不缩进 */
.docx-toc-doc-title {
  flex: 0 0 auto;
  padding: 16px 20px 14px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  line-height: 1.4;
  word-break: break-word;
  border-bottom: 1px solid rgba(220, 242, 255, 0.08);
}

.docx-toc-header {
  flex: 0 0 auto;
  padding: 12px 20px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  color: rgba(220, 242, 255, 0.6);
  border-bottom: 1px solid rgba(220, 242, 255, 0.08);
}

.docx-toc-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 0;
}

.docx-toc-list::-webkit-scrollbar {
  width: 5px;
}
.docx-toc-list::-webkit-scrollbar-thumb {
  background: rgba(220, 242, 255, 0.15);
  border-radius: 3px;
}

.docx-toc-item {
  display: block;
  width: 100%;
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: rgba(220, 242, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: none;
  font-family: inherit;
  word-break: break-word;
}

.docx-toc-item:hover {
  background: rgba(220, 242, 255, 0.06);
  color: #ecf4f8;
}

.docx-toc-item.is-active {
  background: rgba(45, 212, 191, 0.12);
  color: #2dd4bf;
  border-left: 3px solid #2dd4bf;
  padding-left: calc(13px + var(--toc-indent, 0px));
}

.docx-toc-item.is-disabled {
  color: rgba(220, 242, 255, 0.35);
  cursor: default;
}
.docx-toc-item.is-disabled:hover {
  background: transparent;
  color: rgba(220, 242, 255, 0.35);
}

.docx-toc-empty {
  padding: 24px 20px;
  color: rgba(220, 242, 255, 0.4);
  font-size: 0.8125rem;
  text-align: center;
}

.docx-toc-toggle {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(220, 242, 255, 0.2);
  border-radius: 8px;
  background: rgba(7, 17, 28, 0.9);
  color: rgba(220, 242, 255, 0.8);
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ===== docx-preview 渲染容器（前端用 docx-preview 库还原 Word 原始排版）=====
   docx-preview 直接解析 DOCX 的 OOXML，按 Word 语义渲染：
   - 文字对齐（居中/左/右/两端）由 docx-preview 内部样式处理
   - 图片位置（内联/浮动/环绕）按 Word 原始布局
   - 表格、页眉页脚按 Word 原始排版
   外层只负责滚动容器 + 灰色背景衬托白色"纸张" */
.docx-html-content {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding: 6px 8px 14px;
  background: #e9e9e9;
}

/* PDF.js 渲染：每页 canvas 居中，白底，纸张阴影效果 */
.pdf-content {
  text-align: center;
}
.pdf-page-canvas {
  display: block;
  margin: 0 auto 12px;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  max-width: 100%;
  height: auto;
}
/* 懒加载占位容器：渲染前先占位，避免滚动时布局跳动 */
.pdf-page-slot {
  margin: 0 auto 12px;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  max-width: 100%;
  overflow: hidden;
  position: relative;
}
.pdf-page-placeholder {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(245, 246, 248, 0) 0%, rgba(225, 230, 238, 0.55) 50%, rgba(245, 246, 248, 0) 100%);
  background-size: 240% 100%;
  animation: pdfPageShimmer 1.4s ease-in-out infinite;
}
@keyframes pdfPageShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* iframe 原生 PDF 查看器：绝对定位充满父容器，浏览器自带完美中文字体渲染 */
.pdf-native-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* 未预热时的轻量加载提示，避免用户看到完全空白 */
.pdf-loading-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: rgba(0, 0, 0, 0.35);
  font-size: 0.85rem;
  z-index: 2;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* docx-preview 降级用的文档"纸张"：白色背景，居中，阴影（PDF 模式下不生效） */
.docx-html-content .docx-wrapper {
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.docx-html-content .docx-wrapper > section,
.docx-html-content .docx-wrapper > .docx {
  background: #ffffff;
  margin: 0 auto 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  max-width: 100%;
}

/* 图片居中保险：docx-preview 把图片渲染成 <div style="display:inline-block"> 包裹 <img>
   在 text-align:center 段落里 inline-block 应居中，但部分情况失效，
   强制居中段落的图片 div 用 block + margin auto 确保居中。
   要求4：该居中的图片要居中 */
.docx-html-content .docx p[style*="text-align: center"] > div,
.docx-html-content .docx p[style*="text-align:center"] > div {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* 文档内目录链接 */
.docx-html-content a[href^="#"] {
  color: #3370ff;
}

/* 折叠状态：隐藏侧边栏 */
.docx-viewer-layout.is-sidebar-collapsed .docx-toc-sidebar {
  display: none;
}
.docx-viewer-layout.is-sidebar-collapsed .docx-toc-toggle {
  display: flex;
}

/* 移动端：默认折叠侧边栏 */
@media (max-width: 760px) {
  .docx-viewer-body {
    position: relative;
  }
  .docx-toc-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 5;
    width: 260px;
    max-width: 80vw;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }
  .docx-viewer-layout:not(.is-sidebar-collapsed) .docx-toc-sidebar {
    display: flex;
  }
  .docx-viewer-layout.is-sidebar-collapsed .docx-toc-sidebar {
    display: none;
  }
  .docx-toc-toggle {
    display: flex;
  }
  .docx-html-content {
    padding: 0 0 16px;
  }
}

.document-viewer-preview.is-empty,
.document-viewer-empty {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 360px;
  padding: 34px;
  color: rgba(236, 244, 248, 0.82);
  text-align: center;
  border: 1px dashed rgba(220, 242, 255, 0.3);
  border-radius: 12px;
  background: rgba(7, 17, 28, 0.64);
}

.document-viewer-preview.is-empty span {
  display: block;
  margin-top: 8px;
  color: rgba(236, 244, 248, 0.66);
}

@media (max-width: 760px) {
  .document-viewer-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .document-viewer-actions {
    justify-content: flex-start;
  }
}

/* Final front-stage polish: stacked titles, quieter offset, and denser document cards. */
.section:not(.hero) .section-label,
.works-section .works-title {
  display: grid;
  justify-items: start;
  align-items: start;
  gap: 0;
}

.section:not(.hero) .section-label > span,
.works-section .works-title > span {
  display: block;
  width: fit-content;
  max-width: min(74%, 18em);
  margin: 0 0 -0.04em;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 0.9;
  white-space: nowrap;
  background-image: var(--skill-en-metal);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.12)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.38));
  -webkit-text-fill-color: transparent;
}

.section:not(.hero) .section-label > strong,
.works-section .works-title > h2 {
  display: block;
  width: fit-content;
  max-width: min(100%, 24em);
  margin: 0;
  background-image: var(--title-cn-metal);
  -webkit-background-clip: text;
  background-clip: text;
  filter: var(--title-depth-shadow);
  -webkit-text-fill-color: transparent;
}

.skills-section .section-label > span {
  max-width: 58%;
}

.works-section .works-title {
  margin-bottom: 18px;
}

.works-section .works-title > span {
  font-size: clamp(2rem, 3.15vw, 3.45rem);
}

.works-section .works-title > h2 {
  font-size: clamp(2.42rem, 4.5vw, 4.65rem);
}

.work-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 198px;
  gap: 14px;
  justify-content: stretch;
  width: 100%;
}

.skill-column {
  padding-bottom: 28px;
}

.skill-column::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  width: min(58%, 210px);
  height: 82px;
  pointer-events: none;
  opacity: 0.58;
  background:
    radial-gradient(circle at 12px 12px, rgba(117, 228, 255, 0.58) 0 2px, transparent 3px),
    radial-gradient(circle at 102px 48px, rgba(245, 185, 70, 0.42) 0 2px, transparent 3px),
    linear-gradient(90deg, rgba(117, 228, 255, 0.42), rgba(117, 228, 255, 0.05) 52%, transparent 52%) 0 13px / 54px 2px repeat-x,
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 48%, transparent 48%) 14px 38px / 62px 2px repeat-x,
    linear-gradient(90deg, rgba(245, 185, 70, 0.32), rgba(245, 185, 70, 0.04) 44%, transparent 44%) 4px 64px / 48px 2px repeat-x;
  mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 86%, transparent 100%);
  transform: none;
}

.skills-section .skill-column .skill-mark {
  margin-bottom: -0.08em;
  font-size: clamp(0.9rem, 1.05vw, 1.14rem);
  line-height: 0.96;
}

.skills-section .skill-column h3 {
  min-height: 1.26em;
  margin: 0 0 12px;
}

.skills-section .skill-column p {
  margin-top: 0;
  line-height: 1.64;
}

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

@media (max-width: 760px) {
  .section:not(.hero) .section-label > span,
  .works-section .works-title > span {
    max-width: 82%;
  }

  .work-grid {
    grid-template-columns: minmax(268px, 1fr);
    grid-auto-rows: 218px;
  }
}

/* Document viewer: default fills the viewport; compact mode becomes a centered panel. */
body.is-document-view {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.document-viewer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.document-viewer-inner {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
}

.document-viewer-head {
  min-height: 76px;
  padding: 12px clamp(18px, 3vw, 38px);
  align-items: center;
}

.document-viewer-head h1 {
  font-size: clamp(1.2rem, 2.2vw, 2.35rem);
}

.document-viewer-head span,
.document-viewer-head small {
  margin-top: 5px;
  line-height: 1.45;
}

.document-viewer-preview {
  height: 100%;
  min-height: 0;
}

.document-viewer-preview iframe,
.document-viewer-preview img {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.spreadsheet-preview,
.docx-preview {
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.spreadsheet-table-wrap {
  max-height: none;
  height: calc(100% - 86px);
}

.docx-preview {
  max-width: none;
  padding-inline: clamp(16px, 2vw, 32px);
}

.document-viewer.is-compact {
  place-items: center;
  width: 100vw;
  height: 100dvh;
  padding: clamp(2px, 0.5vw, 6px);
  overflow: auto;
}

.document-viewer.is-compact .document-viewer-inner {
  width: min(2400px, 100vw);
  height: min(1100px, 100dvh);
  min-height: 0;
  margin: auto;
}

.document-viewer.is-compact .document-viewer-preview iframe,
.document-viewer.is-compact .document-viewer-preview img {
  height: 100%;
  min-height: 0;
}

.document-viewer.is-compact .spreadsheet-preview,
.document-viewer.is-compact .docx-preview {
  min-height: 0;
}

.document-viewer.is-compact .spreadsheet-table-wrap {
  height: calc(100% - 76px);
  max-height: none;
}

/* Viewer viewport correction: reading area fills the browser; compact mode is centered. */
.document-viewer {
  background: #1f1f1f;
}

.document-viewer:not(.is-compact) .document-viewer-inner {
  grid-template-rows: minmax(0, 1fr);
}

.document-viewer:not(.is-compact) .document-viewer-head {
  position: fixed;
  top: 12px;
  right: 14px;
  left: auto;
  z-index: 6;
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.document-viewer:not(.is-compact) .document-viewer-head > div {
  display: none;
}

.document-viewer:not(.is-compact) .document-viewer-actions {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(92vw, 760px);
  padding: 8px;
  border: 1px solid rgba(120, 210, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 13, 22, 0.62);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
}

.document-close-zone {
  position: fixed;
  z-index: 5;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.document-close-zone::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(75, 199, 255, 0.1);
  transition: opacity 180ms ease;
}

.document-close-zone:hover::after {
  opacity: 1;
}

.document-close-zone.is-left {
  top: 72px;
  bottom: 0;
  left: 0;
  width: max(28px, 3vw);
}

.document-close-zone.is-right {
  top: 72px;
  right: 0;
  bottom: 0;
  width: max(28px, 3vw);
}

.document-close-zone.is-bottom {
  right: 0;
  bottom: 0;
  left: 0;
  height: 28px;
}

.document-viewer.is-compact .document-close-zone {
  display: none;
}

.document-viewer:not(.is-compact) .document-viewer-preview {
  grid-row: 1;
  width: 100vw;
  height: 100dvh;
}

/* Viewer back button - fixed top-left */
.viewer-back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.viewer-back-btn:hover {
  color: #fff;
  background: rgba(36, 155, 145, 0.28);
  border-color: rgba(36, 155, 145, 0.65);
  box-shadow: 0 6px 18px rgba(36, 155, 145, 0.18);
  transform: translateX(-2px);
}

.viewer-back-btn:active {
  transform: translateX(0);
}

body:not(.is-document-view) .viewer-back-btn {
  display: none;
}

body.is-document-view .viewer-back-btn {
  color: #08131f;
  background: #f5b946;
  border-color: #f5b946;
  box-shadow: 0 4px 14px rgba(245, 185, 70, 0.42);
}
body.is-document-view .viewer-back-btn:hover {
  color: #ffffff;
  background: #db6b58;
  border-color: #db6b58;
  box-shadow: 0 6px 18px rgba(219, 107, 88, 0.38);
  transform: translateX(-2px);
}
body.is-document-view .viewer-back-btn:active {
  transform: translateX(0);
}

.document-viewer:not(.is-compact) .document-viewer-preview iframe,
.document-viewer:not(.is-compact) .document-viewer-preview img {
  height: 100dvh;
}

.document-viewer:not(.is-compact) .spreadsheet-preview,
.document-viewer:not(.is-compact) .docx-preview {
  height: 100dvh;
}

.document-viewer.is-compact {
  place-items: center;
  align-items: center;
  justify-items: center;
}

.document-viewer.is-compact .document-viewer-inner {
  grid-template-rows: auto minmax(0, 1fr);
  align-self: center;
  justify-self: center;
  margin: auto;
}

.document-viewer.is-compact .document-viewer-head {
  position: relative;
  top: auto;
  right: auto;
  z-index: auto;
  display: grid;
  min-height: 44px;
  padding: 8px 16px;
  pointer-events: auto;
}

/* Archive directory and viewer refinements */
.archive-tree-list {
  gap: 10px;
}
.archive-folder-node {
  border: 1px solid rgba(73, 196, 255, 0.24);
  border-radius: 10px;
  background: rgba(6, 20, 30, 0.52);
  overflow: hidden;
}
.archive-folder-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 14px 18px 14px calc(18px + var(--depth, 0) * 18px);
  color: #f2f8fb;
  list-style: none;
}
.archive-folder-summary::-webkit-details-marker {
  display: none;
}
.archive-folder-summary::before {
  content: "+";
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(89, 205, 255, 0.42);
  border-radius: 999px;
  color: #6edcff;
  margin-right: 10px;
  flex: 0 0 auto;
}
.archive-folder-node[open] > .archive-folder-summary::before {
  content: "-";
}
.archive-folder-summary strong {
  flex: 1;
}
.archive-folder-summary span,
.archive-file-row span {
  color: rgba(205, 226, 238, 0.72);
  font-size: 0.92rem;
}
.archive-folder-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}
.archive-file-row {
  margin-left: calc(var(--depth, 0) * 18px);
}

/* Archive 按钮样式统一 */
.archive-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.archive-btn:hover {
  color: #fff;
  background: rgba(36, 155, 145, 0.22);
  border-color: rgba(36, 155, 145, 0.58);
  box-shadow: 0 6px 18px rgba(36, 155, 145, 0.15);
  transform: translateY(-1px);
}

.archive-btn:active {
  transform: translateY(0);
}

.archive-btn:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.archive-btn.is-back {
  padding: 9px 18px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

.archive-btn.is-back:hover {
  background: rgba(36, 155, 145, 0.28);
  border-color: rgba(36, 155, 145, 0.65);
}

.archive-no-preview {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.85rem;
  font-style: italic;
  padding: 7px 2px;
}

.archive-open-btn:disabled {
  opacity: 0.58;
  cursor: default;
}
.document-pager[hidden],
.doc-page-status[hidden],
.doc-page-arrow[hidden] {
  display: none !important;
}
.copy-link-button,
.btn.copy-link-button {
  opacity: 1;
  color: #9fe8ff;
  border-color: rgba(94, 219, 255, 0.42);
  background: rgba(29, 90, 122, 0.22);
}
.document-viewer:not(.is-compact) .document-viewer-preview {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100vw;
  min-height: 100dvh;
  padding: 54px 0 0;
}
.document-viewer:not(.is-compact) .document-viewer-preview iframe {
  width: 100vw;
  height: calc(100dvh - 54px);
  border: 0;
}
.preview-frame-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 16%, rgba(74, 198, 255, 0.12), transparent 34%),
    #07111c;
}
.preview-frame-shell iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: #07111c;
  opacity: 0;
  transition: opacity 220ms ease;
}
.preview-frame-shell.is-ready iframe {
  opacity: 1;
}
.preview-frame-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 34%, rgba(74, 198, 255, 0.16), transparent 32%),
    #07111c;
  transition: opacity 180ms ease;
}
.preview-frame-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}
.preview-frame-shell.is-ready .preview-frame-loading {
  opacity: 0;
  pointer-events: none;
}
.document-viewer:not(.is-compact) .preview-frame-shell {
  width: 100vw;
  height: calc(100dvh - 54px);
  min-height: calc(100dvh - 54px);
}
.document-viewer:not(.is-compact) .preview-frame-shell iframe,
.document-viewer.is-compact .preview-frame-shell iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.document-viewer.is-compact .preview-frame-shell {
  height: min(620px, calc(100vh - 238px));
  min-height: 420px;
}
.document-viewer:not(.is-compact) .document-viewer-preview img {
  max-width: 100vw;
  max-height: calc(100dvh - 54px);
  object-fit: contain;
  margin: auto;
}
.document-viewer:not(.is-compact) .docx-preview,
.document-viewer:not(.is-compact) .spreadsheet-preview,
.document-viewer:not(.is-compact) .archive-directory {
  width: min(1480px, calc(100vw - 96px));
  max-height: calc(100dvh - 88px);
  margin: 34px auto 0;
  overflow: auto;
}

.document-viewer-preview.is-loading {
  display: grid;
  place-items: center;
  min-height: 420px;
  background:
    radial-gradient(circle at 70% 18%, rgba(74, 198, 255, 0.12), transparent 34%),
    #07111c;
  color: #eef8fb;
}

.document-viewer:not(.is-compact) .document-viewer-preview.is-loading {
  width: 100vw;
  height: 100dvh;
  padding: 0;
}

.document-viewer:not(.is-compact) .document-viewer-preview.is-folder-directory {
  display: block;
  width: 100vw;
  min-height: 100dvh;
  height: auto;
  padding: clamp(72px, 8vh, 96px) clamp(28px, 6vw, 88px) clamp(44px, 6vw, 82px);
  overflow: auto;
  background:
    radial-gradient(circle at 72% 0%, rgba(75, 199, 255, 0.1), transparent 32%),
    #07111c;
}

.document-viewer-preview.is-folder-directory .archive-file-list {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.document-viewer-preview.is-folder-directory .folder-empty-note {
  width: min(720px, 100%);
  margin: 0 auto;
}

.preview-error {
  display: grid;
  gap: 12px;
  width: min(520px, calc(100vw - 48px));
  margin: auto;
  padding: 28px;
  text-align: center;
  color: #eef8fb;
  border: 1px solid rgba(91, 209, 255, 0.22);
  border-radius: 12px;
  background: rgba(7, 19, 31, 0.88);
}

.preview-error strong {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.2;
}

.preview-error span {
  color: rgba(224, 240, 248, 0.72);
  font-weight: 760;
  line-height: 1.7;
}

/* Skeleton loading for empty grids while data is loading */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

#documentGrid:empty::before {
  content: "";
  display: block;
  grid-column: 1 / -1;
  height: 198px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

#gameCardGrid:empty::before {
  content: "";
  display: block;
  grid-column: 1 / -1;
  height: 120px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

/* Empty state when a filter tab has no documents */
.document-grid-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 56px 16px;
  text-align: center;
  color: rgba(236, 244, 248, 0.46);
  font-size: 0.95rem;
  line-height: 1.6;
}
