/* ---------- Tokens ---------- */
/* Instagram's dark palette (colours only; no logo, glyphs or icons) */
:root {
  --bg: #000000;
  --surface: #262626;
  --surface-2: #363636;
  --text: #F5F5F5;
  --muted: #A8A8A8;
  --line: #262626;
  --accent: #0095F6;          /* primary button blue */
  --accent-hover: #1877F2;
  --accent-text: #FFFFFF;
  --link: #E0F1FF;
  --heart: #FF3040;
  --ring: #FEDA75, #FA7E1E, #D62976, #962FBF, #4F5BD5;  /* story ring stops */
  --focus: #0095F6;
  --overlay: rgba(0, 0, 0, .65);

  --radius: 8px;
  --radius-lg: 12px;
  --content: 935px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;   /* dark only */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; left: 12px; top: -40px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: 8px;
  background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: filter .15s;
}
.btn:hover { filter: brightness(.95); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); filter: none; }
.btn-block { width: 100%; height: 44px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.icon-btn:hover { background: var(--surface-2); }
.link { color: var(--link); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Logo: "ANKIT / KUMAR" lettermark, drawn in the current text colour */
.wordmark { display: block; color: var(--text); text-decoration: none; line-height: 0; }
.wordmark .logo { display: block; height: 30px; width: auto; fill: currentColor; stroke: none; }   /* solid, not the outline icon style */


/* ---------- Navigation ---------- */
/* Desktop: slim icon rail, like Instagram's web sidebar */
:root { --sidebar: 72px; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 9; width: var(--sidebar);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 26px 0 20px; border-right: 1px solid var(--line); background: var(--bg);
}
.sidebar .wordmark .logo { width: 52px; height: auto; }
.sidebar ul { display: flex; flex-direction: column; gap: 8px; }
.sidebar::after { content: ""; height: 30px; }   /* balances the logo so the nav stays centred */
.nav-item {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 16px;
  width: 48px; height: 48px; border-radius: 10px; text-decoration: none; font-size: 15px;
  transition: background .15s, transform .15s;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item svg { transition: transform .15s; }
.nav-item:hover svg { transform: scale(1.06); }
.nav-item:active { transform: scale(.94); }
.nav-item[aria-current="true"] svg { stroke-width: 2.6; }
/* Labels stay readable to screen readers; a tooltip shows them on hover */
.sidebar .nav-item span {
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  padding: 6px 10px; border-radius: 8px; background: var(--text); color: var(--bg);
  font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.sidebar .nav-item:hover span, .sidebar .nav-item:focus-visible span { opacity: 1; }

.topbar, .bottombar { display: none; }

/* Content is centred in the space right of the rail */
main { margin-left: var(--sidebar); padding: 30px 20px 80px; }
main > * { max-width: 935px; margin-inline: auto; }
.profile-head { width: fit-content; max-width: 735px; }
.highlights { max-width: 735px; }

/* Mobile: top bar + bottom bar */
@media (max-width: 767px) {
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 10; height: 56px; padding: 0 8px 0 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .bottombar {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 10;
    background: var(--bg); border-top: 1px solid var(--line);
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  }
  .bottombar .nav-item { flex-direction: column; gap: 2px; width: auto; height: auto; flex: 1; padding: 6px; font-size: 11px; }
  .bottombar .nav-item span { display: block; }
  main { margin-left: 0; padding: 20px 0 96px; }
}

/* ---------- Profile header ---------- */
.profile {
  display: grid; grid-template-columns: auto 1fr; gap: 0 64px; align-items: center;
  margin-top: 28px; margin-bottom: 28px;
}
/* Story ring: always the rotating gradient */
@property --ring-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.avatar-wrap { position: relative; justify-self: start; }
.avatar {
  position: relative; display: block;
  width: 162px; height: 162px; border-radius: 50%; padding: 4px;
  background: conic-gradient(from var(--ring-a), #FEDA75, #FA7E1E, #D62976, #962FBF, #4F5BD5, #D62976, #FEDA75);
  animation: ring-spin 6s linear infinite;
  transition: transform .3s cubic-bezier(.3, 1.4, .5, 1);
}
.avatar:hover { transform: scale(1.03); }
.avatar:active { transform: scale(.97); }
@keyframes ring-spin { to { --ring-a: 360deg; } }
.avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 4px solid var(--bg); background: var(--surface-2);
}
.avatar-play {
  position: absolute; right: 8px; bottom: 8px;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); border: 3px solid var(--bg);
}
.avatar-play svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }


/* Compact header once the profile scrolls away */
.mini-head { position: sticky; top: 0; z-index: 8; height: 0; }
.mini-inner {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0 -14px;
  border-radius: 0 0 14px 14px; background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-110%); opacity: 0; pointer-events: none;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}
.mini-head.show .mini-inner { transform: none; opacity: 1; pointer-events: auto; }
.mini-inner img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #D62976; }
.mini-inner div { flex: 1; display: flex; flex-direction: column; font-size: 14px; line-height: 1.25; }
.mini-inner span { color: var(--muted); font-size: 12.5px; }
.mini-inner .btn { height: 32px; }
@media (max-width: 767px) {
  .mini-head { top: 56px; }
  .mini-inner { margin: 0; border-radius: 0; padding: 8px 16px; }
}

.profile { position: relative; }

.profile-info { display: flex; flex-direction: column; gap: 4px; }
.name-row { display: flex; align-items: center; gap: 12px; }
.name-row h1 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.subtitle { font-size: 13px; letter-spacing: .28em; text-transform: uppercase; margin-bottom: 14px; }
.stats { display: flex; gap: 22px; font-size: 15.5px; margin-bottom: 14px; }
.stats strong { font-weight: 700; font-size: 19px; letter-spacing: -.01em; }   /* numbers a step above the labels */
.bio { display: flex; flex-direction: column; gap: 1px; font-size: 14.5px; max-width: 60ch; }

/* Two wide buttons under the header, like "Edit profile / View archive" */
.profile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 36px; }
.profile-actions .btn { height: 35px; border-radius: 8px; font-size: 13.5px; }

@media (max-width: 767px) {
  .profile { grid-template-columns: auto 1fr; gap: 0 20px; padding: 0 16px; margin-top: 24px; margin-bottom: 16px; align-items: center; }
  .avatar { width: 92px; height: 92px; padding: 3px; }
  .avatar img { border-width: 3px; }
  .avatar-play { width: 26px; height: 26px; right: 0; bottom: 0; border-width: 2px; }
  .avatar-play svg { width: 11px; height: 11px; }
  .profile-info { display: contents; }
  .name-row, .subtitle, .stats { grid-column: 2; }
  .avatar-wrap { grid-row: 1 / span 3; }
  .name-row h1 { font-size: 19px; }
  .subtitle { font-size: 11px; letter-spacing: .22em; margin-bottom: 8px; }
  .stats { justify-content: space-between; gap: 8px; font-size: 12.5px; margin-bottom: 0; color: var(--text); }
  .stats li { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
  .stats strong { font-size: 17.5px; }
  .bio { grid-column: 1 / -1; margin-top: 14px; font-size: 14px; }
  .profile-actions { margin: 0 16px 20px; }
  .profile-head { width: auto; }
  .profile-actions .btn { height: 32px; font-size: 13px; border-radius: 8px; }
}

/* ---------- Highlights ---------- */
.highlights { margin-bottom: 44px; }
.highlights ol {
  display: flex; gap: 28px; padding: 4px 4px 6px; margin-inline: -4px;  /* room for the hover zoom */
  overflow-x: auto; scrollbar-width: none;
}
.highlights ol::-webkit-scrollbar { display: none; }
.highlight { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 87px; }
.hl-ring { display: block; width: 87px; height: 87px; padding: 3px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); }
.hl-img {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: var(--hl); color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  background-size: cover; background-position: center;
}
.hl-img { background-image: radial-gradient(circle at 30% 22%, rgba(255,255,255,.35), transparent 55%), linear-gradient(160deg, var(--hl), color-mix(in srgb, var(--hl) 55%, #000)); }
.hl-ring { transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), border-color .2s; }
.highlight:hover .hl-ring { border-color: var(--muted); transform: scale(1.05); }
.highlight:active .hl-ring { transform: scale(.95); }
.hl-label { font-size: 12.5px; font-weight: 600; }
.hl-tenure { margin-top: -8px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

@media (max-width: 767px) {
  .highlights { margin-bottom: 8px; }
  .highlights ol { gap: 14px; padding: 0 16px 8px; margin-inline: 0; }
  .highlight { width: 66px; gap: 6px; }
  .hl-ring { width: 66px; height: 66px; }
  .hl-img { font-size: 14px; }
  .hl-label { font-size: 11.5px; }
  .hl-tenure { margin-top: -5px; font-size: 10.5px; }
}

/* ---------- Tabs ---------- */
/* Spread evenly, active one underlined, like Instagram's profile tabs */
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tabs [role="tab"] {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px;
  margin-bottom: -1px; border-bottom: 1px solid transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  transition: color .15s;
}
.tabs [role="tab"]:hover { color: var(--text); }
.tabs svg { width: 22px; height: 22px; }
.tabs [aria-selected="true"] { color: var(--text); border-bottom: 2px solid var(--text); }
.tabs [aria-selected="true"] svg { stroke-width: 2.2; }
@media (max-width: 767px) {
  .tabs [role="tab"] { font-size: 0; gap: 0; }   /* icons only on phones */
}

/* ---------- Work grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; perspective: 1200px; }
.panel.enter .grid li, #panel-work:not(.enter) .grid li { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 90ms + 150ms); }
@media (max-width: 767px) { .grid { gap: 2px; } }

.post {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%;
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5;
  overflow: hidden; text-decoration: none; text-align: left; color: #fff;
  border-radius: 2px; container-type: inline-size; isolation: isolate;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .4s;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset;
}
.post.tilting { transition: transform .08s linear, box-shadow .4s; }
.post:hover { box-shadow: 0 24px 48px -20px rgba(0,0,0,.55); z-index: 2; }
/* Soft light that follows the cursor */
.post::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(60% 50% at var(--gx) var(--gy), rgba(255,255,255,.22), transparent 70%);
}
.post:hover::after { opacity: 1; }
/* Film grain for a printed, premium feel */
.post::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: .18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (max-width: 767px) { .post { border-radius: 0; } }

.post-cover {
  position: absolute; inset: auto 0 0 0; z-index: 2; display: flex; flex-direction: column; gap: .5cqw;
  padding: 28cqw 6.5cqw 6.5cqw;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,.25) 55%, transparent);
}
.post-kicker { font-size: max(8px, 3.6cqw); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.post-title { font-size: max(12px, 6.6cqw); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.post-stat { font-size: max(9px, 4cqw); opacity: .85; margin-top: .6cqw; }
.post-stat b { font-weight: 700; }
/* "Live tool" tag: a small frosted pill with a breathing green dot, so a working product reads at a glance */
.post-live {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 1.6cqw; margin-bottom: 1.4cqw;
  padding: 1.2cqw 3cqw 1.2cqw 2.4cqw; border-radius: 999px; font-size: max(9px, 3.4cqw); font-weight: 600; white-space: nowrap;
  background: rgba(255, 255, 255, .16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .22);
}
.post-live i { width: max(5px, 1.8cqw); aspect-ratio: 1; border-radius: 50%; background: #34C759; box-shadow: 0 0 0 0 rgba(52, 199, 89, .6); animation: live-dot 2.4s ease-out infinite; }
@keyframes live-dot { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, .55); } 70%, 100% { box-shadow: 0 0 0 max(4px, 1.6cqw) rgba(52, 199, 89, 0); } }
@media (prefers-reduced-motion: reduce) { .post-live i { animation: none; } }
.post-pin {
  position: absolute; top: 3.5cqw; right: 3.5cqw; z-index: 5;
  display: grid; place-items: center; width: max(22px, 9cqw); aspect-ratio: 1; border-radius: 50%;
  background: rgba(0, 0, 0, .3); backdrop-filter: blur(8px);
}
.post-pin svg { width: 46%; height: 46%; fill: #fff; stroke: none; }
.post-cta {
  position: absolute; top: 3.5cqw; left: 3.5cqw; z-index: 5;
  padding: 1.6cqw 3.4cqw; border-radius: 999px; font-size: max(10px, 3.6cqw); font-weight: 600;
  background: rgba(255,255,255,.16); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.2);
  opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s;
}
.post:hover .post-cta, .post:focus-visible .post-cta { opacity: 1; transform: none; }
.liked-badge {
  position: absolute; bottom: 5cqw; right: 5cqw; z-index: 5; color: #fff;
  opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.liked-badge svg { width: max(14px, 6cqw); height: max(14px, 6cqw); fill: var(--heart); stroke: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.post.is-liked .liked-badge { opacity: 1; transform: none; }
@media (hover: none) { .post-cta { display: none; } }

/* Small tiles (phones): title only, so the art has room */
@container (max-width: 200px) {
  .post-kicker, .post-stat { display: none; }
  .post-title { font-size: 11.5px; line-height: 1.15; }
  .post-cover { padding: 20cqw 7cqw 7cqw; }
  .art { inset: 0 0 24% 0 !important; }
  .liked-badge { top: 5cqw; bottom: auto; left: 5cqw; right: auto; }
}

/* Shared art stage: sized in em off the tile width, so it scales with the grid */
.art { position: absolute; inset: 0 0 30% 0; z-index: 1; display: grid; place-items: center; font-size: 3.2cqw; }
.art > * { grid-area: 1 / 1; }
.ease { transition-timing-function: cubic-bezier(.2, .8, .2, 1); }

/* Good Design System tile: the audit's one-off bill cards (ghosts) collapse into the one
   configurable Card on hover, its status badges cascade in, and "27 variants → 1 card" lands. */
.post-gds, .pv-media.post-gds { background: radial-gradient(120% 90% at 15% 0%, #2FA4FF 0%, #008EFE 30%, #0656B8 62%, #04224F 100%); }
.gx-ghost, .gx-card { width: 18em; transition: transform .8s cubic-bezier(.2, .8, .2, 1), opacity .5s, filter .5s; }
.gx-ghost {
  display: flex; flex-direction: column; gap: .6em; padding: 1.3em; height: 9.6em;
  background: var(--bg); border-radius: var(--r); box-shadow: 0 1.2em 2.4em -1em rgba(0,0,0,.55);
  transform: translate(var(--x), var(--y)) rotate(var(--a));
}
.gx-ghost i { height: .65em; width: 70%; border-radius: 1em; background: var(--ink); opacity: .7; }
.gx-ghost i + i { width: 45%; opacity: .3; }
.gx-ghost b { margin-top: auto; height: 2.2em; width: var(--bw); border-radius: var(--br); background: var(--btn); }
.g1 { --bg: #FFF7EC; --ink: #3a2a16; --btn: #F2994A; --r: .3em; --br: .2em; --bw: 60%; --x: -3.6em; --y: -3.8em; --a: -10deg; }
.g2 { --bg: #1C1F24; --ink: #fff; --btn: #27AE60; --r: 1.6em; --br: 2em; --bw: 100%; --x: 3.8em; --y: -2.4em; --a: 9deg; }
.g3 { --bg: #EEF3FF; --ink: #1d2b4f; --btn: #5B5BD6; --r: .8em; --br: .5em; --bw: 45%; --x: -2.6em; --y: 3.6em; --a: 6deg; }
.gx-card {
  position: relative; display: flex; flex-direction: column; gap: .9em; padding: 1.2em; border-radius: 1em;
  background: #fff; color: #0F1729; box-shadow: 0 1.6em 3em -1em rgba(0,0,0,.6);
  transform: translateY(.8em) rotate(-3deg) scale(.94);
}
.gx-row { display: flex; align-items: center; gap: .7em; }
.gx-av { flex: none; display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 50%; background: #EAF2FF; color: #116DF1; font-style: normal; font-weight: 700; font-size: .95em; }
.gx-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15em; }
.gx-t b { font-size: .88em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-t small { font-size: .78em; color: #64748B; }
.gx-amt { font-size: 1em; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gx-badges { display: flex; gap: .4em; }
.gx-badges i {
  font-style: normal; font-size: .72em; font-weight: 600; padding: .35em .7em; border-radius: 1em; white-space: nowrap;
  opacity: .25; transform: translateY(.4em); transition: opacity .3s, transform .5s cubic-bezier(.3, 1.6, .5, 1); transition-delay: calc(.35s + var(--d) * 80ms);
}
.gx-badges .ok { background: #E3F6EC; color: #11734B; }
.gx-badges .warn { background: #FFEFE0; color: #A84B0C; }
.gx-badges .bad { background: #FDE8E8; color: #B42318; }
.gx-btn { display: flex; align-items: center; justify-content: center; gap: .4em; height: 2.7em; border-radius: .7em; background: #116DF1; color: #fff; font-weight: 600; font-size: .95em; }
.gx-btn svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s .5s; }
.gx-count {
  position: relative; z-index: 2; align-self: end; justify-self: center; margin-bottom: .2em; padding: .5em .95em; border-radius: 1em;
  background: rgba(255,255,255,.14); backdrop-filter: blur(8px); color: #fff; font-weight: 700; white-space: nowrap;
  opacity: 0; transform: translateY(1em) scale(.9); transition: opacity .3s .45s, transform .5s .45s cubic-bezier(.3, 1.6, .5, 1);
}
.gx-count s { color: rgba(255,255,255,.55); font-weight: 500; margin-right: .3em; }
.post:hover .gx-ghost, .post.in-view .gx-ghost, .pv-media .gx-ghost { transform: translateY(.8em) rotate(-3deg) scale(.9); opacity: 0; filter: blur(4px); }
.post:hover .gx-card, .post.in-view .gx-card, .pv-media .gx-card { transform: translateY(-.6em) scale(1.1); }
.post:hover .gx-badges i, .post.in-view .gx-badges i, .pv-media .gx-badges i { opacity: 1; transform: none; }
.post:hover .gx-btn svg, .post.in-view .gx-btn svg, .pv-media .gx-btn svg { transform: translateX(.2em); }
.post:hover .gx-count, .post.in-view .gx-count, .pv-media .gx-count { opacity: 1; transform: none; }

/* Wendor */
.post-wendor, .pv-media.post-wendor { background: radial-gradient(90% 70% at 50% 62%, #4A2BE0 0%, #1E1450 45%, #07060B 85%); }
.vm {
  display: flex; gap: .7em; padding: .9em; border-radius: 1.3em; background: #2A0B0E;
  box-shadow: 0 1.6em 3em -1em rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08);
  transform: rotate(-3deg); transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}
.post:hover .vm, .post.in-view .vm, .pv-media .vm { transform: rotate(0) scale(1.03); }
.vm-glass {
  display: grid; grid-template-columns: repeat(4, 2.2em); grid-auto-rows: 2.6em; gap: .45em; padding: .6em;
  border-radius: .7em; background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
}
.vm-glass i { border-radius: .45em; background: linear-gradient(#FFD5A8, #F59342); }
.vm-glass i:nth-child(3n) { background: linear-gradient(#C6F1E7, #12A594); }
.vm-glass i:nth-child(4n+1) { background: linear-gradient(#FFF0B3, #F5C542); }
.vm-glass i.empty {
  background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28);
  transition: background .35s, box-shadow .35s; transition-delay: calc(var(--d) * 40ms);
}
.post:hover .vm-glass i.empty, .post.in-view .vm-glass i.empty, .pv-media .vm-glass i.empty { background: linear-gradient(#FFFFFF, #FFD5A8); box-shadow: inset 0 0 0 0 transparent; }
.vm-side { display: flex; flex-direction: column; gap: .45em; width: 2.6em; padding-top: .6em; }
.vm-side i { height: 1.1em; border-radius: .3em; background: rgba(255,255,255,.18); }
.vm-side b { margin-top: auto; height: 2.4em; border-radius: .5em; background: rgba(0,0,0,.4); }
.vm-toast {
  align-self: start; justify-self: center; margin-top: 2.2em; padding: .5em 1em; border-radius: 1em;
  position: relative; z-index: 2; background: #fff; color: #1B7F4E; font-size: 1em; font-weight: 700; box-shadow: 0 .8em 1.6em -.6em rgba(0,0,0,.5);
  opacity: 0; transform: translateY(-.8em) scale(.9); transition: opacity .3s .55s, transform .45s .55s cubic-bezier(.3, 1.6, .5, 1);
}
.post:hover .vm-toast, .post.in-view .vm-toast, .pv-media .vm-toast { opacity: 1; transform: none; }

/* Zomato+ tile: the case study's screens on Zomato blue. Hover (or scroll into view on touch)
   fans the side phones out and wakes Zomo from its splash into suggestions. */
/* Palette Proof tile: the tool's window over a terracotta glow. On hover the window settles,
   its joined tonal scale splits into separate tested swatches, and the "22/22" chip lands. */
.post-palette, .pv-media.post-palette { background: radial-gradient(120% 90% at 50% 0%, #E58B70 0%, #B8563F 34%, #5E2519 68%, #170A07 100%); }
.pp-glow { width: 26em; height: 18em; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,214,196,.5), transparent); opacity: .55; transition: opacity .6s, transform .8s cubic-bezier(.2, .8, .2, 1); }
.pp-shot {
  position: relative; width: 21em; border-radius: 1em; overflow: hidden; background: #FAFAFC;
  box-shadow: 0 1.6em 3em -1em rgba(20, 6, 3, .65), 0 0 0 .08em rgba(255, 255, 255, .35);
  transform: translateY(-1.8em) rotate(-3deg); transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
.pp-bar { display: flex; gap: .35em; padding: .55em .7em; background: #EFEFF3; }
.pp-bar i { width: .5em; height: .5em; border-radius: 50%; background: #D3D3DA; }
.pp-shot img { display: block; width: 100%; height: auto; }
.pp-scale { display: flex; gap: 0; transform: translateY(7.4em); transition: gap .6s cubic-bezier(.2, .8, .2, 1); }
.pp-scale i {
  width: 2.3em; height: 2.3em; background: var(--c); border-radius: 0;
  box-shadow: 0 .5em 1em -.3em rgba(20, 6, 3, .5);
  transition: border-radius .5s, transform .6s cubic-bezier(.3, 1.4, .5, 1) calc(var(--k) * 45ms);
}
.pp-scale i:first-child { border-radius: .7em 0 0 .7em; }
.pp-scale i:last-child { border-radius: 0 .7em .7em 0; }
.pp-chip {
  display: inline-flex; align-items: center; gap: .4em; padding: .45em .8em; border-radius: 999px; white-space: nowrap;
  background: #fff; color: #1d1d1f; font-size: 1.05em; font-weight: 600; box-shadow: 0 .8em 1.6em -.6em rgba(20, 6, 3, .6);
  transform: translate(4.4em, -9.4em) scale(.7); opacity: 0; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1) .15s, opacity .3s .15s;
}
.pp-chip b { color: #1F9D55; }
.post:hover .pp-shot, .post.in-view .pp-shot, .pv-media .pp-shot { transform: translateY(-2.4em) rotate(0); }
.post:hover .pp-glow, .post.in-view .pp-glow, .pv-media .pp-glow { opacity: .9; transform: scale(1.12); }
.post:hover .pp-scale, .post.in-view .pp-scale, .pv-media .pp-scale { gap: .4em; }
.post:hover .pp-scale i, .post.in-view .pp-scale i, .pv-media .pp-scale i { border-radius: .6em; transform: translateY(-.3em); }
.post:hover .pp-chip, .post.in-view .pp-chip, .pv-media .pp-chip { opacity: 1; transform: translate(4.4em, -9.4em); }

.post-zomato, .pv-media.post-zomato { background: radial-gradient(110% 80% at 50% 8%, #4B86FF 0%, #2350E0 38%, #0F2280 70%, #060A2C 100%); }
.zp-glow {
  align-self: center; justify-self: center; width: 78%; aspect-ratio: 1; margin-top: 5em; border-radius: 50%;
  background: radial-gradient(circle, rgba(140,180,255,.55), transparent 65%); filter: blur(18px); opacity: .55;
  transition: opacity .5s, transform .8s cubic-bezier(.2, .8, .2, 1);
}
.zp-ph {
  position: relative; align-self: start; justify-self: center; display: block; width: 9.4em; height: auto; max-width: none; margin-top: 3.4em;
  filter: drop-shadow(0 1.4em 1.8em rgba(4,8,40,.6));
  transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .5s, opacity .5s;
}
.zp-l, .zp-r { width: 8.2em; margin-top: 4.6em; opacity: .85; }
.zp-l { transform: translateX(-3.6em) rotate(-6deg); }
.zp-r { transform: translateX(3.6em) rotate(6deg); }
.zp-main { transform: rotate(-3deg) translateY(.5em); }
.zp-main img { display: block; width: 100%; height: auto; }
.zp-main .zp-ai { position: absolute; inset: 0; opacity: 0; transition: opacity .5s .15s; }
.zp-chip {
  position: relative; z-index: 2; align-self: end; justify-self: center; margin-bottom: 1.4em; padding: .55em .95em; border-radius: 1em;
  background: linear-gradient(120deg, #6C7CFF, #E23744); color: #fff; font-weight: 700; font-size: 1em; white-space: nowrap;
  box-shadow: 0 .8em 1.8em -.6em rgba(108,124,255,.8);
  opacity: 0; transform: translateY(1em) scale(.9); transition: opacity .3s .45s, transform .5s .45s cubic-bezier(.3, 1.6, .5, 1);
}
.post:hover .zp-l, .post.in-view .zp-l, .pv-media .zp-l { opacity: 1; transform: translateX(-6.8em) translateY(.6em) rotate(-12deg); }
.post:hover .zp-r, .post.in-view .zp-r, .pv-media .zp-r { opacity: 1; transform: translateX(6.8em) translateY(.6em) rotate(12deg); }
.post:hover .zp-main, .post.in-view .zp-main, .pv-media .zp-main { transform: translateY(-.6em) scale(1.04); filter: drop-shadow(0 2.2em 2.4em rgba(4,8,40,.7)); }
.post:hover .zp-ai, .post.in-view .zp-ai, .pv-media .zp-ai { opacity: 1; }
.post:hover .zp-chip, .post.in-view .zp-chip, .pv-media .zp-chip { opacity: 1; transform: none; }
.post:hover .zp-glow, .post.in-view .zp-glow, .pv-media .zp-glow { opacity: .9; transform: scale(1.15); }

/* .in-view: touch screens play the state when scrolled into view. .pv-media: the post view always shows it. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- About + Resume ---------- */
.panel { padding-top: 28px; }
.prose { max-width: 62ch; display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-size: 24px; letter-spacing: -.02em; }
.prose h3 { font-size: 16px; margin-top: 10px; }
.prose ul { list-style: disc; padding-left: 20px; }
.prose li + li { margin-top: 4px; }
.draft-note { font-size: 13px; color: var(--muted); border-left: 2px solid #D62976; padding-left: 10px; }
@media (max-width: 767px) {
  .panel { padding: 24px 16px 0; }
  #panel-work { padding: 0; }
}

.timeline { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: 180px 1fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.tl-dates { color: var(--muted); font-size: 14px; }
.timeline h3 { font-size: 15.5px; font-weight: 600; }
.timeline p { color: var(--muted); margin-top: 4px; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Dialogs ---------- */
dialog { padding: 0; border: 0; color: var(--text); }
dialog::backdrop { background: var(--overlay); }
body:has(dialog[open]) { overflow: hidden; }

.post-view {
  width: min(960px, calc(100vw - 48px)); max-height: calc(100vh - 48px);
  border-radius: var(--radius-lg); background: var(--surface); overflow: hidden;
}
.pv-inner { display: grid; grid-template-columns: 1.1fr 1fr; }
.pv-media { position: relative; aspect-ratio: 4 / 5; background: #111; container-type: inline-size; overflow: hidden; user-select: none; }
.pv-media video { width: 100%; height: 100%; object-fit: cover; }
.pv-media video:not([src]) { display: none; }
.pv-placeholder { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7%; color: rgba(255,255,255,.75); font-size: 13px; text-align: center; }
.pv-placeholder small { opacity: .7; }
.pv-placeholder .art { font-size: 3.6cqw; inset: 0 0 18% 0; }
.pv-media.has-video .pv-placeholder { display: none; }
.pv-body { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px 24px; overflow-y: auto; }
.pv-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pv-head img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.pv-head div { flex: 1; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.pv-meta { color: var(--muted); font-size: 12.5px; }
.post-view h2 { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.pv-caption { color: var(--muted); }
.pv-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.pv-numbers li { padding: 12px; border-radius: var(--radius); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.pv-numbers strong { display: block; color: var(--text); font-size: 22px; letter-spacing: -.02em; }
.pv-cta { margin-top: auto; }

@media (max-width: 767px) {
  .post-view { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .pv-inner { grid-template-columns: 1fr; height: 100%; overflow-y: auto; }
  .pv-body { order: -1; overflow: visible; }
  .pv-media { order: 0; }
  .pv-cta { position: sticky; bottom: 16px; }
}

/* Story viewer */
.story {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  background: #0A0A0A; color: #fff;
}
.story::backdrop { background: #0A0A0A; }
.story-frame {
  position: relative; height: min(100dvh, 860px); aspect-ratio: 9 / 16; max-width: 100vw;
  margin: max(0px, calc((100dvh - 860px) / 2)) auto 0;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, var(--story-c, #333) 0%, #0A0A0A 85%);
}
@media (max-width: 767px) { .story-frame { height: 100dvh; width: 100vw; aspect-ratio: auto; border-radius: 0; margin: 0; } }

.story-bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; }
.story-bars span { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.story-bars span i { display: block; height: 100%; width: 0; background: #fff; }
.story-bars span.done i { width: 100%; }

.story-head { position: absolute; top: 22px; left: 12px; right: 4px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.story-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--story-c, #333); font-size: 11px; font-weight: 700; border: 1.5px solid rgba(255,255,255,.6); }
.story-head div { flex: 1; display: flex; flex-direction: column; font-size: 14px; line-height: 1.25; }
.story-dates { font-size: 12px; opacity: .7; }
.story-head .icon-btn:hover { background: rgba(255,255,255,.12); }
.story-pause .i-play { display: none; }
.story.paused .story-pause .i-play { display: block; }
.story.paused .story-pause .i-pause { display: none; }

.story-slide {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  padding: 0 24px 96px;
}
.story-slide .s-kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.story-slide .s-title { font-size: clamp(26px, 4.4vh, 36px); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.story-slide .s-body { font-size: 16px; opacity: .85; max-width: 32ch; }
.story-slide .s-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.story-slide .s-stats li { font-size: 13px; opacity: .85; }
.story-slide .s-stats strong { display: block; font-size: 26px; letter-spacing: -.02em; opacity: 1; }
.story-slide .s-img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: .55; }

.story-nav { position: absolute; top: 70px; bottom: 76px; z-index: 2; }
.story-prev { left: 0; width: 35%; }
.story-next { right: 0; width: 65%; }
.story-nav:focus-visible { outline-offset: -4px; }

/* ---------- Case study pages ---------- */
main.case { margin: 0 auto; max-width: 720px; padding: 48px 20px 80px; }
.case h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -.03em; }

/* Post view actions */
.pv-actions { display: flex; align-items: center; gap: 2px; margin: -4px -8px; }
.pv-actions .icon-btn { width: 42px; height: 42px; }
.pv-hint { margin-left: auto; color: var(--muted); font-size: 12px; }
.like-btn svg { transition: transform .35s cubic-bezier(.3, 1.8, .5, 1), fill .2s, stroke .2s; }
.like-btn[aria-pressed="true"] svg { fill: var(--heart); stroke: var(--heart); animation: like-pop .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes like-pop { 40% { transform: scale(1.3); } }

/* Big heart on double-tap */
.burst { position: absolute; left: 50%; top: 45%; z-index: 6; pointer-events: none; width: 0; height: 0; }
.burst.go::before {
  content: ""; position: absolute; width: 110px; height: 110px; left: -55px; top: -55px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 21s-7.5-4.6-9.5-9.3C1.1 8.4 3.3 5 6.8 5c2.1 0 3.6 1.2 5.2 3 1.6-1.8 3.1-3 5.2-3 3.5 0 5.7 3.4 4.3 6.7C19.5 16.4 12 21 12 21Z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.35));
  animation: burst .9s cubic-bezier(.2, .8, .2, 1) both;
}
.burst.go::after {
  content: ""; position: absolute; width: 10px; height: 10px; left: -5px; top: -5px; border-radius: 50%;
  box-shadow: 0 -70px var(--heart), 50px -50px #F5A524, 70px 0 var(--heart), 50px 50px #F5A524, 0 70px var(--heart), -50px 50px #F5A524, -70px 0 var(--heart), -50px -50px #F5A524;
  animation: sparks .7s ease-out both;
}
@keyframes burst { 0% { transform: scale(0); opacity: 0; } 15% { transform: scale(1.2); opacity: 1; } 30% { transform: scale(.95); } 45%, 75% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.1) translateY(-30px); opacity: 0; } }
@keyframes sparks { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }

/* Story: content rises in on each slide, images drift slowly */
.story-slide > * { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.story-slide > :nth-child(2) { animation-delay: .06s; }
.story-slide > :nth-child(3) { animation-delay: .12s; }
.story-slide > :nth-child(4) { animation-delay: .18s; }
.story-slide > :nth-child(5) { animation-delay: .24s; }
.story-slide .s-img { animation: kenburns 6s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.story-slide::before {
  content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; top: 18%; left: 15%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--story-c) 70%, #fff 0%), transparent 65%); opacity: .45; filter: blur(30px);
  animation: blob 8s ease-in-out infinite alternate;
}
@keyframes blob { to { transform: translate(12%, 10%) scale(1.2); } }

/* Story reply bar */
.story-reply {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 8px;
  padding: 12px 12px calc(14px + env(safe-area-inset-bottom));
}
.reply-field {
  flex: 1; height: 44px; display: flex; align-items: center; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45); color: rgba(255,255,255,.85); font-size: 14px; text-decoration: none;
  transition: background .2s;
}
.reply-field:hover { background: rgba(255,255,255,.1); }
.story-reply .icon-btn { width: 44px; height: 44px; }
.story-reply .icon-btn:hover { background: rgba(255,255,255,.12); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 1000; padding: 10px 16px; border-radius: 12px;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 767px) { .toast { bottom: 84px; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Icon inside a button, e.g. the resume download arrow */
.btn { gap: 6px; }
.btn-icon { width: 16px; height: 16px; stroke-width: 2.2; margin-left: -2px; }

/* Photo covers for highlights and the story header */
.hl-img.has-img { background-size: cover; background-position: center; color: transparent; }
.story-avatar { background-size: cover; background-position: center; }

/* Story photos: full brightness, with a dark fade so the text stays readable */
.story-slide .s-img { opacity: 1; }
.story-slide.has-img::before { display: none; }
.story-slide.has-img::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 35%, transparent 60%),
              linear-gradient(to bottom, rgba(0,0,0,.45), transparent 18%);
}

/* Floating Messages pill, bottom right (desktop), like Instagram's */
.messages-pill {
  position: fixed; right: 24px; bottom: 24px; z-index: 20;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-radius: 999px;
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18), 0 0 0 1px var(--line);
  transition: transform .2s, box-shadow .2s;
}
.messages-pill:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.24), 0 0 0 1px var(--line); }
.messages-pill img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-left: 18px; }
@media (max-width: 767px) { .messages-pill { display: none; } }

/* Extra breathing room before the education line in the bio */
.bio .muted { margin-top: 10px; }

/* Tenure line under each story's text */
.story-slide .s-tenure {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; margin-top: 2px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.22);
}
.story-slide .s-tenure svg { width: 15px; height: 15px; }

/* PORTFOLIO banner across the top of the page: faint greyscale lettering,
   fading towards the header so it never competes with the text */
main { overflow-x: clip; }
.wm {
  position: relative; width: 100%; max-width: none; margin: -6px 0 -67px;  /* full width: the word is centred and its faded ends bleed off both sides */
  display: flex; flex-direction: column; align-items: stretch;
  padding: 14px 28px 18px; pointer-events: none; user-select: none;
  isolation: isolate;
}
/* Graph-paper grid that fades out at the edges */
.wm::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 45%, transparent 100%);
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 45%, transparent 100%);
}
.wm-word {
  position: relative; display: flex; align-items: center; justify-content: center; white-space: nowrap;
  font: 600 clamp(84px, 13.5vw, 210px)/.86 "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  font-optical-sizing: auto; letter-spacing: .01em;
  /* greyscale and barely there: you can just make out the word */
  color: #fff; opacity: .05;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, rgba(0,0,0,.4) 100%);
  mask-image: linear-gradient(to bottom, #000 50%, rgba(0,0,0,.4) 100%);
}

@media (max-width: 767px) {
  .wm { margin: -8px auto -36px; padding: 8px 14px 10px; }
  .wm::before { background-size: 18px 18px; }
  .wm-word { font-size: 14.5vw; }   /* whole word fits */
}

/* Confirm sheet before opening an email draft (Instagram action-sheet style) */
.confirm {
  width: min(400px, calc(100vw - 32px)); border-radius: 12px; background: var(--surface); overflow: hidden;
  text-align: center;
}
.confirm[open] { animation: sheet-in .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet-in { from { opacity: 0; transform: scale(1.06); } }
.confirm-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 24px 22px; }
.confirm-head img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.confirm-head h2 { font-size: 19px; font-weight: 600; }
.confirm-head p { color: var(--muted); font-size: 14px; }
.confirm-text strong { color: var(--text); font-weight: 500; }
.confirm-row {
  display: block; width: 100%; padding: 14px; border-top: 1px solid #363636;
  font-size: 14.5px; text-decoration: none; color: var(--text);
}
.confirm-row:hover { background: rgba(255,255,255,.04); }
.confirm-go { color: var(--accent); font-weight: 700; }

/* Profile photo: hair breaks out over the ring.
   --in = ring padding + gap; the cut-out was made so its top sits 22.96% of the
   photo's width above the photo, and it lines up pixel-for-pixel with it. */
.avatar { --av: 162px; --in: 8px; overflow: visible; }
.avatar .avatar-pop {
  position: absolute; z-index: 1; pointer-events: none;
  left: var(--in); width: calc(var(--av) - 2 * var(--in)); height: auto;
  top: calc(var(--in) - (var(--av) - 2 * var(--in)) * .2296);
  border: 0; border-radius: 0; background: none; object-fit: fill;
}
.avatar-play { z-index: 2; }
@media (max-width: 767px) {
  .avatar { --av: 92px; --in: 6px; }
}

/* Story open/close: grows in, shrinks back out */
.story[open] .story-frame { animation: story-in .25s cubic-bezier(.2, .8, .2, 1); }
.story.closing .story-frame { animation: story-out .2s ease-in forwards; }
.story.closing { animation: fade-out .2s ease-in forwards; }
@keyframes story-in { from { transform: scale(.88); opacity: 0; } }
@keyframes story-out { to { transform: scale(.88); opacity: 0; } }
@keyframes fade-out { to { background: transparent; } }
.story { cursor: zoom-out; }
.story-frame { cursor: default; }
.story.closing::backdrop { animation: fade-out .2s ease-in forwards; }

/* Prev / next chevrons inside the story, Instagram-style */
.story-nav .chev {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.88); color: #111;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  opacity: .75; transition: opacity .2s, transform .2s;
}
.story-nav .chev svg { width: 18px; height: 18px; stroke-width: 2.4; }
.story-prev .chev { left: 10px; }
.story-next .chev { right: 10px; }
.story-nav:hover .chev { opacity: 1; }
.story-prev:hover .chev { transform: translateY(-50%) translateX(-2px); }
.story-next:hover .chev { transform: translateY(-50%) translateX(2px); }
.story.at-start .story-prev .chev { opacity: 0; }
@media (hover: none) { .story-nav .chev { opacity: .65; width: 30px; height: 30px; } }

/* Wendor tile: the case study's landing (phones over a violet glow) */
.post-title em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: #C3B6FF; font-size: 1.12em; letter-spacing: 0; }
.wd-ghost {
  align-self: center; justify-self: center; margin-top: 2em;
  font: 800 6.4em/1 var(--font); letter-spacing: -.04em; color: rgba(255,255,255,.07);
  transition: transform .8s cubic-bezier(.2, .8, .2, 1), color .5s;
}
.wd-glow {
  align-self: center; justify-self: center; width: 70%; aspect-ratio: 1; margin-top: 4em; border-radius: 50%;
  background: radial-gradient(circle, rgba(123,92,255,.55), transparent 65%); filter: blur(18px); opacity: .7;
  transition: opacity .5s, transform .8s cubic-bezier(.2, .8, .2, 1);
}
.wd-phones {
  position: relative; align-self: center; justify-self: center; width: 104%; height: auto; max-width: none; margin-top: 1.2em;
  filter: drop-shadow(0 1.6em 2em rgba(0,0,0,.55));
  transform: rotate(-4deg) translateY(.4em);
  transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .5s;
}
.post:hover .wd-phones, .post.in-view .wd-phones, .pv-media .wd-phones { transform: rotate(0) translateY(-.9em) scale(1.05); filter: drop-shadow(0 2.4em 2.6em rgba(0,0,0,.6)); }
.post:hover .wd-glow, .post.in-view .wd-glow, .pv-media .wd-glow { opacity: 1; transform: scale(1.15); }
.post:hover .wd-ghost, .post.in-view .wd-ghost { transform: translateX(-.4em); color: rgba(255,255,255,.11); }

/* Resume tab: editorial CV, same language as About (eyebrow + hairline headers, quiet rows) */
.cv { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 56px; }

.cv-top { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 24px; padding: 36px; border-radius: 20px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(55% 80% at 100% 0%, rgba(214,41,118,.16), transparent 70%),
    radial-gradient(50% 70% at 70% -10%, rgba(150,47,191,.14), transparent 70%),
    radial-gradient(60% 80% at 0% 110%, rgba(79,91,213,.10), transparent 70%),
    linear-gradient(160deg, #121214 0%, #0a0a0b 55%, #060606 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.cv-top h2 { font-size: clamp(38px, 6vw, 58px); font-weight: 800; letter-spacing: -.035em; line-height: .95; margin-top: 14px;
  background: linear-gradient(180deg, #fff 35%, #9c9ca3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.cv-title { font-size: 12.5px; letter-spacing: .3em; text-transform: uppercase; margin-top: 12px; color: #b4b4ba; }
.cv-field { color: #8e8e93; }
@media (max-width: 640px) { .cv-sep { display: none; } .cv-field { display: block; margin-top: 6px; } }
.cv-dl { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px; background: #fff; color: #000; font-weight: 600; font-size: 14px; text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(255,255,255,.3); transition: transform .2s, box-shadow .2s; }
.cv-dl svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.cv-dl:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(255,255,255,.45); }
.cv-dl:hover svg { transform: translateY(2px); }
.cv-summary { grid-column: 1 / -1; margin-top: 28px; font-size: 16.5px; line-height: 1.6; color: #d6d6db; max-width: 60ch; }
.cv-contact { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.07); font-size: 14px; color: #d6d6db; }
.cv-contact li { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 3px; align-items: center; min-width: 0; white-space: nowrap; }
.cv-contact li > :not(.cv-ic) { grid-column: 2; }
/* Small round icon tile, same quiet ring as the logo bubbles */
.cv-ic { grid-row: 1 / span 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); color: #d6d6db; transition: background .2s, color .2s; }
.cv-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cv-contact li:hover .cv-ic { background: rgba(255,255,255,.09); color: #fff; }
.cv-contact span { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cv-contact a { color: var(--text); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s; }
.cv-contact a:hover { background-size: 100% 1px; }

/* Experience rows: logo and dates on the left, the story of the role on the right */
.rx { display: grid; grid-template-columns: 150px 1fr; gap: 28px; padding: 28px 0; }
.rx-list > .rx + .rx { border-top: 1px solid rgba(255,255,255,.06); }
.rx-side { display: flex; flex-direction: column; gap: 14px; }
.rx-logo { width: 48px; height: 48px; flex: none; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background-size: cover; background-position: center;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #3a3a3e; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s; }
.rx-logo:hover { transform: scale(1.07); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #8e8e93; }
.rx.is-now .rx-logo, .rx.is-now .rx-logo:hover { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #D62976, 0 0 18px rgba(214,41,118,.35); }
.rx-when { font-size: 13px; color: #c9c9cf; font-variant-numeric: tabular-nums; line-height: 1.4; }
.rx-when span { display: block; color: var(--muted); font-size: 12.5px; }
.rx-main h4 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 600; letter-spacing: -.015em; }
.rx-role { margin-top: 4px; font-size: 14.5px; color: var(--muted); }
.rx-metrics { display: flex; margin-top: 20px; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); background: rgba(255,255,255,.02); }
.rx-metrics li { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.rx-metrics li + li { box-shadow: inset 1px 0 0 rgba(255,255,255,.07); }
.rx-metrics strong { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.rx-metrics span { font-size: 12px; color: var(--muted); }
.rx-bullets { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; line-height: 1.55; color: #c9c9cf; }
.rx-bullets li { position: relative; padding-left: 22px; }
.rx-bullets li::before { content: ""; position: absolute; left: 0; top: .78em; width: 10px; height: 1px; background: rgba(255,255,255,.35); }

.cv-certs { display: flex; flex-direction: column; }
.cv-certs li { display: grid; grid-template-columns: 150px 1fr; gap: 28px; padding: 16px 0; font-size: 15px; color: var(--text); }
.cv-certs li + li { border-top: 1px solid rgba(255,255,255,.06); }
.cv-certs span { font-size: 12.5px; color: var(--muted); padding-top: 2px; }

.cv-skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; padding-top: 20px; }
.cv-skills h4 { margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: #d6d6db; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-chips li { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: #c9c9cf; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); transition: background .2s, color .2s; }
.cv-chips li:hover { background: rgba(255,255,255,.06); color: var(--text); }

/* Resume tab entrance */
#panel-resume.enter .cv > *, #panel-resume.enter .rx-list > .rx { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
#panel-resume.enter .cv > :nth-child(2) { animation-delay: .06s; }
#panel-resume.enter .rx-list > .rx:nth-child(1) { animation-delay: .1s; }
#panel-resume.enter .rx-list > .rx:nth-child(2) { animation-delay: .16s; }
#panel-resume.enter .rx-list > .rx:nth-child(3) { animation-delay: .22s; }
#panel-resume.enter .rx-list > .rx:nth-child(4) { animation-delay: .28s; }
#panel-resume.enter .cv > :nth-child(n+3) { animation-delay: .32s; }

@media (max-width: 767px) {
  .cv { gap: 40px; }
  .cv-top { grid-template-columns: 1fr; padding: 24px 20px; border-radius: 0; margin: 0 -16px; }
  .cv-dl { order: 4; margin-top: 22px; justify-content: center; }
  .cv-summary { margin-top: 20px; font-size: 15.5px; }
  .cv-contact { flex-direction: column; gap: 14px; }
  .rx { grid-template-columns: 1fr; gap: 14px; padding: 24px 0; }
  .rx-side { flex-direction: row; align-items: center; gap: 14px; }
  .rx-logo { width: 42px; height: 42px; }
  .rx-main h4 { font-size: 19px; }
  .rx-metrics li { flex: 1 1 0; min-width: 0; padding: 12px 10px; }
  .rx-metrics strong { font-size: 18px; }
  .rx-metrics span { font-size: 11px; line-height: 1.3; }
  .cv-certs li { grid-template-columns: 1fr; gap: 2px; }
  .cv-skills { grid-template-columns: 1fr; gap: 22px; }
}

#panel-about.enter > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
#panel-about.enter > :nth-child(2) { animation-delay: .06s; }
#panel-about.enter > :nth-child(3) { animation-delay: .12s; }
#panel-about.enter > :nth-child(n+4) { animation-delay: .18s; }

/* ---------- About: editorial poster ---------- */
.about { max-width: 935px; display: flex; flex-direction: column; gap: 56px; }
.ab-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

/* Hero: grey portrait on the right, title and stats on the left */
.hero { position: relative; display: grid; grid-template-columns: 1fr; border-radius: 20px; overflow: hidden; isolation: isolate;
  background: radial-gradient(60% 85% at 72% 40%, #0f0f10 0%, #09090a 45%, #050505 75%, #030303 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 50px 100px -40px rgba(255,255,255,.12); }
.hero-img { position: absolute; z-index: -1; right: -4%; top: 0; height: 100%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%), linear-gradient(to bottom, #000 70%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 30%), linear-gradient(to bottom, #000 70%, transparent 100%); mask-composite: intersect; }
.hero-copy { padding: 56px 44px 40px; max-width: 470px; }
.hero-hi { color: #b4b4ba; font-size: 15px; font-weight: 500; }
.hero-title { font-size: clamp(54px, 8.4vw, 86px); line-height: .92; font-weight: 800; letter-spacing: -.035em; margin: 10px 0 12px; padding-bottom: .1em;
  background: linear-gradient(180deg, #fff 30%, #9c9ca3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lede { color: #cfcfd4; font-size: 15px; line-height: 1.55; max-width: 34ch; }
.hero-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; height: 44px; padding: 0 22px; border-radius: 999px;
  background: #fff; color: #000; font-weight: 600; font-size: 14.5px; text-decoration: none; box-shadow: 0 10px 30px -10px rgba(255,255,255,.35);
  transition: transform .2s, box-shadow .2s; }
.hero-cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(255,255,255,.5); }
.hero-cta:hover svg { transform: translateX(3px); }
/* Stats: four quiet columns under a hairline, big light numerals, small caps labels */
.hero-stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 8px 44px 40px; padding-top: 26px; }
.hero-stats::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.06) 70%, transparent); }
.hero-stats li { display: flex; flex-direction: column; gap: 8px; padding: 0 24px; }
.hero-stats li:first-child { padding-left: 0; }
.hero-stats li + li { box-shadow: inset 1px 0 0 rgba(255,255,255,.07); }
.hero-stats strong { font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 40%, #a1a1a8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats sup { font-size: .55em; font-weight: 500; vertical-align: top; position: relative; top: .1em; margin-left: 1px; }
.hero-stats span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

#panel-about.enter .hero-img { animation: hero-img 1.6s cubic-bezier(.2, .7, .2, 1) both; }
#panel-about.enter .hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
#panel-about.enter .hero-copy > :nth-child(2) { animation-delay: .08s; }
#panel-about.enter .hero-copy > :nth-child(3) { animation-delay: .16s; }
#panel-about.enter .hero-copy > :nth-child(4) { animation-delay: .24s; }
#panel-about.enter .hero-stats { animation: rise .7s cubic-bezier(.2, .7, .2, 1) .32s both; }
@keyframes hero-img { from { opacity: 0; transform: scale(1.08) translateX(3%); filter: brightness(.3); } }

/* About blocks share one header: small eyebrow over a quiet headline */
.ab-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.ab-head h3 { font-size: 15px; font-weight: 500; color: #d6d6db; letter-spacing: -.005em; }

/* Experience: hairline rows, logo, role, one highlight; hover lifts the row */
.xp li + li { border-top: 1px solid rgba(255,255,255,.06); }
.xp-row { position: relative; width: 100%; display: grid; grid-template-columns: 96px 44px 1fr minmax(0, 240px); align-items: center; gap: 18px;
  padding: 18px 14px; margin: 4px -14px; width: calc(100% + 28px); border: 0; border-radius: 14px; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: none;
  transition: background .25s; }
.xp-project:hover, .xp-project:has(.xp-link:focus-visible) { background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); }
.xp-when { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.xp-logo { position: relative; z-index: 1; padding: 0; border: 0; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #3a3a3e; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s; }
.is-now .xp-logo, .is-now .xp-logo:hover { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #D62976, 0 0 18px rgba(214,41,118,.35); }
.xp-logo:hover, .xp-logo:focus-visible { outline: none; transform: scale(1.08); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px #8e8e93; }
.xp-what { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.xp-name { display: flex; align-items: center; gap: 8px; font-size: 16.5px; font-weight: 600; color: var(--text); }
.xp-role { font-size: 13px; color: var(--muted); }
.xp-now { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, #D62976, #962FBF); }
.xp-note { font-size: 13.5px; color: #c9c9cf; text-align: right; }
.xp-note b { color: var(--text); font-weight: 700; }
/* Only the logo opens the story; on case-study rows the rest of the row is one link underneath it */
.xp-link { position: absolute; inset: 0; border-radius: inherit; }
.xp-link:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
/* Rows that open a case study: the note gives way to a "View project" pill on hover */
.xp-project .xp-note, .xp-cta { grid-column: 4; grid-row: 1; }
.xp-note { transition: opacity .25s, transform .35s cubic-bezier(.16, 1, .3, 1); }
.xp-cta { justify-self: end; display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px 9px 16px; border-radius: 999px;
  background: #f5f5f5; color: #0e0e10; font-size: 13px; font-weight: 600; white-space: nowrap;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s, transform .4s cubic-bezier(.16, 1, .3, 1); }
.xp-cta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.xp-project:hover .xp-note, .xp-project:has(.xp-link:focus-visible) .xp-note { opacity: 0; transform: translateY(-8px); }
.xp-project:hover .xp-cta, .xp-project:has(.xp-link:focus-visible) .xp-cta { opacity: 1; transform: none; transition-delay: .06s; }
.xp-project:hover .xp-cta svg { transform: translate(2px, -2px); }
/* Hovering the logo means the story, not the project */
@media (hover: hover) and (min-width: 768px) {
  .xp-project:has(.xp-logo:hover) { background: transparent; }
  .xp-project:has(.xp-logo:hover) .xp-note { opacity: 1; transform: none; }
  .xp-project:has(.xp-logo:hover) .xp-cta { opacity: 0; transform: translateY(8px); transition-delay: 0s; }
}

/* Painter first: studio photo beside the story and awards, then a strip of recent paintings */
/* Awards card: cover photo beside the list, opens the Awards story */
.paint { width: 100%; display: grid; grid-template-columns: 168px 1fr; gap: 24px; align-items: center; margin-top: 12px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.paint-img { aspect-ratio: 4 / 5; border-radius: 14px; background-size: cover; background-position: center; filter: grayscale(.2); box-shadow: 0 0 0 1px rgba(255,255,255,.08); transition: transform .4s cubic-bezier(.2, .8, .2, 1), filter .4s; }
.paint:hover .paint-img { transform: scale(1.02) rotate(-1deg); filter: none; }
.paint .paint-lede { font-size: 19px; line-height: 1.45; max-width: 30ch; }
.paint-copy { display: flex; flex-direction: column; gap: 16px; }
.paint-lede { font-size: 17px; line-height: 1.5; color: var(--text); font-weight: 500; letter-spacing: -.01em; }
.paint-list { display: flex; flex-direction: column; }
.paint-list > span { display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.06); font-size: 13.5px; color: #d6d6db; }
.paint-list b { grid-row: span 2; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.paint-list i { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Same height, natural widths; scrolls sideways when it runs out of room */
.easel-lede { margin-top: 16px; max-width: 56ch; }
.art-strip { margin-top: 24px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-bottom: -6px; scrollbar-width: none; }
.art-strip::-webkit-scrollbar { display: none; }
.art-strip li { flex: none; scroll-snap-align: start; }
.art-tile { position: relative; display: block; height: 260px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #111; cursor: zoom-in;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.art-tile img { display: block; height: 100%; width: auto; transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .4s; }
.art-tile:hover img { transform: scale(1.05); }
.art-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 28px 12px 10px;
  font-size: 12.5px; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.75));
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.art-cap i { font-style: normal; font-weight: 500; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
.art-tile:hover .art-cap, .art-tile:focus-visible .art-cap { opacity: 1; transform: none; }

/* Painting lightbox */
.art-view { max-width: none; max-height: none; width: 100vw; height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,.92); color: #fff; }
.art-view[open] { display: grid; place-items: center; animation: fade .25s ease; }
.art-view::backdrop { background: transparent; }
.art-view figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.art-view img { max-width: min(86vw, 1100px); max-height: 80dvh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9); animation: art-in .35s cubic-bezier(.2, .8, .2, 1); }
.art-view figcaption { font-size: 14px; color: #c9c9cf; }
.art-x, .art-nav { position: fixed; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.08); color: #fff; transition: background .2s; }
.art-x:hover, .art-nav:hover { background: rgba(255,255,255,.16); }
.art-x svg, .art-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art-x { top: 20px; right: 20px; }
.art-nav { top: 50%; transform: translateY(-50%); }
.art-nav.prev { left: 20px; }
.art-nav.next { right: 20px; }
@keyframes art-in { from { opacity: 0; transform: scale(.97); } }
@keyframes fade { from { opacity: 0; } }

/* Off the clock: three quiet cards */
.hobbies { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.hobbies li { display: flex; align-items: center; gap: 22px; padding: 10px 22px 10px 10px; border-radius: 18px; background: linear-gradient(180deg, #111113, #0a0a0b); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); transition: transform .3s, box-shadow .3s; }
.hobbies li:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.hob-img { flex: none; display: block; width: 44%; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #111; }
.hob-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.hobbies li:hover .hob-img img { transform: scale(1.05); }
/* Icon sits on the photo's bottom edge */
.hobbies h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.hobbies p { font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* Close: headline left, actions right, a soft story-ring glow */
.ab-cta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px; border-radius: 20px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #121212, #0a0a0a); box-shadow: inset 0 0 0 1px var(--line); }
.ab-cta::before { content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; left: -140px; bottom: -260px; border-radius: 50%; filter: blur(70px); opacity: .3;
  background: conic-gradient(#FEDA75, #FA7E1E, #D62976, #962FBF, #4F5BD5, #FEDA75); }
.ab-cta h3 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 600; line-height: 1.25; letter-spacing: -.015em; margin-top: 10px; }
.ab-cta h3 span { color: var(--muted); font-weight: 500; }
.ab-cta-btns { display: flex; gap: 10px; flex: none; }
.ab-cta .btn { height: 42px; padding: 0 22px; }

/* About entrance */
#panel-about.enter .xp li { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
#panel-about.enter .xp li:nth-child(2) { animation-delay: .06s; }
#panel-about.enter .xp li:nth-child(3) { animation-delay: .12s; }
#panel-about.enter .xp li:nth-child(4) { animation-delay: .18s; }
#panel-about.enter .xp li:nth-child(5) { animation-delay: .24s; }

@media (max-width: 767px) {
  .about { gap: 36px; }
  .hero { border-radius: 0; margin: 0 -16px; padding-top: 92%; }
  .hero-img { right: auto; left: 0; width: 100%; height: auto; top: -4%;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 88%); mask-image: linear-gradient(to bottom, #000 55%, transparent 88%); }
  .hero-copy { padding: 0 20px 28px; margin-top: -60px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 22px 0; margin: 4px 20px 28px; padding-top: 22px; }
  .hero-stats li { padding: 0 16px; }
  .hero-stats li:nth-child(odd) { padding-left: 0; box-shadow: none; }
  .hero-stats strong { font-size: 32px; }
  .hero-stats span { font-size: 10.5px; letter-spacing: .12em; }
  .xp-row { grid-template-columns: 40px 1fr auto; grid-template-areas: "logo what when" "logo note note"; gap: 4px 14px; padding: 14px 12px; margin: 2px -12px; width: calc(100% + 24px); }
  .xp-logo { grid-area: logo; width: 40px; height: 40px; align-self: start; }
  .xp-what { grid-area: what; }
  .xp-when { grid-area: when; align-self: start; padding-top: 3px; }
  .xp-note { grid-area: note; text-align: left; font-size: 13px; margin-top: 4px; }
  .xp-project { grid-template-areas: "logo what when" "logo note note" "logo cta cta"; }
  .xp-project .xp-note, .xp-project:hover .xp-note { grid-area: note; opacity: 1; transform: none; }
  .xp-cta, .xp-project:hover .xp-cta { grid-area: cta; justify-self: start; margin-top: 10px; padding: 7px 10px 7px 13px; font-size: 12.5px; opacity: 1; transform: none; }
  .ab-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .paint-lede { font-size: 16px; }
  .paint { grid-template-columns: 1fr; gap: 18px; }
  .paint-img { aspect-ratio: 16 / 10; }
  .paint .paint-lede { font-size: 17px; }
  .art-strip { margin: 20px -16px 0; padding: 0 16px 6px; scroll-padding: 0 16px; }
  .art-tile { height: 200px; }
  .art-cap { opacity: 1; transform: none; }
  .art-nav { top: auto; bottom: 24px; transform: none; }
  .art-view img { max-width: 92vw; max-height: 72dvh; }
  .hobbies { grid-template-columns: 1fr; gap: 12px; }
  .hobbies li { gap: 16px; padding-right: 16px; }
  .hob-img { width: 38%; }
  .ab-cta { flex-direction: column; align-items: stretch; padding: 24px 20px; }
  .ab-cta-btns .btn { flex: 1; }
}

/* Scroll morphs: js/morph.js feeds --p (0 entering → 1 settled) and --o (0 → 1 scrolling away) */
.hero.morph, .cv-top.morph { scale: calc(1 - var(--o, 0) * .07); border-radius: calc(20px + var(--o, 0) * 44px); opacity: calc(1 - var(--o, 0) * .55); }
.hero.morph .hero-img { translate: 0 calc(var(--o, 0) * 9%); }
.hero.morph .hero-copy { translate: 0 calc(var(--o, 0) * -40px); }
.ab-head h3.morph { opacity: calc(.15 + var(--p, 1) * .85); filter: blur(calc((1 - var(--p, 1)) * 8px)); letter-spacing: calc(-.005em + (1 - var(--p, 1)) * .12em); }
/* Paintings start as story-style bubbles and unfold into canvases, one after another */
.art-tile.morph { translate: 0 calc((1 - var(--p, 1)) * 28px); opacity: var(--p, 1); }
.hobbies li.morph { translate: 0 calc((1 - var(--p, 1)) * 28px); opacity: var(--p, 1); }
/* Contact card stretches from a pill to the full card */
.ab-cta.morph { clip-path: inset(0 calc((1 - var(--p, 1)) * 12%) round calc(20px + (1 - var(--p, 1)) * 140px)); }
.ab-cta.morph > * { opacity: calc((var(--p, 1) - .45) / .55); translate: 0 calc((1 - var(--p, 1)) * 14px); }
.ab-cta.morph::before { translate: calc((1 - var(--p, 1)) * 200px) 0; }
.rx-metrics.morph { clip-path: inset(0 calc((1 - var(--p, 1)) * 100%) 0 0 round 14px); }
