/* ---------- Font (Violet's own typeface) ---------- */
/* size-adjust brings it up to the optical size of a standard text face. */
@font-face {
  font-family: "Violet Handwritten";
  src: url("fonts/VioletHandwritten-Regular.otf") format("opentype");
  font-display: swap; size-adjust: 160%; ascent-override: 80%; descent-override: 22%;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-soft: #5f5b57;
  --line: #e4e1dc;
  --blue: #48b8d0;
  --pink: #da4167;
  --green: #44af69;
  --orange: #ff7f11;
  --yellow: #f5c43c;
  --purple: #9a7fe0;

  --hand: "Violet Handwritten", system-ui, sans-serif;
  --body: var(--hand);
  /* The typeface is set loosely; tighten it for caps headings. */
  --caps-track: -0.035em;

  /* Slightly irregular corners, like a box drawn by hand. */
  --drawn: 14px 20px 12px 22px / 20px 12px 22px 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); letter-spacing: -0.01em; }
strong, b { font-weight: 400; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--hand); font-weight: 400; text-transform: uppercase; letter-spacing: var(--caps-track); line-height: 1; margin: 0 0 .5em; }
h1 { font-size: clamp(3rem, 8vw, 5.25rem); }
h2 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h3 { font-size: 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 30; }
.lede { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 5rem; }
.section { margin-top: clamp(3.5rem, 8vw, 6rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head a { font-family: var(--hand); font-size: 1.3rem; text-transform: uppercase; letter-spacing: var(--caps-track); text-decoration: none; }
.section-head a:hover { text-decoration: underline; }
.page-head { padding-top: clamp(2rem, 6vw, 4rem); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 3px solid var(--ink); }
.site-header-inner {
  max-width: var(--max); margin: 0 auto; padding: .9rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem 2rem; flex-wrap: wrap;
}
.logo img { width: clamp(140px, 18vw, 190px); mix-blend-mode: multiply; }
.site-header nav { display: flex; gap: .6rem; }
.site-header nav a {
  font-family: var(--hand); font-size: 1.45rem; text-transform: uppercase; letter-spacing: var(--caps-track); line-height: 1;
  text-decoration: none; padding: .55rem 1.1rem .5rem; border: 3px solid transparent; border-radius: var(--drawn);
}
.site-header nav a:hover { border-color: var(--ink); }
.site-header nav a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; font: 1.1rem/1 var(--hand); text-transform: uppercase; letter-spacing: var(--caps-track);
  padding: .5em .9em .45em; border-radius: 999px; border: 2.5px solid var(--ink);
  background: var(--bg); color: var(--ink); text-decoration: none; white-space: nowrap;
}
button.chip { cursor: pointer; }
button.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
/* Each kind of work keeps the same colour and shape everywhere: Portfolio, About and the Connections
   map. Publication = pink square, Event = blue hexagon, Practice/Design = green triangle,
   Public speaking = purple circle (it sits inside Event on the map). */
.chip-publication::before, .chip-practice::before, .chip-speaking::before, .chip-event::before { content: ""; width: .6em; height: .6em; margin-right: .45em; }
.chip-publication::before { background: var(--pink); border-radius: 2px; }
.chip-practice::before    { background: var(--green); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.chip-speaking::before    { background: var(--purple); border-radius: 50%; }
.chip-event::before       { background: var(--blue); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }

/* ---------- Home ---------- */
.hero { padding-top: clamp(2.5rem, 8vw, 5.5rem); max-width: 960px; }
.hero h1 { font-size: clamp(2.8rem, 7.5vw, 5.25rem); line-height: .98; }

.home-columns { display: grid; gap: 3rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .home-columns { grid-template-columns: minmax(0, 1fr) 400px; } }
.grid.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
@media (min-width: 900px) { .grid.grid-2 { grid-template-columns: 1fr 1fr; } }
/* Recent work sits in its own panel. Its shadow is neutral: the cards inside already use blue, pink and green, and News uses orange. */
.recent { border: solid var(--ink); border-width: 4px 4px 4.5px 3.5px; border-radius: var(--drawn); padding: 1.5rem; box-shadow: 8px 8px 0 rgb(0 0 0 / .12); }
.recent .section-head { margin-top: 0; }
.recent .section-head h2 { font-size: 2rem; }
@media (max-width: 600px) { .recent, .news { padding: 1.1rem; } }
.news { position: sticky; top: 7.5rem; border: solid var(--ink); border-width: 4px 3.5px 4.5px 4px; border-radius: var(--drawn); padding: 1.5rem; box-shadow: 8px 8px 0 var(--orange); }
.news h2 { font-size: 2rem; margin-bottom: .75rem; }
.news ul { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; gap: .1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.news li:first-child { border-top: 0; padding-top: 0; }
.news time { font-size: .9rem; color: var(--ink-soft); text-transform: uppercase; }
.news li { gap: .35rem; }
.news li p { margin: 0; line-height: 1.4; }
.news-tags { display: flex; align-items: center; gap: .5rem; }
.news-tags .chip { font-size: .8rem; padding: .25em .55em .2em; border-width: 2px; }
.news a { line-height: 1.4; text-decoration: none; }
.news a:hover { text-decoration: underline; text-decoration-color: var(--orange); }

/* ---------- Cards / grid ---------- */
.grid { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 2.5rem 1.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
/* Hover shadow matches the kind of work. */
.card { --hover: var(--green); }
.card[data-type="event"] { --hover: var(--blue); }
.card[data-type="speaking"] { --hover: var(--purple); }
.card[data-type="publication"] { --hover: var(--pink); }
.card a { text-decoration: none; display: block; }
.card-img {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line);
  border: solid var(--ink); border-width: 4px 3.5px 4.5px 4px; border-radius: var(--drawn);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
/* Each card gets a slightly different hand-drawn frame. */
.card:nth-child(5n + 2) .card-img { border-width: 3.5px 4.5px 4px 4px; border-radius: 22px 12px 20px 14px / 14px 22px 12px 20px; }
.card:nth-child(5n + 3) .card-img { border-width: 4.5px 4px 3.5px 4.5px; border-radius: 10px 24px 16px 18px / 24px 16px 18px 10px; }
.card:nth-child(5n + 4) .card-img { border-width: 4px 4px 4.5px 3.5px; border-radius: 26px 14px 10px 20px / 12px 20px 26px 14px; }
.card:nth-child(5n + 5) .card-img { border-width: 3.5px 4px 4px 4.5px; border-radius: 16px 18px 24px 10px / 20px 10px 16px 24px; }
/* Type tag appears on hover. */
.hover-tag { position: absolute; left: 12px; top: 12px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
.card a:hover .hover-tag, .card a:focus-visible .hover-tag { opacity: 1; transform: none; }
.card a:hover .card-img, .card a:focus-visible .card-img { box-shadow: 8px 8px 0 var(--hover); transform: translate(-3px, -3px); }
.card h3 { font-size: 1.55rem; line-height: 1.02; margin: 1rem 0 .3rem; }
.card .meta { margin: 0; font-size: 1rem; line-height: 1.3; color: var(--ink-soft); }
.card[hidden] { display: none; }

/* ---------- Filters ---------- */
.filters { margin-top: 1.75rem; display: grid; gap: .75rem; padding: 1.1rem 0; border-block: 1px solid var(--line); }
.filter-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.filter-label { margin-right: .5rem; }
.filter-label, .filter-count { font-family: var(--hand); font-size: 1.15rem; text-transform: uppercase; letter-spacing: var(--caps-track); color: var(--ink-soft); }
.filter-count { margin: 0; }
.empty { text-align: center; padding: 3rem 0; color: var(--ink-soft); }

/* ---------- Project page ---------- */
.project { max-width: 900px; margin: 0 auto; }
.project-head { padding-top: clamp(2rem, 5vw, 3.5rem); margin-bottom: 2.5rem; }
.back { font-family: var(--hand); font-size: 1.25rem; text-transform: uppercase; letter-spacing: var(--caps-track); text-decoration: none; display: inline-block; margin-bottom: 1.4rem; }
.back:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; }
.project-head h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.project-head .meta { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }
.prose { max-width: 70ch; margin: 0 auto; }
.prose > p:has(> img), .prose > .gallery, .prose > .embed { max-width: none; margin-inline: calc(50% - min(50vw - var(--gutter), 450px)); }
.prose img { border-radius: 8px; cursor: zoom-in; margin: 1.5rem auto; }
.prose > p > img { max-height: 80vh; width: auto; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin-top: 1.8em; font-size: 1.9rem; }

.prose a { text-decoration-color: var(--blue); text-decoration-thickness: 2px; }
.gallery { columns: 3 220px; column-gap: 12px; margin: 1.5rem 0; }
.gallery img { width: 100%; margin: 0 0 12px; break-inside: avoid; }
.embed { aspect-ratio: 16 / 9; margin: 1.5rem 0; }
.embed iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-family: var(--hand); font-size: 1.5rem; text-transform: uppercase; letter-spacing: var(--caps-track); line-height: 1.05; }
.pager a:hover { text-decoration: underline; }
.pager small { display: block; font-size: 1rem; color: var(--ink-soft); margin-bottom: .3rem; }
.pager .next { text-align: right; }

/* ---------- About ---------- */
.bio { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-top: clamp(2rem, 6vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 760px) { .bio { grid-template-columns: minmax(240px, 380px) 1fr; } }
.portrait { width: calc(100% - 10px); max-width: 380px; aspect-ratio: 1; object-fit: cover; border: solid var(--ink); border-width: 4px 3.5px 4.5px 4px; border-radius: var(--drawn); box-shadow: 10px 10px 0 var(--green); }
.bio .lede { color: var(--ink); font-size: clamp(1.08rem, 1.8vw, 1.22rem); line-height: 1.65; margin: 0; }

.year-group { border-top: 1px solid var(--line); }
.year-group:last-child { border-bottom: 1px solid var(--line); }
.year-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem; padding: 1rem 0; }
.year-group summary::-webkit-details-marker { display: none; }
.year { font-family: var(--hand); font-size: 2.1rem; line-height: 1; letter-spacing: var(--caps-track); }
.count { color: var(--ink-soft); font-size: .95rem; }
.toggle { margin-left: auto; width: 2.4rem; height: 2.4rem; border: 2.5px solid var(--ink); border-radius: 50%; position: relative; flex: none; }
.toggle::before, .toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2.5px; background: var(--ink); transform: translate(-50%, -50%); }
.toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .2s; }
.year-group[open] .toggle::after { transform: translate(-50%, -50%) rotate(0); }
.year-group summary:hover .toggle { background: var(--ink); }
.year-group summary:hover .toggle::before, .year-group summary:hover .toggle::after { background: var(--bg); }
#publications > .filter-row { margin-bottom: 1rem; }
.tiles { list-style: none; padding: 0 0 1.75rem; margin: 0; display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { --c: var(--pink); position: relative; display: grid; align-content: start; gap: .35rem; padding: 1.2rem 1.3rem; border: solid var(--ink); border-width: 3px 3.5px 3.5px 3px; border-radius: var(--drawn); transition: box-shadow .2s, transform .2s; }
.tile:nth-child(even) { border-radius: 20px 12px 22px 14px / 12px 22px 14px 20px; }
.tile[data-cat="speaking"] { --c: var(--purple); }
.tile[data-cat="event"] { --c: var(--blue); }
.tile:hover, .tile:focus-within { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--c); }
.tile[hidden] { display: none; }
.tile p { margin: 0; }
.tile-link { position: absolute; inset: 0; border-radius: inherit; }
.tile-tags { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tile-tags .chip { font-size: .95rem; padding: .35em .7em .3em; border-width: 2px; }
.year-group[hidden] { display: none; }
.pub-meta { color: var(--ink-soft); font-size: .93rem; }
.pub-link { position: relative; z-index: 1; font-size: .95rem; text-decoration-color: var(--pink); }

.contact-cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.contact-card { display: grid; gap: .35rem; padding: 1.5rem; text-decoration: none; border: 3px solid var(--ink); border-radius: var(--drawn); transition: box-shadow .2s, transform .2s; }
.contact-title { font-family: var(--hand); font-size: 2rem; text-transform: uppercase; letter-spacing: var(--caps-track); line-height: 1; margin-bottom: .3rem; }
.contact-card strong { text-decoration: none; word-break: break-word; }
.contact-card span:last-child { font-size: .95rem; color: var(--ink-soft); }
.contact-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--c); }
.social { display: inline-flex; margin-top: 1.5rem; padding: .6rem; border: 3px solid var(--ink); border-radius: var(--drawn); transition: box-shadow .2s, transform .2s; }
.social:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--orange); }

/* ---------- Connections map ---------- */
/* Compact filter buttons beside the map, so the side panel gets most of the height. */
.map-tags { margin: 0; gap: .3rem; }
/* The filters sit in the title row, over the side panel. */
@media (min-width: 900px) {
  .connections .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; }
  .connections .page-head .map-tags { flex: 0 0 340px; padding-bottom: .35rem; }

}
.map-tags .filter-label { font-size: .9rem; margin: 0 .15rem 0 0; }
.map-tags .chip { gap: .3rem; font-size: .84rem; padding: .32em .55em .28em; border-width: 2px; }
.map-tags .key { width: 12px; height: 12px; }
/* Small keys: the same colours and icons as the map. */
.key { display: inline-block; flex: none; width: 16px; height: 16px; background: center / contain no-repeat; vertical-align: -3px; }
.chip-project::before, .chip-design::before { content: ""; width: .55em; height: .55em; margin-right: .45em; }
.chip-project::before { background: var(--orange); transform: rotate(45deg) scale(.85); }
.chip-design::before { background: var(--green); clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.map-wrap { margin-top: 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.map { position: relative; height: min(80vh, 780px); min-height: 480px; border: solid var(--ink); border-width: 4px 3.5px 4.5px 4px; border-radius: var(--drawn); overflow: hidden; touch-action: none; }
.map svg { width: 100%; height: 100%; display: block; }
.map .cell .wall { fill: #f7f3ee; stroke: #e3d6c8; stroke-width: 3; }
.map .goo circle { fill: #dcc6ae; }
.map .cell .nucleus { fill: #ecdfd2; stroke: #d9c6b3; stroke-width: 2; }
.map .node .shape { transition: transform 1s ease-in-out, filter .7s ease-in-out; }
.map .node.twin .shape { filter: drop-shadow(0 0 2px rgba(17, 17, 17, .55)) drop-shadow(0 0 6px rgba(17, 17, 17, .45)); }
.map .node.twin .edge { stroke-width: 3.6; }
.map .node { cursor: pointer; transition: opacity 1.1s ease-in-out; }
.map .node .edge { stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; } /* same outline at any size */
.map .node .glyph { fill: var(--ink); }
.map .node .glyph .window { fill: var(--bg); }
.map .node .glyph-light { fill: var(--bg); }
/* Captions only for the selected node, or the nuclei when the map is organised around a tag. */
.map .caption { opacity: 0; pointer-events: none; transition: opacity .85s ease-in-out; }
.map .caption rect { fill: var(--bg); fill-opacity: .5; }
.map .caption.show { opacity: 1; }
.map .caption text { font-family: var(--hand); font-size: 16px; fill: var(--ink); text-anchor: middle; text-transform: uppercase; }
.map .caption.active text { font-size: 19px; }
.map .node.faded { opacity: .18; }
.map .node.faded.hovered { opacity: 1; }
/* Clicking a node greys out everything that isn't it, a copy of it, or connected to it. */
.map .node.greyed, .map .caption.greyed.show { opacity: .25; filter: grayscale(1); }
.map .cell { transition: filter .8s ease-in-out; }
.map .cell.greyed { filter: grayscale(1) opacity(.45); }
.map .node:focus-visible { outline: none; }
.map .node:focus-visible .edge { stroke-width: 3.5; }

/* The key and the side panel sit together beside the map, so both stay in view. */
/* No taller than the map, so the panel never needs the page scrolled to read it. */
.map-side { position: sticky; top: 6rem; display: grid; grid-template-rows: minmax(0, 1fr); height: min(80vh, 780px); min-height: 480px; }
.map-panel {
  min-height: 0; overflow-y: auto; display: grid; gap: .55rem; align-content: start;
  padding: 1.1rem 1.15rem; background: var(--bg); border: solid var(--ink); border-width: 3px 3.5px 4px 3px; border-radius: var(--drawn);
}
.map-panel p { margin: 0; line-height: 1.35; }
.map-panel-intro { font-size: 1.15rem; }
.map-panel-hint { color: var(--ink-soft); }
.map-panel img { width: 100%; max-height: 140px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 2px solid var(--ink); }
.map-panel img.map-panel-avatar { width: 72px; aspect-ratio: 1; border-radius: 50%; border-width: 2.5px; }
.map-panel img.map-panel-logo { border-radius: 14px; }
.map-panel-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.map-panel-tags .chip { font-size: .9rem; padding: .3em .65em .25em; border-width: 2px; gap: .35rem; background: color-mix(in srgb, var(--c, var(--bg)) 22%, var(--bg)); }
.map-panel-tags .tag-project { --c: var(--orange); }
.map-panel-tags .tag-publication { --c: var(--pink); }
.map-panel-tags .tag-event { --c: var(--blue); }
.map-panel-tags .tag-design { --c: var(--green); }
.map-panel-tags .tag-organisation { --c: var(--yellow); }
.map-panel-title { font-size: 1.5rem; margin: .1rem 0 0; line-height: 1.05; }
/* The round link buttons follow straight on from the end of the name. */
.map-panel-head .map-panel-title { display: inline; }
.map-panel-buttons { display: inline-flex; gap: .3rem; margin-left: .45rem; vertical-align: .15em; }
.round-link { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); color: var(--ink); background: var(--bg); transition: background .2s ease, color .2s ease; }
.round-link:hover, .round-link:focus-visible { background: var(--ink); color: var(--bg); }
.round-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-panel-meta, .map-panel-count, .map-panel-group { font-size: .9rem; color: var(--ink-soft); text-transform: uppercase; }
.map-panel-link { text-transform: uppercase; }
.map-panel-gather { all: unset; cursor: pointer; text-transform: uppercase; text-decoration: underline; }
.map-panel-links { margin-top: .6rem; padding-top: .7rem; border-top: 1px solid var(--line); display: grid; gap: .3rem; }
.map-panel-group { margin-top: .4rem !important; }
.map-panel ul { list-style: none; margin: 0; padding: 0; }
.map-panel li button { all: unset; cursor: pointer; display: flex; gap: .5rem; align-items: baseline; padding: .15rem 0; line-height: 1.25; }
.map-panel li button:hover, .map-panel li button:focus-visible { text-decoration: underline; }
.map-panel li .key { width: 11px; height: 11px; transform: translateY(1px); }
@media (max-width: 900px) {
  .map-wrap { grid-template-columns: 1fr; }
  .map { height: 70vh; min-height: 420px; }
  .map-side { position: static; height: auto; min-height: 0; }
}

/* ---------- Collaborators (end of posts) ---------- */
.collaborators { max-width: 70ch; margin: 4rem auto 0; padding-top: 2rem; border-top: 1px solid var(--line); }
.collaborators h2 { font-size: 2rem; }
.collaborators ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.collab { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; border: solid var(--ink); border-width: 3px 3.5px 3.5px 3px; border-radius: var(--drawn); }
.collab img, .avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; border: 2.5px solid var(--ink); object-fit: cover; }
.collab-organisation img, .collab-organisation .avatar { border-radius: 10px; }
/* No photo or logo yet: an outline of a person or building, like the map's icons. */
.avatar { display: grid; place-items: center; background: var(--bg); }
.avatar svg { width: 62%; height: 62%; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.map-panel .avatar { width: 72px; height: 72px; border-radius: 50%; border: 2.5px solid var(--ink); }
.map-panel .avatar.map-panel-logo { border-radius: 14px; }
.collab p { margin: 0; font-size: .95rem; line-height: 1.35; color: var(--ink-soft); }
.collab .collab-name { font-size: 1.15rem; color: var(--ink); text-transform: uppercase; letter-spacing: var(--caps-track); }
.collab-links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .35rem !important; }
.collab-links:empty { display: none; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgb(17 17 17 / .94); display: grid; place-items: center; padding: 3rem 4rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 82vh; max-width: 100%; width: auto; border-radius: 4px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; padding: .5rem 1rem; }
.lb-close { top: .5rem; right: .5rem; }
.lb-prev { left: .25rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .25rem; top: 50%; transform: translateY(-50%); }
.lb-caption { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; color: #fff; margin: 0; }

@media (max-width: 600px) {
  .lightbox { padding: 3rem .5rem; }
  .site-header { position: static; }
  .site-header-inner { justify-content: center; }
  .site-header nav { gap: .2rem; }
  .site-header nav a { font-size: 1.1rem; padding: .45rem .6rem .4rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Connections fits on one screen on laptops and desktops: the title, then the map and its side panel
   filling the rest of the height. */
@media (min-width: 900px) and (min-height: 600px) {
  body.connections { display: flex; flex-direction: column; height: 100dvh; }
  body.connections main { flex: 1; min-height: 0; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; padding-bottom: 1rem; overflow-y: auto; }
  .connections .page-head { padding-top: 1rem; }
  .connections .page-head h1 { margin: 0; }
  .connections .map-wrap { flex: 1 0 22rem; min-height: 0; margin-top: .9rem; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
  .connections .map { height: auto; min-height: 0; }
  .connections .map-side { position: static; height: auto; min-height: 0; }
}
