:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #1b1a18;
  --muted: #6d6862;
  --line: #e6e0d8;
  --accent: #1f3a6e;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  /* Sized so the portrait sits at its natural 1198px and everything
     else lines up with its edges. */
  --wrap: calc(1198px + 2 * var(--gutter));

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

main {
  flex: 1;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

.lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: clamp(1rem, 3vw, 2rem);
  border-left: 1px solid var(--line);
}

.lang button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.25rem 0.15rem;
  font: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.lang button:hover {
  color: var(--ink);
}

.lang button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 600;
}

.lang-sep {
  color: var(--line);
  font-size: 0.8125rem;
}

/* Hero -------------------------------------------------------------- */

.hero {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-areas:
    "title image"
    "lead1 image"
    "lead2 image";
  align-items: center;
  column-gap: clamp(2rem, 5vw, 4rem);
}

.hero-title {
  grid-area: title;
}

.hero-lead-1 {
  grid-area: lead1;
}

.hero-lead-2 {
  grid-area: lead2;
}

.hero-grid .lead {
  max-width: 42ch;
}

h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.125rem, 5.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 .dash {
  color: var(--line);
}

h1 .role {
  display: inline-block;
  color: var(--muted);
}

.lead {
  margin: 1.5rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--muted);
  text-wrap: pretty;
}

/* Portrait — sits to the right of the hero text ----------------------- */

.portrait {
  grid-area: image;
  margin: 0;
}

.portrait img {
  width: 100%;
  background: var(--surface);
}

.credit {
  margin-top: 0.6rem;
  font-size: 0.6875rem;
  letter-spacing: 0.03em;
  color: #c4beb6;
}

/* Sections ---------------------------------------------------------- */

.section {
  padding-block: clamp(2.5rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
}

.page {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.page-title {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  margin-bottom: 1.15rem;
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.prose p {
  margin: 0 0 1.15rem;
  max-width: 62ch;
  color: var(--muted);
}

.prose a {
  color: var(--accent);
}

/* Contact ------------------------------------------------------------ */

.contact-line {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
}

/* Footer ------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Tablet and below — hero stacks, image sits between the two
   paragraphs, and the gutter becomes a flat percentage of the
   viewport so edge spacing never depends on a fixed breakpoint. --- */

@media (max-width: 64rem) {
  :root {
    --gutter: max(1.25rem, 5vw);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "lead1"
      "image"
      "lead2";
  }

  .hero-grid .lead {
    max-width: none;
  }

  .portrait {
    margin-top: 1.5rem;
  }
}

/* Small screens ------------------------------------------------------ */

@media (max-width: 46rem) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding-block: 0.75rem;
  }

  .brand {
    margin-right: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 1.25rem;
  }

  .lang {
    padding-left: 1rem;
  }

  .hero {
    padding-block: 2.5rem 2rem;
  }

  .lead {
    max-width: none;
  }
}

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

  * {
    transition: none !important;
  }
}
