* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --main-red: #d4435b; /* 可随时更换 */
  --main-black: #000000;
  --main-white: #ffffff;
  --main-gray: #f2f2f2;
}



.top-left-label {
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--main-black);
  font-family: Arial, sans-serif;
  pointer-events: auto;
}


.top-left-label .name {
  font-size: 1.2rem;
}

.top-left-label .title {
  font-size: 1rem;
}

body {
  font-family: "Gabarito", sans-serif;
  font-weight: 450;
  line-height: 1.6;
  background: #f9f5f0;
  color: #222;
}

strong{
   font-weight: 1000;
   font-size: larger;
}
/* === Landing Section === */
#landing {
  height: 100vh;
  background: var(--main-red);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #ccc;
  transition: opacity 0.6s ease;
  opacity: 1;
  position: relative;
  z-index: 2;
    font-family: "Bowlby One SC", sans-serif;
}

#landing.hide {
  opacity: 0;
  pointer-events: none;
}

.landing-content h1 {
  font-size: 10rem;
  text-align: center;
  line-height: 0.85;
  letter-spacing: -0.2rem;
  font-weight: 900;
  animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* === Navigation === */
#main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
  background: var(--main-white);
  border-radius: 999px; /* 圆角导航栏 */
  position: fixed;
  width: 90%; /* 不要贴满屏幕，留出边距 */
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border: 2px solid var(--main-black);
  background-color: var(--main-white);
}


.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
}
.nav-right {
  flex: 1;
  justify-content: flex-end;
  gap: 0.8rem; /* 缩小间距 */
}

.nav-left {
  flex: 1;
}

.nav-center {
  flex: 1;
  justify-content: center;
  gap: 2rem;
}

.nav-right {
  flex: 1;
  justify-content: flex-end;
  gap: 0.4rem; /* 缩小间距 */
}

/* 通用图标按钮样式 */
.nav-right li {
  list-style: none;
}

.circle-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2.8rem;
  height: 2.8rem;
  background-color: white;
  border: 2px solid black;
  border-radius: 50%;
  box-shadow: 2px 3px 0px black;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.circle-icon:hover {
  background-color: var(--main-red);
  transform: scale(1.1);
}

.circle-icon img {
  width: 1.8rem;
  height: 1.8rem;
  object-fit: contain;
}


#main-nav.show {
  opacity: 1;
  pointer-events: auto;
}

#main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}


#main-nav li {
  font-size: 1rem;
}



/* 选中项样式（有圆角边框） */
.nav-item.active {
  border: 2px solid black;
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-weight: bold;
  background-color: var(--main-red);
  color: white;
  box-shadow: 2px 3px 0px #000;
}
.nav-item {
  position: relative;
  padding: 0.3rem 1rem;
  cursor: pointer;
  height: auto; /* 不要限制高度，避免遮挡 dropdown */
}

/* 控制动画效果的容器 */
.nav-label {
  position: relative;
  overflow: hidden;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 动画文字本体 */
.nav-text {
  display: block;
  transition: transform 0.3s ease;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}

.nav-text.primary {
  transform: translateY(0%);
}

.nav-text.hover-slide {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  transform: translateY(0%);
}

/* hover 时滑动 */
.nav-item:not(.active):hover .primary {
  transform: translateY(-125%);
}
.nav-item:not(.active):hover .hover-slide {
  transform: translateY(-125%);
}

/* dropdown 下拉菜单样式保持不变 */
.works-parent {
  position: relative;
}

.works-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 2px 3px 0px #000;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 9999;
  min-width: 150px;
  border: 2px solid #000;
  border-radius: 12px;
  overflow: hidden;
}

.works-parent:hover .works-dropdown {
  display: block;
}

.works-dropdown li {
  padding: 10px;
  cursor: pointer;
  color: black;
}
.works-dropdown li:hover {
  background-color: #f0f0f0;
}



/* === About Section === */
#about {
  padding: 5vw 5vw;
  margin: 0;
  max-width: none;
  opacity: 1;
  pointer-events: auto;
  /* background-image: linear-gradient(to right,var(--main-red), rgba(255,0,0,0), var(--main-red)); */
}
#about ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#about ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-size: 1rem;
  color: #000000;
}

#about ul li::before {
  content: '⬖';
  color: black;
  font-size: 1.2rem;
  position: absolute;
  left: 0;
  top: -0.15rem; /* 垂直微调 */
}

.about-middle h2 {
  font-size: 5vw;
  margin-bottom: 1rem;
  font-weight: bold;
}
.about-3col-container {
  display: flex;
  flex-wrap: nowrap; /* 不自动换行 */
  gap: 1vw;
}

/* 三列比例调整：左中右 */
.about-left {
  flex: 1 1 30%;
  display: flex;
  flex-direction: column;
  gap: 1vw;
}

.about-middle {
  flex: 2 1 30%;
  display: flex;
  flex-direction: column;
  gap: 1vw;
}

.about-right {
  flex: 1 1 15%;
  display: flex;
  flex-direction: column;
  gap: 1vw;
}

/* 左侧照片 */
.about-left .about-photo img {
  width: 100%;
  border-radius: 16px;
  border: 2px solid #000;
}

/* 环绕照片放大 + 响应式设置 */
.float-photo {
  float: left;
  shape-outside: margin-box;
  width: min(25vw, 220px);  /* 根据屏幕自适应缩放，最大宽度限制 */
  height: auto;
  margin-right: 1rem;
  border-radius: 16px;
  border: 2px solid #000;
}
@media (max-width: 600px) {
  .float-photo {
    width: 100%;
    float: none;
    display: block;
    margin: 0 auto 1rem auto;
    shape-outside: none;
  }

  .about-left .intro {
    text-align: center;
  }
}


/* 确保文字环绕时对齐 */
.about-left .intro {
  overflow: hidden; /* 清除浮动 */
}

.about-left .intro-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #000000;
}

/* 标题间距和字体调整 */
.about-col h2,
.about-col h3 {
  margin-bottom: 0.5rem;
}

.about-col h2{
  font-size: 3rem;
   font-family: "Bowlby One SC", sans-serif;
}

.about-col h3,#works h2 {
  font-size: 2rem; /* 原来是默认值，改大 */
  font-weight: 700;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--main-red);
  font-family: "Bowlby One SC", sans-serif;
}


.about-col ul {
  list-style: disc;
  padding-left: 1.2rem;
  margin: 0;
}

.about-col li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #333;
}

.about-col .education,
.about-col .projects,
.about-col .skills {
  border: 2px solid var(--main-black);
  border-radius: 12px;
  padding: 1.2rem;
  background-color: var(--main-white);
}

.edu-entry {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.edu-left {
  width: 25%;
  font-weight: bold;
  color: #000;
}

.edu-right {
  width: 75%;
}

.edu-right p {
  margin: 0.2rem 0;
  color: #222;
  line-height: 1.5;
}

.projects-entry {
  display: flex;
  gap: 2rem;
}

.projects-left {
  width: 30%;
  font-weight: 600;
}

.projects-right {
  width: 70%;
}


.icons-grid img {
  width: 48px;
  height: 48px;
  border: 2px solid #000;
  border-radius: 10px;
  background: #fff;
  box-shadow: 2px 3px 0px #000;
}



/* 响应式布局 */
@media (max-width: 1024px) {
  .about-3col-container {
    flex-direction: column;
  }

  .about-col {
    width: 100%;
  }

  .about-col h2,
  .about-col p,
  .about-col h3,
  .about-col li {
    text-align: left;
  }

  .icons-grid {
    justify-content: center;
  }
}


/* === Responsive === */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    align-items: center;
  }

  .about-photo,
  .about-content {
    width: 100%;
    max-width: 100%;
  }

  .about-content h2,
  .about-content p,
  .about-content .interests,
  .about-content .domain {
    text-align: left;
  }
}

/* works-parent 设为相对定位，方便子菜单绝对定位 */
.works-parent {
  position: relative;
  cursor: pointer;
}

/* 隐藏 dropdown 默认状态 */
.works-dropdown {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--main-white);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 9999;
  min-width: 150px;
}

/* 显示 dropdown when hovering parent */
.works-parent:hover .works-dropdown {
  display: block !important;
}


/* 可选美化 */
.works-dropdown li {
  padding: 10px;
  color: black;
  cursor: pointer;
}

.works-dropdown li:hover {
  background-color: #f0f0f0;
}

#works {
  padding: 5vw 5vw;
  margin: 0;
  max-width: none;
  opacity: 1;
  pointer-events: auto;
  background-color: var(--main-red);
  padding-bottom: 3rem;
}

#works h2{
  color: var(--main-black);
}

/* Work Card */
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5% 1.5%;

}
@media (max-width: 1728px) {
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 800px) {
  .works-grid {
    grid-template-columns: 1fr; /* 单列 */
  }
}
.work-card {
  position: relative;
  border: 2px solid black;
  border-radius: 16px;
  padding: 5%;
  background-color: white;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 4 / 6;
  display: flex;
  flex-direction: column;
}

.work-card-link {
  display: block; /* 或者 flex */
  width: 100%;
  height: 100%;
}


.work-card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 日期保留右上角 */
.work-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: bold;
  z-index: 2;
  position: relative;
}

/* 图片包一层 wrapper 来裁剪放大的 img */
.img-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.work-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.work-card h3 {
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  margin: 0.5rem 0 0.25rem;
  font-weight: 900;
}

.work-card p {
  font-size: clamp(0.8rem, 1vw, 1.1rem);
  flex-grow: 1;
}

@media (max-width: 1500px) {
  .work-card h3 {
    font-size: 1.8rem;
  }
  .work-card p {
    font-size: 1rem;
  }
}
@media (max-width: 1200px) {
  .work-card h3 {
    font-size: 1.5rem;
  }
  .work-card p {
    font-size: 0.8rem;
  }
}
@media (max-width: 800px) {
  .work-card h3 {
    font-size: 1.6rem;
  }
  .work-card p {
    font-size: 1.1rem;
  }
}

.work-card:hover img {
  transform: scale(1.1); /* 放大但不影响 wrapper 尺寸 */
}

.tagline {
  font-size: 1.1em;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 0.5em;
  text-align: center;
  line-height: 1;
}


.tagline::before {
  content: '⬖ ';
  font-size: 1.5em;
}

.tagline::after {
  content: ' ⬖';
  font-size: 1.5em;
}


.category-label{
  border: 2px solid black;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-weight: bold;
  box-shadow: 2px 3px 0px #000;
}

.date-label{
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-weight: bold;
}

/* 四个圆点 */
/* 通用样式 */
.corner-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: black;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

/* Hover 启动动画 */
.work-card:hover .corner-dot {
  opacity: 1;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

/* 四个圆点的位置和各自动画 */
.corner-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  background: black;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.work-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.scrollable-description {
  overflow-y: auto;
  flex-grow: 1;
  min-height: 0;
  margin-top: 0.5rem;
  padding-bottom: 0.5rem;

  /* 隐藏滚动条 */
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* IE 10+ */
}

.scrollable-description::-webkit-scrollbar {
  display: none;                   /* Chrome / Safari */
}



/* 左上角动画 */
.top-left {
  top: 0;
  left: 0;
  animation-name: orbit-tl;
  animation-duration: 4s;
}

/* 右下角动画 */
.bottom-right {
  bottom: 0;
  right: 0;
  animation-name: orbit-br;
  animation-duration: 4s;
}

/* 左上角轨迹顺时针贴边框 */
@keyframes orbit-tl {
  0%   { top: -6px; left: -6px; }
  25%  { top: -6px; left: calc(100% - 6px); }
  50%  { top: calc(100% - 6px); left: calc(100% - 6px); }
  75%  { top: calc(100% - 6px); left: -6px; }
  100% { top: -6px; left: -6px; }
}

@keyframes orbit-br {
  0%   { bottom: -6px; right: -6px; }
  25%  { bottom: -6px; right: calc(100% - 6px); }
  50%  { bottom: calc(100% - 6px); right: calc(100% - 6px); }
  75%  { bottom: calc(100% - 6px); right: -6px; }
  100% { bottom: -6px; right: -6px; }
}

.work-card.placeholder {
  visibility: hidden;
  height: 0;
  margin-bottom: 20%; /* 模拟最后一排的 gap 和 padding-bottom */
  pointer-events: none;
}


