/* ===== CSS 变量 ===== */
:root {
  --bg-primary: #06080A;
  --bg-black: #000000;
  --brand: #3399CC;
  --text-primary: #E8EDF2;
  --text-secondary: #8899AA;
  --accent: #F7A072;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --card-shadow-inner: inset 0 2px 4px rgba(255, 255, 255, 0.06);
  --radius: 20px;
  --padding-card: 24px;
  --transition: 0.3s ease;
}

/* ===== 基础重置 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ===== 品牌头图区 ===== */
.hero {
  display: flex;
  height: 60vh;
  min-height: 420px;
}

.hero-left {
  width: 40%;
  background: var(--bg-black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 115px;
}

.hero-name {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero-school {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.hero-job {
  font-size: 18px;
  color: var(--brand);
  margin-bottom: 16px;
  font-weight: 600;
}

.hero-quote {
  font-size: 24px;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tag {
  font-size: 16px;
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.btn-resume {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
  align-self: flex-start;
}

.btn-resume:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(51, 153, 204, 0.4);
}

.hero-right {
  width: 60%;
  background:
    linear-gradient(to bottom, transparent 60%, var(--bg-primary) 100%),
    url('images/hero-bg.png');
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

/* ===== 项目展示区 ===== */
.projects {
  background: var(--bg-primary);
  padding: 60px 60px 80px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ===== 凝态玻璃卡片 ===== */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: var(--padding-card);
  box-shadow: var(--card-shadow-inner), var(--card-shadow);
  transition: transform var(--transition), border-color var(--transition);
}

/*.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.6);
}*/

.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(51, 153, 204, 0.5),
    0 0 80px rgba(51, 153, 204, 0.15);
}

/* ===== 卡片头部 ===== */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.card-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-time {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  padding-top: 4px;
}

.card-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ===== 卡片主体：轮播 + 信息 ===== */
.card-main {
  display: flex;
  gap: 28px;
  margin-bottom: 20px;
}

/* ===== 轮播图区域 ===== */
.card-carousel {
  position: relative;
  width: 40%;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

/* 手机端项目：9:16 竖屏比例，白底，完整展示，占比较窄 */
.card-carousel.carousel-mobile {
  aspect-ratio: 9 / 16;
  background: #fff;
  width: 26%;
}

/* 电脑端项目：16:9 横屏比例 */
.card-carousel.carousel-desktop {
  aspect-ratio: 16 / 9;
  background: #000;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

/* 轮播箭头 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
  left: 8px;
}

.carousel-next {
  right: 8px;
}

/* 轮播小圆点 */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background var(--transition);
  cursor: pointer;
}

.carousel-dot.active {
  background: #fff;
}

/* 手机端白色背景下圆点颜色加深 */
.carousel-mobile .carousel-dot {
  background: rgba(0, 0, 0, 0.25);
}

.carousel-mobile .carousel-dot.active {
  background: rgba(0, 0, 0, 0.65);
}

/* ===== 右侧信息 ===== */
.card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.info-item {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.info-label {
  color: var(--text-primary);
  font-weight: 600;
  margin-right: 8px;
}

.data-highlight {
  color: var(--accent);
}

.data-highlight .info-label {
  color: var(--accent);
}

/* 在线链接按钮 */
.btn-link {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
  align-self: flex-start;
  margin-top: 4px;
}

.btn-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(51, 153, 204, 0.35);
}

/* ===== 右侧信息区内的截图展示（项目1 + 项目5） ===== */
.info-screenshots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.info-shot {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
}

.info-shot img:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

.info-shot p {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.35;
}

/* ===== 右侧信息区内的数据看板（项目1） ===== */
.info-dashboard {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.info-dashboard img {
  width: 65%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
}

.info-dashboard img:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.info-dashboard p {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.35;
}

/* ===== 右侧信息区内的描述段落（项目5） ===== */
.info-section {
  margin-top: 6px;
}

.info-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.info-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 3px;
}

.info-highlight {
  color: var(--text-primary);
  font-weight: 600;
}

/* PDF 按钮在 card-info 中的内联样式 */
.btn-pdf-inline {
  align-self: flex-start;
  margin-top: 4px;
}

/* ===== 展开 / 收起按钮 ===== */
.expand-btn,
.collapse-btn {
  display: block;
  margin: 0 auto;
  font-size: 14px;
  color: var(--brand);
  padding: 10px 0;
  transition: color var(--transition);
}

.expand-btn:hover,
.collapse-btn:hover {
  color: #5bb8dd;
}

/* ===== 展开详情区 ===== */
.card-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, margin-top 0.5s ease;
  margin-top: 0;
  border-top: 1px solid transparent;
}

.card-expand.open {
  max-height: 3000px;
  margin-top: 16px;
  border-top-color: rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

/* 展开区网格 */
.expand-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.expand-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* 展开区图片容器 */
.expand-figure {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.expand-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
}

.expand-img:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

/* 展开区图片文字描述 */
.expand-caption {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

/* 展开区居中容器 */
.expand-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

/* 居中半宽图片（项目1数据看板） */
.expand-img-half {
  width: 50%;
  aspect-ratio: auto;
}

/* PDF 按钮 */
.btn-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
}

.btn-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(51, 153, 204, 0.35);
}

/* 居中放大视频（项目3） */
.expand-video-centered {
  width: 80%;
  max-width: 720px;
  border-radius: 10px;
  background: #000;
}

/* 展开区提示文字 */
.expand-notice {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  padding: 24px 0 8px;
}

/* ===== 收起按钮 ===== */
.collapse-btn {
  padding-top: 12px;
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 32px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
  transition: opacity var(--transition);
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 0.7;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 40px;
  text-align: center;
}

.footer p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== 响应式：平板 ===== */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    height: auto;
    min-height: auto;
  }

  .hero-left {
    width: 100%;
    padding: 40px 28px;
  }

  .hero-right {
    width: 100%;
    height: 40vh;
    min-height: 280px;
  }

  .hero-name {
    font-size: 28px;
  }

  .hero-school {
    font-size: 14px;
  }

  .hero-job {
    font-size: 15px;
  }

  .hero-quote {
    font-size: 18px;
  }

  .tag {
    font-size: 13px;
  }

  .card-main {
    flex-direction: column;
  }

  .card-carousel {
    width: 100%;
  }

  .card-carousel.carousel-mobile {
    aspect-ratio: 9 / 16;
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
  }

  .card-carousel.carousel-desktop {
    aspect-ratio: 16 / 9;
  }

  .info-screenshots {
    grid-template-columns: repeat(3, 1fr);
  }

  .info-dashboard img {
    max-width: 100%;
  }

  .info-text {
    font-size: 12px;
  }

  .expand-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .expand-img-half {
    width: 80%;
  }

  .expand-video-centered {
    width: 100%;
  }

  .projects {
    padding: 40px 24px 60px;
  }
}

/* ===== 响应式：手机 ===== */
@media (max-width: 640px) {
  .hero-left {
    padding: 28px 18px;
  }

  .hero-name {
    font-size: 24px;
  }

  .hero-school {
    font-size: 13px;
  }

  .hero-job {
    font-size: 14px;
  }

  .hero-quote {
    font-size: 17px;
  }

  .tag {
    font-size: 12px;
    padding: 3px 12px;
  }

  .hero-right {
    height: 30vh;
    min-height: 200px;
  }

  .projects {
    padding: 30px 14px 50px;
    gap: 32px;
  }

  .card {
    padding: 18px;
    border-radius: 16px;
  }

  .card-header {
    flex-direction: column;
    gap: 4px;
  }

  .card-header h2 {
    font-size: 17px;
  }

  .card-time {
    font-size: 12px;
  }

  .card-desc {
    font-size: 13px;
  }

  .card-info {
    gap: 6px;
  }

  .info-item {
    font-size: 13px;
  }

  .info-screenshots {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .info-shot p {
    font-size: 10px;
  }

  .info-section-title {
    font-size: 13px;
  }

  .info-text {
    font-size: 12px;
  }

  .expand-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .expand-img-half {
    width: 100%;
  }

  .expand-video-centered {
    width: 100%;
  }

  .carousel-dot {
    width: 6px;
    height: 6px;
  }

  .lightbox-close {
    top: 10px;
    right: 16px;
    font-size: 32px;
  }

  .footer {
    padding: 20px 16px;
  }

  .footer p {
    font-size: 11px;
  }
}