:root {
  --paper: #f5f6f1;
  --ink: #17221f;
  --muted: #56645f;
  --green: #1d4d45;
  --green-deep: #133631;
  --gold: #b8892b;
  --gold-soft: #e3c77e;
  --line: #d9ddd3;
  --field: #ffffff;
  --band: #e9ece4;

  --serif: "Spectral", Georgia, serif;
  --sans: "Public Sans", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.5rem, 6vw, 4.25rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--green-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }
h2 { font-size: var(--step-3); margin-bottom: 1.5rem; }
h3 { font-size: var(--step-1); margin-bottom: 0.4rem; }
p { margin: 0 0 1rem; }

/* Spectral's curly apostrophe reads as a prime at display sizes; Georgia's has the expected curl. */
.apos { font-family: Georgia, "Times New Roman", serif; }

.wrap { width: min(100% - 32px, 1080px); margin-inline: auto; }

/* The kasavu: the gold double border of a Kerala mundu, used as the page's only ornament. */
.kasavu {
  height: 14px;
  background:
    linear-gradient(var(--gold), var(--gold)) top / 100% 6px no-repeat,
    linear-gradient(var(--gold-soft), var(--gold-soft)) bottom / 100% 2px no-repeat,
    var(--paper);
}

.masthead { background: var(--paper); }
.masthead-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.1rem;
}
.wordmark {
  font-family: var(--serif); font-size: var(--step-1); font-weight: 600;
  color: var(--ink); text-decoration: none;
}
nav { display: flex; gap: 1.5rem; align-items: center; font-size: var(--step--1); }
nav a { color: var(--ink); text-decoration: none; }
nav a:hover { color: var(--green); text-decoration: underline; }
.nav-cta { font-weight: 600; color: var(--green); }

.hero {
  padding-block: clamp(3.5rem, 10vw, 7.5rem) clamp(3rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 3rem 4.5rem;
  align-items: center;
}
.portrait { display: block; margin: 0; }
.portrait img {
  display: block; width: 100%; height: auto;
  border-bottom: 6px solid var(--gold);
  box-shadow: 0 2px 0 var(--paper), 0 4px 0 var(--gold-soft);
}
.role { color: var(--muted); font-size: var(--step-0); margin-bottom: 1.25rem; text-wrap: balance; }
.hero h1 {
  font-size: var(--step-4);
  font-weight: 400;
  letter-spacing: -0.015em;
  max-width: 14ch;
  margin-bottom: 2rem;
  color: var(--green-deep);
}
.lede { font-size: var(--step-1); line-height: 1.6; max-width: 38em; color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; margin-top: 2.25rem; }

.button {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 3px;
  padding: 0.85rem 1.4rem;
  font: 600 var(--step-0)/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--green-deep); color: #fff; }
.button[disabled] { opacity: 0.6; cursor: progress; }
.quiet-link { font-weight: 500; }

.band { background: var(--band); padding-block: clamp(3.5rem, 8vw, 5.5rem); }

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2.5rem 3rem;
}
.help { border-top: 2px solid var(--green); padding-top: 1rem; }
.help p { color: var(--muted); margin: 0; max-width: 34em; }
.help-lead {
  border-top: 4px solid var(--gold);
  background: var(--paper);
  padding: 1.75rem 1.75rem 2rem;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.help-lead .lead-link { margin-top: auto; font-weight: 600; }
.help-lead h3 { font-size: var(--step-3); margin: 0; }
.help-lead p { font-size: var(--step-1); line-height: 1.55; color: var(--ink); max-width: 30em; }

/* Wide screens: the lead area takes a 2x2 block; the other five fill around it. */
@media (min-width: 980px) {
  .help-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .help-lead { grid-column: 1 / 3; grid-row: 1 / 3; padding: 2.5rem 3rem 2.75rem; }
}

.ventures { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-intro { color: var(--muted); max-width: 36em; margin: -0.75rem 0 2.5rem; }

/* Heading and intro on the left, the content on the right, so wide screens aren't half empty. */
@media (min-width: 980px) {
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 4.5rem; align-items: start; }
  .split-head { position: sticky; top: 2rem; }
  .split .section-intro { margin-bottom: 0; }
  .split .channels { margin-top: 0; }
}

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.year {
  font-family: var(--serif);
  font-size: var(--step-2);
  color: var(--gold);
  line-height: 1.1;
  font-variant-numeric: lining-nums;
}
.timeline p { margin: 0; color: var(--muted); max-width: 36em; }
.earlier { color: var(--muted); font-size: var(--step--1); max-width: 42em; margin: 1.5rem 0 0; }

.how { background: var(--green-deep); color: #eef2ec; }
.how h2 { color: #fff; }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 2rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-size: var(--step-3);
  color: var(--gold-soft);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.steps h3 { color: #fff; }
.steps p { color: #c9d4cd; margin: 0; }

.contact { padding-block: clamp(3.5rem, 8vw, 6rem); }
.contact-lede { font-size: var(--step-1); max-width: 32em; }
.channels { list-style: none; padding: 0; margin: 2.25rem 0 0; }
.channels li {
  display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; align-items: baseline;
  padding: 1rem 0; border-top: 1px solid var(--line);
}
.channels li:last-child { border-bottom: 1px solid var(--line); }
.channel-label { color: var(--muted); font-size: var(--step--1); }
.channels a { font-family: var(--serif); font-size: var(--step-2); overflow-wrap: anywhere; }

.footer { margin-top: 2rem; }
.footer-row a { color: inherit; }
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  padding-block: 1.5rem 2.5rem; color: var(--muted); font-size: var(--step--1);
}

@media (max-width: 760px) {
  nav a:not(.nav-cta) { display: none; }
  .hero { grid-template-columns: 1fr; }
  .portrait { order: -1; }
  .portrait img { aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 5%; }
  .channels li { grid-template-columns: 1fr; gap: 0.2rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.4rem; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121a18;
    --ink: #e7ebe5;
    --muted: #a3b0aa;
    --green: #7fb8a9;
    --green-deep: #9fd0c2;
    --gold: #d2a54a;
    --gold-soft: #8c6f2e;
    --line: #2a3632;
    --field: #19231f;
    --band: #18221f;
  }
  :root:not([data-theme="light"]) .button { color: #0f1a17; }
  :root:not([data-theme="light"]) .how { background: #183630; }
  :root:not([data-theme="light"]) .steps p { color: #c3d2ca; }
  :root:not([data-theme="light"]) .steps li::before { color: var(--gold); }
}
