:root {
  color-scheme: light;
  --paper: #f4f3ef;
  --ink: #151515;
  --muted: #5f5f5a;
  --rule: #c9c8c1;
  --measure: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-200%);
}

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

.site-header,
main,
footer {
  width: min(calc(100% - 3rem), var(--measure));
  margin-inline: auto;
}

.site-header {
  min-height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--rule);
}

.name {
  font-weight: 650;
  text-decoration: none;
}

.introduction {
  display: grid;
  align-content: center;
  padding-block: clamp(6rem, 12vw, 10rem);
}

.descriptor,
.section h2 {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  max-width: 22ch;
  margin: clamp(2rem, 4vw, 3.5rem) 0;
  font-size: clamp(2.5rem, 4.6vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

.landscape {
  width: min(100%, 56rem);
  margin: 0 0 clamp(4.5rem, 8vw, 7rem) auto;
}

.landscape img {
  display: block;
  width: 100%;
  height: auto;
}

.landscape figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.section {
  display: grid;
  grid-template-columns: minmax(10rem, 0.7fr) minmax(0, 2fr);
  gap: clamp(2rem, 8vw, 8rem);
  padding-block: clamp(4.5rem, 8vw, 7rem);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 2rem;
}

#areas {
  padding-block: clamp(3.5rem, 6vw, 5rem);
}

.index-list {
  margin: 0 0 0 1.35rem;
  padding: 0;
  list-style: none;
}

.index-list > li {
  position: relative;
  padding-left: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
}

.index-list > li + li {
  margin-top: 0.55rem;
}

.index-list > li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--muted);
}

#research .index-list a {
  text-decoration: none;
}

.reports-page,
.current-research-page {
  min-height: calc(100vh - 13.5rem);
  padding-block: clamp(5rem, 10vw, 8rem);
}

.reports-page > h1,
.current-research-page > h1 {
  margin: 0 0 clamp(4.5rem, 9vw, 7rem);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reports-page .report-entry,
.current-research-page .current-research-entry {
  margin-left: min(32%, 14rem);
}

.current-research-entry {
  max-width: 48rem;
}

.work-meta {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.current-research-entry h2 {
  max-width: 25ch;
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.work-copy {
  max-width: 42rem;
  margin-top: 2rem;
  color: var(--muted);
}

.work-copy p {
  margin: 0;
}

.work-copy p + p {
  margin-top: 1.25rem;
}

.report-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-entry {
  max-width: 48rem;
}

.report-meta {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-entry h2,
.report-entry h3 {
  max-width: 25ch;
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.report-entry h2 a,
.report-entry h3 a {
  text-decoration: none;
}

.report-entry h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.report-subtitle,
.report-summary,
.report-links {
  max-width: 42rem;
  margin: 1.15rem 0 0;
}

.report-subtitle {
  font-size: 1rem;
}

.report-summary {
  color: var(--muted);
}

.report-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.method-copy {
  max-width: 48rem;
}

.method-copy p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
}

.report-overview {
  min-height: calc(100vh - 13.5rem);
  padding-block: clamp(5rem, 10vw, 8rem);
}

.report-overview article {
  max-width: 46rem;
}

.report-overview h1 {
  max-width: 18ch;
}

.report-deck {
  max-width: 42rem;
  margin: 0 0 3rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.report-citation {
  display: flex;
  gap: 2.5rem;
  margin: 0 0 3rem;
}

.report-citation > div {
  display: flex;
  gap: 0.75rem;
}

.report-citation dt {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-citation dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.85rem;
}

.report-abstract {
  max-width: 42rem;
  margin-bottom: 2.5rem;
  color: var(--muted);
}

.report-abstract p {
  margin: 0;
}

.report-abstract p + p {
  margin-top: 1.25rem;
}

.download-link {
  display: inline-block;
  font-size: 0.875rem;
}

footer {
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}

footer p {
  margin: 0;
}

@media (max-width: 46rem) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 2rem), var(--measure));
  }

  .site-header {
    min-height: 4.75rem;
  }


  .introduction {
    padding-block: 5rem;
  }

  h1 {
    margin-block: 2.25rem;
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

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

  .section {
    gap: 3.5rem;
  }

  .reports-page .report-entry,
  .current-research-page .current-research-entry {
    margin-left: 0;
  }

  .report-citation {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
  }
}

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

@media print {
  :root {
    --paper: #fff;
    --ink: #000;
    --muted: #333;
    --rule: #aaa;
  }

  .site-header nav,
  .skip-link {
    display: none;
  }

  .introduction {
    min-height: auto;
  }

  .section {
    break-inside: avoid;
  }
}

/* Personal site additions */

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.intro-note {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
}

.section.compact {
  padding-block: clamp(3.5rem, 6vw, 5rem);
}

.prose {
  max-width: 42rem;
}

.prose p {
  margin: 0;
}

.prose p + p {
  margin-top: 1.25rem;
  color: var(--muted);
}

.paper-list > li + li {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.section .report-entry h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
}

.timeline {
  margin: 0;
  max-width: 42rem;
}

.timeline > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.5rem;
}

.timeline > div + div {
  margin-top: 0.8rem;
}

.timeline dt {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.55rem;
}

.timeline dd {
  margin: 0;
  font-weight: 500;
}

.cv-link {
  margin: 2rem 0 0;
  font-size: 0.875rem;
}

.principle {
  margin: 0;
  padding-block: 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
  text-align: right;
}

@media (max-width: 46rem) {
  .timeline > div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .principle {
    text-align: left;
  }
}

/* Hero: photo as background of the top section */

.hero {
  position: relative;
  margin-inline: calc(50% - 50vw);
  padding-inline: max(1.5rem, calc((100vw - var(--measure)) / 2));
  padding-block: clamp(7rem, 14vw, 12rem);
  min-height: min(82vh, 52rem);
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.72) 0%, rgba(21, 21, 21, 0.45) 55%, rgba(21, 21, 21, 0.2) 100%),
    url("/assets/mountain-2015.webp") center 40% / cover no-repeat;
  color: var(--paper);
  margin-bottom: clamp(1rem, 3vw, 2rem);
}

.hero .intro-note {
  color: rgba(244, 243, 239, 0.82);
}

.hero .descriptor {
  color: rgba(244, 243, 239, 0.9);
}

.hero-caption {
  position: absolute;
  right: max(1.5rem, calc((100vw - var(--measure)) / 2));
  bottom: 1.25rem;
  margin: 0;
  color: rgba(244, 243, 239, 0.7);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.hero + .section {
  border-top: 0;
}

body {
  overflow-x: hidden;
}

@media (max-width: 46rem) {
  .hero {
    padding-inline: 1rem;
    padding-block: 5rem;
    min-height: auto;
    background:
      linear-gradient(rgba(21, 21, 21, 0.6), rgba(21, 21, 21, 0.6)),
      url("/assets/mountain-2015.webp") center / cover no-repeat;
  }

  .hero-caption {
    right: 1rem;
  }
}

@media print {
  .hero {
    background: none;
    color: var(--ink);
  }
}

/* Portrait in About */

.about-side .portrait {
  display: block;
  width: 100%;
  max-width: 14rem;
  height: auto;
  margin-top: 2rem;
  filter: grayscale(1);
}

#about h2 {
  margin: 0;
}

@media (max-width: 46rem) {
  .about-side .portrait {
    max-width: 11rem;
    margin-top: 1.5rem;
  }
}
