/* 全局變數設定 */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-color);
  scroll-behavior: smooth;
}

/* 導覽列 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Hero 區塊 */
.hero {
  padding: 5rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.hero h1 {
  font-size: 2.3rem;
  margin-bottom: 1rem;
}

.highlight {
  color: var(--primary-color);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: var(--primary-hover);
}

/* 區塊與容器 */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.bg-alt {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

/* 關於我與標籤 */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* 卡片排版 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* 頁尾與聯絡 */
footer {
  text-align: center;
  background-color: #0f172a;
  color: #f8fafc;
}

footer p {
  color: #94a3b8;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 2rem 0;
}

.social-btn {
  color: #ffffff;
  background: #334155;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.social-btn:hover {
  background: var(--primary-color);
}

.copyright {
  font-size: 0.85rem;
  margin-top: 2rem;
}

/* 手機版適應 (RWD) */
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    gap: 0.8rem;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
}