/* Page styles for landonkrivanec.com. Design tokens (palette, radii, spacing, type) live in tokens.css. */

/* ---------- page tokens ---------- */
:root {
  --glass: rgba(255, 255, 255, .82);
  --group: #F3F6FC;
  --node-shadow: drop-shadow(0 1px 2px rgba(26, 34, 77, .09)) drop-shadow(0 3px 8px rgba(26, 34, 77, .06));
  --ring-in: inset 0 0 0 3px rgba(67, 101, 227, .38);
  --logo-bg: #FFFFFF;
  --logo-line: #E3E7EE;
  --scrim: rgba(20, 24, 40, .28);
  --paper: #FFFFFF;
  --paper-filter: none;
  --hdr: 60px;
  --side-w: clamp(380px, 34vw, 460px);
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glass: rgba(31, 35, 43, .82);
    --group: #1F232B;
    --node-shadow: none;
    --ring-in: inset 0 0 0 3px rgba(118, 153, 251, .45);
    --logo-bg: #EEF0F4;
    --logo-line: transparent;
    --scrim: rgba(0, 0, 0, .5);
    --paper: #E9ECF1;
    --paper-filter: brightness(.94);
  }
}
:root[data-theme="dark"] {
  --glass: rgba(31, 35, 43, .82);
  --group: #1F232B;
  --node-shadow: none;
  --ring-in: inset 0 0 0 3px rgba(118, 153, 251, .45);
  --logo-bg: #EEF0F4;
  --logo-line: transparent;
  --scrim: rgba(0, 0, 0, .5);
  --paper: #E9ECF1;
  --paper-filter: brightness(.94);
}

html { scroll-padding-top: calc(var(--hdr) + 16px); }
html.no-scroll { overflow: hidden; }
body { overflow-x: hidden; }
p, li { text-wrap: pretty; }
h4 { margin: 0; text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { flex: none; display: block; }
button { font-family: inherit; }
img.contain { object-fit: contain; }
img.cover { object-fit: cover; }
img.small { object-fit: scale-down; }

.skip { position: fixed; z-index: 200; left: 16px; top: -60px; padding: 10px 16px; border-radius: var(--r-pill); background: var(--card); color: var(--accent-ink); font-weight: 600; box-shadow: var(--shadow-lift); transition: top var(--t-fast) var(--ease); }
.skip:focus-visible { top: 12px; border-radius: var(--r-pill); }
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lift);
}
.icon-btn {
  appearance: none; border: 0; background: transparent; color: var(--text-2);
  width: 40px; height: 40px; border-radius: var(--r-pill);
  display: inline-grid; place-items: center; cursor: pointer; flex: none;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--inset); color: var(--text); }
.icon-btn:active { transform: scale(.98); }
.icon-btn:focus-visible, .btn:focus-visible, .chip:focus-visible { border-radius: var(--r-pill); }
.btn { text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-sm { font-size: 13px; padding: 8px 12px; gap: 6px; }
.btn-mark { width: 18px; height: 18px; display: grid; flex: none; }
.btn-mark img { width: 100%; height: 100%; display: block; }
.chip { min-height: 32px; }
.chip-sm { font-size: 12px; padding: 5px 9px; gap: 5px; min-height: 26px; }
button.chip:hover { filter: brightness(.96); }
.chip.is-hover { box-shadow: 0 0 0 2px var(--accent); }
.tint-hardware { background: var(--teal-tint); color: var(--teal-ink); }
.tint-software { background: var(--purple-tint); color: var(--purple-ink); }
.tint-analysis, .tint-research { background: var(--inset); color: var(--text); }
.chip-logo { width: 20px; height: 20px; border-radius: 6px; background: var(--logo-bg); box-shadow: inset 0 0 0 1px var(--logo-line); display: grid; place-items: center; padding: 2px; margin-left: -5px; flex: none; }
.chip-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.c-count { font-size: 11px; font-weight: 600; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--card); color: var(--text-2); display: inline-grid; place-items: center; margin-right: -5px; font-variant-numeric: tabular-nums; }

/* glyphs: the map's shapes, reused in its key and on chips */
.gl { flex: none; display: inline-block; vertical-align: middle; }
.gl-experience circle { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 1.5; }
.gl-project rect { fill: var(--card); stroke: var(--text-2); stroke-width: 1.5; }
.gl-skill circle { fill: var(--c-skill); }
.gl-software circle { fill: var(--logo-bg); stroke: var(--purple); stroke-width: 1.75; }
.gl-hardware path { fill: var(--c-hardware); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 60; height: var(--hdr); border-bottom: 1px solid var(--sep); }
.hdr-in { max-width: 1280px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 16px; min-width: 0; border-radius: var(--r-pill); }
.brand img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand:hover { text-decoration: none; }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.hdr-btn { height: 40px; padding: 0 16px; font-size: 14px; }
/* the LinkedIn mark sits on a small white tile so it stays visible on the blue primary button */
.btn-primary .btn-mark { background: #fff; border-radius: 5px; padding: 1px; width: 20px; height: 20px; }

/* ---------- layout: the page, with the map beside it ---------- */
.layout { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) var(--side-w); gap: 40px; padding: 16px 32px 48px; }
.story { min-width: 0; max-width: 720px; }
.side { position: sticky; top: calc(var(--hdr) + 16px); align-self: start; height: calc(100dvh - var(--hdr) - 32px); min-height: 520px; min-width: 0; z-index: 2; }
.map-slot { display: none; }

/* ---------- sections ---------- */
.sec { padding: 40px 0; scroll-margin-top: calc(var(--hdr) + 16px); }
.sec + .sec, .map-slot + .sec { border-top: 1px solid var(--sep); }
.intro { padding-top: 8px; }
.sec-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.sec-lead { font-size: 16px; color: var(--text-2); margin-top: 8px; line-height: 1.5; max-width: 60ch; }
.sub-h { font-size: 13px; color: var(--text-2); margin: 20px 0 8px; }
.group-label { font-size: 13px; font-weight: 500; color: var(--text-2); margin: 24px 4px 8px; }
.bul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.55; }
.bul li::marker { color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ns { padding: 24px; margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }

/* intro */
.intro-card { padding: 24px; }
.intro-top { display: flex; align-items: center; gap: 18px; min-width: 0; }
.intro-id { min-width: 0; }
.intro-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; background: var(--inset); }
.intro-photo.sm { width: 56px; height: 56px; }
.intro-name { font-size: 36px; line-height: 1.08; letter-spacing: -0.025em; }
.intro-head { font-size: 17px; color: var(--text-2); margin-top: 6px; line-height: 1.4; }
.hl-part { white-space: nowrap; }
.hl-sep { color: var(--text-2); font-weight: 300; padding: 0 2px; }
@media (max-width: 420px) { .hl-part { white-space: normal; } }
.avail { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; padding: 8px 14px 8px 12px; border-radius: var(--r-pill); background: var(--green-tint); color: var(--green-ink); font-weight: 600; font-size: 15px; line-height: 1.35; }
.avail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 4px rgba(67, 185, 102, .22); }
.intro-now { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text-2); margin-top: 12px; line-height: 1.4; }
.intro-now + .intro-now { margin-top: 6px; }
.email-row { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding: 6px; background: var(--group); border-radius: var(--r-tile); min-width: 0; }
.email-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 15px; font-weight: 500; padding: 4px 6px; border-radius: var(--r-input); }
.email-link:hover { text-decoration: none; color: var(--accent-ink); }
.email { overflow-wrap: anywhere; }
.copy-btn { background: var(--card); box-shadow: 0 1px 2px rgba(26, 34, 77, .07); flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tint-accent { background: var(--accent-tint); color: var(--accent-ink); }
/* the three takeaways, each a door to its proof */
.proofs { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.proof {
  appearance: none; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 10px 10px 8px; margin-left: -8px; border-radius: var(--r-tile);
  transition: background-color var(--t-fast) var(--ease);
}
.proof:hover, .proof.is-hover { background: var(--group); }
.proof.is-active { background: var(--accent-tint); }
.proof:focus-visible { box-shadow: var(--ring); }
.proof-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.proof-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.proof-t { font-size: 16px; font-weight: 600; line-height: 1.35; }
.proof-e { font-size: 14px; color: var(--text-2); line-height: 1.4; font-variant-numeric: tabular-nums; }
.proof .r-chev { color: var(--text-3); }

/* selected work */
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.feat, .pcard {
  appearance: none; padding: 0; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.feat:hover, .feat.is-hover, .pcard:hover, .pcard.is-hover { box-shadow: var(--shadow-lift); }
.feat:active, .pcard:active { transform: scale(.985); }
.feat:focus-visible, .pcard:focus-visible { box-shadow: var(--ring), var(--shadow); border-radius: var(--r-card); }
.feat.is-active, .pcard.is-active { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.feat-media { display: block; aspect-ratio: 16 / 10; background: var(--group); overflow: hidden; }
.feat-media img { width: 100%; height: 100%; display: block; }
.feat-body { display: flex; flex-direction: column; padding: 14px 16px 16px; gap: 2px; flex: 1; min-width: 0; }
.feat-v { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.feat-l { font-size: 14px; color: var(--text-2); line-height: 1.4; }
.feat-t { font-size: 15px; font-weight: 600; margin-top: 12px; line-height: 1.3; text-wrap: balance; }
.feat-m { font-size: 13px; color: var(--text-2); }
.more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--accent-ink); margin-top: auto; padding-top: 10px; white-space: nowrap; }
.more .ic { transition: transform var(--t-fast) var(--ease); }
.feat:hover .more .ic, .pcard:hover .more .ic { transform: translateX(2px); }

/* experience */
.role { padding: 24px 0 4px; scroll-margin-top: calc(var(--hdr) + 16px); }
.sec-title + .role { padding-top: 20px; }
.role + .role { border-top: 1px solid var(--sep); margin-top: 32px; padding-top: 32px; }
.role-head { display: flex; gap: 14px; align-items: flex-start; }
.role-id { min-width: 0; }
.role-badge { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 2px var(--accent); }
.role-badge.sm { width: 30px; height: 30px; box-shadow: inset 0 0 0 1.5px var(--accent); }
.role-org { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; margin: 0; }
p.role-org { font-size: 17px; }
.role-meta { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.role-org + .role-meta { margin-top: 2px; }
.role-sum { font-size: 16px; line-height: 1.55; margin-top: 14px; max-width: 64ch; }
details.more-skills { margin-top: 16px; }
details.more-skills summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent-ink); padding: 8px 12px 8px 8px; margin-left: -8px; border-radius: var(--r-pill); list-style: none; min-height: 40px; transition: background-color var(--t-fast) var(--ease); }
details.more-skills summary::-webkit-details-marker { display: none; }
details.more-skills summary:hover { background: var(--accent-tint); }
details.more-skills summary:focus-visible { box-shadow: var(--ring); outline: none; }
details.more-skills summary .ic { transition: transform var(--t-fast) var(--ease); }
details.more-skills[open] summary .ic { transform: rotate(90deg); }
details.more-skills .skill-groups { margin-top: 8px; }
.pcards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.pc-media { display: block; aspect-ratio: 4 / 3; background: var(--group); overflow: hidden; }
.pc-media img { width: 100%; height: 100%; display: block; }
.pc-media.tile { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 14px 16px; gap: 2px; }
.ht-v { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ht-v.sm { font-size: 19px; line-height: 1.25; }
.ht-l { font-size: 13px; line-height: 1.35; }
.ht-icon { margin-bottom: auto; opacity: .9; }
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.pc-title { font-size: 15px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.pc-tag { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.pc-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.pc-foot .more { margin-left: auto; padding-top: 0; }
.chip-status { background: var(--orange-tint); color: var(--orange-ink); }

/* inset grouped rows */
.group-list { background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow); border-radius: var(--r-card); overflow: hidden; }
.group-list.flat { background: var(--group); box-shadow: none; border: 0; border-radius: var(--r-tile); }
.group-list > * + * { border-top: 1px solid var(--sep); }
.rowbtn {
  appearance: none; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px;
  padding: 12px 14px; background: transparent; border: 0; border-radius: 0; text-align: left;
  font: inherit; color: inherit; cursor: pointer; min-width: 0;
  transition: background-color var(--t-fast) var(--ease);
}
.rowbtn:hover, .rowbtn.is-hover { background: var(--inset); }
.rowbtn:focus-visible { border-radius: 0; box-shadow: var(--ring-in); }
.rowbtn.is-active { background: var(--accent-tint); }
.rowbtn.is-active .r-title, .rowbtn.is-active .r-meta { color: var(--accent-ink); }
.r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.r-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.r-meta { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.r-chev { color: var(--text-3); flex: none; display: grid; }
.thumb { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--group); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .tv { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.logo-set { display: flex; flex: none; }
.logo-set.multi .logo-tile + .logo-tile { margin-left: calc(var(--s) * -.3); }
.logo-set.multi .logo-tile { box-shadow: 0 0 0 2px var(--card), inset 0 0 0 1px var(--logo-line); }
.logo-tile { width: var(--s); height: var(--s); border-radius: calc(var(--s) * .27); background: var(--logo-bg); box-shadow: inset 0 0 0 1px var(--logo-line); display: grid; place-items: center; flex: none; padding: calc(var(--s) * .17); }
.logo-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-tile.none { color: var(--purple-ink); background: var(--purple-tint); box-shadow: none; }

/* a role's link to its full panel */
.link-more {
  appearance: none; border: 0; background: transparent; font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; margin: 12px 0 0 -10px; padding: 10px; min-height: 40px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--accent-ink); transition: background-color var(--t-fast) var(--ease);
}
.link-more:hover { background: var(--accent-tint); }
.link-more:focus-visible { box-shadow: var(--ring); }

/* software tools as a logo grid, hardware as chip rows */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 20px; }
.tool-tile {
  appearance: none; font: inherit; color: var(--text); text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 12px; padding: 12px; min-height: 64px; min-width: 0;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-tile); box-shadow: var(--shadow);
  transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.tool-tile:hover, .tool-tile.is-hover { box-shadow: var(--shadow-lift); }
.tool-tile:active { transform: scale(.985); }
.tool-tile:focus-visible { box-shadow: var(--ring), var(--shadow); }
.tool-tile.is-active { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.tt-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tt-name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tt-meta { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.hw-groups { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.hw-group .group-label { margin: 14px 4px 8px; }
.top-skills { margin-top: 20px; }
.skill-group + .skill-group { margin-top: 16px; }

/* skills */
.skill-groups { display: grid; gap: 12px; margin-top: 20px; }
.skill-g { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.chips.pro .chip { background: transparent; box-shadow: inset 0 0 0 1px var(--sep); }
.chips.pro .chip:hover { background: var(--inset); }

/* education and leadership */
.info-card { padding: 20px; margin-top: 16px; scroll-margin-top: calc(var(--hdr) + 16px); }
.sec-title + .info-card { margin-top: 20px; }
.info-card .bul { margin-top: 14px; }
.info-card .group-list { margin-top: 14px; }
.sub-role { border-top: 1px solid var(--sep); margin-top: 16px; padding-top: 14px; }
.sub-role-h { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; align-items: baseline; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.sub-role-h .role-meta { font-weight: 400; font-size: 13px; }
.sub-role .bul { margin-top: 0; }
.cert {
  appearance: none; border: 0; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--accent-tint); color: var(--accent-ink); border-radius: var(--r-tile); padding: 12px 14px; min-height: 48px;
  font-size: 15px; font-weight: 600; margin-top: 16px; text-align: left; transition: filter var(--t-fast) var(--ease);
}
.cert > span:first-of-type { flex: 1; }
.cert .r-chev { color: var(--accent-ink); }
.cert:hover { filter: brightness(.97); }
.cert:focus-visible { box-shadow: var(--ring); }
.cert.static { cursor: default; }
.role.flash .role-badge { animation: badgePulse 1.4s var(--ease); }
.info-card.flash { animation: flashCard 1.6s var(--ease); }
@keyframes badgePulse { 0%, 30% { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 8px var(--accent-tint); } 100% { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 8px transparent; } }
@keyframes flashCard { 0%, 35% { box-shadow: 0 0 0 4px var(--accent), var(--shadow); } 100% { box-shadow: 0 0 0 4px transparent, var(--shadow); } }

/* contact */
.contact-sec { padding-bottom: 96px; }
.contact-card { padding: 24px; margin-top: 20px; }

/* ---------- the experience map ---------- */
.map-card { height: 100%; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-panel); box-shadow: var(--shadow); overflow: hidden; }
.map-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 14px 4px 20px; }
.map-id { flex: 1; min-width: 0; }
.map-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.map-hint { font-size: 13px; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.map-expand { flex: none; margin-top: 2px; }
.map-close { flex: none; }
.map-stage { position: relative; flex: 1; min-height: 0; }
#graph { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none; }
#graph:focus-visible { outline: 3px solid rgba(67, 101, 227, .38); outline-offset: -4px; border-radius: 12px; }
#graph.zoomable { touch-action: none; cursor: grab; }
.map-reset { position: absolute; z-index: 2; right: 12px; top: 4px; }
.map-peek { position: absolute; z-index: 3; white-space: nowrap; box-shadow: var(--shadow-lift); animation: fadeIn var(--t-fast) var(--ease); max-width: calc(100% - 16px); }
.map-peek span { overflow: hidden; text-overflow: ellipsis; }
.map-reset.glass:hover { filter: none; background: var(--card); }
.map-key { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 20px 14px; border-top: 1px solid var(--sep); font-size: 12px; color: var(--text-2); }
.map-key span { display: inline-flex; align-items: center; gap: 6px; }
.fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--text-2); }

.link { stroke: var(--sep); stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; transition: stroke var(--t-fast) var(--ease), opacity var(--t-med) var(--ease); }
.g-focus .link { opacity: .3; }
.g-focus .link.is-hl { stroke: var(--accent); opacity: .6; stroke-width: 1.25; }
.g-hover .link.is-hl { opacity: 1; stroke-width: 1.5; }
.node { cursor: pointer; transition: opacity var(--t-med) var(--ease); outline: none; }
.node .body { transition: transform var(--t-fast) var(--spring); }
.node:hover .body, .node.is-center .body, .node.is-kbd .body { transform: scale(1.15); }
.node.is-minor .body { transform: scale(.72); transition-timing-function: var(--ease); }
.node .shape { vector-effect: non-scaling-stroke; transition: fill var(--t-fast) var(--ease), stroke var(--t-fast) var(--ease); }
.node .hit { fill: transparent; stroke: none; }
.node .ring { fill: none; stroke: var(--accent); stroke-width: 3; opacity: 0; vector-effect: non-scaling-stroke; transition: opacity var(--t-fast) var(--ease); }
.node.is-sel .ring { opacity: .35; }
.node.is-kbd .ring { opacity: .6; }
.n-experience .shape { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 2; filter: var(--node-shadow); }
.n-experience .icon { color: var(--accent-ink); }
.n-project .shape { fill: var(--card); stroke: var(--text-2); stroke-width: 1.5; filter: var(--node-shadow); }
.n-project .icon { color: var(--text-2); }
.n-project.k-hardware .shape { fill: var(--teal-tint); stroke: var(--teal-ink); }
.n-project.k-hardware .icon { color: var(--teal-ink); }
.n-project.k-software .shape { fill: var(--purple-tint); stroke: var(--purple-ink); }
.n-project.k-software .icon { color: var(--purple-ink); }
.n-project.k-analysis .shape, .n-project.k-research .shape { fill: var(--inset); stroke: var(--text-2); }
.n-skill .shape { fill: var(--c-skill); }
.n-skill.is-pro .shape { fill: var(--sep); }
.n-software .shape { fill: var(--logo-bg); stroke: var(--purple); stroke-width: 1.5; filter: var(--node-shadow); }
.n-software .icon { color: var(--purple-ink); }
.n-hardware .shape { fill: var(--c-hardware); stroke: var(--teal-ink); stroke-width: 1; }
.node.is-sel .shape { fill: var(--accent-strong); stroke: var(--accent-strong); }
.node.is-sel.has-logo .shape { fill: var(--logo-bg); stroke-width: 3; }
.node.is-sel .icon { color: #fff; }
.g-focus .node:not(.is-hl) { opacity: .18; }
.g-focus .node.n-experience:not(.is-hl), .g-focus .node.n-project:not(.is-hl) { opacity: .5; }
.node.is-hidden, .g-focus .node.is-hidden { opacity: 0; pointer-events: none; }
.g-focus .node:not(.is-hl) .shape { filter: none; }
.link.is-hidden, .g-focus .link.is-hidden { opacity: 0; }
.node.is-under { opacity: .3; }
.glabel { pointer-events: none; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.glabel.on { opacity: 1; }
.glabel.clickable.on { pointer-events: auto; cursor: pointer; }
.glabel text { paint-order: stroke fill; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; fill: var(--text); }
.glabel .t2 { fill: var(--text-2); }
.l-skill text, .l-software text, .l-hardware text { fill: var(--text-2); }
.g-focus .glabel.on:not(.is-hl) text, .g-focus .glabel.on:not(.is-hl) .t2 { fill: var(--text-2); }
.g-focus .glabel.is-hl text { fill: var(--text); }
.g-focus .glabel.is-hl .t2 { fill: var(--text-2); }
.glabel.is-sel text, .g-focus .glabel.is-sel text { fill: var(--accent-ink); }
/* one authored moment: the map's dots fade in from the middle outward on load */
.m-enter .node { animation: fadeIn 520ms var(--ease) both; animation-delay: var(--d, 0ms); }
.m-enter .link { animation: fadeIn 700ms var(--ease) both; animation-delay: 240ms; }
.m-enter .glabel { animation: fadeIn 500ms var(--ease) both; animation-delay: 420ms; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- details: over the map on a wide screen, a sheet on narrower ones ---------- */
.detail {
  position: fixed; z-index: 50;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--r-panel); box-shadow: var(--shadow-lift);
  overflow: hidden;
  opacity: 0; transform: translateY(8px); visibility: hidden;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease), visibility 0s linear var(--t-med);
}
.detail.open { opacity: 1; transform: none; visibility: visible; transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease), visibility 0s; }
.d-grab { display: none; }
.d-head { display: flex; align-items: center; gap: 4px; padding: 10px 10px 4px; min-height: 56px; }
.d-type { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-body { flex: 1; overflow: auto; padding: 4px 24px 32px; overscroll-behavior: contain; }
.d-content { animation: dIn var(--t-med) var(--ease); }
@keyframes dIn { from { opacity: .35; transform: translateY(6px); } }
.d-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; outline: none; text-wrap: balance; }
.d-title:focus-visible { box-shadow: none; }
.d-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.d-tag { font-size: 16px; color: var(--text-2); line-height: 1.45; margin-top: 10px; }
.d-skill-head { display: flex; gap: 14px; align-items: flex-start; }
.d-skill-head .logo-set { margin-top: 2px; }
.d-sec { margin-top: 24px; }
.d-sec > h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.d-sec > p { font-size: 15px; line-height: 1.55; }
.d-h3b { font-size: 13px; font-weight: 500; color: var(--text-2); margin: 14px 0 6px; }
.gal { margin: 20px 0 0; }
.gal-main { border-radius: var(--r-tile); overflow: hidden; background: var(--group); aspect-ratio: 4 / 3; }
.gal-main img { width: 100%; height: 100%; display: block; transition: opacity var(--t-fast) var(--ease); }
.gal-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.gal-th { appearance: none; border: 0; padding: 0; width: 64px; height: 48px; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--group); opacity: .6; transition: opacity var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.gal-th img { width: 100%; height: 100%; object-fit: cover; }
.gal-th:hover { opacity: .9; }
.gal-th[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.gal-th:focus-visible { border-radius: 8px; }
.note { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); margin-top: 8px; line-height: 1.4; }
.note-t { flex: 1; min-width: 0; }
.full-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; flex: none; padding: 6px 2px; }
.paper { background: var(--paper) !important; }
.paper img.contain { filter: var(--paper-filter); }
.hero-tile { margin-top: 20px; border-radius: var(--r-tile); padding: 24px 20px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.hero-tile .ht-v { font-size: 40px; }
.hero-tile .ht-v.sm { font-size: 22px; }
.hero-tile .ht-l { font-size: 14px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 16px; }
.metric { background: var(--group); border-radius: var(--r-tile); padding: 12px; min-width: 0; }
.metric-v { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric-l { font-size: 12px; color: var(--text-2); line-height: 1.35; margin-top: 2px; }
.story-box { background: var(--group); border-radius: var(--r-tile); padding: 14px 16px; }
.story-box p { font-size: 15px; line-height: 1.55; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ticks li { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; }
.ticks li .ic { color: var(--green-ink); margin-top: 3px; }
.evid-sum { font-size: 15px; color: var(--text-2); margin-bottom: 10px; }
.evid-sum strong { color: var(--text); }
.d-sec .sub-h { margin-top: 16px; }
.part { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--sep); }
.d-sec > h3 + .part { margin-top: 10px; padding-top: 0; border-top: 0; }
.part-media { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.part-media a { display: block; border-radius: 10px; overflow: hidden; background: var(--group); }
.part-media img { width: 100%; aspect-ratio: 4 / 3; display: block; }
.part-title { font-size: 16px; font-weight: 600; margin-top: 12px; line-height: 1.3; }
.part-tag { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.part-desc { font-size: 15px; line-height: 1.55; margin-top: 8px; }
.part .ticks { margin-top: 10px; }
.scrim { display: none; }

/* phones: a bottom bar with the main action and the map, in thumb reach */
.mbar { display: none; }
html:not(.js) .side, html:not(.js) .mbar, html:not(.js) .map-slot { display: none !important; }

/* ---------- narrower screens: one column, the map sits in the page ---------- */
@media (max-width: 1023px) {
  :root { --hdr: 56px; }
  .hdr-in { padding: 0 var(--gut-r) 0 var(--gut-l); }
  .layout { grid-template-columns: minmax(0, 1fr); max-width: 760px; gap: 0; padding: 8px var(--gut-r) 32px var(--gut-l); }
  .story { max-width: none; }
  .side { display: none; }
  #hdrLinkedIn { display: none; }
  .layout { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
  .mbar {
    display: flex; gap: 8px; position: fixed; z-index: 70; left: 0; right: 0; bottom: 0;
    padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    background: var(--header-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--sep);
  }
  .mbar .btn { height: 48px; font-size: 16px; }
  .mbar { justify-content: center; }
  .mbar-li { flex: 1; justify-content: center; max-width: 520px; }
  .mbar-map { flex: none; padding: 0 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--sep); }
  .mbar-map .ic { color: var(--accent-ink); }
  body.map-full .mbar, body.detail-open .mbar { display: none; }
  body.map-full .map-close {
    position: fixed; z-index: 121; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
    height: 48px; padding: 0 24px; font-size: 16px; background: var(--card); box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--sep);
  }
  .map-slot { display: block; height: 480px; margin: 0 0 40px; }
  body.map-full .map-card {
    position: fixed; inset: 0; z-index: 120; height: auto; border-radius: 0; border: 0; box-shadow: none;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) calc(80px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px);
    animation: fullIn var(--t-med) var(--ease);
  }
  body.map-full .map-head { padding-top: 12px; }
  @keyframes fullIn { from { opacity: 0; transform: scale(.985); } }

  .detail {
    left: 0; right: 0; bottom: 0; top: max(56px, 8dvh); z-index: 130;
    border-radius: var(--r-panel) var(--r-panel) 0 0; border-bottom: 0;
    transform: translateY(100%); opacity: 1;
  }
  .detail.open { transform: translateY(var(--drag, 0px)); }
  .detail.dragging { transition: none; }
  .d-grab { display: flex; justify-content: center; padding: 8px 0 2px; cursor: pointer; touch-action: none; }
  .d-grab span { width: 36px; height: 5px; border-radius: 3px; background: var(--sep); }
  .d-head { min-height: 48px; padding-top: 0; touch-action: none; }
  .d-body { padding: 0 20px calc(32px + env(safe-area-inset-bottom, 0px)); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 125; background: var(--scrim); opacity: 0; pointer-events: none; touch-action: none; transition: opacity var(--t-med) var(--ease); }
  body.detail-open .scrim { opacity: 1; pointer-events: auto; }
}
@media (max-width: 760px) {
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
  .tool-tile { padding: 10px; gap: 10px; min-height: 60px; }
  .tool-tile .logo-tile { --s: 32px !important; }
  .tt-name { font-size: 14px; }
  .tt-meta { font-size: 12px; }
  .proof-t { font-size: 15px; }
  .proof-e { font-size: 13px; }
  .proof { gap: 12px; }
  .hdr-actions { gap: 6px; }
  .hdr-btn { padding: 0 14px; }
  .intro-card { padding: 18px; }
  .intro-top { gap: 14px; }
  .intro-photo { width: 64px; height: 64px; }
  .intro-name { font-size: 28px; }
  .intro-head { font-size: 15px; }
  .avail { font-size: 14px; margin-top: 16px; }
  .intro-now { font-size: 14px; }
  .email-link { font-size: 14px; gap: 8px; padding: 4px 2px; }
  .email-link .logo-tile { --s: 26px !important; }
  .email { overflow-wrap: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .copy-btn { width: 40px; padding: 0; justify-content: center; }
  .copy-btn span { display: none; }
  .sec { padding: 32px 0; }
  .sec-title { font-size: 24px; }
  .sec-lead { font-size: 15px; }
  .feat-grid { gap: 10px; margin-top: 16px; }
  .feat-media { aspect-ratio: 4 / 3; }
  .feat-body { padding: 12px; }
  .feat-v { font-size: 20px; }
  .feat-l { font-size: 13px; }
  .feat-t { font-size: 14px; margin-top: 8px; }
  .pcards { gap: 10px; }
  .pc-body { padding: 10px 12px 12px; }
  .pc-title { font-size: 14px; }
  .pc-foot .more { display: none; }
  .ht-v { font-size: 24px; }
  .ht-v.sm { font-size: 16px; }
  .pc-media.tile { padding: 10px 12px; }
  .map-slot { height: 580px; }
  .map-head { padding: 14px 12px 2px 16px; }
  .map-key { padding: 8px 16px 12px; gap: 4px 12px; }
  .role-org { font-size: 19px; }
  .role-sum { font-size: 15px; }
  .info-card, .contact-card { padding: 18px; }
  .rowbtn { padding: 12px; gap: 12px; }
  .d-title { font-size: 22px; }
}
@media (max-width: 359px) {
  .feat-grid, .pcards { grid-template-columns: 1fr; }
}
/* touch: every control at least 40px tall */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .email-link { min-height: 40px; }
  .brand { min-height: 40px; }
  button.chip { min-height: 40px; padding-inline: 14px; }
  button.chip.chip-sm { min-height: 36px; }
  .btn-sm { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  /* the reduced-motion rule gives every element a 1ms transition, which would delay the panel's (inherited)
     visibility and stop focus from moving into it; the panel and its contents switch at once instead */
  .detail, .detail * { transition: none !important; }
  .node .body { transition: none; }
  .m-enter .node, .m-enter .link, .m-enter .glabel { animation: none; }
}
