/* Plain and clean: off-white page, near-black sans text, blue links, narrow column.
   One screen: no header, nav or footer; contact sits right under the text. */

:root {
  /* Colour: warm off-white page, near-black text, one blue for links */
  --paper: #f8f6f0;
  --ink: #111111;
  --ink-muted: #6b6b6b;
  --rule: #e8e8e8;
  --rule-strong: #b5b5b5;
  --accent: #1756a9;
  --accent-hover: #0f3d7a;
  --selection: #dbe8fb;

  /* Type */
  --font-text: "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 3rem;

  /* Spacing */
  --space-1: 4px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --measure: 44rem;

  /* Photo */
  --photo-width: 11rem;
  --photo-radius: 2rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--text-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--selection);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

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

/* One reading column, vertically centred when there is room */
main {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--space-5));
  margin: 0 auto;
  padding: clamp(var(--space-4), 3vh, var(--space-8)) var(--space-5);
}

h1 {
  margin: 0 0 var(--space-5);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

p {
  margin: 0 0 var(--space-4);
  text-wrap: pretty;
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.6;
}

/* Heading and lede on the left, photo on the right */
.intro {
  display: grid;
  grid-template-columns: 1fr var(--photo-width);
  column-gap: var(--space-7);
  align-items: start;
  margin-bottom: clamp(var(--space-5), 5vh, var(--space-7));
}

.intro h1,
.intro .lede {
  grid-column: 1;
}

.intro .lede {
  margin-bottom: 0;
}

.photo {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--photo-radius);
}

.contact {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px dotted var(--rule-strong);
  color: var(--ink-muted);
}

.contact span {
  margin: 0 var(--space-1);
}

/* Narrow screens */
@media (max-width: 34rem) {
  :root {
    --text-base: 1rem;
    --text-xl: 2.25rem;
    --text-lg: 1.125rem;
    --photo-width: 5.5rem;
    --photo-radius: 1.25rem;
  }

  /* Small photo beside the heading only; lede runs full width below */
  .intro {
    column-gap: var(--space-4);
    align-items: center;
  }

  .intro h1 {
    margin-bottom: 0;
  }

  .photo {
    grid-row: 1;
  }

  .intro {
    margin-bottom: var(--space-5);
  }

  .intro .lede {
    grid-column: 1 / -1;
    margin-top: var(--space-4);
  }

  main {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }

  body {
    line-height: 1.6;
  }

  p {
    margin-bottom: 12px;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
}
