:root {
  color-scheme: light;

  --ink: #111;
  --muted: rgba(17, 17, 17, 0.64);
  --line: rgba(17, 17, 17, 0.28);

  --background: #d9d7ce;
  --panel: rgba(255, 255, 255, 0.82);

  --edge: clamp(1.25rem, 3.5vw, 3.5rem);
  --column: 38rem;
  --panel-padding: clamp(1rem, 2vw, 1.5rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--background);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

/* Background */

.background-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--background);
}

.background {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 0%;
}

/*
   Wide desktop: deliberately crop from the top of the portrait source.
   At 200% height, the viewport shows roughly the top half of the video.
*/
@media (min-aspect-ratio: 16/9) {
  .background {
    width: 100%;
    height: 200%;
    object-fit: cover;
    object-position: 50% 0%;
  }
}

/* Page layout */

.page {
  width: min(100%, calc(var(--column) + (2 * var(--edge))));
  min-height: 100svh;
  padding:
    var(--edge)
    var(--edge)
    max(var(--edge), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Information panel */

.info-panel {
  width: min(100%, var(--column));
  background: var(--panel);
}

.intro {
  padding:
    var(--panel-padding)
    var(--panel-padding)
    0;
}

.links {
  padding:
    1.5rem
    var(--panel-padding)
    var(--panel-padding);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.8fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}

/* Typography */

h1,
h2,
p,
ul {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.tagline {
  margin-top: 0.7rem;
  max-width: 31rem;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
}

.contact {
  display: inline-block;
  margin-top: 0.45rem;
}

/* Links */

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

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

/* Project / elsewhere groups */

.group h2 {
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
}

.group ul {
  padding: 0;
  list-style: none;
}

.group li {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.45rem 0.8rem;
  align-items: baseline;
  padding: 0.19rem 0;
}

.description {
  color: var(--muted);
}

.location {
  white-space: nowrap;
}

/* Mobile / portrait */

@media (max-width: 640px) {
  :root {
    --edge: 1.25rem;
    --panel-padding: 1rem;
  }

  .background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0%;
  }

  .links {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding-top: 1.35rem;
  }

  .group li {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.2rem 0;
  }

  .description {
    font-size: 0.86rem;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .background {
    display: none;
  }

  .background-wrap {
    background:
      var(--background)
      url("background.jpg")
      center top / cover
      no-repeat;
  }
}

@media
  (prefers-reduced-motion: reduce)
  and (min-aspect-ratio: 16/9) {

  .background-wrap {
    background-size: auto 200%;
    background-position: center top;
  }
}
