/* =========================================================
   KYLE LIBRA — minimal.css
   Black on white. One typeface (Geist), two text sizes,
   no accent colour. The only large thing is the name.
========================================================= */

:root {
  --paper: #fff;
  --ink: #000;
  --gray: #707070;
  --line: #ebebeb;

  --font: 'Geist', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --gutter: 40px;
  --label: 200px;   /* left column that holds section names */
  --bar: 56px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  letter-spacing: -0.006em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

::selection { background: var(--ink); color: var(--paper); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #bdbdbd;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s, color 0.2s;
}
a:hover { text-decoration-color: var(--ink); }

p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

ul, ol { list-style: none; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 400;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  text-decoration: none;
}
.skip:focus { top: 10px; }

/* =========================================================
   THE NAME
   One fixed element for the whole page. JS carries it from
   full width to the bar as the page scrolls.
========================================================= */
.wordmark {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  font-size: 15vw;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--ink);
  transform-origin: 0 0;
  transform: translate(4vw, 36vh); /* position without JS */
  will-change: transform;
}
.wordmark a {
  display: block;
  color: inherit;
  text-decoration: none;
  animation: name-in 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes name-in {
  from { opacity: 0; transform: translateY(0.06em); }
  to   { opacity: 1; transform: none; }
}
.wordmark span { display: inline-block; }

/* =========================================================
   BAR
========================================================= */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--bar);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  transition: opacity 0.3s, visibility 0.3s;
}
.js body:not(.docking) .bar { opacity: 0; visibility: hidden; }

.bar-inner {
  height: 100%;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark-slot {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  white-space: nowrap;
  visibility: hidden;
  flex-shrink: 0;
}

.bar-links { display: flex; gap: 28px; }
.bar-links a {
  color: var(--gray);
  text-decoration: none;
}
.bar-links a:hover,
.bar-links a[aria-current] { color: var(--ink); }

/* Hamburger: three lines, shown on small screens only. */
.menu-btn {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  margin-right: -9px;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-btn span {
  position: absolute;
  left: 9px;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
}
.menu-btn span:nth-child(1) { top: 13px; }
.menu-btn span:nth-child(2) { top: 19px; }
.menu-btn span:nth-child(3) { top: 25px; }

.menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--paper);
  padding: 96px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu a {
  font-size: 2rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.menu-close {
  position: absolute;
  top: 0;
  right: var(--gutter);
  height: var(--bar);
  font: inherit;
  letter-spacing: inherit;
  color: var(--gray);
  background: none;
  border: 0;
  cursor: pointer;
}

/* =========================================================
   OPENING SCREEN — empty apart from the name
========================================================= */
.reel {
  position: relative;
  height: 82vh;
  height: 82svh;
  padding: 0 var(--gutter);
}

/* =========================================================
   CONTENT
   Section name in a narrow left column, content beside it.
   Everything is one size except the opening paragraph.
========================================================= */
.page { padding: 0 var(--gutter); }

.sec {
  display: grid;
  grid-template-columns: var(--label) minmax(0, 620px);
  padding: 28px 0 96px;
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--bar);
}

.sec h2,
.sec h3 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gray);
}
.sec h2 {
  position: sticky;
  top: calc(var(--bar) + 28px);
  align-self: start;
}
.sec h3 { margin: 48px 0 16px; }

.sec p + p { margin-top: 1em; }

.lead {
  font-size: clamp(1.375rem, 2.1vw, 1.75rem);
  line-height: 1.28;
  letter-spacing: -0.025em;
  margin-bottom: 1.2em;
}

.rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
}
.rows li + li { margin-top: 18px; }
.rows .t { font-weight: 500; }
.rows .d,
.rows .y,
.muted { color: var(--gray); }
.rows .y { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows .d { grid-column: 1; }

.more { margin-top: 28px; }

.bullets {
  list-style: disc;
  margin-top: 1em;
  padding-left: 1.15em;
}
.bullets li + li { margin-top: 6px; }
.bullets li::marker { color: var(--gray); }

/* Projects: one row per category. */
.shelf {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px 24px;
  margin-top: 28px;
}
.shelf dt { color: var(--gray); }

.portrait { margin-top: 32px; }
.portrait img { display: block; width: 100%; height: auto; border-radius: 4px; }

/* =========================================================
   SIGN-OFF
========================================================= */
.foot {
  margin: 0 var(--gutter);
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: var(--label) minmax(0, 620px);
}
.foot-body { grid-column: 2; }
.foot .lead { margin-bottom: 0.6em; }
.socials { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot-small { margin-top: 72px; color: var(--gray); font-size: 0.8125rem; }

/* =========================================================
   SMALLER SCREENS
========================================================= */
@media (max-width: 860px) {
  :root { --gutter: 22px; }

  .bar-links { display: none; }
  .menu-btn { display: block; }

  .sec, .foot { display: block; }
  .sec { padding: 22px 0 72px; }
  .sec h2 { position: static; margin-bottom: 16px; }
  .shelf { grid-template-columns: 1fr; gap: 0; }
  .shelf dd { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar, .menu, a { transition: none; }
  .wordmark a { animation: none; }
}
