/* =========================
   Global 基本設定
========================= */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f7f7f7;
  color: #333;
}

/* =========================
   Header 頂部區塊
========================= */
header {
  background-color: #1f3a5f;
  color: white;
  padding: 35px;
  text-align: center;
  position: relative; /* 給 dog 定位 */
}

/* --- Header 左下角 dog GIF --- */
.header-dog {
  position: absolute;
  left: 25px;
  bottom: -5px;
  width: 80px;          /* 桌機尺寸 */
  height: auto;
  pointer-events: none;
  opacity: 0.9;
}
/* Header 右下角 dog2 */
.header-dog2 {
  position: absolute;
  right: 25px;
  bottom: -5px;
  width: 80px;
  height: auto;
  pointer-events: none;
  opacity: 0.9;
}

/* =========================
   Social Icons
========================= */
.social-links {
  margin-top: 30px;          /* 與副標距離 */
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
}

.social-links svg {
  width: 24px;
  height: 24px;
  fill: #1f3a5f;
}

/* =========================
   Section 通用樣式
========================= */
section {
  max-width: 1000px;
  margin: 40px auto;
  background: white;
  padding: 35px;
  border-radius: 8px;
}

h2 {
  border-bottom: 2px solid #ddd;
  padding-bottom: 10px;
}

/* =========================
   About / Profile
========================= */
.profile {
  display: flex;
  align-items: center;
  gap: 40px;
}

.photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-photo {
  width: 220px;
  height: 300px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* =========================
   Flower Decoration（進場顯示）
========================= */
.flower-decor {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.flower-decor.in-view {
  opacity: 1;
  transform: translateY(0);
}

.flower-decor span {
  font-size: 20px;
  opacity: 0.75;
  animation: floatFlower 4s ease-in-out infinite;
}

.flower-decor span:nth-child(2) { animation-delay: 1.2s; }
.flower-decor span:nth-child(3) { animation-delay: 2.4s; }

/* =========================
   CV 區塊
========================= */
.cv-block {
  margin-bottom: 28px;
}

.cv-block h3 {
  margin-bottom: 8px;
  color: #1f3a5f;
}

.cv-block ul {
  margin: 0;
  padding-left: 20px;
}

.cv-block li {
  margin-bottom: 6px;
}

/* =========================
   Projects 專案卡片（桌機 / 共用）
========================= */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 30px;
}

.project-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

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

.project-card div {
  padding: 18px;
}

/* =========================
   Footer
========================= */
footer {
  text-align: center;
  padding: 20px;
  color: #777;
}

/* =========================
   Animations
========================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes floatFlower {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

header h1 {
  animation: fadeUp 0.9s ease-out forwards;
}

header p {
  opacity: 0;
  animation: fadeUp 0.9s ease-out forwards;
  animation-delay: 0.2s;
}

/* =========================
Responsive Design（RWD）
========================= */

  /*  RWD：平板以下 */
@media (max-width: 900px) {
  .profile {
    flex-direction: column;
    text-align: center;
  }

  .profile-photo {
    width: 150px;
    height: auto;
  }

  section {
    margin: 25px 15px;
    padding: 28px;
  }
}

/* =========================
   RWD：手機版（重點調整）
========================= */
@media (max-width: 600px) {

  /* 整體閱讀字級 */
  body {
    font-size: 17px;
    line-height: 1.7;
  }

  header h1 { font-size: 1.9rem; }
  header p  { font-size: 1.05rem; }
  h2        { font-size: 1.35rem; }
  h3        { font-size: 1.1rem; }

  /* Projects：手機一列一張 */
  .projects {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  /* Header dog：手機放大 */
  .header-dog {
    width: 65px;
    left: 18px;
    bottom: 0px;
  }
  /* 手機板縮小 */
  .header-dog2 {
    width: 65px;
    right: 18px;
    bottom: 0px;
  }

}
