/* 莫蘭迪色系 (Morandi Color System) - 高級感、低飽和度的靜謐美學 */
:root {
  --bg-color: #f2efeb; 
  --text-color: #4a4e52;
  --text-muted: #8d9399;
  --primary-color: #8a9a9c; 
  --secondary-color: #9bb1a7;
  --accent-color: #bfa39e;
  --card-bg: #faf9f7;
  --border-color: #d1cbc4;
  /* 縮短微動畫時間為 Skill 指定的 0.2s */
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.8;
  letter-spacing: 0.04em;
  overflow-x: hidden;
}

/* 導覽列 - 手機優先佈局 */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(242, 239, 235, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.logo i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* 漢堡按鈕僅在手機顯示 */
.menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
}

/* 手機版導覽連結：預設隱藏並使用疊加層 */
.nav-links {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-color);
  flex-direction: column;
  padding: 2rem;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: none; /* 預設隱藏 */
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.nav-links.active {
  display: flex; /* 切換 active 類別時顯示 */
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-links a:hover {
  color: var(--primary-color);
  padding-left: 0.5rem;
}

.nav-links a i {
  width: 20px;
  text-align: center;
}

/* 主要區塊佈局 */
section {
  min-height: 100vh;
  padding: 7rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hidden {
  display: none;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 3rem;
  text-align: center;
  color: var(--text-color);
  letter-spacing: 0.15em;
}

/* 首頁英雄區 */
#home h1 {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

#home p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 100%;
  margin-bottom: 2rem;
}

.hero-img {
  width: 100%;
  max-width: 280px;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(138, 154, 156, 0.15);
  border: 4px solid #fff;
}

/* 按鈕樣式 */
.btn {
  padding: 0.8rem 2.5rem;
  border: 1px solid var(--primary-color);
  font-size: 0.9rem;
  background: transparent;
  color: var(--primary-color);
  border-radius: 4px;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: var(--primary-color);
  color: #fff;
}

/* 卡片與格網 */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

.card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* 桌面端優化 (768px 以上) */
@media (min-width: 768px) {
  nav {
    padding: 1.2rem 4rem;
  }

  .menu-toggle {
    display: none; /* 桌面端隱藏按鈕 */
  }

  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    width: auto;
    background: transparent;
    padding: 0;
    gap: 3rem;
    border: none;
    box-shadow: none;
  }

  .logo {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 5rem;
  }

  #home h1 {
    font-size: 2.8rem;
  }

  section {
    padding: 10rem 4rem 6rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
  }
}
