:root {
  color-scheme: light dark;
  --paper: #fbfaf8;
  --ink: #232323;
  --muted: #777;
  --sea: rgb(155, 100, 51);
  --sea-strong: rgb(155, 100, 51);
  --intro-link-line: #c9ad94;
  --line: #dedbd6;
  --focus: #9a4f24;
  --portrait-ring: #dedbd6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

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

a {
  color: var(--sea-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--ink);
}

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

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

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

.theme-toggle {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--sea-strong);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--muted);
  color: var(--ink);
}

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

.site-shell {
  width: min(100% - 3rem, 52rem);
  margin-inline: auto;
}

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

.hero__layout {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  column-gap: 2.5rem;
  align-items: start;
}

.hero__identity > h1 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-align: center;
}

.hero__identity > .portrait {
  margin: 0;
}

.hero__identity > .portrait img {
  width: 12rem;
  height: 12rem;
  aspect-ratio: 1;
  border: 1px solid var(--portrait-ring);
  border-radius: 50%;
  object-fit: cover;
}

.hero__intro > p {
  margin: 0 0 1.1rem;
}

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

.hero__intro a {
  text-decoration-color: var(--intro-link-line);
}

.contact-links {
  margin: 1.5rem 0 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.7;
  text-align: center;
  white-space: nowrap;
}

.contact-links a {
  display: inline-block;
  white-space: nowrap;
}

.content-section {
  max-width: 42rem;
  margin-inline: auto;
  padding-block: 3rem 4.5rem;
  border-bottom: 1px solid var(--line);
}

h2,
h3 {
  line-height: 1.35;
}

h2 {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h3 {
  margin: 4rem 0 1rem;
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h2 + h3,
h2 + p + h3,
h2 + p + p + h3 {
  margin-top: 0;
}

h4 {
  margin: 2.5rem 0 0.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

p {
  margin-block: 0 1.1rem;
}

.content-section > p {
  margin-block: 0 1.15rem;
}

.content-section > .back-to-top {
  margin: 3.5rem 0 0;
  font-size: 0.82rem;
  text-align: center;
}

h4 + p {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

h4 + p + p {
  margin-block: 0 0.7rem;
}

h4 + p + p + p {
  margin: 0;
  font-size: 0.9rem;
}

#past-experiences ul {
  margin: 0;
  padding-left: 1.2rem;
}

#past-experiences li {
  margin-bottom: 0.85rem;
  padding-left: 0.25rem;
}

#past-experiences li:last-child {
  margin-bottom: 0;
}

#past-experiences ul + p {
  margin-top: 2.25rem;
}

strong {
  font-weight: 650;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171717;
    --ink: #e8e6e2;
    --muted: #a5a29d;
    --sea: #9ab3bf;
    --sea-strong: #9ab3bf;
    --intro-link-line: #667882;
    --line: #3b3a38;
    --focus: #e0a077;
    --portrait-ring: #3b3a38;
  }
}

:root[data-theme="dark"] {
  --paper: #171717;
  --ink: #e8e6e2;
  --muted: #a5a29d;
  --sea: #9ab3bf;
  --sea-strong: #9ab3bf;
  --intro-link-line: #667882;
  --line: #3b3a38;
  --focus: #e0a077;
  --portrait-ring: #3b3a38;
}

@media (max-width: 44rem) {
  .site-shell {
    width: min(100% - 2rem, 52rem);
  }

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

  .hero__layout {
    grid-template-columns: 1fr;
    row-gap: 2.25rem;
  }

  .hero__identity > .portrait img {
    width: 11rem;
    height: 11rem;
    margin-inline: auto;
  }

  .content-section {
    padding-block: 3rem 3.5rem;
  }

  .contact-links {
    white-space: normal;
  }
}

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

@media print {
  :root,
  :root[data-theme="dark"] {
    --paper: #ffffff;
    --ink: #000000;
    --muted: #333333;
    --sea: #000000;
    --sea-strong: #000000;
    --line: #b8b8b8;
  }

  .site-shell {
    width: 100%;
  }

  .skip-link,
  .theme-toggle {
    display: none;
  }

  .hero,
  .content-section {
    padding-block: 2rem;
  }

  a {
    color: inherit;
  }
}
