/* ===== 配色變數 ===== */
:root {
  --bg: #db7ba2;
  --card: #fff5f8;
  --text: #1f1f1f;
  --text-muted: #3b1f2b;
  --accent: #4a0d26;
  --btn-bg: #3b1f2b;
  --btn-text: #fff5f8;
  --border: #ffd1dc;

  --font: system-ui, -apple-system, "Segoe UI", "Microsoft JhengHei",
          "PingFang TC", "Noto Sans TC", sans-serif;
  --nav-h: 4rem;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-padding-top: var(--nav-h);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  padding-top: var(--nav-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;          /* 16px */
  line-height: 1.7;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ===== 共用元件 ===== */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.card p + p { margin-top: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover { background: var(--accent); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags li {
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  font-size: 1rem;
}

.tags-small li { font-size: 0.875rem; padding: 0.125rem 0.75rem; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--nav-h);
  background: var(--card);
  border-bottom: 2px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.125rem;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.625rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:hover { color: var(--accent); text-decoration: underline; }

/* ===== Hero ===== */
.hero { padding: 3rem 0 2.5rem; }

.hero-inner {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 2rem;
}

.hero h1 {
  font-size: clamp(3rem, 14vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.tagline {
  margin: 1rem 0 1.5rem;
  max-width: 32rem;
  font-size: 1.25rem;
  color: var(--text-muted);
}

.avatar {
  flex: none;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--card);
  border: 4px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  object-fit: cover;
}

/* ===== 區塊 ===== */
.section { padding: 2.5rem 0; }

.section h2,
.footer h2 {
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section h3 {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 1.25rem 0 0.5rem;
}

.card h3 { margin: 0 0 0.5rem; color: var(--text); }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grid .card { display: flex; flex-direction: column; gap: 0.75rem; }
.grid .card .links { margin-top: auto; }

/* ===== Footer ===== */
.footer {
  margin-top: 2.5rem;
  padding: 2rem 0;
  background: var(--card);
  border-top: 2px solid var(--border);
}

.footer h2 { font-size: 1.5rem; }

.copyright {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== 平板 768px ~ 1023px ===== */
@media (min-width: 768px) {
  .container { padding: 0 1.5rem; }

  .hero { padding: 4rem 0 3rem; }
  .hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .avatar { width: 200px; height: 200px; font-size: 5rem; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

/* ===== 桌面 >= 1024px ===== */
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .section { padding: 3.5rem 0; }
}
