:root {
  --bg: #f7f5f2;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #6b6b6b;
  --accent: #2d5a3d;
  --accent-light: #e8f0eb;
  --accent-2: #3d5a8a;
  --accent-3: #8a5a3d;
  --border: #e5e2dd;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
  --header-bg: rgba(247, 245, 242, 0.95);
  --footer-bg: #1a1a1a;
  --footer-text: #ffffff;
}

html[data-theme="silver"] {
  --bg:#f4f4f2;
  --bg-card:#fff;
  --text:#161616;
  --text-secondary:#6f6f6f;
  --accent:#232323;
  --accent-light:#ececec;
  --accent-2:#5f6b8a;
  --accent-3:#8a5a3d;
  --border:#e2e2e0;
  --header-bg:rgba(250, 250, 250, 0.95);
  --footer-bg:#161616;
}

html[data-theme="warm"] {
  --bg:#f7f1ea;
  --bg-card:#fffdf9;
  --text:#2a201c;
  --text-secondary:#7d6f63;
  --accent:#a4643a;
  --accent-light:#f3e4d8;
  --accent-2:#7d5a44;
  --accent-3:#4d6b5a;
  --border:#eadfd6;
  --header-bg:rgba(247, 241, 233, 0.95);
  --footer-bg:#2a201c;
  --shadow:0 4px 24px rgba(122, 90, 60, 0.16);
  --shadow-hover:0 12px 40px rgba(90, 60, 40, 0.22);
}

html[data-theme="dark"] {
  --bg:#15171c;
  --bg-card:#1e232a;
  --text:#f0efe9;
  --text-secondary:#b8c0ca;
  --accent:#8fc9a8;
  --accent-light:#22332a;
  --accent-2:#7fa6c8;
  --accent-3:#d8a06a;
  --border:#2f343c;
  --header-bg:rgba(20, 21, 24, 0.93);
  --footer-bg:#0f1114;
  --shadow:0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover:0 12px 48px rgba(0, 0, 0, 0.55);
}

html[data-theme="slate"] {
  --bg:#edf3f8;
  --bg-card:#fff;
  --text:#1c242c;
  --text-secondary:#5f6b78;
  --accent:#3d6b9e;
  --accent-light:#d8e6f3;
  --accent-2:#3d6b9e;
  --accent-3:#b0785c;
  --border:#dae2ea;
  --header-bg:rgba(239, 246, 251, 0.96);
  --footer-bg:#1c242c;
  --shadow:0 4px 24px rgba(22, 80, 110, 0.12);
  --shadow-hover:0 12px 44px rgba(30, 70, 120, 0.18);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

button, input, textarea, select { font: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  text-decoration: none;
}

.logo span { color: var(--accent); }

.nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav a {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav a:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.nav a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.theme-widget {
  position: relative;
  display: flex;
  align-items: center;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle .theme-icon {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-card) 45%, var(--text) 55%);
}

.theme-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 15px;
  min-width: 170px;
  display: none;
  z-index: 1200;
}

.theme-menu.open { display: block; }

.menu-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 10px;
  padding: 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  text-align: left;
  transition: all 0.2s ease;
}

.theme-option:hover {
  background: var(--accent-light);
}

.theme-option.active {
  background: var(--accent-light);
  font-weight: 600;
  color: var(--accent);
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.page-shell {
  padding-top: 112px;
  min-height: 100vh;
}

.hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 140px 40px 60px;
}

.hero-tag {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 0 40px;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 60px;
  margin-bottom: 60px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-number {
  font-family: "Noto Serif SC", serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.cards-section {
  max-width: 1200px;
  margin: -100px auto 0;
  padding: 40px 40px 100px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all 0.4s ease;
  box-shadow: var(--shadow);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-content {
  padding: 24px;
}

.card-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.card-icon-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 16px;
}

.card h3 {
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.card-photo:hover { border-color: var(--accent); }
.card-video:hover { border-color: var(--accent-2); }
.card-ai:hover { border-color: var(--accent-3); }

.section-header {
  max-width: 1100px;
  margin: 0 auto 28px;
  padding: 0 24px;
}

.section-header h2 {
  font-size: clamp(28px, 3vw, 42px);
  font-family: "Noto Serif SC", serif;
  margin: 0 0 12px;
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
}

.filter-bar {
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-btn {
  padding: 10px 24px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.gallery-wrap, .video-grid-wrap {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 2 / 3;
  background: #eee;
  border: 1px solid transparent;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  box-shadow: var(--shadow);
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light), var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.gallery-item:hover .overlay {
  opacity: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.12) 70%, transparent 100%);
}

.overlay h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #fff;
}

.overlay p {
  margin: 0 0 10px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
}

.tag {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 12px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.video-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: var(--shadow);
}

.video-item:hover {
  transform: translateY(-6px);
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-light), var(--shadow-hover);
}

.video-thumbnail {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #ddd;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.video-item:hover .video-thumbnail img {
  transform: scale(1.06);
  filter: brightness(0.82) saturate(1.12);
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.8);
  backdrop-filter: blur(4px);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.video-item:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.12);
  background: var(--accent-2);
  border-color: #fff;
}

.play-icon::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 17px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #fff;
}

.video-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.video-info {
  padding: 18px 18px 20px;
}

.video-info h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 13px;
}

.video-tag {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.ai-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 20px;
}

.ai-hero-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 22px;
  color: #fff;
  padding: 40px 36px;
  box-shadow: var(--shadow-hover);
}

.ai-hero-card h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 56px);
  font-family: "Noto Serif SC", serif;
}

.ai-hero-card p {
  margin: 0;
  max-width: 720px;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
  font-size: 17px;
}

.ai-intro {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 0 24px;
}

.ai-intro-box {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: 20px;
  padding: 30px 28px;
}

.ai-intro-box h3 {
  margin: 0 0 18px;
  font-size: 24px;
}

.ai-intro-box p {
  margin: 0;
  line-height: 1.8;
  color: rgba(255,255,255,0.9);
}

.tools-grid {
  max-width: 1100px;
  margin: 30px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  outline: none;
}

.tool-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.tool-card .tool-content {
  padding: 18px 18px 22px;
}

.tool-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.tool-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.capability-list {
  max-width: 1100px;
  margin: 34px auto 50px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.capability-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 15px;
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.capability-item:hover,
.capability-item:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  outline: none;
}

.ai-modal-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.ai-modal-image {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  background: #111;
}

.ai-modal-body {
  padding: 28px 26px;
  color: var(--text);
  background: var(--bg-card);
}

.ai-modal-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
}

.ai-modal-body h3 {
  margin: 16px 0 12px;
  font-size: clamp(24px, 2vw, 30px);
  font-family: "Noto Serif SC", serif;
}

.ai-modal-body p {
  margin: 0 0 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.ai-modal-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.9;
}

.ai-modal-list li + li {
  margin-top: 4px;
}

.profile-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.profile-header {
  text-align: center;
  margin-bottom: 18px;
}

.profile-header h1 {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(38px, 5vw, 52px);
  margin: 0 0 8px;
}

.profile-tag {
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
}

.profile-contact {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 15px;
}

.profile-contact span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stat-strip {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 900px;
  margin: -8px auto 16px;
}

.stat-chip {
  background: linear-gradient(var(--accent), var(--accent-2, #3d5a8a));
  color: #fff;
  border-radius: 16px;
  padding: 16px 26px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.stat-chip:hover {
  transform: translateY(-6px) scale(1.02);
}

.stat-chip .num {
  font-family: "Noto Serif SC", serif;
  font-size: 30px;
  font-weight: 800;
}

.stat-chip .lbl {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 8px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  margin-top: 18px;
}

.job,
.skill-category,
.education,
.cta-section,
.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
  transition: all 0.3s cubic-bezier(.25,.46,.45,.94);
}

.job:hover,
.skill-category:hover,
.education:hover,
.cta-section:hover,
.card-box:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

.job h3,
.skill-category h3,
.education h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 22px;
}

.job-list,
.skill-list,
.ai-list,
.education-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.job li,
.skill-list li,
.ai-list li,
.education-list li {
  color: var(--text);
  font-size: 15px;
  line-height: 1.9;
}

.job li + li,
.skill-list li + li,
.ai-list li + li,
.education-list li + li {
  margin-top: 6px;
}

.job li strong,
.highlight {
  color: var(--accent);
  font-weight: 700;
}

.job-title {
  font-size: 19px;
  color: var(--text);
  font-weight: 700;
}

.job-company {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

.skill-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 22px;
}

.skill-category h4 {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 100px;
  font-weight: 700;
  margin-bottom: 10px;
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.ai-grid li {
  position: relative;
  padding-left: 18px;
}

.ai-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.cta-section {
  margin-top: 24px;
  text-align: center;
}

.cta-section h3 {
  margin: 0 0 12px;
  font-size: 28px;
}

.cta-section p {
  color: var(--text-secondary);
  margin: 0 0 18px;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open { display: flex; }

.modal.is-fullscreen {
  background: rgba(0, 0, 0, 0.96);
  padding: 0;
}

.modal.is-fullscreen .modal-panel {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.modal.is-fullscreen .lightbox-img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-sizing: border-box;
}

.modal.is-fullscreen .modal-close,
.modal.is-fullscreen .lightbox-nav,
.modal.is-fullscreen .lightbox-caption {
  opacity: 0.95;
}

.modal.is-fullscreen .modal-close {
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
}

.modal.is-fullscreen .lightbox-nav {
  top: 50%;
}

.modal.is-fullscreen .lightbox-fullscreen {
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
}

.modal.is-fullscreen .lightbox-caption {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(70vw, 720px);
  text-align: center;
  padding: 0;
  pointer-events: none;
}

.modal-panel {
  position: relative;
  width: min(90vw, 1100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  touch-action: pan-y;
}

.modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-img,
.video-modal-player {
  width: min(80vw, 900px);
  max-height: 75vh;
  border-radius: 16px;
  object-fit: contain;
  background: #000;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.lightbox-img.is-changing {
  opacity: 0.64;
  transform: scale(0.98);
}

/* 自定义图片全屏模式 */
.modal.is-fullscreen .lightbox-img {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  object-fit: contain;
}

.video-modal-player {
  width: min(80vw, 960px);
  height: auto;
  display: block;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
}

.lightbox-prev { left: -72px; }
.lightbox-next { right: -72px; }

.lightbox-fullscreen {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(15, 17, 20, 0.42);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, border-color 0.2s ease;
  z-index: 2;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.lightbox-fullscreen:hover,
.lightbox-fullscreen:focus-visible,
.lightbox-fullscreen.active {
  background: rgba(255,255,255,0.24);
  border-color: rgba(255,255,255,0.52);
  transform: scale(1.06);
  outline: none;
}

.lightbox-caption {
  position: static;
  color: #fff;
  text-align: center;
  margin-top: 12px;
  font-size: 15px;
  max-width: min(70vw, 720px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 40px;
  text-align: center;
}

#backTop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 1100;
}

#backTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backTop:hover {
  background: var(--accent-2, #3d5a8a);
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  .cards-grid,
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .ai-modal-panel {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 40px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 20px;
  }

  .nav {
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .nav a {
    padding: 6px 10px;
    font-size: 14px;
  }

  .hero {
    padding: 120px 20px 40px;
  }

  .cards-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-list {
    grid-template-columns: 1fr;
  }

  .lightbox-prev { left: -10px; }
  .lightbox-next { right: -10px; }

  .lightbox-fullscreen {
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .hero-stats {
    display: grid;
    gap: 16px;
    width: 100%;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    padding: 0 16px;
  }

  .section-header,
  .gallery-wrap,
  .video-grid-wrap,
  .ai-hero,
  .ai-intro,
  .tools-grid,
  .capability-list,
  .profile-shell {
    padding-left: 16px;
    padding-right: 16px;
  }
}

html[data-theme="dark"] .stat-chip {
  background: linear-gradient(#22332a, #2f343c);
}

html[data-theme="dark"] .highlight,
html[data-theme="dark"] .job li strong {
  color: #a8e0bf;
}
