/* === 基本設定 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans TC", "Helvetica Neue", Arial, sans-serif;
  background-color: #FAF6F0; /* 米白背景 */
  color: #44403C; /* 深棕灰文字 */
  line-height: 1.8;
  scroll-behavior: smooth;
}

/* === 導覽列（固定頂部）=== */
header {
  background: rgba(250, 246, 240, 0.95);
  border-bottom: 1px solid #E7E3DD;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 12px 0;
}

nav ul li {
  margin: 0 18px;
}

nav ul li a {
  text-decoration: none;
  color: #44403C;
  font-weight: 500;
  transition: color 0.2s, border-bottom 0.2s;
  padding-bottom: 2px;
}

nav ul li a:hover {
  color: #D97706;
  border-bottom: 2px solid #D97706;
}

/* === 主要區塊 === */
section {
  max-width: 880px;
  margin: 0 auto;
  padding: 90px 20px;
  text-align: center;
}

/* === Hero 區塊 === */
.hero {
  padding: 120px 20px;
  background-color: #F3ECE3;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  color: #D97706;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.1rem;
  color: #44403C;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  background: #D97706;
  color: #FAF6F0;
  padding: 10px 28px;
  border-radius: 4px;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: #b45309;
  transform: translateY(-1px);
}

/* === 各區塊標題 === */
section h2 {
  font-size: 1.6rem;
  color: #D97706;
  margin-bottom: 25px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* === About === */
#about p {
  font-size: 1.05rem;
  color: #44403C;
  max-width: 700px;
  margin: 0 auto;
}

/* === Skills === */
#skills ul {
  list-style: none;
  margin-top: 20px;
}

#skills li {
  padding: 10px;
  border-bottom: 1px solid #E0DAD2;
  color: #44403C;
  font-size: 1rem;
}

/* === Projects === */
#projects .project {
  background: #FFFDFB;
  border: 1px solid #EAE3D9;
  border-radius: 6px;
  padding: 25px;
  margin: 15px auto;
  width: 80%;
  transition: box-shadow 0.3s, transform 0.2s;
}

#projects .project:hover {
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
  transform: translateY(-2px);
}

/* === Contact === */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 80%;
  max-width: 480px;
  margin: auto;
}

input, textarea {
  padding: 12px;
  border: 1px solid #D9D3CA;
  border-radius: 4px;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
  background-color: #FFFDFB;
}

input:focus, textarea:focus {
  border-color: #D97706;
}

button {
  background: #D97706;
  color: #FAF6F0;
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #b45309;
}

/* === Footer === */
footer {
  text-align: center;
  background: #F3ECE3;
  color: #44403C;
  padding: 25px 0;
  font-size: 0.9rem;
  border-top: 1px solid #E7E3DD;
}

/* === RWD 響應式調整 === */
@media (max-width: 768px) {
  nav ul {
    flex-wrap: wrap;
  }

  .hero h1 {
    font-size: 2rem;
  }

  section {
    padding: 70px 20px;
  }

  #projects .project {
    width: 95%;
  }
}


/* === Modal 背景 === */
.modal {
  display: none; /* 初始隱藏 */
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
}

/* === Modal 內容 === */
.modal-content {
  background-color: #FAF6F0; /* 和整體風格一致 */
  margin: 8% auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 480px;
  border: 1px solid #E7E3DD;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  text-align: center;
  position: relative;
}

/* 關閉按鈕 */
.close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 26px;
  cursor: pointer;
  color: #44403C;
}

.close:hover {
  color: #D97706;
}

/* 按鈕群組 */
.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.modal-buttons button {
  width: 48%;
}

/* 沿用你的按鈕樣式 */
.cancel {
  background: #E0DAD2;
  color: #44403C;
}

.cancel:hover {
  background: #C6BEB4;
}

/* Modal 背景 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

/* Modal 內容 */
.modal-content {
  background: #fff;
  width: 90%;
  max-width: 400px;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  position: relative;
}

/* 關閉按鈕 */
.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

/* 表單樣式 */
.modal input,
.modal textarea {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
}

.modal button {
  width: 100%;
  padding: 10px;
  background: #333;
  color: white;
  border: none;
  cursor: pointer;
}
