/* ---------- Variables ---------- */
:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #62676c;
  --color-border: #e6e6e6;
  --color-accent: #1d3557;
  --color-accent-soft: #eef2f6;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 760px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 22px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--color-accent);
  width: 34px;
  height: 34px;
  border-radius: 7px;
}
.wordmark svg {
  width: 19px;
  height: 19px;
  display: block;
}
.wordmark:hover { text-decoration: none; opacity: 0.85; }
.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--color-muted);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--color-accent); text-decoration: none; }
.site-nav a.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}
.site-nav a.lang-switch {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--color-muted);
}
.site-nav a.lang-switch:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ---------- Sub-navigation (tabs) ---------- */
.subnav {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-accent-soft);
}
.subnav-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.subnav a {
  display: inline-block;
  padding: 11px 14px;
  font-size: 0.9rem;
  color: var(--color-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.subnav a:hover { color: var(--color-accent); text-decoration: none; }
.subnav a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  font-weight: 600;
}

/* ---------- Main ---------- */
main.wrap { padding-top: 48px; padding-bottom: 72px; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}
h1 { font-size: 2rem; margin: 0 0 8px; }
h2 {
  font-size: 1.35rem;
  margin: 48px 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
main .page-home h1 { margin-bottom: 4px; }
h3 { font-size: 1.05rem; margin: 0 0 4px; }

p { margin: 0 0 16px; }
.lede {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 28px;
}

/* ---------- Home / hero ---------- */
.hero {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.hero-photo {
  width: 128px;
  height: 128px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.hero-text { flex: 1; min-width: 240px; }
.role { color: var(--color-muted); margin-bottom: 14px; }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0 0;
  font-size: 0.92rem;
}
.contact-links a { color: var(--color-accent); }

/* ---------- Lists / cards ---------- */
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry-list > li {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.entry-list > li:last-child { border-bottom: none; }
.entry-list .meta { color: var(--color-muted); font-size: 0.92rem; }
.entry-list .topic { margin-top: 4px; }

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list > li {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.pub-list > li:last-child { border-bottom: none; }
.pub-list .pub-title { font-weight: 600; }
.pub-list .pub-venue { color: var(--color-muted); font-size: 0.92rem; }

.tag {
  display: inline-block;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
}

.subtle-list { padding-left: 20px; margin: 0 0 16px; }
.subtle-list li { margin-bottom: 6px; }

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 620px) {
  .two-col-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; }
  .hero { flex-direction: column; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 24px 0 48px;
  color: var(--color-muted);
  font-size: 0.85rem;
}
