:root {
  --bg: #faf9f7;
  --fg: #1c1c1c;
  --muted: #6b6b6b;
  --accent: #2563eb;
  --border: #e6e3de;
  --card: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans", "Noto Sans JP", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.brand { font-weight: 700; letter-spacing: -0.02em; }

.lang-switcher { display: flex; gap: 4px; }

.lang-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover { color: var(--fg); border-color: var(--muted); }

.lang-btn.is-active {
  background: var(--fg);
  color: #fff;
  border-color: var(--fg);
}

main { max-width: 720px; margin: 0 auto; padding: 0 24px; }

.hero { text-align: center; padding: 56px 0 40px; }

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.name { font-size: 32px; margin: 20px 0 0; letter-spacing: -0.02em; }

.alias { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

.role { margin: 12px 0 0; font-weight: 600; color: var(--accent); }

.tagline {
  max-width: 540px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 16px;
}

.section { padding: 28px 0; border-top: 1px solid var(--border); }

.section h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.lede { margin: 0 0 20px; color: #333; }

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.timeline li:last-child { border-bottom: 0; }

.timeline .when {
  flex: 0 0 96px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 14px;
}

.timeline .what { color: #333; }

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.card h3 { margin: 0 0 8px; font-size: 17px; }

.card p { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }

.card-link { color: var(--accent); font-size: 14px; }

.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.contacts a { color: var(--accent); text-decoration: none; font-weight: 500; }

.contacts a:hover { text-decoration: underline; }

.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 560px) {
  .projects { grid-template-columns: 1fr; }
  .timeline li { flex-direction: column; gap: 2px; }
  .timeline .when { flex: none; }
}

.notfound { text-align: center; padding: 96px 0; }
.notfound-code { font-size: 44px; font-weight: 700; margin: 0 0 4px; }
.notfound .contacts { justify-content: center; margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
