/* =====================================================================
   NAV: transparent over the hero, solid once you scroll
   ===================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.is-solid {
  background: rgba(0, 0, 0, .94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 2.5rem; }
.nav__brand {
  color: var(--text); text-decoration: none; white-space: nowrap;
  font-weight: 500; font-size: 1rem; letter-spacing: -.01em;
}
.nav__links { display: flex; gap: 2rem; margin-left: auto; }
.nav__links a { position: relative; padding: .4rem 0; text-decoration: none; transition: color .2s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__clock { white-space: nowrap; }
@media (max-width: 960px) { .nav__clock { display: none; } }
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}

/* =====================================================================
   SIDE INDEX: [01] 02 03 04, only on wide screens where there's margin
   ===================================================================== */
.index {
  position: fixed; left: clamp(1rem, 1.6vw, 1.75rem); top: 50%; z-index: 40;
  transform: translateY(-50%);
  display: none; flex-direction: column; gap: .3rem;
  mix-blend-mode: difference; /* stays readable over the light band */
}
.index a {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  color: rgba(255, 255, 255, .42); text-decoration: none; transition: color .2s;
}
.index a::before, .index a::after { content: "\00a0"; }
.index a:hover, .index a.is-active { color: #fff; }
.index a.is-active::before { content: "["; }
.index a.is-active::after { content: "]"; }
@media (min-width: 1480px) { .index { display: flex; } }

/* =====================================================================
   HERO: meta columns on top, a signal trace behind, giant name below
   ===================================================================== */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: var(--nav-h);
  background: #000;
}
.hero__signal { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__top { position: relative; width: 100%; padding-top: clamp(1.25rem, 4vh, 3rem); }
.hero__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 0; }
.hero__meta-item { padding: .1rem 1.25rem 0 .9rem; border-left: 1px solid var(--line-strong); }
.hero__meta dt { margin-bottom: .4rem; }
.hero__meta dd { max-width: 26ch; color: var(--text); font-size: .92rem; line-height: 1.4; }
.hero__fig { position: relative; width: 100%; margin-top: auto; padding-bottom: .9rem; text-align: right; }
.hero__word {
  position: relative; width: 100%;
  padding-bottom: clamp(.75rem, 3vh, 2.25rem);
  font-size: min(42vw, 58svh); font-weight: 300;
  line-height: .8; letter-spacing: -.065em; white-space: nowrap;
  color: #ececec;
}
.hero__word > span[aria-hidden] { display: block; margin-left: -.06em; }
@media (max-width: 760px) {
  .hero { min-height: 92svh; }
  .hero__meta { grid-template-columns: 1fr 1fr; }
  .hero__word { font-size: 40vw; }
  .hero__fig { text-align: left; }
}

/* =====================================================================
   INTRO: the one-paragraph "about", straight after the hero
   ===================================================================== */
.intro { padding: clamp(4.5rem, 10vw, 8rem) 0; border-top: 1px solid var(--line); }
.intro__inner { display: grid; grid-template-columns: var(--grid); gap: 1.25rem 2rem; }
.intro__body { grid-column: 2 / -1; }
.intro__label { padding-top: .7em; }
.intro__text {
  max-width: 32ch; color: var(--text);
  font-size: var(--step-2); font-weight: 300; line-height: 1.3; letter-spacing: -.015em;
}
.intro__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; }

/* =====================================================================
   SECTIONS + HEADINGS (shared two-column grid: label | content)
   ===================================================================== */
.section {
  --rule: var(--line);
  padding: clamp(5rem, 11vw, 9rem) 0;
  border-top: 1px solid var(--line);
}
.sec-head {
  display: grid; grid-template-columns: var(--grid);
  gap: 1rem 2rem; margin-bottom: clamp(3rem, 6vw, 5rem);
}
.sec-head__label { grid-column: 1; padding-top: 1.1em; }
.sec-head__title { grid-column: 2 / -1; font-size: var(--step-3); line-height: 1; letter-spacing: -.045em; }
.sec-head__intro {
  grid-column: 2 / -1; max-width: 50ch; margin-top: .5rem;
  color: var(--text-dim); font-size: var(--step-1); font-weight: 300; line-height: 1.5;
}

/* light band */
.section--light {
  --rule: var(--ink-line);
  background: var(--paper); color: var(--ink-body); border-top: 0;
}
.section--light h2, .section--light h3 { color: var(--ink); }
.section--light .mono, .section--light .tag, .section--light .sec-head__intro { color: var(--ink-dim); }
.section--light ::selection { background: #000; color: #fff; }
.section--light .links a { color: var(--ink); text-decoration-color: var(--ink-line); }
.section--light .btn { --text: var(--ink); }

/* =====================================================================
   WORK: editorial rows (meta | title | description)
   ===================================================================== */
.work { border-top: 1px solid var(--rule); }
.work__row {
  display: grid; grid-template-columns: var(--grid);
  gap: 1rem 2rem; padding: 2.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.work__meta { display: flex; flex-direction: column; gap: .3rem; }
.work__meta span:first-child { color: var(--text); margin-bottom: .4rem; }
.work__title { font-size: var(--step-2); line-height: 1.12; letter-spacing: -.03em; transition: transform .4s var(--ease); }
.work__row:hover .work__title { transform: translateX(.35rem); }
.work__role { margin-top: .7rem; color: var(--text-dim); font-size: .95rem; }
.work__body p { max-width: 54ch; }
.work__media { grid-column: 2 / -1; margin-top: 1rem; border: 1px solid var(--rule); }

/* =====================================================================
   CELLS: a ruled grid, used by "Outside the office"
   ===================================================================== */
.cells {
  display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
}
.cell {
  display: flex; flex-direction: column;
  padding: 1.75rem 1.75rem 2rem;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  transition: background .3s;
}
.cell:hover { background: rgba(255, 255, 255, .03); }
.cell__top { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.cell__top span:first-child { color: var(--text); }
.cell__title { font-size: var(--step-2); line-height: 1.1; letter-spacing: -.03em; }
.cell__role { margin-top: .75rem; }
.cell__desc { margin-top: 1.25rem; font-size: .97rem; }
.cell .tags { margin-top: auto; padding-top: 1.75rem; }

/* =====================================================================
   EXPERIENCE: logo row, then a ruled list of roles
   ===================================================================== */
.logos {
  display: grid; grid-template-columns: var(--grid);
  gap: 1.25rem 2rem; align-items: center;
  margin-bottom: clamp(3rem, 6vw, 4.5rem); padding: 1.75rem 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.logos + .xp { margin-top: calc(-1 * clamp(3rem, 6vw, 4.5rem)); border-top: 0;
}
.logos__list { grid-column: 2 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem 2rem; }
.logos__list img { width: 60px; height: 60px; object-fit: contain; opacity: .78; transition: opacity .2s; }
.logos__list img:hover { opacity: 1; }
.section--light .logos__list img { filter: invert(1); } /* the logo files are white */

.xp { border-top: 1px solid var(--rule); }
.xp__row {
  display: grid; grid-template-columns: var(--grid);
  gap: .75rem 2rem; padding: 1.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.xp__when { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.xp__now { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); }
.section--light .xp__now { color: var(--ink); }
.xp__now::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.xp__title { font-size: var(--step-1); font-weight: 400; line-height: 1.3; letter-spacing: -.01em; }
.xp__org { margin-top: .4rem; }
.xp__note { max-width: 54ch; font-size: .97rem; }

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact { display: grid; grid-template-columns: var(--grid); gap: 2rem; }
.contact__main { grid-column: 2 / -1; }
.contact__blurb {
  max-width: 28ch; color: var(--text);
  font-size: var(--step-2); font-weight: 300; line-height: 1.3; letter-spacing: -.015em;
}
.contact__mail {
  display: inline-flex; align-items: baseline; gap: .6rem; max-width: 100%;
  margin-top: 2.5rem; padding-bottom: .35rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text); text-decoration: none; overflow-wrap: anywhere;
  font-size: var(--step-2); font-weight: 300; letter-spacing: -.02em;
  transition: border-color .2s;
}
.contact__mail:hover { border-color: var(--text); }
.contact__mail span { font-size: .6em; transition: transform .25s var(--ease); }
.contact__mail:hover span { transform: translate(3px, -3px); }
.contact__links { margin-top: 3.5rem; border-top: 1px solid var(--rule); }
.contact__link {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--rule);
  color: var(--text); text-decoration: none;
  font-size: var(--step-1); font-weight: 300;
  transition: padding .35s var(--ease);
}
.contact__link:hover { padding-left: .6rem; }
.contact__link .mono { font-size: 1rem; color: var(--text-dim); transition: color .2s, transform .25s var(--ease); }
.contact__link:hover .mono { color: var(--text); transform: translate(2px, -2px); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.foot { border-top: 1px solid var(--line); }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-block: 2rem; }
.foot a { text-decoration: none; transition: color .2s; }
.foot a:hover { color: var(--text); }

.error { padding: 40vh var(--gutter) 0; }
.error code { font-family: var(--font-mono); color: var(--text); }

/* =====================================================================
   SMALL SCREENS: everything collapses to one column
   ===================================================================== */
@media (max-width: 860px) {
  .intro__inner, .sec-head, .logos, .contact { grid-template-columns: 1fr; }
  .sec-head__label, .sec-head__title, .sec-head__intro, .contact__main, .intro__body, .logos__list { grid-column: 1; }
  .sec-head__label, .intro__label { padding-top: 0; }
  .work__row, .xp__row { grid-template-columns: 1fr; }
  .work__meta { flex-direction: row; flex-wrap: wrap; gap: .25rem 1.25rem; margin-bottom: .5rem; }
  .work__meta span:first-child { margin-bottom: 0; }
  .work__media { grid-column: 1; }
  .xp__when { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; }
  .cells { grid-template-columns: 1fr !important; }
  .logos__list { justify-content: flex-start; gap: 1.25rem 1.75rem; }
  .logos__list img { width: 48px; height: 48px; }
}
