/* Team, Publications, Software, Gallery, Contact. Colours come from /shared/common.css (seven tokens). */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { background: var(--bg); color: var(--ink); font-family: Manrope, system-ui, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; transition: background-color .6s var(--ease), color .6s var(--ease); }
img { display: block; max-width: 100%; }
a { color: inherit; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
a:hover .i { transform: translateX(4px); }
main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px) 120px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.big { font-size: clamp(48px, 6.4vw, 96px); font-weight: 600; letter-spacing: -0.04em; line-height: .98; margin-top: 18px; }
.lead { font-size: 19px; color: var(--muted); margin-top: 24px; max-width: 620px; font-weight: 400; }
.sub { font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 12px; }
.sub span, .tabs span, .year h3 span { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.intro { padding: 160px 0 64px; }
.go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; text-decoration: none; padding-bottom: 5px;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1.5px no-repeat, linear-gradient(var(--line), var(--line)) left bottom / 100% 1px no-repeat; transition: background-size .6s var(--ease); }
.go:hover { background-size: 100% 1.5px, 100% 1px; }

/* reveal */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease) calc(var(--i, 0) * 70ms), transform 1s var(--ease) calc(var(--i, 0) * 70ms); }
.rv.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- team */
.pi { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; padding: 32px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.pi img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; }
.pi h2 { font-size: clamp(30px, 3vw, 44px); font-weight: 600; letter-spacing: -0.02em; margin-top: 10px; }
.pi-bio { color: var(--muted); font-size: 16.5px; line-height: 1.75; margin-top: 16px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 48px; align-items: start; }
.person { border-radius: 22px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color .4s var(--ease), box-shadow .5s var(--ease), translate .5s var(--ease); }
.person:hover { translate: 0 -4px; border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 24px 50px color-mix(in srgb, #000 22%, transparent); }
.person-head { width: 100%; display: grid; grid-template-columns: 1fr; text-align: left; gap: 2px; padding: 18px 18px 16px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; position: relative; }
.ph { display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: color-mix(in srgb, var(--ink) 6%, transparent); margin-bottom: 14px; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.person:hover .ph img { transform: scale(1.04); }
.pn { font-weight: 600; font-size: 16.5px; }
.pr { font-size: 13.5px; color: var(--muted); }
.more-sign { position: absolute; right: 18px; bottom: 22px; width: 14px; height: 14px; }
.more-sign::before, .more-sign::after { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 1.6px; background: var(--muted); transition: transform .45s var(--ease); }
.more-sign::after { transform: rotate(90deg); }
.person.open .more-sign::after { transform: rotate(0deg); }
.person-bio { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.person-bio > p { overflow: hidden; padding: 0 18px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.person.open .person-bio { grid-template-rows: 1fr; }
.person.open .person-bio > p { padding-bottom: 18px; }
.alumni { margin-top: 88px; }
.alumni-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 18px; margin-top: 24px; }
.alum { border-bottom: 1px solid var(--line); padding: 10px 0; }
.alum summary { display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none; font-weight: 500; }
.alum summary::-webkit-details-marker { display: none; }
.alum img, .alum .noimg { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: color-mix(in srgb, var(--ink) 8%, transparent); flex: none; }
.alum p { color: var(--muted); font-size: 14px; margin: 10px 0 4px 58px; }

/* ---------------------------------------------------------------- publications */
.pub-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; position: sticky; top: 66px; z-index: 5; padding: 14px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tabs { position: relative; display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.tabs button { position: relative; z-index: 1; border: 0; background: none; color: var(--muted); font: 600 14px Manrope, sans-serif; padding: 9px 16px; border-radius: 999px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; transition: color .35s var(--ease); }
.tabs button[aria-selected="true"] { color: var(--bg); }
.tabs button[aria-selected="true"] span { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.tab-ink { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--ink); transition: transform .5s var(--ease), width .5s var(--ease); }
.search { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); min-width: min(380px, 100%); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; }
.search input { flex: 1; border: 0; background: none; color: var(--ink); font: 400 15px Manrope, sans-serif; outline: none; }
.years { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 18px 0 8px; font-size: 13px; }
.years a { color: var(--muted); text-decoration: none; transition: color .3s; }
.years a:hover { color: var(--accent); }
.year { padding-top: 34px; }
.year h3 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.year ol { list-style: none; }
.cite { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.65; color: color-mix(in srgb, var(--ink) 88%, var(--muted)); transition: background .3s var(--ease); }
.cite:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.cite mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.empty { color: var(--muted); padding: 40px 0; }

/* ---------------------------------------------------------------- software */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool { display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: translate .5s var(--ease), border-color .4s var(--ease), box-shadow .5s var(--ease); }
.tool:hover { translate: 0 -5px; border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 26px 54px color-mix(in srgb, #000 22%, transparent); }
/* every screenshot sits in the same 16:10 plate and scales down to fit it, whatever its own shape */
.tool-img { position: relative; aspect-ratio: 16 / 10; background: #FFFFFF; overflow: hidden; }
.tool-img img { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; }
.tool-img.dark { background: var(--bg); }
.tool-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tool-body h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.tool-body p { color: var(--muted); font-size: 14.5px; line-height: 1.65; flex: 1; }
.tool.feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
.tool.feature .tool-img { aspect-ratio: auto; height: 100%; min-height: 280px; }
.tool.feature .tool-img img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tool.feature h2 { font-size: 30px; }

/* ---------------------------------------------------------------- gallery */
.album { margin-top: 24px; }
.album + .album { margin-top: 80px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 24px; }
.shot { border: 0; padding: 0; border-radius: 18px; overflow: hidden; cursor: zoom-in; background: var(--surface); aspect-ratio: 4 / 3; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s var(--ease); }
.shot:hover img { transform: scale(1.05); filter: brightness(1.06); }
.lightbox { border: 0; padding: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; background: color-mix(in srgb, #000 88%, transparent); display: none; place-items: center; }
.lightbox[open] { display: grid; animation: lbIn .45s var(--ease); }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; animation: lbImg .55s var(--ease); }
.lightbox button { position: fixed; border: 0; background: color-mix(in srgb, #fff 12%, transparent); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; cursor: pointer; transition: background .3s; }
.lightbox button:hover { background: color-mix(in srgb, #fff 24%, transparent); }
.lb-close { top: 18px; right: 18px; } .lb-prev { left: 18px; top: 50%; } .lb-next { right: 18px; top: 50%; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbImg { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- contact */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; align-items: start; }
.c-card { padding: 34px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); }
.c-card .kicker { margin-top: 22px; } .c-card .kicker:first-child { margin-top: 0; }
.c-card address, .c-card p { font-style: normal; color: var(--muted); font-size: 16px; margin-top: 8px; }
.c-card a { color: var(--ink); }
.join h2 { font-size: clamp(30px, 3vw, 42px); font-weight: 600; letter-spacing: -0.02em; margin-top: 12px; }
.join ul { margin: 14px 0 22px 20px; color: var(--muted); }
.join li { margin-top: 6px; }

@media (max-width: 960px) {
  .tools { grid-template-columns: 1fr 1fr; } .tool.feature { grid-template-columns: 1fr; }
  .contact, .pi { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .intro { padding: 120px 0 40px; }
  .tools { grid-template-columns: 1fr; }
  .pub-tools { top: 64px; } .search { min-width: 100%; }
  .people { grid-template-columns: 1fr 1fr; gap: 12px; } .person-head { padding: 12px; } .pn { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
