:root {
  --ink: #1f1f1f;
  --body: #4a4a4a;
  --lede: #3d3d3d;
  --muted: #767676;
  --nav: #8e959f;
  --line: #eaeaea;
  --tint: #fafaf9;
  --link: #3f5f8f;
  --bg: #ffffff;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sidebar: 348px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 15px;
  line-height: 25px;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 500; }

/* ---------- Layout ---------- */
.layout { display: flex; align-items: flex-start; max-width: 1440px; margin: 0 auto; }

.sidebar {
  position: sticky; top: 0;
  width: var(--sidebar); flex-shrink: 0;
  height: 100vh; overflow-y: auto;
  padding: 72px 24px 48px 72px;
  display: flex; flex-direction: column; gap: 40px;
}
.sidebar .name { font-size: 24px; line-height: 30px; color: var(--ink); letter-spacing: -0.01em; }
.nav { display: flex; flex-direction: column; gap: 20px; }
.nav a.top { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--nav); }
.nav a.top.active, .nav a.top:hover { color: var(--ink); text-decoration: none; }
.nav details summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: 15px; line-height: 20px; font-weight: 700; color: var(--ink);
  display: flex; gap: 8px; align-items: center;
}
.nav details summary::-webkit-details-marker { display: none; }
.nav details summary .chev { font-size: 12px; transition: transform .15s ease; display: inline-block; }
.nav details:not([open]) summary .chev { transform: rotate(-90deg); }
.nav .sub { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.nav .sub a { font-size: 14px; line-height: 19px; color: var(--nav); }
.nav .sub a.active, .nav .sub a:hover { color: var(--ink); text-decoration: none; }
.meta { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; color: var(--muted); }

main { width: 1092px; max-width: 100%; flex: 0 1 1092px; min-width: 0; padding: 72px 72px 140px 0; display: flex; flex-direction: column; gap: 96px; }

/* ---------- Sections ---------- */
section { padding-top: 56px; border-top: 1px solid var(--line); }
section#hello { padding-top: 0; border-top: 0; }
.row { display: flex; gap: 56px; align-items: flex-start; }
.text { width: 436px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.media { width: 528px; flex-shrink: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.label { font-size: 13px; line-height: 18px; color: var(--muted); }
h2 { font-size: 24px; line-height: 30px; letter-spacing: -0.015em; }
h1 { font-size: 40px; line-height: 46px; letter-spacing: -0.025em; }
.lede { font-size: 17px; line-height: 27px; color: var(--lede); }
.small { font-size: 13px; line-height: 20px; color: var(--muted); }
.bullets { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 22px; }
.quote { font-size: 14px; line-height: 22px; color: var(--ink); font-style: italic; }
.quote cite { font-style: normal; font-size: 13px; color: var(--muted); }
.quote.big { font-size: 15px; line-height: 24px; padding: 4px 0 0 16px; border-left: 2px solid var(--ink); }
.links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; line-height: 20px; }
.links.stack { flex-direction: column; flex-wrap: nowrap; }
strong { color: var(--ink); font-weight: 500; }

.photo { position: relative; border-radius: 6px; overflow: hidden; background: #f2f2f0; }
.photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .4s ease; }
.photo:hover img { transform: scale(1.015); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.cap { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 8px; }
.cap b { color: var(--ink); font-weight: 400; }
figure { margin: 0; }

.badge {
  position: absolute; left: 16px; bottom: 16px;
  padding: 6px 10px; border-radius: 4px; background: rgba(255,255,255,.95);
  font-size: 13px; line-height: 18px; color: var(--ink);
}
a.badge:hover { text-decoration: none; background: #fff; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 56px; height: 56px; border-radius: 50%; background: rgba(31,31,31,.85);
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.play svg { margin-left: 3px; }

.stats { display: flex; border-top: 1px solid var(--ink); }
.stats > div { flex: 1; padding: 14px 12px 0 12px; border-left: 1px solid var(--line); }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats .n { font-size: 28px; line-height: 32px; font-weight: 500; color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.stats .n.xl { font-size: 44px; line-height: 50px; letter-spacing: -0.03em; }
.stats .l { font-size: 12px; line-height: 16px; color: var(--muted); }

/* ---------- Timeline (work) ---------- */
.timeline { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.stop { position: relative; display: flex; gap: 56px; align-items: flex-start; padding: 0 0 56px 28px; scroll-margin-top: 40px; }
.stop:last-child { padding-bottom: 8px; }
.stop::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.stop .text { width: 408px; }
.stop h3 { font-size: 19px; line-height: 26px; letter-spacing: -0.01em; }

/* ---------- Drop-downs ---------- */
.acc { border-top: 1px solid var(--ink); }
.acc details { border-bottom: 1px solid var(--line); }
.acc details[open] { background: var(--tint); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; gap: 16px; align-items: baseline;
  padding: 14px 12px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.acc .cat { width: 120px; flex-shrink: 0; font-size: 13px; line-height: 24px; color: var(--muted); }
.acc .head { flex: 1; display: flex; flex-wrap: wrap; gap: 0 12px; align-items: baseline; }
.acc .t { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--ink); }
.acc .s { font-size: 14px; line-height: 24px; color: var(--muted); }
.acc .pm { width: 24px; flex-shrink: 0; text-align: right; font-size: 18px; line-height: 24px; color: var(--ink); }
.acc .pm::before { content: "+"; }
.acc details[open] .pm::before { content: "–"; }
.acc .body { display: flex; gap: 28px; padding: 2px 12px 20px 148px; }
.acc .body .copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.acc .body .pics { width: 420px; flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acc .body .pics .photo { height: 200px; }
.acc .body .pics.one { grid-template-columns: 1fr; }
.acc.narrow .cat { width: 64px; }
.acc.narrow .body { padding-left: 92px; flex-direction: column; }
.acc.narrow .body .pics { width: auto; }
.acc.narrow .body .pics .photo { height: 150px; }
.acc .body .pics.one .photo { height: 220px; }
.acc .body .pics a.photo { display: block; }
.acc .body .pics a.photo img { cursor: pointer; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.card .logo { height: 150px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); background: #fff; }
.card .stats { border-top: 0; background: var(--tint); }
.card .stats > div { padding: 16px 14px; }
.card .stats > div:first-child { padding-left: 16px; }
.card .stats .n { font-size: 24px; line-height: 28px; }
.card .essay { display: flex; gap: 16px; align-items: center; padding: 16px; border-top: 1px solid var(--line); }
.doc { width: 56px; height: 72px; flex-shrink: 0; border: 1px solid #d9d9d9; border-radius: 3px; padding: 9px 7px; display: flex; flex-direction: column; gap: 5px; }
.doc i { display: block; height: 2px; background: #cfcfcf; }
.doc i:first-child { height: 3px; width: 60%; background: var(--ink); }

.brand { display: flex; gap: 20px; align-items: center; padding: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fafafa; }
.mono { width: 72px; height: 72px; flex-shrink: 0; border-radius: 10px; background: #111; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; letter-spacing: -0.04em; }

.thumbrow { display: flex; gap: 12px; align-items: flex-start; }
.thumbrow figure:first-child { flex: 316; }
.thumbrow figure:last-child { flex: 200; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(15,15,15,.88); display: none; align-items: center; justify-content: center; z-index: 50; padding: 32px; cursor: zoom-out; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }

/* ---------- Mobile top bar ---------- */
.topbar { display: none; }

@media (max-width: 1300px) {
  :root { --sidebar: 280px; }
  .sidebar { padding-left: 40px; }
  main { padding-right: 40px; }
  .row, .stop { flex-direction: column; gap: 24px; }
  .text, .media, .stop .text { width: 100%; }
  .acc .body { flex-direction: column; padding-left: 12px; }
  .acc .body .pics { width: 100%; }
}
@media (max-width: 820px) {
  html { scroll-padding-top: 72px; }
  .layout { display: block; }
  .topbar {
    display: flex; position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
    padding: 14px 16px; justify-content: space-between; align-items: center;
  }
  .topbar .name { font-size: 18px; color: var(--ink); }
  .topbar button { font: inherit; font-size: 14px; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; }
  .sidebar {
    position: fixed; inset: 0; z-index: 45; height: 100vh; width: 100%;
    background: #fff; padding: 72px 24px 40px; transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: none; }
  .sidebar button.close { display: block; }
  main { width: 100%; padding: 32px 16px 96px; gap: 64px; }
  h1 { font-size: 34px; line-height: 40px; }
  .acc .cat { display: none; }
  .acc.narrow .body { padding-left: 12px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .stats { flex-wrap: wrap; }
  .stats > div { min-width: 45%; padding-bottom: 12px; }
}
.sidebar .close { display: none; position: absolute; top: 16px; right: 16px; font: inherit; font-size: 14px; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; color: var(--ink); }
a.essay:hover .doc { border-color: var(--link); }
a.essay:hover > div > div:first-child { color: var(--link) !important; }

/* Drop-downs: full-width photos, never cropped */
.acc .body { flex-direction: column; gap: 16px; }
.acc .body .pics, .acc.narrow .body .pics { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.acc .body .pics .photo, .acc.narrow .body .pics .photo, .acc .body .pics.one .photo { height: auto; background: none; border-radius: 6px; }
.acc .body .pics .photo img { width: 100%; height: auto; max-height: 560px; object-fit: contain !important; object-position: center !important; }
.acc .body .pics .photo:hover img { transform: none; }

/* Startupfest: full-width vertical video, photos below */
.sf-media { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.sf-video { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sf-video video { width: 100%; max-height: 80vh; aspect-ratio: 9 / 16; object-fit: contain; background: #111; border-radius: 6px; display: block; }

/* Uncropped photo rows: each child's flex = its width/height ratio, so heights match */
.photo.fit, .fit-row .photo { height: auto; }
.photo.fit img, .fit-row .photo img { height: auto; display: block; }
.fit-row { display: flex; gap: 8px; }
.fit-row .photo { min-width: 0; }

/* fit-rows inside drop-downs: equal-height, uncropped, side by side */
.acc .body .pics .fit-row { gap: 10px; }
.acc .body .pics .fit-row .photo img { max-height: none; object-fit: cover !important; }

/* Build Day photos use the drop-down's full width on desktop */
@media (min-width: 821px) { .acc.narrow .body .pics.bd-pics { margin-left: -80px; width: calc(100% + 80px); } }

/* NorthPath: client backers with logos */
.backers { display: flex; flex-wrap: wrap; gap: 14px 28px; font-size: 26px; line-height: 34px; font-weight: 500; color: var(--ink); letter-spacing: -0.02em; }
.backers span { display: inline-flex; align-items: center; gap: 12px; }
.backers img { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
@media (max-width: 820px) { .backers { font-size: 20px; line-height: 28px; } .backers img { width: 28px; height: 28px; } }
