:root {
  --ink: #16212a;
  --ink-2: #3b4a56;
  --muted: #6b7a86;
  --line: #e2e6ea;
  --paper: #fbfaf7;
  --card: #ffffff;
  --accent: #1f7a8c;
  --accent-ink: #15596a;
  --hero: #0b1a22;
  --hero-text: #e9f1f4;
  --hero-muted: #a9bcc6;
  --max: 980px;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  line-height: 1.6; font-size: 17px;
}
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 650; margin-top: 2.5rem; }
h3 { font-size: 1.15rem; font-weight: 650; margin-top: 1.5rem; }
p { margin: 0 0 1rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(11,26,34,.92); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(255,255,255,.06); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav a { color: var(--hero-text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav .brand { letter-spacing: .02em; }
.nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.nav ul a { font-weight: 500; color: var(--hero-muted); }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: #fff; }
.nav.light { background: rgba(251,250,247,.92); border-bottom-color: var(--line); }
.nav.light a { color: var(--ink); }
.nav.light ul a { color: var(--ink-2); }
.nav.light ul a:hover, .nav.light ul a[aria-current="page"] { color: var(--accent-ink); }

/* hero */
.hero {
  background: var(--hero) url("brain-hero.webp") right 30% / cover no-repeat;
  color: var(--hero-text); position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,26,34,.25) 0%, rgba(11,26,34,.45) 55%, rgba(11,26,34,.92) 100%);
}
.hero .wrap { position: relative; padding: 4.5rem 16px 3.5rem; display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
@media (min-width: 760px) { .hero .wrap { grid-template-columns: 240px 1fr; padding: 6rem 16px 5rem; } .hero .portrait { order: -1; justify-self: start; } }
.hero .kicker { font-family: var(--mono); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hero-muted); margin-bottom: 1rem; }
.hero h1 span { color: var(--hero-muted); font-weight: 400; }
.hero .lede { font-size: 1.2rem; color: #d7e3e9; max-width: 40ch; }
.hero .lede b { color: #fff; font-weight: 600; }
.hero .portrait { justify-self: center; }
.hero .portrait img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; object-position: center top; border: 4px solid rgba(255,255,255,.18); box-shadow: 0 10px 40px rgba(0,0,0,.4); }
@media (min-width: 760px) { .hero .portrait img { width: 200px; height: 200px; } }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.btn { display: inline-block; padding: .6rem 1.05rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; border: 1px solid transparent; }
.btn.primary { background: #fff; color: var(--hero); }
.btn.primary:hover { background: #e9f1f4; color: var(--hero); }
.btn.ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn.ghost:hover { border-color: #fff; color: #fff; }
.btn.solid { background: var(--accent); color: #fff; }
.btn.solid:hover { background: var(--accent-ink); color: #fff; }
.btn.outline { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn.outline:hover { border-color: var(--accent); color: var(--accent-ink); }

/* sections */
section.band { padding: 3rem 0; }
section.band + section.band { border-top: 1px solid var(--line); }
.now { font-size: 1.1rem; max-width: 66ch; }
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.25rem; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; }
.card .when { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.card h3 { margin-top: .25rem; }
.card p { color: var(--ink-2); font-size: .98rem; flex: 1; }
.card .facts { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: .5rem 0 .75rem; padding: 0; list-style: none; }
.card .facts li { font-size: .85rem; color: var(--ink); }
.card .facts li b { font-weight: 700; }
.card a.more { font-size: .92rem; font-weight: 600; }
.aside { color: var(--ink-2); max-width: 66ch; }
.links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; padding: 0; list-style: none; margin: .75rem 0 0; }
.links a { font-weight: 600; }

/* page header for inner pages */
.pagehead { padding: 3rem 0 1rem; }
.pagehead p { color: var(--ink-2); max-width: 66ch; font-size: 1.05rem; }

/* cv */
.cv dl { display: grid; grid-template-columns: 1fr; gap: .25rem 1.5rem; margin: 0 0 1.5rem; }
@media (min-width: 700px) { .cv dl { grid-template-columns: 150px 1fr; } }
.cv dt { font-family: var(--mono); font-size: .82rem; color: var(--muted); padding-top: .25rem; }
.cv dd { margin: 0 0 1.1rem; }
.cv dd strong { display: block; font-size: 1.05rem; }
.cv dd .org { color: var(--ink-2); }
.cv ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.cv li { margin-bottom: .3rem; color: var(--ink-2); font-size: .97rem; }
.cv .pubs li { margin-bottom: .6rem; }
.cv .compact li { margin-bottom: .15rem; }
.twocol { display: grid; grid-template-columns: 1fr; gap: 0 2rem; }
@media (min-width: 760px) { .twocol { grid-template-columns: 1fr 1fr; } }

/* work */
.project { display: grid; grid-template-columns: 1fr; gap: 1.25rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.project:first-of-type { border-top: 0; }
@media (min-width: 820px) { .project { grid-template-columns: 1.1fr .9fr; align-items: start; } .project.flip { grid-template-columns: .9fr 1.1fr; } .project.flip figure { order: -1; } }
.project .when { font-family: var(--mono); font-size: .82rem; color: var(--muted); }
.project h2 { margin-top: .2rem; font-size: 1.5rem; }
.project p, .project li { color: var(--ink-2); }
.project ul { padding-left: 1.1rem; }
.project figure { margin: 0; }
.project figure img, .project figure video { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 2px 4px rgb(0 0 0 / .06); }
.project figure video { background: #000; }
.project .thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 1rem; }
.project .thumbs a { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.project .thumbs a img { width: 100%; height: 100%; object-fit: cover; object-position: top; border: 0; border-radius: 0; box-shadow: none; }
.project .thumbs a.phone img { object-fit: cover; object-position: top; }
.project .thumbs a span { position: absolute; left: 0; right: 0; bottom: 0; padding: .25rem .5rem; font-size: .75rem; font-weight: 600; color: #fff; background: linear-gradient(180deg, rgba(11,26,34,0), rgba(11,26,34,.75)); }
.lightbox { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(11,26,34,.94); padding: 1rem; }
.lightbox:target { display: grid; place-items: center; }
.lightbox .lb-backdrop { position: absolute; inset: 0; }
.lightbox figure { position: relative; margin: 0; max-width: 1100px; width: 100%; display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: center; }
@media (min-width: 760px) { .lightbox figure { grid-template-columns: 3fr 2fr; } .lightbox figure.phone { grid-template-columns: 300px 1fr; justify-content: center; max-width: 820px; } }
.lightbox figure img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 10px; border: 0; box-shadow: none; background: transparent; }
.lightbox figcaption { color: #e9f1f4; font-size: 1.02rem; line-height: 1.55; }
.lightbox figcaption b { color: #fff; }
.lightbox .lb-close { display: inline-block; margin-top: 1rem; color: #fff; font-weight: 600; }
.project figcaption { font-size: .82rem; color: var(--muted); margin-top: .4rem; }
.stack { font-family: var(--mono); font-size: .8rem; color: var(--muted); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--ink-2); font-size: .95rem; }
footer .links { margin-top: .4rem; }
footer small { display: block; margin-top: 1.25rem; color: var(--muted); }

@media print {
  .nav, .actions, footer .links, .noprint { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .hero { background: #fff; color: #000; }
  a { color: inherit; text-decoration: none; }
}
