/* Apple-inspired look on the black-and-white Figma layout: frosted glass, big soft corners, segmented tabs, pill buttons, system font. Giant mono wordmark and glowing orb stay as the signature. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #1c1c1e;
  --fg: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, .12);
  --glass: rgba(255, 255, 255, .06);
  --glass-hi: rgba(255, 255, 255, .11);
  --glow-a: rgba(255, 255, 255, .16);
  --glow-b: rgba(255, 255, 255, .06);
  --grid: rgba(255, 255, 255, .045);
  --solid-bg: #f5f5f7;
  --solid-fg: #000000;
  --pill-bg: rgba(255, 255, 255, .1);
  --pill-shadow: 0 0 0 .5px rgba(255, 255, 255, .14);
  --text-glow: 0 0 60px rgba(255, 255, 255, .35);
  --accent: #2997ff;
  --seg-bg: rgba(255, 255, 255, .09);
  --seg-on: #48484a;
  --nav-bg: rgba(28, 28, 30, .84);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font-display: "Roboto Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: #ffffff;
  --fg: #1d1d1f;
  --muted: #5f5f64;
  --line: rgba(0, 0, 0, .12);
  --glass: rgba(255, 255, 255, .72);
  --glass-hi: rgba(255, 255, 255, .95);
  --glow-a: rgba(255, 255, 255, 1);
  --glow-b: rgba(0, 0, 0, .05);
  --grid: rgba(0, 0, 0, .05);
  --solid-bg: #1d1d1f;
  --solid-fg: #ffffff;
  --pill-bg: rgba(0, 0, 0, .06);
  --pill-shadow: 0 0 0 .5px rgba(0, 0, 0, .1);
  --text-glow: none;
  --accent: #0066cc;
  --seg-bg: rgba(0, 0, 0, .06);
  --seg-on: #ffffff;
  --nav-bg: rgba(255, 255, 255, .86);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .14);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .16);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; } /* the sticky menu never covers what you tab to */
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  overflow-x: hidden;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
main:focus { outline: none; }
.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; }
.ico { display: inline-flex; width: 18px; height: 18px; flex-shrink: 0; }
.ico svg { width: 100%; height: 100%; }
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 50;
  background: var(--solid-bg); color: var(--solid-fg);
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: top .2s;
}
.skip:focus { top: 12px; }
.noscript { max-width: 60ch; margin: 40px auto; padding: 20px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); }

/* luminous background: soft glows, then a very faint grid that fades out from the top */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(65vw 48vw at 50% -8%, var(--glow-a), transparent 66%),
    radial-gradient(42vw 42vw at 8% 58%, var(--glow-b), transparent 70%),
    radial-gradient(46vw 46vw at 96% 88%, var(--glow-b), transparent 70%);
  animation: breathe 10s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 18%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 65% at 50% 18%, #000 0%, transparent 78%);
}
@keyframes breathe { from { opacity: .72; } to { opacity: 1; } }

/* top bar: a floating frosted pill, like the macOS dock */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-block: 20px 10px;
  max-width: 1360px; margin-inline: auto;
}
.nav {
  grid-column: 2;
  display: flex; align-items: center; gap: 2px;
  background: var(--nav-bg); box-shadow: var(--pill-shadow), var(--shadow-sm);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-radius: 999px; padding: 5px;
  overflow-x: auto; max-width: 100%;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-size: 15px; font-weight: 500; letter-spacing: -.01em;
  white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px;
  transition: background .25s var(--ease), color .25s;
}
.nav a:hover { background: var(--pill-bg); }
.nav a[aria-current="true"]:not(.chip) { background: var(--seg-on); box-shadow: var(--shadow-sm); }
.nav a.chip {
  background: var(--solid-bg); color: var(--solid-fg);
  font-weight: 600; display: inline-flex; align-items: center; gap: 8px; margin-left: 4px;
}
.nav a.chip:hover { background: var(--solid-bg); opacity: .85; }
.toggle {
  grid-column: 3; justify-self: end;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--nav-bg); color: var(--fg); box-shadow: var(--pill-shadow), var(--shadow-sm);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  display: grid; place-items: center;
  transition: transform .2s var(--ease);
}
.toggle:active { transform: scale(.92); }
.toggle svg { width: 22px; height: 22px; }
.toggle .moon { display: none; }
:root[data-theme="light"] .toggle .moon { display: block; }
:root[data-theme="light"] .toggle .sun { display: none; }

/* hero */
.hero {
  max-width: 1360px; margin-inline: auto;
  min-height: 640px; padding-block: 56px 40px;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  grid-template-areas: "id orb" "facts facts";
  align-items: center; column-gap: 48px; row-gap: 56px;
}
.id { grid-area: id; min-width: 0; }
.eyebrow { margin: 0 0 22px; max-width: none; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.id h1 { margin: 0 0 22px; display: flex; flex-direction: column; gap: .12em; }
.id h1 .first {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1;
  font-size: clamp(56px, 9.6vw, 140px); text-shadow: var(--text-glow);
}
.id h1 .rest { font-size: clamp(26px, 3.6vw, 52px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; color: var(--muted); }
.id .creds { margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.7; color: var(--muted); }
.id .intro { margin: 24px 0 0; max-width: 44ch; font-size: 21px; line-height: 1.5; letter-spacing: -.01em; color: var(--fg); }
.actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

/* buttons: pill shaped, sentence case, they press down a little when tapped */
.resume, .btn-solid {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 28px; border: 0; cursor: pointer;
  border-radius: 999px; font-size: 16px; font-weight: 600; letter-spacing: -.01em;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, opacity .2s;
}
.resume { background: var(--pill-bg); color: var(--fg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.btn-solid { background: var(--solid-bg); color: var(--solid-fg); }
.resume:hover { background: var(--glass-hi); }
.btn-solid:hover { opacity: .88; }
.resume:active, .btn-solid:active { transform: scale(.97); }

/* glowing orb: stands in for the portrait until a new photo is added */
.orb {
  grid-area: orb; position: relative; justify-self: center;
  width: min(76%, 330px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--glow-a), transparent 64%);
  box-shadow: 0 0 140px var(--glow-b), inset 0 0 0 1px var(--line);
}
.orb::before, .orb::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid var(--line); }
.orb::before { inset: -8%; }
.orb::after { inset: -15%; opacity: .5; }
.portrait { grid-area: orb; width: 100%; max-width: 440px; height: auto; justify-self: center; align-self: end; border-radius: 32px; }

/* primary contacts under the hero: three quiet outlined tiles */
.facts {
  grid-area: facts; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.contact {
  display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 14px 20px;
  border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line);
  transition: background .25s, box-shadow .25s, transform .25s var(--ease);
}
.contact:hover { background: var(--glass); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 30%, transparent); }
.contact:active { transform: scale(.985); }
.contact .ico { width: 20px; height: 20px; color: var(--muted); }
.c-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c-label { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.c-value { font-size: 16px; font-weight: 500; letter-spacing: -.01em; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .facts { grid-template-columns: 1fr; } }

/* content sections */
main section {
  max-width: 1360px; margin-inline: auto; padding-block: 104px;
  border-top: 1px solid var(--line); scroll-margin-top: 90px;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 48px;
}
main h2 { margin: 0; position: sticky; top: 110px; align-self: start; font-size: clamp(28px, 3vw, 36px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
main p { margin: 0; max-width: 62ch; line-height: 1.65; color: var(--muted); font-size: 17px; }
.sec-body { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.sec-body h3 { margin: 18px 0 0; font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sec-body > .hint { font-size: 16px; }
.lead { max-width: 60ch; font-size: clamp(20px, 2vw, 24px); line-height: 1.55; letter-spacing: -.015em; color: var(--fg); }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rows li { display: flex; justify-content: space-between; gap: 20px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.rows li:first-child { padding-top: 4px; }
.rows li > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rows strong { font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.org { font-size: 16px; color: var(--fg); }
.meta { font-size: 15.5px; color: var(--muted); overflow-wrap: anywhere; }
.when { font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rows.two { flex-direction: row; gap: 36px; }
.rows.two li { flex: 1; padding-top: 4px; }

/* work experience */
.jobs { display: flex; flex-direction: column; }
.job { display: flex; flex-direction: column; gap: 14px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.job:first-child { padding-top: 4px; }
.job-head { display: flex; justify-content: space-between; gap: 20px; }
.job-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.job-head strong { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.bullets { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 16.5px; line-height: 1.6; }
.bullets li::marker { color: var(--fg); }

/* certificates */
.certs li { align-items: center; }
.certs .row-main { flex: 1; }
.certs .row-side { flex-direction: row; align-items: center; gap: 20px; flex-shrink: 0; }
.thumb {
  position: relative; width: 120px; height: 84px; padding: 0; flex-shrink: 0;
  border: 0; border-radius: 16px; overflow: hidden;
  background: var(--glass); box-shadow: var(--pill-shadow); color: var(--muted); font: inherit; cursor: zoom-in;
  display: grid; place-items: center;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { transform: scale(1.04); box-shadow: var(--pill-shadow), var(--shadow-lg); }
.thumb-count { position: absolute; right: 6px; bottom: 6px; padding: 2px 9px; border-radius: 999px; background: var(--solid-bg); color: var(--solid-fg); font-size: 12px; font-weight: 600; }
.thumb.is-pending, .thumb.is-broken {
  cursor: default; box-shadow: inset 0 0 0 1.5px var(--line); align-content: center; gap: 4px;
  font-size: 12px; font-weight: 500; text-align: center;
}
.thumb.is-pending:hover, .thumb.is-broken:hover { transform: none; }
.thumb .ico { width: 22px; height: 22px; }

/* tags and chips */
.tag { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; background: var(--solid-bg); color: var(--solid-fg); white-space: nowrap; }
.tag.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 15px; font-weight: 500; padding: 8px 16px; border-radius: 999px; background: var(--pill-bg); }
.chips.sm { gap: 6px; }
.chips.sm li { font-size: 13px; padding: 5px 12px; }
.skills { gap: 32px; }
.skills .group { display: flex; flex-direction: column; gap: 14px; }
.skills .group h3 { margin: 0; }

/* ===== END OF FIRST HALF. The second half starts with "category tabs". ===== */

/* category tabs: a segmented control, like iOS */
.tabs { display: flex; flex-wrap: nowrap; gap: 2px; align-self: flex-start; max-width: 100%; padding: 4px; border-radius: 999px; background: var(--seg-bg); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); box-shadow: none;
  font-size: 15px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  transition: background .25s var(--ease), color .25s, box-shadow .25s;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { background: var(--seg-on); color: var(--fg); box-shadow: var(--shadow-sm); }
.tab .count { font-size: 13px; font-weight: 500; opacity: .65; font-variant-numeric: tabular-nums; }

/* project cards */
.project-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project-grid > li { display: flex; min-width: 0; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px; width: 100%; padding: 30px;
  border-radius: 32px; background: var(--glass); box-shadow: var(--pill-shadow);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  transition: transform .4s var(--ease), box-shadow .4s, background .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--pill-shadow), var(--shadow-lg); background: var(--glass-hi); }
.card:active { transform: scale(.985); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-body .card-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.025em; text-transform: none; line-height: 1.2; color: var(--fg); text-wrap: balance; }
.card-open { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.card-open::after { content: ""; position: absolute; inset: 0; border-radius: 32px; }
.card-open:focus-visible { outline: none; }
.card-open:focus-visible::after { outline: 3px solid var(--accent); outline-offset: 3px; }
.card-sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; line-height: 1.55; }
.card-cta { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 500; color: var(--accent); }
.card-cta .ico { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.card:hover .card-cta .ico { transform: translateX(4px); }
.empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  padding: 56px 24px; border-radius: 32px; background: var(--glass); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted);
}
.empty strong { color: var(--fg); font-size: 18px; }
.empty .ico { width: 30px; height: 30px; }

/* dialogs */
dialog { color: var(--fg); }
dialog::backdrop { background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.sheet {
  width: min(920px, calc(100vw - 24px)); max-width: none;
  max-height: min(90vh, 920px); max-height: min(90dvh, 920px);
  padding: 0; border: 0; border-radius: 34px; background: var(--panel); overflow: hidden;
  box-shadow: 0 0 0 .5px var(--line), var(--shadow-lg);
}
.sheet[open] { display: flex; flex-direction: column; animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px 32px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.sheet-kicker { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sheet-nav { display: flex; gap: 8px; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 30px 32px 38px; display: flex; flex-direction: column; gap: 22px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  display: grid; place-items: center; background: var(--pill-bg); color: var(--fg);
  transition: background .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: var(--glass-hi); }
.icon-btn:active { transform: scale(.92); }
.icon-btn .ico { width: 20px; height: 20px; }

.pd-title { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
.pd-meta { display: flex; align-items: center; gap: 14px; }
.pd-sum { margin: 0; font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 66ch; }
.pd-empty { margin: 0; color: var(--muted); font-size: 15px; }
.pd-sec { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.pd-sec h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border: 0; border-radius: 999px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; cursor: pointer;
  background: var(--pill-bg); color: var(--fg);
  transition: transform .25s var(--ease), opacity .2s, background .2s;
}
.btn.solid { background: var(--solid-bg); color: var(--solid-fg); }
a.btn:hover { opacity: .88; }
a.btn:active { transform: scale(.97); }
.btn.is-pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); cursor: not-allowed; font-weight: 500; }
.btn.is-pending em { font-style: normal; font-size: 13px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.shot {
  position: relative; aspect-ratio: 16 / 10; padding: 0; display: block;
  border: 0; border-radius: 20px; overflow: hidden; background: var(--glass); box-shadow: var(--pill-shadow); cursor: zoom-in;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.shot:hover img { transform: scale(1.05); }
.shot.is-pending {
  cursor: default; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-content: center; justify-items: center; gap: 6px;
  color: var(--muted); font-size: 13px; font-weight: 500; text-align: center;
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--glass) 10px 20px);
}
.shot .ico { width: 24px; height: 24px; }
.docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.doc { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 20px; border-radius: 20px; background: var(--glass); box-shadow: var(--pill-shadow); transition: background .2s; }
a.doc:hover { background: var(--glass-hi); }
.doc.is-pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); cursor: not-allowed; }
.doc-name { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.doc .soon { font-style: normal; font-size: 13px; }

/* image viewer */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .92); color: #f5f5f7;
}
.lightbox[open] { display: grid; place-items: center; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 94vw; }
.lb-fig img { max-width: 92vw; max-height: 78vh; max-height: 78dvh; object-fit: contain; border-radius: 16px; background: #111; }
.lb-fig figcaption { font-size: 15px; line-height: 1.5; color: #d2d2d7; text-align: center; max-width: 70ch; }
.lb-missing { max-width: 46ch; padding: 32px; border: 1.5px dashed rgba(255, 255, 255, .3); border-radius: 24px; color: #d2d2d7; text-align: center; overflow-wrap: anywhere; }
.lightbox .icon-btn { position: absolute; background: rgba(255, 255, 255, .14); color: #fff; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-close { top: max(16px, env(safe-area-inset-top, 0px)); right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-prev:active, .lightbox .lb-next:active { transform: translateY(-50%) scale(.92); }

/* gallery: columns keep each piece at its own shape, so posters and photos are not cropped */
.gallery-grid { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 16px; }
.gallery-grid > li { break-inside: avoid; margin-bottom: 16px; }
.gallery-grid.is-empty { columns: 1; }
.g-item {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  border: 0; border-radius: 24px; background: var(--glass); box-shadow: var(--pill-shadow); cursor: zoom-in;
  color: inherit; font: inherit; text-align: left;
  transition: transform .4s var(--ease), box-shadow .4s;
}
.g-item img { display: block; width: 100%; height: auto; transition: transform .6s var(--ease); }
.g-item:hover { transform: translateY(-3px); box-shadow: var(--pill-shadow), var(--shadow-lg); }
.g-item:hover img { transform: scale(1.03); }
.g-cap {
  position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 3px; padding: 40px 18px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); color: #fff; font-size: 14px;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease);
}
.g-cap strong { font-size: 16px; font-weight: 600; }
.g-item:hover .g-cap, .g-item:focus-visible .g-cap { opacity: 1; transform: none; }
@media (hover: none) { .g-cap { opacity: 1; transform: none; } }
.g-item.is-pending {
  cursor: default; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 140px;
  color: var(--muted); font-size: 13px; font-weight: 500; text-align: center;
  background: repeating-linear-gradient(135deg, transparent 0 10px, var(--glass) 10px 20px);
}
.g-item.is-pending:hover { transform: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.g-item .ico { width: 24px; height: 24px; }

/* socials */
.socials { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.social {
  display: flex; flex-direction: column; gap: 14px; padding: 22px 24px;
  border-radius: 28px; background: var(--glass); box-shadow: var(--pill-shadow);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  transition: transform .4s var(--ease), box-shadow .4s, background .3s;
}
.social:not(.is-pending-card):hover { transform: translateY(-3px); box-shadow: var(--pill-shadow), var(--shadow-lg); background: var(--glass-hi); }
.soc-main { display: flex; align-items: center; gap: 14px; min-width: 0; border-radius: 16px; }
.soc-ico { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center; background: var(--pill-bg); }
.soc-ico .ico { width: 22px; height: 22px; }
.soc-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.soc-text strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
a.soc-main > .ico { margin-left: auto; opacity: .55; }
.is-pending-card { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.is-pending-card .soc-ico { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.is-pending-card .soc-text strong { color: var(--muted); }
.copy {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 999px; cursor: pointer; background: var(--pill-bg); color: var(--fg);
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  transition: background .2s, transform .2s var(--ease);
}
.copy:hover { background: var(--glass-hi); }
.copy:active { transform: scale(.96); }

/* toast and footer */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 14px 24px; border-radius: 999px; background: var(--solid-bg); color: var(--solid-fg);
  font-size: 15px; font-weight: 600; box-shadow: var(--shadow-lg);
  transition: opacity .3s, transform .4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot {
  max-width: 1360px; margin-inline: auto; padding-block: 36px 56px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 15px; color: var(--muted);
}
.foot p { margin: 0; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }

/* taps respond at once, with no double-tap-zoom delay */
a, button, summary, [role="tab"], label.switch { touch-action: manipulation; }

/* Windows high-contrast mode: keep focus and buttons visible */
@media (forced-colors: active) {
  :focus-visible { outline: 2px solid Highlight; }
  .nav, .tab, .btn-solid, .resume, .copy, .btn { border: 1px solid ButtonText; }
}

@media (max-width: 1000px) {
  .project-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "id" "orb" "facts"; min-height: 0; padding-block: 36px 24px; row-gap: 40px; }
  .orb { width: min(70%, 300px); }
  .portrait { max-width: 320px; }
  .facts { grid-template-columns: 1fr; }
  main section { grid-template-columns: 1fr; row-gap: 24px; padding-block: 72px; }
  main h2 { position: static; }
  .rows.two { flex-direction: column; gap: 0; }
}
@media (max-width: 640px) {
  .topbar { grid-template-columns: 1fr auto; row-gap: 12px; padding-block: 16px 8px; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .toggle { grid-column: 2; grid-row: 1; }
  .topbar::before { content: ""; grid-column: 1; grid-row: 1; }
  .actions > * { flex: 1 1 100%; }
  .card { padding: 24px; border-radius: 28px; }
  .card-open::after { border-radius: 28px; }
  .job-head { flex-direction: column; gap: 6px; }
  .certs li { flex-direction: column; align-items: flex-start; }
  .certs .row-side { width: 100%; justify-content: space-between; }
  .sheet { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .sheet-bar { padding-left: 20px; }
  .sheet-body { padding: 22px 20px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}