:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #666666;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", sans-serif;
  line-height: 1.8;
  font-size: 16px;
}

header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #eee;
}

header .site-name {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--fg);
}

nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav a {
  color: var(--fg);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav a:hover {
  color: var(--muted);
}

.lang-toggle {
  justify-self: end;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 120px;
}

main.wide {
  max-width: 1080px;
}

h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 48px 0 16px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

p {
  margin: 0 0 16px;
  color: var(--fg);
}

.muted {
  color: var(--muted);
}

.hero {
  margin-bottom: 48px;
}

.hero img {
  width: 100%;
  display: block;
  margin-top: 24px;
}

.bio-block {
  margin-bottom: 32px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.gallery img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.cv-entry {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 15px;
}

.cv-entry .year {
  flex: 0 0 80px;
  color: var(--muted);
}

footer {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid #eee;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.lang-toggle span {
  color: var(--muted);
}

.lang-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.05em;
}

.lang-btn.active {
  color: var(--fg);
  font-weight: 600;
}

/* Bilingual visibility */
[data-lang="zh"] .en { display: none; }
[data-lang="en"] .zh { display: none; }
