/* Design tokens carried over from lukaschmiel.com:
   white bg, #666 body text, Helvetica Neue, fixed left sidebar. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --gap: 34px;
  --ink: #000;
  --nav: #1f1f1f;
  --nav-active: #545454;
  --body: #666;
  --serif: 'Newsreader', 'Tiempos Text', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', 'Styrene A', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: #fff;
  color: var(--body);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.8em;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }

#canvas {
  max-width: 1800px;
  padding: 80px;
}

/* ------------------------------------------------ sidebar */

#sidebar {
  position: fixed;
  top: 80px;
  left: 80px;
  width: 310px;
}

#sidebar .logo {
  margin: 0 0 30px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2em;
  letter-spacing: 0;
}
#sidebar .logo a { color: var(--ink); }

#sidebar nav {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.2em;
  letter-spacing: 0;
}
#sidebar nav a,
#sidebar nav .folder-toggle {
  display: block;
  padding: .2em 0;
  color: var(--nav);
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  letter-spacing: inherit;
}
#sidebar nav a:hover,
#sidebar nav .folder-toggle:hover { color: var(--ink); }
#sidebar nav a.on { color: var(--nav-active); }

#sidebar .subnav {
  list-style: none;
  margin: 0;
  padding: .5em 0 1em;
  display: none;
}
#sidebar .folder.open .subnav { display: block; }
#sidebar .subnav li { margin-left: .5em; }
#sidebar .subnav a { padding: .2em 0; }
#sidebar .subnav a.on { color: var(--nav-active); }

#sidebar .contact {
  font-family: var(--sans);
  margin-top: 40px;
  font-size: 12px;
  line-height: 2.1em;
}
#sidebar .contact a { color: var(--body); }
#sidebar .contact a:hover { color: var(--ink); }

/* ------------------------------------------------ main */

main {
  margin-left: 380px;
}

/* project pages: block layout mirrors rows/columns */

.project > * + *,
.col > * + * { margin-top: var(--gap); }

.row {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}
.row > .col {
  flex-grow: var(--span);
  flex-basis: 0;
  min-width: 0;
}

.media {
  display: block;
  width: 100%;
  height: auto;
  background: #f4f4f4;
}

/* vertical videos: size by screen height so they fit in view */
.project video.portrait {
  width: auto;
  max-width: 100%;
  max-height: 82vh;
}

.text { max-width: 720px; }
.text a { color: var(--nav); }
.text a:hover { color: var(--ink); }

.press .avatar {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  background: #e9e9e9;
  margin: 0 0 14px;
}

.press .press-head { color: var(--ink); }

/* ------------------------------------------------ home: big-name collage */

body.home { background: #fff; }

#home-nav {
  font-family: var(--sans);
  font-family: var(--sans);
  position: fixed;
  top: 26px;
  right: 34px;
  z-index: 10;
  display: flex;
  gap: 26px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.6em;
}
#home-nav a { color: var(--nav); }
#home-nav a:hover { color: var(--body); }

#home-wrap {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 8vw 120px;
}

.display-name {
  position: fixed;
  top: 20px;
  left: clamp(20px, 2.5vw, 44px);
  z-index: 5;
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5.5vw, 92px);
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: #000;
  pointer-events: none;
  user-select: none;
}

.collage {
  columns: 2;
  column-gap: 5vw;
  padding-top: calc(clamp(72px, 8vw, 150px) + 20px);
}

.ctile {
  display: inline-block;
  width: 100%;
  margin: 0 0 10vh;
  break-inside: avoid;
}
.ctile .tile-media {
  aspect-ratio: auto;
  background: #f4f4f4;
}
.ctile .tile-media video,
.ctile .tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ctile .tile-cap {
  font-family: var(--sans);
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.7em;
}
.ctile:hover .tile-cap { color: var(--body); }

/* oversized tiles: xl fills its column; xxl breaks across both columns */
.ctile.xl { width: 100% !important; margin-left: 0 !important; }
.ctile.xxl {
  column-span: all;
  width: 80% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block;
}
/* a single vertical tile: centered, as tall as the landscape tiles are wide */
.ctile.xxl.portrait { width: 45% !important; }

/* scatter variants — cycle of six placements */
/* two vertical tiles shown side by side, spanning the collage columns */
.collage .cpair {
  column-span: all;
  display: flex;
  gap: 5vw;
  align-items: flex-start;
  margin: 0 0 var(--gap);
}
.collage .cpair .ctile {
  width: 50%;
  margin-left: 0;
  margin-top: 0;
}

.ctile.v0 { width: 84%; }
.ctile.v1 { width: 62%; margin-left: 30%; margin-top: 7vh; }
.ctile.v2 { width: 74%; margin-left: 10%; }
.ctile.v3 { width: 56%; margin-left: 36%; margin-top: 5vh; }
.ctile.v4 { width: 90%; }
.ctile.v5 { width: 66%; margin-left: 4%; margin-top: 8vh; }

/* ------------------------------------------------ mobile */

@media (max-width: 980px) {
  #canvas { padding: 20px; }
  #sidebar {
    position: static;
    width: auto;
    margin-bottom: 40px;
  }
  main { margin-left: 0; }
  .row { display: block; }
  .row > .col + .col { margin-top: var(--gap); }
}

@media (max-width: 700px) {
  #home-nav { top: auto; bottom: 0; left: 0; right: 0; justify-content: center; gap: 18px; padding: 10px; background: rgba(255,255,255,.92); }
  #home-wrap { padding: 20px 24px 90px; }
  .display-name { left: 24px; font-size: clamp(26px, 8.5vw, 48px); }
  .collage { position: relative; z-index: 6; columns: 1; padding-top: calc(19vw + 20px); }
  .collage .cpair { gap: 16px; margin-bottom: 52px; }
  .collage .cpair .ctile { width: 50% !important; margin-bottom: 0; }
  .ctile, .ctile.v0, .ctile.v1, .ctile.v2, .ctile.v3, .ctile.v4, .ctile.v5, .ctile.xxl, .ctile.xxl.portrait {
    width: 100% !important; margin-left: 0 !important; margin-top: 0; margin-bottom: 52px;
  }
}
