:root {
  --background: #000;
  --foreground: #fff;
  --accent: #e7d1b5;
  --highlight: #f1a638;
  --banner-fallback: #344734;
  --gutter: 4vw;
  --column-gap: 2.125rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --scale-unit: clamp(8px, 1vw, 18px);
  --heading-huge: calc(1rem + 3.6 * var(--scale-unit));
  --heading-large: calc(1rem + 2.16 * var(--scale-unit));
  --heading-medium: calc(1rem + 1.44 * var(--scale-unit));
  --heading-small: calc(1rem + 0.24 * var(--scale-unit));
  --title-size: calc(1rem + 1.2 * var(--scale-unit));
  --lead-size: calc(1rem + 0.6 * var(--scale-unit));
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 400 1rem/1.8 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

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

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

p a {
  color: var(--highlight);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 2rem;
  font-weight: 700;
}

h1 {
  font-size: var(--heading-huge);
  line-height: 1.23;
}

h2 {
  font-size: var(--heading-large);
  line-height: 1.3;
}

h3 {
  font-size: var(--heading-medium);
  line-height: 1.33;
}

h4 {
  font-size: var(--heading-small);
  line-height: 1.4;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #000;
}

.skip-link:focus {
  left: 0;
  z-index: 20;
}

.icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.button {
  display: inline-block;
  padding: 1.2em 2em;
  border: 2px solid var(--highlight);
  border-radius: 0.4rem;
  color: var(--highlight);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  background: var(--highlight);
  color: var(--background);
}

.button--small {
  font-size: 0.9rem;
}

.button--large {
  font-size: calc(1rem + 0.12 * var(--scale-unit));
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.5rem var(--gutter);
  background: var(--background);
}

.site-title {
  margin: 0;
  color: var(--foreground);
  font-size: var(--title-size);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

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

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.site-nav .button {
  color: var(--highlight);
}

.site-nav .button:hover,
.site-nav .button:focus-visible {
  color: var(--background);
}

.social-links {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: flex;
  color: inherit;
  text-decoration: none;
}

/* Sections */

.section {
  padding: 4.4rem var(--gutter);
}

.split {
  display: grid;
  grid-template-columns: calc(31.2% + 15px) calc(43.8% - 15px);
}

.split--articles {
  grid-template-columns: calc((100% - 4 * var(--column-gap) / 2) / 3 + var(--column-gap)) minmax(0, 1fr);
}

.section-label {
  margin: 0;
  font-style: italic;
}

.section-label + hr {
  width: 2.625rem;
  height: 1px;
  margin: 2.6rem 0 0;
  border: 0;
  background: var(--foreground);
}

.split--articles .section-label + hr {
  width: 10.5rem;
}

.expertise {
  padding-top: 5.3rem;
}

.expertise .section-label + hr {
  width: 100%;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--column-gap);
  padding-top: 8.8rem;
  padding-bottom: 3.5rem;
}

.hero-text {
  grid-column: 1 / span 3;
}

.hero-email {
  margin-bottom: 2rem;
}

.hero h2:last-child {
  margin-bottom: 0;
}

.hero-photo {
  grid-column: 4;
  width: 100%;
}

/* Core values */

.core-value {
  margin-bottom: 2rem;
}

.core-value:last-child {
  margin-bottom: 0;
}

.core-value h2 {
  margin-bottom: 2rem;
}

/* Talk banner */

.banner {
  display: grid;
  place-items: center;
  min-height: 33rem;
  padding: 4rem var(--gutter);
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("images/watch-talk.webp") center / cover no-repeat,
    var(--banner-fallback);
  text-align: center;
}

.banner-content {
  width: 75%;
}

.banner h1 {
  margin-bottom: 1.5rem;
}

.banner p {
  margin-bottom: 2.25rem;
  font-size: var(--lead-size);
  line-height: 1.8;
}

/* Expertise */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem var(--column-gap);
  margin-top: 2.6rem;
}

.expertise-grid h4 {
  margin-bottom: 2rem;
}

.expertise-grid img {
  width: 100%;
  margin-bottom: 2.2rem;
}

.contact-call {
  padding: 1.9rem var(--gutter) 7.25rem;
  text-align: center;
}

/* Articles */

.article-entry {
  margin-bottom: 2rem;
}

.article-entry h4 {
  margin-bottom: 1.5rem;
}

.article-entry blockquote {
  margin: 0 2.5rem;
}

.article-entry blockquote p:last-child {
  margin-bottom: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Projects */

.project-list h2 {
  margin-bottom: 2rem;
}

.project-list h2:last-child {
  margin-bottom: 0;
}

/* Legal pages */

.legal {
  padding-top: 4.5rem;
  padding-bottom: 5rem;
}

.legal-content {
  width: 50%;
}

.legal h3 {
  margin-bottom: 1.5rem;
}

.legal h1 {
  margin-bottom: 2rem;
}

.legal h2 {
  margin: 2rem 0 1rem;
  font-size: 1rem;
  line-height: 1.8;
}

.legal-updated {
  margin-bottom: 0;
  font-weight: 700;
}

/* Footer */

.site-footer,
.contact-panel {
  padding: 3rem var(--gutter) 4.5rem;
  background: var(--accent);
  color: #000;
}

.site-footer a,
.contact-panel a {
  color: #000;
}

.footer-heading {
  width: 50%;
  margin-bottom: 2rem;
}

.footer-email {
  margin: 0 0 3.5rem;
  font-size: 1.15rem;
}

.site-footer .social-links,
.contact-panel .social-links {
  gap: 0.9rem;
}

/* Small screens */

@media (max-width: 767px) {
  :root {
    --gutter: 6vw;
  }

  .site-header {
    position: static;
  }

  .hero,
  .split,
  .split--articles,
  .expertise-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-text,
  .hero-photo {
    grid-column: 1;
  }

  .hero-photo {
    max-width: 31.25rem;
    margin: 2rem auto 0;
  }

  .banner-content,
  .footer-heading,
  .legal-content {
    width: 100%;
  }

  .section-label + hr {
    margin: 1.25rem 0 1.5rem;
  }

  .banner {
    min-height: 0;
  }

  .article-entry blockquote {
    margin-inline: 1rem;
  }
}
