/* ============================================================
   Edwind Portfolio — 极简黑白风格
   ============================================================ */

/* ---------- 全局重置 ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-color: #fafafa;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 图片保护（全局） ---------- */
img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* ---------- 布局容器 ---------- */
section {
  max-width: 960px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 48px;
  text-align: center;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  padding-top: 140px;
  padding-bottom: 100px;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* 头像 — background-image 保护 */
.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url('../个人头像/00.webp');
  margin-bottom: 16px;
  /* 透明覆盖层阻止另存为 */
  position: relative;
}

.avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.hero-name {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero-en {
  font-size: 16px;
  color: #999;
  letter-spacing: 3px;
  margin-top: -4px;
}

.hero-tagline {
  font-size: 15px;
  color: #666;
  margin-top: 8px;
  letter-spacing: 1px;
}

.hero-edu {
  font-size: 13px;
  color: #aaa;
  margin-top: 4px;
}

/* ============================================================
   PORTFOLIO GRID — Behance 风格
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* 图片保护覆盖层 */
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* 卡片封面 — background-image 加载，无 <img> 标签 */
.card-cover {
  width: 100%;
  padding-bottom: 75%; /* 4:3 比例 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* 透明覆盖层：阻止右键"图片另存为" */
.card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.card-info {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-info h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

.card-count {
  font-size: 12px;
  color: #bbb;
  font-weight: 500;
}

/* ---- Coming Soon 占位卡片 ---- */
.project-card.coming-soon {
  cursor: default;
  border: 1px dashed #ddd;
  background: transparent;
}

.project-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.coming-soon .card-cover {
  background: #f5f5f5 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 75%;
  position: relative;
}

.coming-soon .card-cover::before {
  content: '即将上线\nComing Soon';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre-line;
  font-size: 14px;
  color: #ccc;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1.8;
}

/* ============================================================
   UNDER CONSTRUCTION
   ============================================================ */
#construction {
  text-align: center;
  padding-top: 60px;
  padding-bottom: 60px;
}

.construction-banner {
  display: inline-block;
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 40px 60px;
}

.construction-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

.construction-title {
  font-size: 20px;
  font-weight: 600;
  color: #666;
  letter-spacing: 2px;
}

.construction-sub {
  font-size: 13px;
  color: #bbb;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  text-align: center;
  padding-top: 40px;
  padding-bottom: 60px;
}

.contact-content {
  margin-top: 8px;
}

.contact-email {
  font-size: 16px;
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid #1a1a1a;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.contact-email:hover {
  opacity: 0.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid #eee;
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 13px;
  color: #bbb;
}

.footer-icp {
  font-size: 12px;
  color: #ddd;
  margin-top: 4px;
}

/* ============================================================
   GALLERY OVERLAY — 全屏画廊
   ============================================================ */
#gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #111;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* 部分 iOS 需要 */
  transition: opacity 0.3s ease;
}

.gallery-hidden {
  display: none !important;
}

#gallery-close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 10000;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#gallery-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

#gallery-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 画廊中的每张图片 */
.gallery-image {
  width: 100%;
  padding-bottom: 66%; /* 3:2 比例，实际由 background-size cover 控制 */
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* 图片保护覆盖层 */
.gallery-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

/* 画廊底部在建提示 */
.gallery-footer-construction {
  text-align: center;
  padding: 48px 24px 64px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  letter-spacing: 1px;
}

.gallery-footer-construction .construction-icon {
  display: inline;
  font-size: 18px;
  margin-right: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  section {
    padding: 60px 20px;
  }

  #hero {
    padding-top: 80px;
    padding-bottom: 60px;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }

  .hero-name {
    font-size: 28px;
  }

  .hero-tagline {
    font-size: 13px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .construction-banner {
    padding: 28px 24px;
  }

  .construction-title {
    font-size: 17px;
  }

  #gallery-content {
    padding: 60px 16px 24px;
  }

  #gallery-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 24px;
  }

  .section-title {
    font-size: 12px;
    margin-bottom: 32px;
  }

  .card-info h3 {
    font-size: 14px;
  }
}
