/* ==========================================================================
   lucyxguo.com: mobile-first styles
   Core identity kept from the original site: letter-spaced teal LUCY.GUO
   wordmark, mint discs, dark slate sections, low-poly map, category colors.
   ========================================================================== */

:root {
  --ink: #1d2327;
  --ink-soft: #4a555c;
  --muted: #7a868d;
  --paper: #ffffff;
  --paper-alt: #f4f7f7;
  --night: #1f2529;
  --night-2: #2a3136;
  --night-3: #343c42;
  --line: #e3e9e9;
  --line-dark: rgba(255, 255, 255, .08);
  --teal: #6fb3a7;
  --teal-deep: #3b877a;
  --mint: #7fd8ac;
  --c-work: #3fbf7f;
  --c-research: #9b82ea;
  --c-study: #ecc95b;
  --c-projects: #6cc58b;
  --c-conf: #5fc3d8;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 28, .04), 0 8px 24px rgba(16, 24, 28, .07);
  --shadow-lg: 0 2px 4px rgba(16, 24, 28, .05), 0 22px 48px rgba(16, 24, 28, .14);
  --wrap: 1160px;
  --gutter: 20px;
  --display: "Montserrat", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 12px; }
.brand {
  font-family: var(--display); font-weight: 800; letter-spacing: .26em;
  text-decoration: none; color: var(--teal); font-size: 14px; white-space: nowrap;
}
.brand span { color: var(--ink); }
.brand:hover { color: var(--teal-deep); }

.nav { display: flex; gap: 2px; }
.nav a {
  font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-soft);
  padding: 9px 13px; border-radius: 999px; transition: background .2s, color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal-deep); background: rgba(111, 179, 167, .12); }

.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: transparent; cursor: pointer; margin-right: -8px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; width: 20px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .3s var(--ease), background .2s;
}
.nav-toggle span { top: 21px; left: 12px; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; left: 0; }
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 4px; padding: 12px var(--gutter) 22px;
    background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgba(0, 0, 0, .14);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .3s var(--ease), opacity .25s, visibility .25s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { font-size: 15px; padding: 14px 16px; border-radius: 14px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  padding: 0 24px; border-radius: 999px; text-decoration: none;
  background: var(--ink); color: #fff; border: 1.5px solid var(--ink); cursor: pointer;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; box-shadow: 0 10px 24px rgba(59, 135, 122, .3); }
.btn.ghost { background: rgba(255, 255, 255, .6); color: var(--ink); border-color: rgba(29, 35, 39, .18); }
.btn.ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: none; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 11.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2em 0 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(100svh - var(--header-h)); display: grid; align-items: center;
  padding: 64px 0 110px;
  background:
    radial-gradient(60% 50% at 10% 10%, rgba(127, 216, 172, .22), transparent 70%),
    radial-gradient(50% 60% at 95% 80%, rgba(111, 179, 167, .2), transparent 70%),
    linear-gradient(180deg, #f8fbfa 0%, #ffffff 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(rgba(29, 35, 39, .08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 80%);
}
.hero-art {
  position: absolute; z-index: -1; width: min(640px, 40vw); right: -7vw; top: 50%; transform: translateY(-50%); opacity: .6;
  filter: drop-shadow(0 30px 40px rgba(59, 135, 122, .18));
  animation: float 9s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(calc(-50% - 14px)) rotate(-1.5deg); } }
.hero-inner { position: relative; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font: 700 12px var(--display); letter-spacing: .28em; text-transform: uppercase; color: var(--teal-deep);
}
.hero-kicker::before { content: ""; width: 28px; height: 2px; background: var(--mint); border-radius: 2px; }
.hero h1 {
  font-size: clamp(48px, 11.5vw, 168px); font-weight: 800; line-height: .95;
  letter-spacing: .14em; margin: 0 0 .32em; color: var(--teal); white-space: nowrap;
}
.hero h1 .ch { display: inline-block; }
.hero h1 .dot { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .ch { opacity: 0; animation: letter-in 1s var(--ease) forwards; animation-delay: calc(var(--i) * 75ms + 150ms); }
  .hero .fade-in { opacity: 0; animation: fade-up 1.1s var(--ease) forwards; animation-delay: var(--d, 0ms); }
  .hero-art { opacity: 0; animation: art-in 1.6s var(--ease) .2s forwards, float 9s ease-in-out 1.8s infinite; }
}
@keyframes letter-in { from { opacity: 0; transform: translateY(.3em); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes art-in { from { opacity: 0; transform: translateY(-50%) scale(.92) rotate(-4deg); } to { opacity: .6; transform: translateY(-50%); } }
.hero .roles {
  font-family: var(--body); font-style: italic; font-weight: 300; color: var(--muted);
  font-size: clamp(17px, 2.2vw, 26px); letter-spacing: .02em; margin: 0 0 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px;
}
.hero .roles span { display: inline-flex; align-items: center; }
.hero .roles span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--teal); opacity: .7; margin-right: 12px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.chips { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font: 600 13px var(--body); color: var(--ink-soft); padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .75); border: 1px solid var(--line);
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; margin-left: -23px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: var(--teal-deep); text-decoration: none;
  background: rgba(255, 255, 255, .7); border: 1px solid rgba(59, 135, 122, .25);
  box-shadow: 0 6px 18px rgba(59, 135, 122, .15); transition: background .2s, color .2s, box-shadow .2s;
}
.scroll-cue svg { width: 22px; height: 22px; }
.scroll-cue:hover { background: var(--teal-deep); color: #fff; box-shadow: 0 10px 24px rgba(59, 135, 122, .3); }
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue { animation: bob 1.8s ease-in-out infinite; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(9px); } }

@media (max-width: 820px) {
  .hero { min-height: calc(88svh - var(--header-h)); padding: 48px 0 64px; }
  .hero-art { width: 78vw; right: -26vw; top: 6%; transform: none; animation: none !important; opacity: .32 !important; }
  .hero h1 { letter-spacing: .1em; font-size: clamp(38px, 13.2vw, 96px); }
  .hero-inner { text-align: center; }
  .hero h1 { padding-left: 0; }
  .hero .roles { justify-content: center; }
  .hero-cta { justify-content: center; }
  .hero-art { right: 50%; margin-right: -39vw; top: 4%; }
  .hero-cta .btn { flex: 1 1 100%; white-space: nowrap; }
  .chips { margin-top: 28px; }
  .chips li { font-size: 12px; padding: 6px 12px; }
  .scroll-cue { bottom: 16px; width: 42px; height: 42px; margin-left: -21px; }
}

/* ---------- Sections ---------- */
section.block { padding: clamp(60px, 10vw, 120px) 0; position: relative; }
section.alt { background: var(--paper-alt); }
section.dark { background: var(--night); color: #e7eef0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 12px var(--display); letter-spacing: .26em; text-transform: uppercase; color: var(--teal-deep); margin: 0 0 12px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; opacity: .6; }
section.dark .eyebrow { color: var(--mint); }
.section-title {
  overflow-wrap: anywhere; font-size: clamp(28px, 6.4vw, 52px); font-weight: 800;
  letter-spacing: .02em; text-transform: uppercase; margin-bottom: .35em;
}
.lede { color: var(--ink-soft); max-width: 640px; font-size: clamp(16px, 2vw, 18px); }
section.dark .lede { color: #a9b6bc; }

/* ---------- Experience map (zoomable) ---------- */
.map-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 12px; }
.map-toolbar button {
  min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: var(--night-2); border: 1px solid var(--line-dark); color: #cfd8dc;
  font: 700 11.5px var(--display); letter-spacing: .12em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.map-toolbar button:hover { border-color: rgba(127, 216, 172, .5); color: #fff; }
.map-toolbar button[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); color: var(--night); }

.map {
  position: relative; margin: 0 0 16px; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(80% 90% at 50% 40%, #232b30 0%, #1a2024 100%);
  aspect-ratio: 17 / 10; max-height: 78vh; border: 1px solid var(--line-dark);
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.map.zoomed { touch-action: none; }
.map.dragging { cursor: grabbing; }
.map-canvas {
  position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1.75;
  transform-origin: 0 0;
}
.map-canvas.animate { transition: transform .55s var(--ease), width .55s var(--ease); }
.map-canvas img { width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }

.pin {
  --size: 22px;
  position: absolute; width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%; border: 2.5px solid #fff; background: var(--c, var(--teal));
  box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
  cursor: pointer; padding: 0; transition: box-shadow .2s;
}
.pin::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; }   /* larger tap target */
.pin::after {
  content: ""; position: absolute; inset: -2.5px; border-radius: 50%; border: 2px solid var(--c);
  animation: ping 2.6s var(--ease) infinite; pointer-events: none;
}
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
.pin:hover, .pin:focus-visible { z-index: 3; outline: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 3px 10px rgba(0, 0, 0, .45); }
.pin .tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px);
  background: #fff; color: var(--ink); font: 600 12px/1.2 var(--body); white-space: nowrap;
  padding: 7px 10px; border-radius: 8px; pointer-events: none; opacity: 0; transition: opacity .15s, transform .2s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
.pin:hover .tip, .pin:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.map.zoomed .pin::after { animation: none; }

.map-zoom { position: absolute; right: 12px; bottom: 12px; display: grid; gap: 6px; z-index: 5; }
.map-zoom button {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); cursor: pointer;
  background: rgba(31, 37, 41, .82); color: #fff; font-size: 22px; line-height: 1;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .2s;
}
.map-zoom button:hover { background: var(--teal-deep); }
.map-zoom button:disabled { opacity: .35; cursor: default; background: rgba(31, 37, 41, .82); }
.map-hint {
  position: absolute; left: 12px; bottom: 12px; z-index: 5; margin: 0; max-width: calc(100% - 80px);
  padding: 6px 10px; border-radius: 8px; background: rgba(31, 37, 41, .75); color: #b9c4c8;
  font-size: 12px; line-height: 1.3; pointer-events: none; transition: opacity .4s;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.map.touched .map-hint { opacity: 0; }
.hint-touch { display: none; }
@media (hover: none) { .hint-desk { display: none; } .hint-touch { display: inline; } }

/* Category tabs (Work selected by default) */
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; }
.legend button {
  display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: var(--night-2); border: 1px solid var(--line-dark); color: #b9c4c8;
  font: 700 11.5px/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
  transition: background .25s, color .25s, border-color .25s, box-shadow .35s;
}
.legend button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); transition: box-shadow .35s; }
.legend button:hover { color: #fff; border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.legend button[aria-selected="true"] {
  color: #fff;
  background: color-mix(in srgb, var(--c) 16%, var(--night-2));
  border-color: color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent), 0 0 18px color-mix(in srgb, var(--c) 45%, transparent);
}
.legend button[aria-selected="true"] i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent), 0 0 10px var(--c); }

.exp-group { margin-top: 22px; }
.exp-group[hidden] { display: none; }
.exp-group:not([hidden]) { animation: group-in .35s var(--ease); }
@keyframes group-in { from { opacity: 0; } }
.exp-group .swipe { margin: 0 0 10px; text-align: right; font: 500 12px var(--body); color: #8d9aa0; }
@media (min-width: 1001px) { .exp-group .swipe { visibility: hidden; } }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.exp-card {
  position: relative; text-align: left; border: 1px solid var(--line-dark); cursor: pointer; padding: 0; overflow: hidden;
  background: var(--night-2); color: #e7eef0; border-radius: var(--radius-sm);
  display: flex; flex-direction: column;
  transition: border-color .25s, background .25s;
}
.exp-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); z-index: 1; }
.exp-card:hover, .exp-card:focus-visible { background: var(--night-3); border-color: color-mix(in srgb, var(--c) 55%, transparent); outline: none; }
.exp-card .ph { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--night-3); }
.exp-card .ph-track { display: flex; height: 100%; transition: transform .55s cubic-bezier(.45, 0, .2, 1); }
.exp-card .ph-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; transition: opacity .55s ease; }
.exp-card.playing .ph-track img:not(.active) { opacity: 0; }
.exp-card .ph-dots {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: 5px;
  padding: 4px 7px; border-radius: 999px; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .3s;
}
.exp-card .ph-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .5); transition: background .3s, transform .3s; }
.exp-card .ph-dots i.on { background: #fff; transform: scale(1.25); }
.exp-card.playing .ph-dots { opacity: 1; }
.exp-card .body { padding: 16px 18px 18px; display: grid; gap: 4px; align-content: start; flex: 1; }
.exp-card h4 { font-size: 16px; margin: 0 0 2px; color: #fff; line-height: 1.3; }
.exp-card .meta { font-size: 13.5px; color: #9eabb1; margin: 0; }
.exp-card .meta:last-child { color: color-mix(in srgb, var(--c) 70%, #fff); font-weight: 600; }

/* Experience cards: horizontal-only swipe rows */
.cards.rail {
  display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  touch-action: pan-x pan-y; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 2px;
}
.cards.rail::-webkit-scrollbar { display: none; }
.cards.rail > * { flex: 1 1 0; min-width: 210px; max-width: calc((100% - 48px) / 4); scroll-snap-align: start; }
@media (max-width: 1000px) { .cards.rail > * { flex: 0 0 calc((100% - 32px) / 3); max-width: none; } }
@media (max-width: 700px) {
  .cards.rail {
    gap: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .cards.rail > * { flex: 0 0 min(78vw, 300px); max-width: none; }
  .map-toolbar { margin-top: 24px; gap: 6px; }
  .map-toolbar button { min-height: 36px; padding: 0 12px; font-size: 10.5px; }
  .map { aspect-ratio: 3 / 2; max-height: 70vh; border-radius: 16px; }
  .pin { --size: 18px; border-width: 2px; }
  .pin .tip { display: none; }
  .map-zoom button { width: 38px; height: 38px; }
  .legend { gap: 8px; }
  .legend button { min-height: 38px; padding: 0 12px; font-size: 10.5px; gap: 7px; }
}

/* ---------- Project tiles ---------- */
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); margin-top: 34px; }
.tile {
  display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--paper);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); color: inherit; }
.tile .img { aspect-ratio: 16/10; background: var(--paper-alt); overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.tile h3 { font-size: 19px; margin-bottom: 8px; }
.tile p { color: var(--ink-soft); font-size: 15px; margin: 0; }
.tile .more {
  margin-top: auto; padding-top: 16px; display: inline-flex; align-items: center; gap: 6px;
  font: 700 12px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--teal-deep);
}
.tile .more::after { content: "→"; font-size: 14px; transition: transform .25s var(--ease); }
.tile:hover .more::after { transform: translateX(4px); }

@media (max-width: 560px) {
  .tiles { gap: 14px; margin-top: 24px; }
  .tile .body { padding: 16px 18px 18px; }
  .tile h3 { font-size: 17px; }
  .tile p { font-size: 14.5px; }
}

/* ---------- Engineering communication (mint discs) ---------- */
.circles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 4vw, 40px); margin-top: 44px; text-align: center; }
.circle-link { text-decoration: none; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.circle-link .disc {
  position: relative; width: min(200px, 100%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #b2efd0 0%, var(--mint) 55%, #5cc394 100%);
  display: grid; place-items: center; color: var(--night);
  box-shadow: 0 18px 40px rgba(127, 216, 172, .16), inset 0 -6px 18px rgba(0, 0, 0, .08);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.circle-link .disc::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed rgba(127, 216, 172, .4); transition: transform .8s var(--ease); }
.circle-link .disc svg { width: 32%; height: 32%; }
.circle-link:hover .disc { transform: translateY(-6px) scale(1.03); box-shadow: 0 26px 50px rgba(127, 216, 172, .26); }
.circle-link:hover .disc::after { transform: rotate(90deg); }
.circle-link span { font: 700 clamp(11px, 2.4vw, 14px) var(--display); letter-spacing: .18em; text-transform: uppercase; }
.circle-link:hover { color: var(--mint); }

@media (max-width: 560px) {
  .circles { grid-template-columns: 1fr; gap: 10px; margin-top: 26px; }
  .circle-link {
    flex-direction: row; gap: 16px; padding: 12px 18px 12px 12px; border-radius: 18px;
    background: var(--night-2); border: 1px solid var(--line-dark); text-align: left;
  }
  .circle-link .disc { width: 54px; flex: none; box-shadow: none; }
  .circle-link .disc::after { display: none; }
  .circle-link span { flex: 1; font-size: 13px; }
  .circle-link::after { content: "→"; color: var(--mint); font-size: 18px; }
}

/* ---------- Art ---------- */
.art-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 22px; }
.art-item {
  position: relative; border: 0; padding: 0; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--paper-alt); aspect-ratio: 1; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.art-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.art-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.art-item:hover img { transform: scale(1.06); }
.art-item .label {
  position: absolute; inset: auto 10px 10px 10px; padding: 9px 12px; text-align: left; border-radius: 10px;
  font: 700 13px var(--display); letter-spacing: .04em; color: var(--ink);
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.subhead {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin: 52px 0 0;
}
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-title + .subhead { margin-top: 26px; }
.hs-tiles { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin-top: 22px; }
.hs-tiles .tile .img { aspect-ratio: 4/3; }

@media (max-width: 560px) {
  .art-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .art-item .label { inset: auto 6px 6px 6px; padding: 6px 9px; font-size: 11.5px; border-radius: 8px; }
  .subhead { margin-top: 40px; }
  .hs-tiles { gap: 14px; }
}

/* ---------- Contact ---------- */
.contact-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin-top: 28px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; text-decoration: none;
  background: var(--night-2); border: 1px solid var(--line-dark); color: #fff; min-width: 0;
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.contact-card:hover { transform: translateY(-3px); border-color: rgba(127, 216, 172, .5); background: var(--night-3); color: #fff; }
.contact-card svg {
  width: 46px; height: 46px; flex: none; padding: 12px; border-radius: 14px;
  background: rgba(127, 216, 172, .14); color: var(--mint);
}
.contact-card span { display: grid; font-weight: 600; font-size: 15px; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.contact-card small { font: 700 10.5px var(--display); letter-spacing: .18em; text-transform: uppercase; color: #8d9aa0; margin-bottom: 3px; }
.contact-loc { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; color: #a9b6bc; font-size: 15px; }
.contact-loc svg { width: 18px; height: 18px; color: var(--mint); }

.site-footer { background: #171c1f; color: #7f8b91; padding: 26px 0 calc(26px + env(safe-area-inset-bottom)); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.site-footer a { color: #b9c4c8; }

/* ---------- Detail pages ---------- */
.page-head {
  position: relative; overflow: hidden;
  padding: clamp(36px, 8vw, 88px) 0 clamp(28px, 5vw, 44px);
  background: radial-gradient(50% 80% at 100% 0%, rgba(127, 216, 172, .22), transparent 70%), var(--paper-alt);
  border-bottom: 1px solid var(--line);
}
.page-head .back {
  display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 0 14px; margin-bottom: 18px;
  border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font: 700 11.5px var(--display); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft);
}
.page-head .back:hover { color: var(--teal-deep); border-color: var(--teal); }
.page-head h1 { overflow-wrap: anywhere; font-size: clamp(28px, 7vw, 60px); font-weight: 800; letter-spacing: .03em; text-transform: uppercase; margin: 0; }
.page-head .sub { color: var(--ink-soft); margin: 10px 0 0; font-size: clamp(15px, 2vw, 18px); }
.prose { max-width: 720px; }
.prose p { color: var(--ink-soft); }
.content { padding: clamp(32px, 6vw, 56px) 0 clamp(64px, 10vw, 100px); }
.content h2 {
  font-size: clamp(14px, 3.6vw, 18px); letter-spacing: .16em; text-transform: uppercase; margin: 52px 0 6px;
  display: flex; align-items: center; gap: 14px;
}
.content h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.content h2:first-child { margin-top: 0; }
.deck-list h2::after { display: none; }
.split { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: 1.1fr 1fr; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 18px; }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery button {
  border: 0; padding: 0; cursor: zoom-in; background: var(--paper-alt); border-radius: var(--radius-sm); overflow: hidden;
  display: flex; flex-direction: column; text-align: left; box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.gallery button:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gallery button img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #e9eeee; }
.gallery.tall button img { aspect-ratio: 3/4; }
.gallery figcaption { padding: 9px 12px 11px; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
@media (max-width: 560px) {
  .gallery, .gallery.tall { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery.wide { grid-template-columns: 1fr; }
  .gallery button { border-radius: 12px; }
  .gallery figcaption { font-size: 12px; padding: 7px 9px 9px; }
}

.video-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); margin-top: 18px; }
figure { margin: 0; }
.video-grid video, .single-video video { width: 100%; border-radius: var(--radius-sm); background: #000; box-shadow: var(--shadow); }
.video-grid figcaption, .single-video figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.single-video { margin-top: 28px; }

.doc-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.doc-list a {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); background: var(--paper);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.doc-list a:hover { border-color: var(--teal); transform: translateX(3px); box-shadow: var(--shadow); }
.doc-list .kind {
  flex: none; font: 800 10.5px var(--display); letter-spacing: .08em; padding: 6px 8px; border-radius: 8px;
  background: rgba(111, 179, 167, .14); color: var(--teal-deep); min-width: 52px; text-align: center;
}
.doc-list .name { font-weight: 600; font-size: 15px; line-height: 1.35; }
.doc-list .hint { color: var(--muted); font-size: 13px; margin-left: auto; white-space: nowrap; }
@media (max-width: 560px) { .doc-list .hint { display: none; } }

/* Slide deck viewer */
.deck-list { display: grid; gap: clamp(40px, 7vw, 64px); }
.deck-list h2 { margin-bottom: 4px; }
.deck { margin-top: 14px; background: var(--night); border-radius: var(--radius); padding: clamp(8px, 1.6vw, 14px); box-shadow: var(--shadow-lg); }
.deck-stage { position: relative; aspect-ratio: 16/9; background: #0f1215; border-radius: 12px; overflow: hidden; touch-action: pan-y; }
.deck-stage img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.deck .progress { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); margin: 10px 2px 0; overflow: hidden; }
.deck .progress i { display: block; height: 100%; width: 0; background: var(--mint); transition: width .3s var(--ease); }
.deck-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 2px 2px; color: #cfd8db; font: 600 13px var(--body); }
.deck-bar button {
  background: var(--night-3); color: #fff; border: 0; border-radius: 999px; width: 44px; height: 44px;
  font-size: 18px; cursor: pointer; transition: background .2s;
}
.deck-bar button:hover { background: var(--teal-deep); }

/* ---------- Dialogs ---------- */
dialog {
  border: 0; padding: 0; border-radius: 24px; width: min(980px, 100% - 32px); max-height: calc(100dvh - 48px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .45); color: var(--ink); overscroll-behavior: none;
  overflow-y: auto; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; scrollbar-width: thin;
}
dialog[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
dialog::backdrop { background: rgba(12, 16, 19, .78); }
.dlg-head {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 24px 24px 16px; background: #fff;
  border-bottom: 1px solid var(--line);
}
.dlg-head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c, var(--teal)); }
.dlg-head h2 { font-size: clamp(18px, 3vw, 26px); letter-spacing: .02em; text-transform: uppercase; margin: 0; }
.dlg-head .where { margin: 6px 0 0; color: var(--muted); font: 700 11.5px/1.4 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.dlg-close {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--paper-alt);
  font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s, transform .2s;
}
.dlg-close:hover { background: var(--line); transform: rotate(90deg); }
.dlg-body { padding: 22px 24px 28px; display: grid; gap: 26px; grid-template-columns: 1fr 1fr; }
.dlg-body h3 { font-size: 17px; margin: 0 0 2px; }
.dlg-body .when {
  display: inline-block; margin: 8px 0 14px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--c, var(--teal)) 16%, #fff); color: var(--ink-soft);
}
.dlg-body ul { padding-left: 20px; margin: 0 0 12px; }
.dlg-body li { margin-bottom: 7px; color: var(--ink-soft); }
.dlg-body li::marker { color: var(--c, var(--teal)); }
.dlg-body ul ul { margin-top: 6px; columns: 2; column-gap: 18px; }
.dlg-body .gallery { margin-top: 0; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dlg-body .gallery button:first-child { grid-column: 1 / -1; }
.dlg-body .gallery button:first-child img { aspect-ratio: 16/10; }

/* Phone: dialogs become bottom sheets */
@media (max-width: 700px) {
  dialog:not(.lightbox) {
    width: 100%; max-width: 100%; margin: auto 0 0; max-height: 90dvh;
    border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom);
  }
  dialog:not(.lightbox)[open] { animation: sheet .38s var(--ease); }
  .dlg-head { padding: 20px 18px 14px; }
  .dlg-body { grid-template-columns: 1fr; padding: 18px 18px 26px; gap: 20px; }
  .dlg-body ul ul { columns: 1; }
}
@keyframes sheet { from { transform: translateY(100%); } }

/* Lightbox */
.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; background: rgba(8, 10, 12, .97); color: #fff; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.lightbox .stage { display: grid; place-items: center; padding: 64px 72px 8px; min-height: 0; touch-action: pan-y; }
.lightbox .stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; user-select: none; -webkit-user-drag: none; }
.lightbox .cap { text-align: center; padding: 12px 20px calc(24px + env(safe-area-inset-bottom)); color: #c9d3d6; font-size: 14px; }
.lightbox .lb-btn {
  position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; width: 48px; height: 48px;
  border-radius: 50%; font-size: 22px; cursor: pointer; transition: background .2s;
}
.lightbox .lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lightbox .lb-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.lightbox .lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lightbox .stage { padding: 70px 6px 6px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: none; }
  .lightbox .cap { padding-inline: 70px; min-height: 72px; }
}

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Projects carousel ---------- */
.carousel { margin-top: 34px; }
.carousel-track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px 4px 22px; margin: -6px -4px 0; scrollbar-width: none; overscroll-behavior-x: contain;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > .tile { flex: 0 0 calc((100% - 40px) / 3); scroll-snap-align: start; }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 6px; }
.carousel-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink); box-shadow: var(--shadow); transition: background .2s, color .2s, opacity .2s;
}
.carousel-btn:hover:not(:disabled) { background: var(--ink); color: #fff; }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: #c9d3d3; transition: width .3s var(--ease), background .3s;
}
.carousel-dots button[aria-selected="true"] { width: 26px; background: var(--teal-deep); }
@media (max-width: 960px) { .carousel-track > .tile { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 600px) {
  .carousel { margin-top: 24px; }
  .carousel-track { gap: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .carousel-track > .tile { flex-basis: 84%; }
  .carousel-btn { width: 40px; height: 40px; font-size: 20px; }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; z-index: 55;
  right: max(18px, env(safe-area-inset-right)); bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-deep); color: #fff; text-decoration: none;
  box-shadow: 0 10px 28px rgba(16, 24, 28, .3), 0 0 0 2px rgba(255, 255, 255, .9);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9);
  transition: opacity .3s, visibility .3s, transform .3s var(--ease), background .2s;
}
.to-top svg { width: 20px; height: 20px; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ink); color: #fff; }
.to-top:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
@media (max-width: 700px) { .to-top { width: 46px; height: 46px; right: 16px; } }

/* While a pop-up is open the page behind it stays put */
html.dialog-open, html.dialog-open body { overflow: hidden; overscroll-behavior: none; }

/* Smooth scrolling inside pop-ups: keep scrolled content on its own layer and skip hover effects there */
dialog:not(.lightbox) { transform: translateZ(0); }
dialog .dlg-body { contain: layout paint; }
dialog .gallery button, dialog .gallery button:hover { box-shadow: none; transform: none; transition: none; }

/* ---------- Art scroll wheel ---------- */
.wheel { --item: clamp(220px, 30vw, 340px); margin-top: 18px; }
.wheel-track {
  display: flex; gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  padding: 26px calc(50% - var(--item) / 2) 30px; scrollbar-width: none; overscroll-behavior-x: contain;
  touch-action: pan-x pan-y; perspective: 1200px;
}
.wheel-track::-webkit-scrollbar { display: none; }
.wheel-track > .art-item {
  flex: 0 0 var(--item); margin: 0 -14px; scroll-snap-align: center;
  transform: scale(var(--s, .78)) rotateY(var(--ry, 0deg)); opacity: var(--o, .55);
  transition: transform .15s linear, opacity .15s linear, box-shadow .3s; will-change: transform;
  z-index: var(--zi, 1); text-decoration: none;
}
.wheel-track > .art-item:hover { transform: scale(var(--s, .78)) rotateY(var(--ry, 0deg)); }
.wheel-track > .art-item.center { box-shadow: 0 24px 50px rgba(16, 24, 28, .22); }
.wheel-track > .art-item:not(.center) img { transform: none; }
.wheel .art-item .label small { display: block; margin-top: 3px; font: 500 11.5px var(--body); letter-spacing: 0; color: var(--muted); }
.wheel .carousel-nav { margin-top: 2px; }
@media (max-width: 600px) {
  .wheel { --item: 66vw; }
  .wheel-track > .art-item { margin: 0 -10px; }
  .wheel-track { padding-top: 16px; padding-bottom: 22px; }
  .wheel .art-item .label { inset: auto 8px 8px 8px; padding: 8px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .wheel-track > .art-item { transition: none; } }

/* ---------- Pop-up slideshows (auto-play while open) ---------- */
.slideshow { position: relative; min-width: 0; }
.ss-stage { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: #eef2f2; aspect-ratio: 4 / 3; touch-action: pan-y; }
.ss-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.45, 0, .2, 1); }
.ss-slide { flex: 0 0 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; opacity: 0; transition: opacity .6s ease; }
.ss-slide.active { opacity: 1; }
.ss-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.ss-cap { min-height: 1.4em; margin: 10px 2px 0; font-size: 13.5px; color: var(--ink-soft); }
.ss-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
.ss-nav button.ss-prev, .ss-nav button.ss-next {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--ink); transition: background .2s, color .2s;
}
.ss-nav button.ss-prev:hover, .ss-nav button.ss-next:hover { background: var(--ink); color: #fff; }
.ss-dots { display: flex; gap: 6px; }
.ss-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: #c9d3d3; cursor: pointer; transition: width .3s var(--ease), background .3s; }
.ss-dots button[aria-current="true"] { width: 22px; background: var(--c, var(--teal-deep)); }
@media (max-width: 700px) { .ss-stage { aspect-ratio: 4 / 3; } }

/* ---------- Uncropped masonry (2015 / 2016 art portfolios) ---------- */
.gallery.masonry { display: block; columns: 4 220px; column-gap: 14px; }
.gallery.masonry button { display: block; width: 100%; margin: 0 0 14px; break-inside: avoid; }
.gallery.masonry button img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
@media (max-width: 900px) { .gallery.masonry { columns: 3; } }
@media (max-width: 600px) {
  .gallery.masonry { columns: 2; column-gap: 10px; }
  .gallery.masonry button { margin-bottom: 10px; border-radius: 10px; }
}

/* LinkedIn highlight bullets on project pages */
.highlights { list-style: none; padding: 18px 20px; margin: 0 0 24px; border-radius: var(--radius-sm); background: var(--paper-alt); border: 1px solid var(--line); display: grid; gap: 10px; }
.highlights li { position: relative; padding-left: 22px; color: var(--ink); font-weight: 500; line-height: 1.5; }
.highlights li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(127, 216, 172, .25); }

/* Keep Lucy in frame when the tall Apple Park photo is cropped */
img[src$="apple-park.jpg"] { object-position: 38% 72%; }
.dlg-body .when-spacer { height: 8px; margin: 0; }
img[src$="houston-team.jpg"] { object-position: 50% 40%; }

/* Arrows for experience rows that overflow (mouse users can't swipe) */
.rail-wrap { position: relative; }
.rail-btn {
  position: absolute; top: 34%; z-index: 4; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .15); background: rgba(31, 37, 41, .9); color: #fff; font-size: 20px; line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4); transition: background .2s;
}
.rail-btn:hover { background: var(--teal-deep); }
.rail-btn.prev { left: -14px; }
.rail-btn.next { right: -14px; }
@media (hover: none) { .rail-btn { display: none; } }

/* ---------- Current role: glowing pin + glowing card ---------- */
.pin.current {
  --size: 24px; z-index: 6; border-width: 2.5px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 20%, transparent), 0 0 8px 1px color-mix(in srgb, var(--c) 30%, transparent), 0 3px 10px rgba(0, 0, 0, .4);
}
.pin.current::after { inset: -2.5px; border-width: 2px; animation: ping-soft 3s var(--ease) infinite; }
@keyframes ping-soft { 0% { transform: scale(1); opacity: .45; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.map.zoomed .pin.current::after { animation: ping-soft 3s var(--ease) infinite; }
.pin.current .tip { opacity: 1; transform: translate(-50%, 0); background: var(--c); color: #0f2a1d; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .pin.current { animation: pin-glow 3.2s ease-in-out infinite; }
}
@keyframes pin-glow {
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 24%, transparent), 0 0 11px 2px color-mix(in srgb, var(--c) 38%, transparent), 0 3px 10px rgba(0, 0, 0, .4); }
}

/* room for the glow inside the swipe rows */
.cards.rail { padding-top: 16px; padding-bottom: 20px; margin-top: -16px; margin-bottom: -20px; }
@media (min-width: 701px) { .cards.rail { padding-inline: 14px; margin-inline: -14px; scroll-padding-inline: 14px; } }

.exp-card.current {
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 18%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .exp-card.current { animation: card-glow 4s ease-in-out infinite; }
}
@keyframes card-glow {
  50% { box-shadow: 0 0 16px color-mix(in srgb, var(--c) 26%, transparent); }
}
.exp-card.current .meta:last-child::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; vertical-align: 1px;
  background: var(--c); box-shadow: 0 0 4px color-mix(in srgb, var(--c) 60%, transparent);
}
@media (max-width: 700px) { .pin.current { --size: 20px; } }

/* Grouped roles (e.g. Shell) inside one pop-up */
.role-list { list-style: none; padding: 0 0 0 18px; margin: 0; position: relative; display: grid; gap: 22px; }
.role-list::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: color-mix(in srgb, var(--c, var(--teal)) 30%, #fff); border-radius: 2px; }
.role-list > li { position: relative; margin: 0; color: var(--ink); }
.role-list > li::before {
  content: ""; position: absolute; left: -19px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--c, var(--teal));
}
.role-list .role-where { margin: 2px 0 0; font: 700 11.5px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.role-list .when { margin: 8px 0 10px; }
.role-list .when-spacer { height: 4px; }

/* Internship / Co-Op shown as a subtitle under the company name */
.exp-card .subtitle { margin: -2px 0 2px; font: 500 italic 12.5px var(--body); color: #9eabb1; }
.dlg-head .subtitle { margin: 2px 0 0; font: 500 italic 14px var(--body); color: var(--muted); }

/* Companies tagline, centred under the hero buttons */
.hero-actions { display: inline-flex; flex-direction: column; align-items: center; gap: 22px; max-width: 100%; }
.hero-companies {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; margin: 0;
  font: 600 12px/1.4 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.hero-companies span { display: inline-flex; align-items: center; }
.hero-companies span + span::before {
  content: ""; width: 4px; height: 4px; margin-right: 14px; border-radius: 50%; background: var(--teal); opacity: .7;
}
@media (max-width: 820px) {
  .hero-actions { display: flex; width: 100%; }
  .hero-actions .hero-cta { width: 100%; }
  .hero-companies { font-size: 10px; letter-spacing: .09em; gap: 4px 8px; flex-wrap: nowrap; white-space: nowrap; }
  .hero-companies span + span::before { width: 3px; height: 3px; margin-right: 8px; }
}
@media (max-width: 359px) { .hero-companies { flex-wrap: wrap; white-space: normal; } }

/* Hovered/focused pin and its label always sit above every other pin and label */
.pin:hover, .pin:focus-visible { z-index: 60 !important; }
.pin .tip { z-index: 2; }
.pin:hover .tip, .pin:focus-visible .tip { box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.map:has(.pin:hover) .pin.current:not(:hover) .tip { opacity: 0; }   /* keep the "Now" label from crowding a hovered label */

/* Auto-scrolling gallery under a project video (LCDC) */
.media-stack { display: grid; gap: 28px; align-content: start; min-width: 0; }
.page-slideshow h2 { margin: 0 0 12px; }
.page-slideshow .ss-stage { aspect-ratio: 3 / 2; box-shadow: var(--shadow); }
/* Page slideshows show the whole photo (renders, GIFs, screenshots) on a soft backdrop instead of cropping */
.page-slideshow .ss-stage { background: #eef2f2; }
.page-slideshow .ss-slide img { object-fit: contain; }

/* ---------- Centered hero (all screen sizes) ---------- */
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero .roles { justify-content: center; }
.hero-cta { justify-content: center; }
.hero-actions { align-self: center; }
@media (min-width: 821px) {
  .hero h1 { padding-left: 0; }
  .hero-art {
    width: min(760px, 62vw); right: 50%; margin-right: calc(min(760px, 62vw) / -2);
    top: 50%; transform: translateY(-50%); opacity: .22;
  }
  @keyframes art-in { from { opacity: 0; transform: translateY(-50%) scale(.92) rotate(-4deg); } to { opacity: .22; transform: translateY(-50%); } }
}
/* Keep people in frame when the tall Pittsburgh photos are cropped */
img[src$="pittsburgh-banner.jpg"] { object-position: 70% 52%; }
img[src$="pittsburgh-office.jpg"] { object-position: 30% 50%; }

/* TL;DR box at the top of project pages */
.tldr { margin: 0 0 26px; }
.tldr-label { margin: 0 0 8px; font: 800 11px var(--display); letter-spacing: .24em; color: var(--teal-deep); }
.tldr .highlights { margin: 0; border-left: 3px solid var(--mint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.tldr .highlights li { font-weight: 400; color: var(--ink-soft); }
.tldr .highlights strong { color: var(--ink); font-weight: 700; }
