:root {
  --ink: #18332f;
  --ink-soft: #40534f;
  --accent: #ad5f49;
  --accent-dark: #8d4938;
  --paper: #f4f0e9;
  --surface: #fffdf9;
  --surface-muted: #e8efeb;
  --line: #ced8d3;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(24, 51, 47, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(173, 95, 73, 0.11), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: rgba(173, 95, 73, 0.6);
  text-underline-offset: 0.2em;
}

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

button,
a {
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

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

p,
ul,
dl {
  margin-top: 0;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  margin-bottom: 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 7vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 1.35rem;
  color: var(--accent-dark);
  font-size: 0.83rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 0.2rem;
  font-size: 1.06rem;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-180%);
  border-radius: 0.4rem;
  background: var(--white);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell,
.letter-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 2rem auto;
  overflow: hidden;
  border: 1px solid rgba(24, 51, 47, 0.08);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.hero::after {
  position: absolute;
  right: -6rem;
  bottom: -12rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 3rem rgba(255, 255, 255, 0.035),
    0 0 0 7rem rgba(255, 255, 255, 0.025);
  content: "";
}

.hero > * {
  position: relative;
  z-index: 1;
}

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

.hero .eyebrow {
  color: #e8ad9b;
}

.role {
  margin-bottom: 1.2rem;
  color: #dbe7e2;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.hero-summary {
  max-width: 47rem;
  margin-bottom: 1.8rem;
  color: #c6d6d0;
  font-size: 1.03rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

.button-primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: var(--white);
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
  color: inherit;
}

.button-secondary:hover {
  border-color: currentColor;
  color: inherit;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 0.34fr) minmax(0, 0.66fr);
}

.sidebar {
  padding: 3rem clamp(1.5rem, 4vw, 3rem);
  background: var(--surface-muted);
}

.sidebar section + section {
  margin-top: 2.6rem;
  padding-top: 2.1rem;
  border-top: 1px solid rgba(24, 51, 47, 0.13);
}

address {
  display: grid;
  gap: 0.45rem;
  font-style: normal;
}

.compact-list,
.timeline-item ul {
  padding-left: 1.1rem;
}

.compact-list li + li,
.timeline-item li + li {
  margin-top: 0.5rem;
}

li::marker {
  color: var(--accent);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(24, 51, 47, 0.14);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
}

.language-list {
  margin-bottom: 0;
}

.language-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.language-list div + div {
  margin-top: 0.55rem;
}

.language-list dt {
  font-weight: 700;
}

.language-list dd {
  margin: 0;
  color: var(--ink-soft);
  text-align: right;
}

main {
  min-width: 0;
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
}

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

.main-section > p {
  color: var(--ink-soft);
}

.main-section > p:last-child {
  margin-bottom: 0;
}

.timeline-item + .timeline-item,
.education-item + .education-item {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(24, 51, 47, 0.1);
}

.item-heading,
.education-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.organisation,
.education-item p {
  margin-bottom: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.date {
  flex: 0 0 auto;
  color: var(--accent-dark) !important;
  font-size: 0.85rem !important;
  font-weight: 700;
  white-space: nowrap;
}

.timeline-item ul,
.timeline-item > p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.condensed .item-heading {
  margin-bottom: 0.7rem;
}

.education-item h3 {
  margin-bottom: 0.25rem;
}

.education-item p {
  margin-bottom: 0;
}

.final-section {
  padding-bottom: 0.25rem;
}

.page-shell > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.5rem, 5vw, 4rem);
  background: var(--ink);
  color: #dbe7e2;
  font-size: 0.86rem;
}

.page-shell > footer p {
  margin: 0;
}

.letter-page {
  background:
    radial-gradient(circle at top right, rgba(173, 95, 73, 0.12), transparent 28rem),
    var(--paper);
}

.letter-shell {
  max-width: 860px;
  padding: clamp(1.5rem, 6vw, 4.5rem);
  overflow: visible;
}

.editing-note {
  margin: -1rem -1rem 2.5rem;
  padding: 0.8rem 1rem;
  border: 1px solid #ead6b0;
  border-radius: 0.5rem;
  background: #fff6df;
  color: #705020;
  font-size: 0.88rem;
  text-align: center;
}

.letter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--ink);
}

.letter-header h1 {
  margin-bottom: 0.25rem;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
}

.letter-header p {
  margin: 0;
  color: var(--ink-soft);
}

.letter-header address {
  padding-top: 0.4rem;
  font-size: 0.9rem;
  text-align: right;
}

.letter-actions {
  margin: 1.5rem 0 0;
  justify-content: flex-end;
}

.letter-actions .button-secondary {
  border-color: var(--line);
}

.letter-content {
  max-width: none;
  padding: 3rem 0 0;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.03rem;
  line-height: 1.75;
}

.letter-content h2 {
  margin: 2rem 0 1.5rem;
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
}

.letter-meta {
  margin-bottom: 2rem;
}

.letter-meta p {
  margin-bottom: 1.4rem;
}

.placeholder {
  padding: 0.05rem 0.15rem;
  border-radius: 0.15rem;
  background: #fff0c9;
  color: #6b4c1d;
}

.sign-off {
  margin-top: 2rem;
  color: var(--ink);
}

@media (max-width: 760px) {
  .page-shell,
  .letter-shell {
    width: min(100%, calc(100% - 1rem));
    margin: 0.5rem auto;
    border-radius: 0.75rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .item-heading,
  .education-item,
  .letter-header {
    display: block;
  }

  .date {
    margin-top: 0.4rem;
    white-space: normal;
  }

  .letter-header address {
    margin-top: 1.5rem;
    text-align: left;
  }

  .letter-actions {
    justify-content: flex-start;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  html {
    font-size: 10.5px;
  }

  body {
    background: var(--white);
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .screen-only,
  .skip-link {
    display: none !important;
  }

  .page-shell,
  .letter-shell {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hero {
    padding: 2.3rem 2.8rem;
  }

  .hero::after {
    display: none;
  }

  .hero-summary {
    margin-bottom: 0;
  }

  .sidebar,
  main {
    padding: 2rem 2.5rem;
  }

  .sidebar section + section {
    margin-top: 1.7rem;
    padding-top: 1.4rem;
  }

  .main-section + .main-section {
    margin-top: 1.9rem;
    padding-top: 1.7rem;
  }

  .timeline-item + .timeline-item,
  .education-item + .education-item {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
  }

  .timeline-item,
  .education-item,
  .main-section {
    break-inside: avoid;
  }

  .page-shell > footer {
    padding: 0.8rem 2.5rem;
  }

  .letter-shell {
    padding: 5mm 8mm;
  }

  .letter-header {
    padding-bottom: 1.5rem;
  }

  .letter-content {
    padding-top: 2rem;
    font-size: 10.8pt;
    line-height: 1.55;
  }

  .letter-content p {
    orphans: 3;
    widows: 3;
  }

  .placeholder {
    padding: 0;
    background: transparent;
    color: inherit;
  }
}
