:root {
  --bg: #fafaf8;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e4e4e0;
  --card: #efefeb;
  --accent: #d9480f;
  --max: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --fg: #ececec;
    --muted: #9a9a9a;
    --line: #2a2a2a;
    --card: #1c1c1c;
    --accent: #ff8a5c;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "SF Pro Text", "PingFang TC", "Noto Sans TC",
    "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.site-header, main, .site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
}
.logo { font-weight: 600; letter-spacing: .02em; }
.site-header nav { display: flex; gap: 24px; color: var(--muted); font-size: .95rem; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 96px;
}
.eyebrow { margin: 0; color: var(--muted); }
h1 {
  margin: 4px 0 16px;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -.03em;
}
.lead { margin: 0; max-width: 28em; font-size: 1.15rem; color: var(--muted); }

.portrait { margin: 0; }
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  background: var(--card);
}

/* Sections */
section { padding: 24px 0 72px; }
h2 {
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Work grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}
.card h3 { margin: 12px 0 0; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.thumb {
  aspect-ratio: 4 / 3;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .thumb img { transform: scale(1.04); }

#about p { max-width: 36em; margin: 0; }

/* Footer */
.site-footer {
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .95rem;
}
.site-footer p { margin: 4px 0; }
.links { display: flex; gap: 20px; }
.copy { font-size: .8rem; }

/* Mobile */
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 56px; }
  .portrait { order: -1; max-width: 280px; }
}
