/* ========== Global Reset ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  background-color: #fff7f0; /* 暖奶油色背景 */
}

/* ========== Header ========== */
.site-header {
  width: 100%;
  background-color: #fff7f0;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.header-left {
  display: flex;
  flex-direction: column; /* logo 上，文字下 */
  align-items: flex-start;
  gap: 0.2rem;
}

.header-left .logo {
  width: 120px;
  height: auto;
}

.header-left .site-title {
  font-size: 16px;
  font-weight: 600;
  margin: 5px 0 0 0;
  color: #333;
}

/* ========== Navigation ========== */
.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  text-decoration: none;
  color: #262137;
  font-weight: 500;
  transition: color 0.3s ease;
}

.site-nav a:hover {
  color: #e07b39;
}

/* ========== Hamburger Button / Mobile Nav ========== */
.menu-toggle {
  display: none; /* 桌面端隐藏 */
  font-size: 2.2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #e07b39;
  padding: 0.5rem 0.7rem;
  position: absolute;
  top: 15px;
  right: 0;
  z-index: 200;
  transition: transform 0.3s ease, color 0.3s ease;
}

.menu-toggle.active {
  transform: rotate(90deg); /* 点击旋转效果 */
  color: #e07b39;
}

@media (max-width: 768px) {

  /* Header 调整 */
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    position: relative;
  }

  .header-left .logo {
    width: 100px;
  }

  .header-left .site-title {
    font-size: 14px;
  }

  /* 汉堡按钮显示 */
  .menu-toggle {
    display: block;
  }

  /* 移动端导航 */
  .site-nav {
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #f5f0e6;  /* 米色背景 */
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    padding: 1rem 2rem;
    z-index: 150;

    /* 默认隐藏 */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
  }

  .site-nav.active {
    max-height: 500px; /* 根据菜单高度可调整 */
    opacity: 1;
  }

  .site-nav a {
    padding: 0.5rem 0;
    color: #262137;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
  }

  /* hover 下划线动画 */
  .site-nav a::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    background: #e07b39;
    transition: width 0.3s;
    position: absolute;
    bottom: -4px;
    left: 0;
  }

  .site-nav a:hover::after {
    width: 100%;
  }
}

/* ========== Hero Section ========== */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: flex-start;
  align-items: center;
  padding: 4rem 2rem 2rem 2rem;
}

.hero-image {
  margin-bottom: 4rem;
}

.hero-image img {
  max-width: 80%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

.btn, .btn.outline {
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn {
  background-color: #e07b39;
  color: #fff;
  border: none;
}

.btn:hover {
  background-color: #c25a17;
  transform: translateY(-2px);
}

.btn.outline {
  background-color: transparent;
  color: #e07b39;
  border: 2px solid #e07b39;
}

.btn.outline:hover {
  background-color: #e07b39;
  color: #fff;
  transform: translateY(-2px);
}

/* ========== Projects Grid ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project {
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff4e6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.project img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 1rem 1.5rem;
}

.project-content h3 {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  color: #262137;
}

.project-content p {
  color: #555;
  font-size: 0.95rem;
}

/* ========== Card Section ========== */
.card {
  text-align: center;
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.card h3 {
  font-size: 2.2rem;
  color: #262137;
  margin-bottom: 1rem;
  font-weight: 700;
}

.card p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* ========== Footer ========== */
footer {
  padding: 2rem 4rem;
  text-align: center;
  background-color: #fff7f0;
  color: #262137;
}

footer .footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

footer .footer-logo {
  width: 100px;
  height: auto;
}

/* ========== Page Transition Animation ========== */
.page-transition {
  animation: slideFadeOut 0.8s ease forwards;
}

@keyframes slideFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-80px);
  }
}
