/* ========================= */
/* 全局设置 */
/* ========================= */

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont,
  "PingFang SC", "Hiragino Sans GB",
  "Microsoft YaHei", sans-serif;
}

.wide-container {
  max-width: 1400px;
  margin: auto;
  padding: 0 4%;
}

/* ========================= */
/* 顶部导航 */
/* ========================= */

.top-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  padding: 10px 25px;
  border-radius: 50px;
  z-index: 1000;
  display: flex;
  gap: 25px;
}

.top-nav a {
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  transition: opacity .3s ease;
}

.top-nav a:hover {
  opacity: 0.7;
}

/* ========================= */
/* Hero */
/* ========================= */

.hero-section {
  height: 100vh;
  background: linear-gradient(to bottom,#B3E5FC,#E1F5FE);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 10vw;
}

.logo-text {
  font-size: 90px;
  font-weight: 400;
  letter-spacing: 6px;
  line-height: 1.05;
  transition: transform 0.2s ease-out;
}

.hero-sub {
  margin-top: 30px;
  font-size: 13px;
  letter-spacing: 3px;
  opacity: 0.6;
}

/* ========================= */
/* Resume */
/* ========================= */

.resume-section {
  background: linear-gradient(to bottom,#E1F5FE,#2D3E50);
  padding: 140px 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 28px;
  transition: transform 0.25s ease-out;
}

.bento-item {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.profile-photo {
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4/5;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grid 分配 */

.basic-info { grid-column: span 3; }
.experience { grid-column: span 3; }
.education { grid-column: span 1; }
.skills { grid-column: span 4; }

.resume-section h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 1px;
}

.bio-text {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
  margin-top: 20px;
}

.bento-title {
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  opacity: 0.6;
  margin-bottom: 18px;
}

.bento-item p,
.bento-item li {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

/* 标签 */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tag-cloud span {
  padding: 5px 12px;
  background: rgba(96,125,139,0.1);
  color: #546E7A;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(96,125,139,0.15);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tag-cloud span:hover {
  background: #607D8B;
  color: #fff;
  transform: translateY(-2px);
}

/* ========================= */
/* Portfolio */
/* ========================= */

.portfolio-block {
  padding: 120px 0;
  background: #2D3E50;
  scroll-margin-top: 120px;
}

.section-title {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s ease;
}

.section-title.show {
  opacity: 1;
  transform: translateY(0);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 40px;
}

/* 整张卡片可点击但不改变视觉 */

a.project-link,
a.project-link:link,
a.project-link:visited,
a.project-link:hover,
a.project-link:active {
  text-decoration: none !important;
  color: inherit !important;
  display: block;
}

.card-link:hover {
  text-decoration: none;
  color: inherit;
}

.project-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.8s ease;
  opacity: 0;
  transform: translateY(40px);
}

.project-card.show {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.img-box {
  height: 250px;
  overflow: hidden;
}

.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-info {
  padding: 25px;
}

.project-meta {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 10px;
}

.project-role {
  font-size: 13px;
  margin-top: 10px;
  opacity: 0.7;
}

/* ========================= */
/* 平板 */
/* ========================= */

@media(max-width:900px) {

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    display: none;
  }
}

/* ========================= */
/* 手机 */
/* ========================= */

@media (max-width: 768px) {

  .hero-section {
    padding: 0 6vw;
  }

  .logo-text {
    font-size: 48px;
    letter-spacing: 4px;
  }

  .hero-sub {
    font-size: 12px;
    line-height: 1.6;
    margin-top: 25px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .basic-info,
  .experience,
  .education,
  .skills {
    grid-column: span 1 !important;
  }

  .portfolio-block {
    padding: 80px 0;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .img-box {
    height: 200px;
  }

  .project-card {
    transform: none !important;
  }
}
a {
  text-decoration: none;
  color: inherit;
}
a.card-link,
a.card-link:link,
a.card-link:visited,
a.card-link:hover,
a.card-link:active {
  text-decoration: none;
  color: inherit;
  display: block;
}