/* Studio layout in the original mrandrewross.com style: deep blue night, aurora, stars, cyan and sky-blue accents.
   Layout concept: Andrew's template (logo | top bar / side bar | display window) as glass panels over the night sky. */
:root {
  --bg: #071019;
  --bg-deep: #04090f;
  --panel: rgba(10, 21, 31, 0.72);
  --panel-solid: #0c1722;
  --panel-2: #111f2c;
  --text: #f3f1e8;
  --muted: #9eaab4;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --cyan: #61d9d5;
  --cyan-soft: #a3f1ed;
  --accent: #72c7ff;
  --accent-soft: #b9e2ff;
  --accent-hover: #91d4ff;
  --cream: #efe5cf;
  --display: "Space Grotesk", "Aptos Display", "Segoe UI", sans-serif;
  --body: "Manrope", "Aptos", "Segoe UI", sans-serif;
  --radius: 22px;
  --col: clamp(96px, 7.6vw, 128px);
  --top: clamp(96px, 12vh, 120px);
  --gap: clamp(10px, 1.3vw, 18px);
  --pad: clamp(10px, 1.7vw, 26px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg-deep); color: var(--text); font: 400 1rem/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow: hidden; }
::selection { background: var(--accent); color: #081019; }
[hidden] { display: none !important; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }

/* ---------- night sky background ---------- */
.bg-aurora { position: fixed; inset: -4%; z-index: 0; background:
    linear-gradient(90deg, rgba(4, 9, 15, 0.92) 0%, rgba(4, 9, 15, 0.7) 40%, rgba(4, 9, 15, 0.25) 75%, rgba(4, 9, 15, 0.15) 100%),
    linear-gradient(180deg, rgba(4, 9, 15, 0.2), transparent 40%, rgba(4, 9, 15, 0.75) 100%),
    url('../../images/aurora-shimmer.png') center 40% / cover no-repeat,
    url('../../images/topper-hero.jpg') right 60% / cover no-repeat;
  background-blend-mode: normal, normal, screen, normal;
  filter: saturate(0.9) brightness(0.8);
}
@media (prefers-reduced-motion: no-preference) { .bg-aurora { animation: drift 30s ease-in-out infinite alternate; } }
@keyframes drift { from { transform: scale(1.02) translate3d(-0.6%, 0, 0); } to { transform: scale(1.06) translate3d(0.8%, -0.6%, 0); } }
.bg-stars { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; opacity: 0.75; pointer-events: none; }
.bg-glow { position: fixed; left: -260px; top: -260px; z-index: 0; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(97, 217, 213, 0.09), transparent 68%); transform: translate3d(var(--x, -999px), var(--y, -999px), 0); }
.bg-noise { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.035; mix-blend-mode: soft-light; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }

/* ---------- shell ---------- */
.shell {
  position: fixed; inset: 0; z-index: 1;
  display: grid;
  grid-template-columns: var(--col) minmax(0, 1fr);
  grid-template-rows: var(--top) minmax(0, 1fr);
  gap: var(--gap);
  padding: calc(var(--pad) + env(safe-area-inset-top, 0px)) max(var(--pad), env(safe-area-inset-right, 0px)) calc(var(--pad) + env(safe-area-inset-bottom, 0px)) max(var(--pad), env(safe-area-inset-left, 0px));
}
.glass, .logo, .topbar, .sidenav, .display { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35); }

/* ---------- logo ---------- */
.logo { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; cursor: pointer; overflow: hidden; color: var(--text); background: radial-gradient(120% 120% at 30% 20%, rgba(97, 217, 213, 0.16), transparent 60%), var(--panel); transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(.2, .8, .2, 1); }
.logo:hover { border-color: rgba(114, 199, 255, 0.6); box-shadow: 0 0 0 1px rgba(114, 199, 255, 0.1), 0 0 40px rgba(97, 217, 213, 0.18), 0 28px 80px rgba(0, 0, 0, 0.35); transform: translateY(-2px); }
.logo-mark { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; place-items: center; width: 54%; aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, 0.32); font: 700 clamp(1rem, 1.6vw, 1.45rem)/1 var(--display); letter-spacing: -0.06em; transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), border-color 0.3s ease; }
.logo-mark::before { content: ""; position: absolute; inset: 6%; border: 1px solid rgba(97, 217, 213, 0.45); transform: rotate(45deg) scale(0.7); transition: transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.logo-mark span { position: relative; }
.logo:hover .logo-mark::before { transform: rotate(225deg) scale(0.78); }
.logo:hover .logo-mark, .logo[aria-pressed="true"] .logo-mark { transform: translateY(-12%); border-color: var(--cyan); }
.logo-orbit { position: absolute; inset: 12%; z-index: 1; border-radius: 50%; border: 1px dashed rgba(163, 241, 237, 0.22); }
.logo-orbit i { position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
@media (prefers-reduced-motion: no-preference) { .logo-orbit { animation: orbit 9s linear infinite; } .logo:hover .logo-orbit { animation-duration: 2s; } }
@keyframes orbit { to { transform: rotate(360deg); } }
.logo-hint { position: absolute; left: 0; right: 0; bottom: 10%; z-index: 2; color: var(--cyan-soft); font: 800 0.62rem/1 var(--body); letter-spacing: 0.18em; text-transform: uppercase; text-align: center; opacity: 0; transform: translateY(6px); transition: opacity 0.25s ease, transform 0.25s ease; }
.logo:hover .logo-hint, .logo:focus-visible .logo-hint, .logo[aria-pressed="true"] .logo-hint { opacity: 1; transform: none; }
.logo[aria-pressed="true"] { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(97, 217, 213, 0.25), 0 0 46px rgba(97, 217, 213, 0.25); }

/* ---------- top bar ---------- */
.topbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 1fr 1fr; align-items: center; gap: 2px 16px; padding: 8px clamp(12px, 1.4vw, 20px); min-width: 0; }
.top-brand { display: flex; flex-direction: column; justify-content: center; padding-right: 18px; border-right: 1px solid var(--line); text-decoration: none; line-height: 1.2; white-space: nowrap; }
.top-brand strong { font: 600 1.02rem/1.1 var(--display); letter-spacing: -0.01em; }
.top-brand small { margin-top: 3px; color: var(--muted); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.top-brand:hover strong { color: var(--accent-soft); }
.areas, .cats { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.areas::-webkit-scrollbar, .cats::-webkit-scrollbar { display: none; }
.areas.overflow, .cats.overflow { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.areas.overflow.at-end, .cats.overflow.at-end { -webkit-mask-image: none; mask-image: none; }
.areas a { flex: none; position: relative; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em; text-decoration: none; color: rgba(243, 241, 232, 0.72); transition: color 0.2s ease, background 0.2s ease; }
.areas a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.areas a[aria-current="page"] { color: var(--bg); background: var(--accent); box-shadow: 0 8px 24px rgba(114, 199, 255, 0.25); }
.top-links { display: flex; gap: 8px; }
.top-links a { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; text-decoration: none; white-space: nowrap; color: rgba(243, 241, 232, 0.85); transition: border-color 0.2s ease, color 0.2s ease; }
.top-links a:hover { border-color: var(--cyan); color: var(--cyan-soft); }
.cats { grid-column: 1 / -1; gap: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.cat { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(7, 16, 25, 0.4); font-weight: 750; font-size: 0.76rem; color: var(--muted); text-decoration: none; white-space: nowrap; transition: all 0.2s ease; }
.cat:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.cat span { color: rgba(243, 241, 232, 0.4); font-variant-numeric: tabular-nums; }
.cat[aria-current="page"] { color: #071019; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 6px 20px rgba(97, 217, 213, 0.25); }
.cat[aria-current="page"] span { color: rgba(7, 16, 25, 0.6); }
.cat[aria-current="page"] .dot { box-shadow: 0 0 0 2px rgba(7, 16, 25, 0.5); }
.dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 10px color-mix(in srgb, var(--c, var(--accent)) 70%, transparent); }
[data-dot="ai"] { --c: #6ff0d0; } [data-dot="vr"] { --c: #7fa9ff; } [data-dot="ar"] { --c: #c49cff; }
[data-dot="video"] { --c: #ff6f81; } [data-dot="games"] { --c: #ff9a4d; } [data-dot="music"] { --c: #ff7fd0; }
[data-dot="gamification"] { --c: #ffd84d; } [data-dot="things"] { --c: #a6e86c; } [data-dot="awards"] { --c: #ffc75a; }
[data-dot="home"] { --c: #ffb547; } [data-dot="contact"] { --c: #ff7f9e; }

/* ---------- side bar ---------- */
.sidenav { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; min-height: 0; }
.side-head { margin: 12px 4px 2px; color: var(--cyan-soft); font: 800 0.58rem/1.35 var(--body); letter-spacing: 0.16em; text-transform: uppercase; }
.side-head:first-child { margin-top: 4px; }
.side-item { position: relative; display: grid; gap: 6px; width: 100%; padding: 6px; border: 1px solid transparent; border-radius: 14px; background: transparent; color: rgba(243, 241, 232, 0.8); text-align: left; text-decoration: none; cursor: pointer; font: 700 0.72rem/1.3 var(--body); transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.side-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); transform: translateX(2px); }
.side-item[aria-current="true"] { border-color: rgba(97, 217, 213, 0.5); background: linear-gradient(180deg, rgba(97, 217, 213, 0.14), rgba(97, 217, 213, 0.04)); color: var(--text); box-shadow: 0 0 24px rgba(97, 217, 213, 0.12); }
.side-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: #0a1520; border: 1px solid var(--line); }
.side-thumb img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) brightness(0.8); transition: filter 0.3s ease, transform 0.5s cubic-bezier(.2, .8, .2, 1); }
.side-item:hover .side-thumb img, .side-item[aria-current="true"] .side-thumb img { filter: saturate(1.05) brightness(1); transform: scale(1.06); }
.side-thumb .ph { position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c, var(--accent)) 45%, transparent), transparent 70%), #0d1b27; }
.side-num { position: absolute; z-index: 1; top: 5px; left: 5px; padding: 2px 6px; border-radius: 999px; background: rgba(4, 9, 15, 0.72); border: 1px solid rgba(255, 255, 255, 0.18); color: var(--cream); font-size: 0.55rem; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.side-label { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; }
.side-row { display: flex; align-items: flex-start; gap: 7px; }
.side-row .dot { margin-top: 4px; }
.side-count { display: block; margin-top: 2px; color: var(--muted); font-weight: 600; font-size: 0.66rem; font-variant-numeric: tabular-nums; }
.side-btn { margin-top: 8px; padding: 9px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(5, 12, 18, 0.46); color: var(--text); font: 800 0.66rem/1.2 var(--body); letter-spacing: 0.04em; cursor: pointer; text-align: center; text-decoration: none; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.side-btn:hover { border-color: var(--cyan); color: var(--cyan-soft); }
.side-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.side-btn.primary:hover { background: var(--accent-hover); color: var(--bg); }

/* ---------- display window ---------- */
.display { position: relative; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; background: rgba(7, 16, 25, 0.66); }
.display:focus { outline: none; }
.display.is-planet { overflow: hidden; border-color: rgba(97, 217, 213, 0.4); }
.view { padding: clamp(20px, 3.2vw, 48px); max-width: 1400px; }
.view.enter { animation: view-in 0.4s cubic-bezier(.2, .8, .2, 1); }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } }
.planet-frame { position: absolute; inset: 0; background: #0d0b24; border-radius: inherit; overflow: hidden; }
.planet-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--cyan-soft); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--cyan); box-shadow: 0 0 12px rgba(97, 217, 213, 0.7); }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 18px; }
.chip-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(7, 16, 25, 0.48); color: var(--muted); font-size: 0.72rem; font-weight: 800; text-decoration: none; letter-spacing: 0.04em; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.chip-link:hover { color: var(--text); border-color: rgba(114, 199, 255, 0.5); background: rgba(114, 199, 255, 0.06); }
.view-head { display: grid; gap: 12px; margin-bottom: clamp(24px, 3vw, 36px); padding-bottom: clamp(20px, 2.5vw, 30px); border-bottom: 1px solid var(--line); }
.view-head h1 { display: flex; align-items: center; gap: 16px; margin: 0; font: 600 clamp(2.2rem, 4.6vw, 4.2rem)/1 var(--display); letter-spacing: -0.045em; }
.view-head h1 .dot { width: 14px; height: 14px; }
.view-head p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.7; max-width: 66ch; }
.view h2 { margin: 0 0 18px; font: 600 clamp(1.5rem, 2.4vw, 2.1rem)/1.05 var(--display); letter-spacing: -0.035em; }
.view section + section { margin-top: clamp(40px, 5vw, 64px); }
em { font-style: normal; color: var(--accent-soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 50px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.025em; text-decoration: none; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.btn:hover svg { transform: translate(2px, -2px); }
.btn-primary { background: var(--accent); color: #0a1020; box-shadow: 0 12px 34px rgba(114, 199, 255, 0.22); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 16px 40px rgba(114, 199, 255, 0.32); }
.btn-ghost { background: rgba(5, 12, 18, 0.46); color: var(--text); border-color: rgba(255, 255, 255, 0.2); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions.link-stack { flex-direction: column; flex-wrap: nowrap; align-items: stretch; width: min(100%, 300px); }
.actions.link-stack .btn { width: 100%; justify-content: space-between; }

/* Home */
.hero { position: relative; display: grid; gap: 0; margin-bottom: clamp(36px, 5vw, 60px); }
.hero h1 { margin: 0; font: 600 clamp(2.6rem, 5.6vw, 5.4rem)/0.98 var(--display); letter-spacing: -0.055em; max-width: 13ch; }
.hero-lede { margin: 26px 0 0; max-width: 62ch; font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.7; color: rgba(243, 241, 232, 0.76); }
.hero .actions { margin-top: 30px; }
.hero-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 40px; max-width: 760px; }
.hero-meta div { display: flex; gap: 12px; align-items: flex-start; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.17); }
.hero-meta strong { font: 600 1.35rem/1 var(--display); color: var(--cream); }
.hero-meta span { font-size: 0.62rem; line-height: 1.5; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(243, 241, 232, 0.54); }
@media (max-width: 640px) { .hero-meta { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.tile { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(17, 31, 44, 0.86), rgba(10, 21, 31, 0.94)); text-decoration: none; transition: transform 0.32s cubic-bezier(.2, .8, .2, 1), border-color 0.3s ease, box-shadow 0.3s ease; }
.tile:hover { transform: translateY(-5px); border-color: rgba(114, 199, 255, 0.58); box-shadow: 0 28px 74px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(114, 199, 255, 0.07); }
.tile-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #06111a; }
.tile-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.84) contrast(1.05) brightness(0.76); transition: transform 0.75s cubic-bezier(.2, .8, .2, 1), filter 0.4s ease; }
.tile:hover .tile-media img { transform: scale(1.055); filter: saturate(1) contrast(1.07) brightness(0.91); }
.tile-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 8, 13, 0.02) 25%, rgba(3, 8, 13, 0.74) 100%); }
.pill { position: absolute; z-index: 1; left: 14px; top: 14px; padding: 6px 9px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; background: rgba(3, 9, 14, 0.64); backdrop-filter: blur(10px); color: var(--cream); font-size: 0.56rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.arrow { position: absolute; z-index: 1; right: 14px; top: 14px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(3, 9, 14, 0.7); backdrop-filter: blur(10px); transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease; }
.arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile:hover .arrow, .card:hover .arrow, .card.hl .arrow { background: var(--accent); color: var(--bg); transform: rotate(8deg); border-color: var(--accent); }
.tile-copy { display: block; padding: 18px 20px 20px; }
.tile-copy strong { display: flex; align-items: center; gap: 10px; font: 600 clamp(1.3rem, 1.8vw, 1.7rem)/1.05 var(--display); letter-spacing: -0.035em; }
.tile-copy span { display: block; margin-top: 8px; color: var(--muted); font-size: 0.8rem; line-height: 1.6; }

.planet-tile { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; width: 100%; margin-top: 18px; padding: 22px 26px; border: 1px solid rgba(97, 217, 213, 0.3); border-radius: var(--radius); background: radial-gradient(80% 140% at 0% 50%, rgba(97, 217, 213, 0.14), transparent 60%), linear-gradient(180deg, rgba(17, 31, 44, 0.86), rgba(10, 21, 31, 0.94)); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), border-color 0.3s ease, box-shadow 0.3s ease; }
.planet-tile:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: 0 0 50px rgba(97, 217, 213, 0.16); }
.planet-tile .mini { position: relative; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #9ce6a5 0 18%, #5fae72 40%, #3c6fd0 75%); box-shadow: inset -8px -8px 16px rgba(0, 0, 0, 0.5), 0 0 30px rgba(97, 217, 213, 0.35); }
.planet-tile .mini::after { content: ""; position: absolute; inset: 24px -10px; border: 2px solid rgba(163, 241, 237, 0.7); border-radius: 50%; transform: rotate(-18deg); border-top-color: transparent; }
.planet-tile strong { display: block; font: 600 1.35rem/1.1 var(--display); letter-spacing: -0.03em; }
.planet-tile span span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.85rem; }

/* Project cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.group + .group { margin-top: clamp(36px, 4.5vw, 54px); }
.group-h { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font: 600 clamp(1.3rem, 2vw, 1.7rem)/1.1 var(--display); letter-spacing: -0.035em; }
.group-h a { text-decoration: none; }
.group-h a:hover { color: var(--accent-soft); }
.group-h small { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; font: 800 0.6rem/1 var(--body); letter-spacing: 0.1em; color: var(--muted); }
.card { --mx: 50%; --my: 0%; position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(17, 31, 44, 0.84), rgba(10, 21, 31, 0.9)); text-decoration: none; transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), border-color 0.3s ease, box-shadow 0.3s ease; transform-style: preserve-3d; }
.card::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; opacity: 0; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(163, 241, 237, 0.12), transparent 45%); transition: opacity 0.3s ease; }
.card:hover::before, .card.hl::before { opacity: 1; }
.card:hover, .card.hl { border-color: rgba(97, 217, 213, 0.55); box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(97, 217, 213, 0.06), 0 0 40px rgba(97, 217, 213, 0.08); }
.card.hl { transform: translateY(-4px); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; max-width: 100%; overflow: hidden; background: #0a1520; }
.card-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.04) brightness(0.82); transition: transform 0.7s cubic-bezier(.2, .8, .2, 1), filter 0.4s ease; }
.card:hover .card-media img, .card.hl .card-media img { transform: scale(1.06); filter: saturate(1) contrast(1.06) brightness(0.97); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(4, 9, 15, 0.62)); }
.ph-card { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; text-align: center; font: 600 1.15rem/1.15 var(--display); letter-spacing: -0.02em; color: rgba(243, 241, 232, 0.85); background: radial-gradient(70% 90% at 30% 20%, color-mix(in srgb, var(--c, var(--accent)) 35%, transparent), transparent 70%), radial-gradient(60% 80% at 90% 100%, rgba(97, 217, 213, 0.18), transparent 70%), #0b1824; }
.badges { position: absolute; z-index: 1; left: 14px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; background: rgba(4, 9, 15, 0.7); backdrop-filter: blur(10px); color: var(--cream); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.badge svg { width: 9px; height: 9px; fill: currentColor; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.card-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--cyan-soft); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.card-meta time { color: var(--muted); }
.card-title { font: 600 clamp(1.25rem, 1.6vw, 1.55rem)/1.08 var(--display); letter-spacing: -0.035em; color: var(--text); }
.card-sum { margin-top: 10px; color: var(--muted); font-size: 0.82rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 14px; }
.tag-row span { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: rgba(243, 241, 232, 0.68); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.03em; }

/* Project detail */
.detail-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.pager { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.pager a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(5, 12, 18, 0.46); text-decoration: none; color: var(--text); transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.pager a:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: scale(1.06); }
.pager svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.detail { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(22px, 3vw, 44px); align-items: start; }
.detail-media { position: relative; aspect-ratio: 16 / 10; max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #06111a; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); }
.detail-media img, .detail-media video, .detail-media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.detail-media video { object-fit: contain; background: #000; }
.media-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; font: 600 1.5rem/1.15 var(--display); background: radial-gradient(70% 90% at 30% 20%, color-mix(in srgb, var(--c, var(--accent)) 35%, transparent), transparent 70%), #0b1824; }
.detail-text { display: grid; gap: 14px; align-content: start; }
.detail-cat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; color: var(--cyan-soft); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.detail-cat .sep { color: var(--muted); }
.detail-text h1 { margin: 0; font: 600 clamp(2rem, 3.6vw, 3.2rem)/1 var(--display); letter-spacing: -0.045em; }
.detail-sum { margin: 0; font-size: 1.08rem; line-height: 1.6; color: var(--cream); }
.detail-desc { margin: 0; color: var(--muted); line-height: 1.75; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: rgba(243, 241, 232, 0.72); font-size: 0.68rem; font-weight: 700; }
.detail .actions { margin-top: 6px; }
@media (max-width: 1080px) { .detail { grid-template-columns: 1fr; } }

/* About, experience, recognition */
.about { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(22px, 4vw, 56px); align-items: center; }
.portrait { position: relative; margin: 0; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); filter: saturate(0.9) contrast(1.05); }
.portrait::after { content: ""; position: absolute; inset: auto -8% -8% auto; width: 60%; height: 50%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(97, 217, 213, 0.25), transparent 70%); }
.portrait figcaption { position: absolute; left: 14px; bottom: 14px; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 14px; background: rgba(4, 9, 15, 0.7); backdrop-filter: blur(10px); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream); line-height: 1.5; }
.about h1 { margin: 0 0 20px; font: 600 clamp(2.2rem, 4.4vw, 4rem)/1 var(--display); letter-spacing: -0.05em; }
.about p { margin: 0 0 16px; color: var(--muted); line-height: 1.75; max-width: 64ch; }
.about .lede { font-size: 1.15rem; color: var(--text); }
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.cap { position: relative; overflow: hidden; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7, 16, 25, 0.55); transition: border-color 0.25s ease, transform 0.25s ease; }
.cap::before { content: ""; position: absolute; width: 180px; height: 180px; right: -75px; top: -75px; border-radius: 50%; background: radial-gradient(circle, rgba(97, 217, 213, 0.12), transparent 68%); }
.cap:hover { transform: translateY(-4px); border-color: rgba(114, 199, 255, 0.52); }
.cap-icon { width: 54px; height: 54px; margin-bottom: 26px; display: grid; place-items: center; border: 1px solid rgba(97, 217, 213, 0.35); border-radius: 16px; color: var(--cyan); background: rgba(97, 217, 213, 0.04); }
.cap-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cap h3 { margin: 0 0 10px; font: 600 1.4rem/1.1 var(--display); letter-spacing: -0.03em; }
.cap p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.7; }
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.dl div { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--line); }
.dl dt { margin-bottom: 6px; color: var(--cyan-soft); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.dl dd { margin: 0; color: rgba(243, 241, 232, 0.82); font-size: 0.9rem; line-height: 1.6; }
.dl a { color: var(--accent-soft); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .portrait { max-width: 320px; } }
.timeline { position: relative; list-style: none; margin: 0; padding: 0; max-width: 62rem; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--cyan), rgba(97, 217, 213, 0.05)); }
.timeline li { position: relative; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; padding: 0 0 40px 46px; scroll-margin-top: 20px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--cyan); background: var(--bg); box-shadow: 0 0 16px rgba(97, 217, 213, 0.6); }
.t-date { margin: 0; color: var(--cyan-soft); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.timeline h3 { margin: 0; font: 600 1.4rem/1.15 var(--display); letter-spacing: -0.03em; }
.t-co { margin: 4px 0 10px; color: var(--cream); font-size: 0.85rem; font-weight: 700; }
.timeline p:last-child { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.7; }
@media (max-width: 760px) { .timeline li { grid-template-columns: 1fr; gap: 6px; padding-left: 36px; } }
.rec-list { list-style: none; margin: -12px 0 36px; padding: 0; }
.rec-list li { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 26px; padding: 22px 0; border-bottom: 1px solid var(--line); transition: background 0.2s ease, padding 0.2s ease; }
.rec-list li:hover { background: rgba(255, 255, 255, 0.02); padding-inline: 12px; }
.rec-list h3 { margin: 0; font: 600 1.25rem/1.15 var(--display); letter-spacing: -0.03em; }
.rec-list p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.7; }
@media (max-width: 760px) { .rec-list li { grid-template-columns: 1fr; gap: 6px; } }
.anchor { scroll-margin-top: 20px; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 4vw, 56px); align-items: start; }
.contact h1 { margin: 0 0 18px; font: 600 clamp(2rem, 3.8vw, 3.4rem)/1.02 var(--display); letter-spacing: -0.05em; }
.contact-copy > p { color: var(--muted); line-height: 1.75; max-width: 54ch; }
.form { display: grid; gap: 14px; padding: clamp(18px, 2.4vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(17, 31, 44, 0.84), rgba(10, 21, 31, 0.9)); }
.form label { display: grid; gap: 7px; color: var(--cyan-soft); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.form input, .form textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 9, 15, 0.6); color: var(--text); font: 500 0.95rem/1.5 var(--body); letter-spacing: 0; text-transform: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.form input::placeholder, .form textarea::placeholder { color: rgba(158, 170, 180, 0.6); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(97, 217, 213, 0.15); }
.form .btn { justify-self: start; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.honeypot { position: absolute !important; left: -9999px !important; }
.form-status { margin: 0; color: var(--cyan-soft); font-size: 0.9rem; }
.form-status.error { color: #ffb8b8; }
.direct { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.direct li { display: grid; grid-template-columns: 7rem 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.direct span { color: var(--cyan-soft); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding-top: 3px; }
.direct div { color: var(--text); }
.direct a { color: var(--text); overflow-wrap: anywhere; text-underline-offset: 3px; }
.direct a:hover { color: var(--accent-soft); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } .direct li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- small screens: logo + top bar, side bar becomes a strip, display fills the rest ---------- */
@media (max-width: 760px) {
  :root { --col: 72px; --gap: 8px; --pad: 8px; --radius: 16px; }
  .shell { grid-template-columns: var(--col) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .logo { height: auto; min-height: 72px; }
  .topbar { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; padding: 6px 8px; }
  .top-brand { display: none; }
  .side-title { display: none; }
  .top-links { display: none; }
  .areas a { padding: 7px 11px; }
  .sidenav { grid-column: 1 / -1; flex-direction: row; align-items: stretch; gap: 6px; padding: 6px; overflow-x: auto; overflow-y: hidden; max-height: 118px; }
  .side-head { display: none; }
  .side-item { flex: none; width: 116px; align-content: start; }
  .side-item:hover { transform: none; }
  .side-label { -webkit-line-clamp: 2; }
  .side-btn { flex: none; margin: 0; width: 104px; align-self: center; }
  .display { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
.view-head .kicker { margin: 0; font-size: 0.68rem; line-height: 1.6; color: var(--cyan-soft); }


/* ---------- design pass: structure inside the panels ---------- */
.side-title { flex-wrap: wrap; position: sticky; top: -10px; z-index: 2; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin: -10px -8px 4px; padding: 14px 12px 10px; background: linear-gradient(180deg, rgba(10, 21, 31, 0.98) 70%, rgba(10, 21, 31, 0)); }
.side-title strong { font: 600 0.92rem/1.15 var(--display); letter-spacing: -0.02em; min-width: 0; }
.side-title span { flex: none; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--cyan-soft); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.sec-head h2, .sec-head .group-h { margin: 0; }
.sec-head .kicker { margin-bottom: 12px; }
.chip-link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Home hero with the featured reel */
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); align-items: center; gap: clamp(24px, 3.5vw, 56px); }
.hero h1 { font-size: clamp(2.4rem, 4.3vw, 4.6rem); max-width: 12ch; }
.hero-lede { font-size: clamp(0.98rem, 1.15vw, 1.1rem); }
.reel { display: grid; gap: 10px; min-width: 0; }
.reel-stage { position: relative; aspect-ratio: 4 / 3.2; max-width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: #06111a; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(97, 217, 213, 0.05); }
.reel-stage::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.reel-slide { position: absolute; inset: 0; display: block; opacity: 0; transform: scale(1.03); transition: opacity 0.8s ease, transform 1.2s cubic-bezier(.2, .8, .2, 1); text-decoration: none; }
.reel-slide.on { opacity: 1; transform: none; z-index: 1; }
.reel-slide img, .reel-slide video { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92) contrast(1.05) brightness(0.86); }
.reel-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 9, 15, 0.1) 30%, rgba(4, 9, 15, 0.92) 100%); }
@media (prefers-reduced-motion: no-preference) { .reel-slide.on img { animation: kenburns 9s ease-out both; } }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.reel-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; gap: 8px; padding: clamp(18px, 2.4vw, 28px); }
.reel-label { display: flex; align-items: center; gap: 8px; color: var(--cyan-soft); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.reel-cap strong { font: 600 clamp(1.5rem, 2.6vw, 2.4rem)/1 var(--display); letter-spacing: -0.045em; color: var(--text); }
.reel-sum { max-width: 46ch; color: rgba(243, 241, 232, 0.75); font-size: 0.86rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reel-slide .arrow { z-index: 2; }
.reel-slide:hover .arrow { background: var(--accent); color: var(--bg); border-color: var(--accent); transform: rotate(8deg); }
.reel-badge { position: absolute; z-index: 3; left: 16px; top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; background: rgba(3, 9, 14, 0.66); backdrop-filter: blur(10px); color: var(--cream); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.reel-badge #reel-count { color: var(--muted); }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
@media (prefers-reduced-motion: no-preference) { .live { animation: pulse 2s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: 0.35; } }
.reel-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.reel-tab { position: relative; min-width: 0; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 16, 25, 0.5); color: var(--muted); text-align: left; cursor: pointer; overflow: hidden; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.02em; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.reel-tab span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel-tab:hover { color: var(--text); border-color: var(--line-strong); }
.reel-tab[aria-selected="true"] { color: var(--text); border-color: rgba(97, 217, 213, 0.5); background: rgba(97, 217, 213, 0.08); }
.reel-tab i { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.reel-tab i::after { content: ""; position: absolute; inset: 0; background: var(--cyan); transform: scaleX(0); transform-origin: left; }
.reel-tab[aria-selected="true"] i::after { transform: scaleX(1); }
.reel-tab.run i::after { animation: reel-fill 7s linear both; }
.reel.paused .reel-tab.run i::after { animation-play-state: paused; }
@keyframes reel-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 1180px) { .hero { grid-template-columns: 1fr; } .hero h1 { max-width: 16ch; } .reel-stage { aspect-ratio: 16 / 9; } }

/* Bento grids: the lead card spans two columns and lays out side by side */
.grid { container-type: inline-size; }
.bento { grid-auto-flow: dense; }
@container (min-width: 760px) {
  .card.wide { grid-column: span 2; flex-direction: row; }
  .card.wide .card-media { flex: 1.25 1 0; aspect-ratio: auto; min-height: 300px; }
  .card.wide .card-body { flex: 1 1 0; justify-content: center; padding: clamp(22px, 2.6vw, 34px); }
  .card.wide .card-title { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
  .card.wide .card-sum { -webkit-line-clamp: 5; font-size: 0.9rem; }
  .card.wide .tag-row { margin-top: 18px; }
}

/* Category header: title left, description and counts right */
.cat-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 18px clamp(24px, 4vw, 60px); margin-bottom: clamp(26px, 3vw, 40px); padding-bottom: clamp(22px, 2.6vw, 32px); border-bottom: 1px solid var(--line); }
.cat-title .crumb { margin-bottom: 18px; gap: 16px; }
.cat-title .crumb .kicker { margin: 0; }
.cat-title h1 { display: block; margin: 0; font: 600 clamp(2.3rem, 4.6vw, 4.4rem)/0.98 var(--display); letter-spacing: -0.05em; }
.cat-title h1 .dot { width: 14px; height: 14px; margin-right: 16px; vertical-align: 0.28em; }
.cat-side p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.75; max-width: 58ch; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 20px 0 0; padding: 0; list-style: none; }
.stat-row li { display: flex; align-items: baseline; gap: 8px; }
.stat-row strong { font: 600 1.4rem/1 var(--display); color: var(--cream); font-variant-numeric: tabular-nums; }
.stat-row span { color: rgba(243, 241, 232, 0.54); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
@media (max-width: 1000px) { .cat-head { grid-template-columns: 1fr; } }

.more { margin-top: clamp(40px, 5vw, 60px); padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--line); }

/* Closing strip at the bottom of every view */
.view-foot { margin-top: clamp(48px, 6vw, 80px); }
.foot-cta { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 32px; padding: clamp(24px, 3vw, 40px); overflow: hidden; border: 1px solid rgba(97, 217, 213, 0.22); border-radius: calc(var(--radius) + 4px); background: radial-gradient(60% 140% at 100% 0%, rgba(114, 199, 255, 0.16), transparent 60%), radial-gradient(50% 120% at 0% 100%, rgba(97, 217, 213, 0.12), transparent 60%), linear-gradient(180deg, rgba(17, 31, 44, 0.86), rgba(10, 21, 31, 0.94)); }
.foot-cta h2 { margin: 0; max-width: 18ch; }
.foot-cta .kicker { margin-bottom: 12px; }
.foot-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 18px; padding: 0 4px; color: rgba(243, 241, 232, 0.45); font-size: 0.72rem; font-weight: 600; }
.foot-line a { color: rgba(243, 241, 232, 0.65); margin-left: 12px; text-decoration: none; }
.foot-line a:hover { color: var(--cyan-soft); }

@media (max-width: 760px) {
  .side-title { display: none; }
  .sidenav { max-height: 136px; }
  .side-count { display: none; }
  .cat-title .crumb { gap: 10px; }
  .foot-cta { padding: 20px; }
}

/* Home opens straight on the featured reel */
.hero.solo { grid-template-columns: 1fr; }
.hero.solo .reel-stage { aspect-ratio: 2.35 / 1; }
.hero.solo .reel-cap strong { font-size: clamp(1.8rem, 3.4vw, 3.2rem); }
.hero.solo .reel-sum { max-width: 60ch; font-size: 0.95rem; }
@media (max-width: 1180px) { .hero.solo .reel-stage { aspect-ratio: 16 / 9; } }
@media (max-width: 600px) { .hero.solo .reel-stage { aspect-ratio: 4 / 3.4; } }

/* Side bar slides away on Home and the display window grows to fill its space */
.sidenav { position: relative; z-index: 0; visibility: visible; transition: transform 0.65s cubic-bezier(.65, 0, .35, 1), opacity 0.5s ease, visibility 0s; }
.display { z-index: 1; margin-left: 0; transition: margin-left 0.65s cubic-bezier(.65, 0, .35, 1), border-color 0.3s ease; }
.shell.no-side .sidenav { transform: translateX(calc(-100% - var(--pad) - 60px)); opacity: 0; visibility: hidden; pointer-events: none; transition: transform 0.65s cubic-bezier(.65, 0, .35, 1), opacity 0.5s ease 0.1s, visibility 0s linear 0.65s; }
.shell.no-side .display { margin-left: calc(-1 * (var(--col) + var(--gap))); }
.shell.no-anim .sidenav, .shell.no-anim .display { transition: none !important; }
@media (max-width: 760px) {
  .sidenav { transition: max-height 0.55s cubic-bezier(.65, 0, .35, 1), padding 0.55s cubic-bezier(.65, 0, .35, 1), margin 0.55s cubic-bezier(.65, 0, .35, 1), transform 0.55s cubic-bezier(.65, 0, .35, 1), opacity 0.4s ease, border-width 0.55s, visibility 0s; }
  .shell.no-side .sidenav { max-height: 0; padding-block: 0; border-width: 0; margin-top: calc(-1 * var(--gap)); transform: translateX(-110%); }
  .shell.no-side .display { margin-left: 0; }
}
@media (max-width: 760px) {
  .shell.no-side .sidenav { transition: max-height 0.55s cubic-bezier(.65, 0, .35, 1), padding 0.55s cubic-bezier(.65, 0, .35, 1), margin 0.55s cubic-bezier(.65, 0, .35, 1), transform 0.55s cubic-bezier(.65, 0, .35, 1), opacity 0.4s ease, border-width 0.55s, visibility 0s linear 0.55s; }
}

/* Horizontal project rails with arrow navigators (Work page) */
.rail { position: relative; margin: 0 -6px; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 20px) / 4); gap: 20px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: 6px; padding: 10px 6px 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > .card { scroll-snap-align: start; }
.rail.fade-r .rail-track { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 70px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 70px), transparent); }
.rail.fade-l .rail-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 70px); mask-image: linear-gradient(90deg, transparent, #000 70px); }
.rail.fade-l.fade-r .rail-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 70px, #000 calc(100% - 70px), transparent); mask-image: linear-gradient(90deg, transparent, #000 70px, #000 calc(100% - 70px), transparent); }
.rail-btn { position: absolute; z-index: 4; top: calc(10px + (100% - 26px) * 0.24); width: 52px; height: 52px; margin-top: -26px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 50%; background: rgba(4, 9, 15, 0.78); backdrop-filter: blur(12px); color: var(--text); cursor: pointer; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); transition: opacity 0.25s ease, transform 0.25s cubic-bezier(.2, .8, .2, 1), background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.rail-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rail-btn.prev { left: -8px; }
.rail-btn.next { right: -8px; }
.rail-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: scale(1.08); box-shadow: 0 14px 40px rgba(114, 199, 255, 0.3); }
.rail-btn.off { opacity: 0; pointer-events: none; transform: scale(0.8); }
@media (max-width: 1280px) { .rail-track { grid-auto-columns: calc((100% - 2 * 20px) / 3); } }
@media (max-width: 960px) { .rail-track { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (max-width: 600px) { .rail-track { grid-auto-columns: 82%; gap: 14px; } .rail-btn { width: 42px; height: 42px; margin-top: -21px; } .rail-btn.prev { left: 0; } .rail-btn.next { right: 0; } }