:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #5d6066;
  --line: #e2ddd3;
  --accent: #0f6b5c;
  --accent-soft: #e3f0ec;
  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --surface: #1b1d20;
    --text: #ecebe8;
    --muted: #a3a6ab;
    --line: #2c2f33;
    --accent: #5cc4ad;
    --accent-soft: #1d2f2b;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

/* header */
.top { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; gap: 16px; }
.brand { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }
.top nav .lang { border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; color: var(--text); }
@media (max-width: 720px) { .top nav a:not(.lang):not(.cta-link) { display: none; } }

/* hero */
.hero { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: center; padding: 48px 0 72px; }
.eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(38px, 5.4vw, 60px); letter-spacing: -0.01em; }
.lead { font-size: 20px; color: var(--muted); margin: 22px 0 32px; max-width: 34em; }
.hero-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--line); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 16px;
  text-decoration: none; border: 1px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 36px; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.facts strong { color: var(--text); font-family: var(--serif); font-size: 22px; display: block; line-height: 1.1; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; }
  .hero-photo { max-width: 340px; order: -1; }
}

/* sections */
section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 40px; }
h2 { font-size: clamp(28px, 3.6vw, 38px); }
.section-head p { color: var(--muted); margin: 12px 0 0; }

.talks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 820px) { .talks { grid-template-columns: 1fr; } }
.talk {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
}
.talk h3 { font-size: 22px; margin-bottom: 12px; }
.talk p { margin: 0 0 16px; color: var(--muted); }
.talk ul { margin: 0 0 18px; padding-left: 18px; color: var(--muted); font-size: 15px; }
.talk ul li { margin-bottom: 4px; }
.talk .tags { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding: 0; list-style: none; }
.tags li { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.talk.featured { grid-column: 1 / -1; border-color: var(--accent); }
.talk .kind { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 8px; }

.stage { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .stage { grid-template-columns: 1fr; gap: 24px; } }
.video { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; opacity: .92; }
.video:hover img { transform: scale(1.02); opacity: 1; }
.video .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%; background: #e62b1e; display: grid; place-items: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.video .play::after { content: ""; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: #e62b1e; border: 1px solid #e62b1e; border-radius: 999px; padding: 2px 10px; margin-bottom: 14px; }
.stage h3 { font-size: 28px; margin-bottom: 12px; }
.stage p { color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }
.formats { list-style: none; padding: 0; margin: 0; }
.formats li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
.formats li span { color: var(--muted); text-align: right; }

.bio-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.bio-box h3 { font-family: var(--sans); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.bio-box p { margin: 0; }
.copy { font: 600 13px var(--sans); color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; cursor: pointer; letter-spacing: 0; text-transform: none; }
.copy:hover { border-color: var(--accent); }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.photos a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--line); }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photos a:hover img { transform: scale(1.03); }
.small { font-size: 14px; color: var(--muted); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

.contact { text-align: center; padding: 96px 0; }
.contact h2 { font-size: clamp(30px, 4.4vw, 46px); }
.contact p { color: var(--muted); max-width: 34em; margin: 16px auto 30px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: var(--muted); }

/* legal pages */
.legal { max-width: 46em; padding: 32px 0 80px; }
.legal h1 { font-size: 40px; margin-bottom: 28px; }
.legal h2 { font-size: 24px; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--text); }

/* testimonials */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quotes.letters { grid-template-columns: repeat(2, 1fr); margin-bottom: 20px; }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .quotes, .quotes.letters { grid-template-columns: 1fr; } }
.quote {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 18px;
}
.quote blockquote { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.55; }
.quote.letter { background: var(--accent-soft); border-color: transparent; }
.quote.letter blockquote { font-size: 19px; }
.quote figcaption { margin-top: auto; font-size: 14px; color: var(--muted); }
.quote figcaption strong { display: block; color: var(--text); font-size: 15px; }

/* v2: general profile */
.hero { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
.hero h1 { font-size: clamp(34px, 4.4vw, 50px); }
.hero-tedx { margin-top: 8px; }
.hero-tedx .badge { margin-top: 18px; }
.hero-tedx .tedx-title { font-size: 24px; margin: 0 0 8px; }
.hero-tedx p { color: var(--muted); margin: 0; font-size: 16px; }
@media (max-width: 820px) { .hero-tedx { order: 0; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.card:first-child { border-color: var(--accent); }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0 0 18px; }
.card a { margin-top: auto; font-weight: 600; text-decoration: none; }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }
.pillar { border-top: 2px solid var(--accent); padding-top: 14px; }
.pillar h3 { font-size: 19px; margin-bottom: 8px; }
.pillar p { color: var(--muted); margin: 0; font-size: 15px; }
h3.sub { font-size: 22px; margin: 48px 0 8px; }
.timeline .when { font-weight: 600; color: var(--accent); }
.formats-line { color: var(--muted); margin: 28px 0 0; font-size: 15px; }
.formats-line strong { color: var(--text); }

.about { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 48px; align-items: start; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }
.about-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; position: sticky; top: 24px; }
@media (max-width: 820px) { .about-photo { position: static; max-width: 320px; } }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about h2 { margin-bottom: 16px; }

.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote figcaption .who { flex: 1; min-width: 0; }
.avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font: 700 14px var(--sans); letter-spacing: 0.02em;
}
.logo {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 8px; padding: 6px 8px; height: 34px; max-width: 110px;
}
.logo img { max-height: 22px; max-width: 94px; width: auto; }
.logo-text { font: 700 13px var(--sans); color: #1c1d1f; letter-spacing: 0.04em; }
.quote.letter .logo { align-self: flex-start; height: 44px; max-width: 160px; }
.quote.letter .logo img { max-height: 30px; max-width: 140px; }
.quote.letter figcaption { display: block; }
.actions.center { justify-content: center; margin-bottom: 18px; }
.quote .logo { align-self: flex-start; height: 40px; padding: 6px 10px; max-width: none; }
.quote .logo img { width: 120px; height: 26px; max-width: none; max-height: none; object-fit: contain; object-position: left center; }
.quote.letter .logo img { width: 150px; height: 32px; }

/* mail dialog */
.mail-dialog {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text);
  padding: 28px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.mail-dialog::backdrop { background: rgba(0,0,0,.5); }
.mail-dialog h3 { font-size: 24px; margin: 0 0 12px; }
.mail-addr { font-size: 18px; font-weight: 600; margin: 0 0 4px; word-break: break-all; user-select: all; }
.mail-subj { margin: 0 0 20px; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mail-actions .btn { font-size: 15px; padding: 9px 16px; cursor: pointer; font-family: var(--sans); }
.mail-close { position: absolute; right: 14px; top: 10px; margin: 0; }
.mail-close button { background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; }
.mail-dialog { position: fixed; }
