:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --surface: #f1f2ef;
  --text: #20231f;
  --muted: #666c63;
  --line: #dfe1dc;
  --accent: #276749;
  --accent-strong: #174b34;
  --content: 720px;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

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

.container {
  width: min(calc(100% - 2.5rem), var(--content));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--text);
  color: var(--bg);
}

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  gap: 1.5rem;
}

.site-title {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

nav { display: flex; gap: 1.25rem; }

nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

nav a:hover,
nav a.active { color: var(--text); }

main { min-height: calc(100vh - 11rem); }

h1,
h2,
h3 {
  margin: 0 0 0.7rem;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

h1 { font-size: clamp(2.35rem, 8vw, 4.15rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.25rem; }

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lede {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.18rem;
}

.hero { padding: clamp(2rem, 6vw, 4rem) 0 clamp(4rem, 9vw, 6rem); }
.hero h1 { margin-top: 0.5rem; }
.hero .lede { margin-top: 1.5rem; }
.hero-actions { margin-top: 2rem; }

.hero-note {
  max-width: 42rem;
  margin-top: 2rem;
}

.hero-note p:last-child { margin-bottom: 0; }

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}

.brand-logo-home {
  max-width: 34rem;
  margin-top: -1rem;
  margin-bottom: -0.75rem;
}

.brand-logo-blog {
  max-width: 30rem;
}

.brand-heading {
  margin: -1rem 0 0;
}

.button {
  display: inline-block;
  margin-right: 1.25rem;
  padding: 0.65rem 1rem;
  border-radius: 0.3rem;
  background: var(--accent);
  color: white;
  font-weight: 650;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-strong);
  color: white;
}

.text-link { white-space: nowrap; }

.latest-posts {
  padding: 3rem 0 5rem;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

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

.post-list li {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.post-list time {
  color: var(--muted);
  font-size: 0.82rem;
}

.post-list h2,
.post-list h3 { margin-top: 0.25rem; }

.post-list a {
  color: var(--text);
  text-decoration: none;
}

.post-list a:hover { color: var(--accent); }
.post-list p { margin: 0; color: var(--muted); }

.page,
.post { padding: clamp(4rem, 10vw, 6.5rem) 0; }

.page > p:not(.eyebrow),
.page > .lede { max-width: 40rem; }

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  align-items: center;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.about-intro h1 { font-size: clamp(2.35rem, 7vw, 3.65rem); }

.about-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 0.4rem;
  object-fit: cover;
}

.about-copy { max-width: 42rem; }

.nationality-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.25rem;
  vertical-align: -0.15rem;
}

.nationality-flags img {
  display: block;
  width: auto;
  height: 1rem;
  border: 1px solid var(--line);
}

.about-section {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.about-section > p:not(.eyebrow) { max-width: 42rem; }

.speaking-gallery {
  display: grid;
  grid-template-columns: 3fr 2fr;
  align-items: start;
  gap: 1rem;
  margin-top: 2rem;
}

.speaking-gallery figure { margin: 0; }

.speaking-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0.3rem;
  object-fit: cover;
}

.speaking-gallery figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.about-archive {
  padding-right: 1.5rem;
  padding-bottom: 1.5rem;
  padding-left: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--surface);
}

.about-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-intro {
  margin: 1rem auto 3rem;
  text-align: center;
}
.post-list-full h2 { font-size: 1.35rem; }

.post-header {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.post-header h1 { font-size: clamp(2.2rem, 7vw, 3.5rem); }

.post-content {
  padding: 2.5rem 0 1rem;
}

.post-content h2 { margin-top: 2.5rem; }
.post-content h3 { margin-top: 2rem; }

.post-content code {
  padding: 0.12rem 0.3rem;
  border-radius: 0.2rem;
  background: var(--surface);
  font-size: 0.9em;
}

.post-content pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--surface);
}

.post-content pre code { padding: 0; }

.post-content img {
  display: block;
  max-width: 100%;
  height: auto;
}

.back-link { margin-top: 2rem; }

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer p { margin: 0; }

@media (max-width: 520px) {
  html { font-size: 16px; }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 1rem 0; gap: 0.5rem; }
  .hero { padding-top: 2rem; }
  .about-intro { grid-template-columns: 1fr; }
  .about-portrait { width: min(70%, 15rem); grid-row: 1; }
  .speaking-gallery { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151815;
    --surface: #20251f;
    --text: #edf0ea;
    --muted: #a6ada3;
    --line: #343a33;
    --accent: #78c99b;
    --accent-strong: #a4ddb9;
  }
}
