/* albertludemann.com. The home page opens on his film of the traveller in space (assets/landing.css
   and assets/flight.js, kept as they were); everything under it is institutional, built like the
   sites of Palantir, Anduril, Citadel and 8VC.
   One precise grotesk (Geist) for everything, set large and tight for statements and small and
   grey for labels; black, white and greys; a 12-column grid with a label column on the left;
   thin rules; real photographs; his LUDEMANN wordmark as the only mark. */

@font-face {
  /* Geist, SIL Open Font License, latin subset, weights 100-900 in one file */
  font-family: "Geist";
  src: url(/fonts/geist-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0b0b0c;
  --body: #3b3b3e;
  --grey: #85858a;
  --line: #e4e4e2;
  --panel: #f4f4f2;
  --dark: #0b0b0c;
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --edge: clamp(20px, 4.5vw, 64px);
  --gap: clamp(96px, 13vh, 160px);
  --top: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html {
  background: #fff;
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: var(--top);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; }

p { margin: 0 0 1em; }

.wrap {
  max-width: calc(1320px + var(--edge) * 2);
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* A section: its name small in the left column, everything else from the fourth column on. */
.row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 32px;
}

.label {
  margin: 0;
  padding-top: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--grey);
}

.statement {
  max-width: 17em;
  margin: 0;
  font-size: clamp(36px, 4.2vw, 64px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.035em;
}

/* His wordmark, drawn as a mask so it takes the colour of the text around it. */
.mark {
  display: block;
  background: currentColor;
  -webkit-mask: var(--src) no-repeat left center / contain;
  mask: var(--src) no-repeat left center / contain;
}

.mark--ludemann { --src: url(/img/ludemann.svg); width: 116px; aspect-ratio: 1394.59 / 162.11; }

/* ------------------------------------------------------------ the bar */

/* White with a rule under it; on the home page it starts clear over the photograph. */
.top {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--top);
  /* the same left and right edges as the content under it */
  padding: 0 max(var(--edge), calc((100% - 1320px) / 2));
  color: var(--ink);
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}

.top__mark { color: inherit; }

.top__nav { display: flex; gap: 36px; }

.top__nav a,
.top__menu {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 450;
  color: inherit;
  text-decoration: none;
  opacity: .82;
  transition: opacity .2s ease;
}

.top__nav a:hover,
.top__menu:hover { opacity: 1; }

.top__menu {
  display: none;
  padding: 8px 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* ------------------------------------------------------------ sections */

.sec { padding: var(--gap) 0; }

.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(40px, 6vh, 64px);
}

.cols p {
  margin: 0;
  font-size: 17px;
  color: var(--body);
}

/* Four figures, Citadel's way: large numerals, a rule above, a small line under. */
.figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: clamp(72px, 10vh, 112px) 0 clamp(72px, 10vh, 112px);
}

.figures div {
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.figures dt {
  font-size: clamp(40px, 4.6vw, 72px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.045em;
}

.figures dd {
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--grey);
}

.film-frame {
  margin: 0;
  overflow: hidden;
  background: #000;
}

/* A film (the live-fire test, the Patron race) at its own 16:9, never cut. */
.clip {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.caption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--grey);
}

.caption__links { display: flex; gap: 28px; }

.caption__links a {
  color: var(--ink);
  text-decoration: none;
}

.caption__links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ------------------------------------------------------------ writing */

/* Like a firm's news page: two essays large, eight four across, on a light ground. */
.writing {
  padding: var(--gap) 0;
  background: var(--panel);
}

.writing__head {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 32px;
  align-items: end;
  margin-bottom: clamp(40px, 6vh, 64px);
}

.writing__head h2 {
  margin: 0;
  font-size: clamp(36px, 4.2vw, 64px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.035em;
}

.lead {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px 32px;
}

.post-card {
  display: block;
  text-decoration: none;
}

.post-card__art {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #e6e6e3;
}

.post-card__art img {
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.post-card:hover .post-card__art img { transform: scale(1.03); }

.post-card__meta {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--grey);
}

.post-card__title {
  display: block;
  margin-top: 8px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.015em;
}

.post-card:hover .post-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.post-card__dek {
  display: block;
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
}

.post-card--lead .post-card__title {
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

/* ------------------------------------------------------------ about */

.about {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.about__portrait {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #1c1d20;
}

.about__portrait img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.about h2 {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.about__role {
  margin: 8px 0 32px;
  font-size: 15px;
  font-weight: 500;
  color: var(--grey);
}

.about__text > p:not(.about__role) {
  font-size: 17px;
  color: var(--body);
}

.facts {
  margin: 40px 0 0;
  border-top: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.facts dt { font-weight: 500; }

.facts dd { margin: 0; color: var(--grey); }

/* ------------------------------------------------------------ contact */

.end {
  padding: var(--gap) 0 36px;
  background: var(--dark);
  color: #fff;
}

.end .label { color: rgba(255, 255, 255, .5); }

.end__mail {
  font-size: clamp(30px, 4.6vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.04em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.end__mail:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; }

.end__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 32px 0 0;
  font-size: 15px;
  font-weight: 500;
}

.end__links a { text-decoration: none; opacity: .8; }

.end__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.end__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(96px, 14vh, 160px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .5);
}

.end__base .mark { color: #fff; }

/* ------------------------------------------------------------ an essay */

.post-head {
  max-width: calc(1320px + var(--edge) * 2);
  margin: 0 auto;
  padding: calc(var(--top) + clamp(56px, 10vh, 112px)) var(--edge) 0;
}

.post-head__inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 32px;
}

.post-head__meta a { text-decoration: none; }

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

.post-head__title {
  max-width: 15em;
  margin: 0;
  font-size: clamp(38px, 5vw, 76px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.04em;
}

.post-head__dek {
  max-width: 34em;
  margin: 24px 0 0;
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--body);
}

/* The picture at the head of the essay, whole. */
.post-art {
  max-width: calc(1320px + var(--edge) * 2);
  margin: clamp(48px, 7vh, 80px) auto 0;
  padding: 0 var(--edge);
}

.post-art img {
  width: auto;
  max-width: 100%;
  max-height: 86vh;
}

.post {
  max-width: calc(1320px + var(--edge) * 2);
  margin: clamp(48px, 7vh, 80px) auto 0;
  padding: 0 var(--edge);
}

.post__body {
  max-width: 680px;
  margin-left: calc((100% - 32px) * 3 / 12 + 32px);
  font-size: 18px;
  line-height: 1.7;
  color: var(--body);
}

.post__body p { margin: 0 0 1.2em; }

.post__body h2,
.post__body h3 {
  margin: 2em 0 .6em;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: var(--ink);
}

.post__body h3 { font-size: 21px; }

.post__body blockquote {
  margin: 1.8em 0;
  padding-left: 22px;
  border-left: 2px solid var(--ink);
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: -.015em;
  color: var(--ink);
}

.post__body blockquote p { margin: 0; }

.post__body hr {
  width: 80px;
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* A painting inside the text, as wide as the column. */
.post-figure { margin: 2.4em 0; }

.post-figure img {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
}

.post-figure figcaption,
.post-art figcaption {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--grey);
}

.post-figure figcaption a,
.post-art figcaption a {
  color: inherit;
  text-decoration-color: #c9c9c9;
  text-underline-offset: 3px;
}

/* Three more essays under each essay. */
.more {
  margin-top: var(--gap);
  padding: var(--gap) 0;
  background: var(--panel);
}

.more .grid4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }


/* ------------------------------------------------------------ the film page */

/* Under the film the page stays as dark as the film and slides up over its last frame. */
html:has(body.film) { background: #07060c; color: #fff; }

.film .page {
  position: relative;
  z-index: 5;
  background: #07060c;
  color: #fff;
}

.film .page::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 46vh;
  background: linear-gradient(rgba(7, 6, 12, 0), rgba(7, 6, 12, .55) 45%, #07060c);
  pointer-events: none;
}

/* The two cards at the end of the film: the same glass, a word each, in Geist. */
.cards--two {
  grid-template-columns: repeat(2, minmax(0, min(calc((100vw - 56px) / 3), calc((100svh - 150px) * 3 / 4))));
}

.film .card h2 {
  font-family: var(--sans);
  font-size: clamp(20px, 8cqw, 44px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
  text-transform: none;
}

/* The bar keeps out of the film and comes in once the page is reached. */
.film .top {
  color: #fff;
  background: rgba(7, 6, 12, .92);
  border-bottom-color: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity .35s ease, transform .35s ease;
}

.film .top:not(.is-solid) {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

/* The sections in the dark. */
.film .label,
.film .about__role,
.film .facts dd,
.film .figures dd,
.film .caption,
.film .post-card__meta { color: rgba(255, 255, 255, .5); }

.film .cols p,
.film .about__text > p:not(.about__role),
.film .post-card__dek { color: rgba(255, 255, 255, .74); }

.film .facts,
.film .facts div,
.film .caption,
.film .lead { border-color: rgba(255, 255, 255, .12); }

.film .figures div { border-top-color: rgba(255, 255, 255, .9); }

.film .caption__links a { color: #fff; }

.film .post-card__art { background: #15141c; }

.film .end {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, .08);
}


/* ------------------------------------------------------------ the timeline of his work */

/* One entry per year: the year in the label column, the entry on a thin line with a point at its start. */
/* the timeline comes straight after the film; About follows it, divided by a rule */
.film #about { border-top: 1px solid rgba(255, 255, 255, .08); }

/* a shorter flight now that no cards rise at its end, so the timeline comes sooner */
.film .track { height: 400vh; }

.tl {
  margin: clamp(56px, 8vh, 96px) 0 0;
  padding: 0;
  list-style: none;
}

.tl__item {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 32px;
}

.tl__year {
  margin: 0;
  font-size: clamp(40px, 4.4vw, 68px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.045em;
}

.tl__body {
  position: relative;
  padding: 0 0 clamp(72px, 10vh, 120px) clamp(28px, 3vw, 44px);
  border-left: 1px solid rgba(255, 255, 255, .16);
}

.tl__item:last-child .tl__body { padding-bottom: 0; }

.tl__body::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
}

.tl__body h3 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.035em;
}

.tl__role {
  margin: 10px 0 22px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, .5);
}

.tl__body > p:not(.tl__role):not(.tl__links) {
  max-width: 40em;
  font-size: 17px;
  color: rgba(255, 255, 255, .74);
}

.tl__media {
  margin: 32px 0 0;
  overflow: hidden;
  background: #15141c;
}

/* A company's own mark above its name. */
.tl__logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 0 22px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}

/* A film: its picture and a play button. Clicked, the player takes its place (YouTube's for the
   live-fire test, the file itself for Patron); nothing from YouTube loads before that. */
.play {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .3s ease;
}

.play:hover img { opacity: .86; }

.play__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
}

.play__icon--plain { height: 68px; }

.play__bg {
  fill: #212121;
  fill-opacity: .8;
  transition: fill .15s ease, fill-opacity .15s ease;
}

.play--yt:hover .play__bg,
.play--yt:focus-visible .play__bg { fill: #f00; fill-opacity: 1; }

.play:not(.play--yt):hover .play__bg { fill-opacity: 1; }

.play iframe,
.play video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.tl .caption { margin-bottom: 0; }

.tl__links {
  margin: 20px 0 0;
  font-size: 15px;
  font-weight: 500;
}

.tl__links a {
  color: #fff;
  text-decoration: none;
}

.tl__links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* The essays, in their own section after the timeline. */
.film .writing {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.writing .lead { margin-top: clamp(48px, 7vh, 80px); }

/* ------------------------------------------------------------ motion */

.js [data-rise] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.js [data-reveal] {
  clip-path: inset(5% 3% 0 3%);
  transition: clip-path 1.4s var(--ease);
}

.js [data-reveal] video {
  transform: scale(1.04);
  transition: transform 1.8s var(--ease);
}

.js .is-in[data-rise] { opacity: 1; transform: none; }
.js .is-in[data-reveal] { clip-path: inset(0); }
.js .is-in[data-reveal] video { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rise], .js [data-reveal], .js [data-reveal] video { opacity: 1; transform: none; clip-path: none; transition: none; }
}

/* ------------------------------------------------------------ narrow screens */

@media (max-width: 1000px) {
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about__portrait { width: min(100%, 420px); }
}

@media (max-width: 760px) {
  .row, .writing__head, .post-head__inner { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cols { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
  .lead { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .post__body { margin-left: 0; }
  .tl__item { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tl__year { padding-left: clamp(28px, 3vw, 44px); }
  .more .grid4 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  :root { --top: 60px; }
  .top__nav {
    position: fixed;
    top: var(--top);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--edge) 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .top__nav.is-open { display: flex; }
  .top__nav a { padding: 12px 0; font-size: 22px; color: var(--ink); opacity: 1; }
  .top__menu { display: block; }
  .mark--ludemann { width: 100px; }
  .grid4 { grid-template-columns: minmax(0, 1fr); }
  .caption { flex-direction: column; gap: 6px; }
  /* the address on one line: about 15 em wide in Geist */
  .end__mail { font-size: calc((100vw - 40px) / 15.6); }
  .end__base { flex-direction: column; align-items: flex-start; gap: 14px; }
  .film .top__nav { background: #07060c; border-bottom-color: rgba(255, 255, 255, .08); }
  .film .top__nav a { color: #fff; }
}

@media (max-width: 720px) {
  .cards--two {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: min(340px, calc((100svh - 86px) / 2));
  }
}
