/* Home v2 – block layout (kit-local). Visual styling from /styles.css */
.v2 { min-height: 100vh; background: var(--bg); color: var(--ink); overflow-x: clip; }
.v2-top { position: relative; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.v2-top__me { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.v2-top__me:hover { color: var(--ink); }
.v2-top__ctrl { display: flex; align-items: center; gap: 8px; }
.v2-top__menu { display: none; }
.v2-hero { padding-top: 96px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 20px; }
.v2-hero__h1 { margin: 0; font-size: 64px; line-height: 1.04; letter-spacing: -0.03em; font-weight: 400; max-width: 1080px; text-wrap: balance; }
.v2-hero__sub { margin: 0; font-size: 21px; line-height: 1.4; letter-spacing: -0.005em; color: var(--ink-2); max-width: 720px; text-wrap: pretty; }
/* Streaming headline (ChatGPT-style): characters blur in one by one, the brand dot glides after the text */
.v3-type { position: relative; }
.v3-type__word { white-space: nowrap; }
.v3-type__ch { opacity: 0; }
.v3-type__ch.is-on { animation: v3-type-in 760ms cubic-bezier(0.22, 0.61, 0.36, 1) both; will-change: opacity, filter; }
@keyframes v3-type-in { from { opacity: 0; filter: blur(8px); } 40% { opacity: 0.7; } to { opacity: 1; filter: blur(0); } }
.v3-type__dot { position: absolute; top: 0; left: 0; width: 0.34em; height: 0.34em; pointer-events: none; transition: transform 120ms linear; animation: v3-dot-in 360ms cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.v3-type__dot.is-jump { transition: none; }
.v3-type__dot i { display: block; width: 100%; height: 100%; transition: opacity 560ms cubic-bezier(0.4, 0, 0.2, 1), transform 560ms cubic-bezier(0.4, 0, 0.2, 1), filter 560ms cubic-bezier(0.4, 0, 0.2, 1); }
.v3-type__dot b { display: block; width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(90deg, #007DFF, #00BAFF); animation: v3-dot 1.4s ease-in-out infinite; }
.v3-type__dot.is-gone i { opacity: 0; transform: scale(0.3); filter: blur(2px); }
@keyframes v3-dot-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes v3-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.84); } }
/* Subline and CTAs come in as the dot fades */
.v3-hero__after { opacity: 0; transform: translateY(10px); filter: blur(8px); transition: opacity 900ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1), filter 900ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.v3-hero__after.is-shown { opacity: 1; transform: none; filter: none; }
.v2-hero__cta.v3-hero__after { transition-delay: 180ms; }
@media (prefers-reduced-motion: reduce) { .v3-type__ch, .v3-type__ch.is-on { opacity: 1; animation: none; } .v3-hero__after { transition: none; transform: none; filter: none; } }
.v2-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
/* Hero CTAs: equal width, sized by the longest label */
.v3-hero .v2-hero__cta { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
@media (max-width: 1024px) { .v3-hero .v2-hero__cta { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .v3-hero .v2-hero__cta { display: grid; grid-template-columns: minmax(0, 1fr); align-self: stretch; } }
.v2-whitebtn { background: var(--surface); border-color: transparent; box-shadow: 0 0 0 1px var(--line); }
.v2-hero-bento .dl-tray { grid-auto-rows: 230px; }

.v2-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.v2-photo--wide img { object-position: center 30%; }
.v2-map { min-height: 200px; }
.v2-map__pin { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(0, 125, 255, 0.12); display: flex; align-items: center; justify-content: center; }
.v2-career { display: flex; flex-direction: column; }
.v2-career__row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 17px; }
.v2-career__row:first-child { border-top: 0; padding-top: 4px; }
.v2-career__when { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }

.v2-about { gap: 0; padding: 12px 32px; }
.v2-about__row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.v2-about__row:first-child { border-top: 0; }
.v2-about__row .dl-block__k { padding-top: 6px; }
.v2-about__text { font-size: 22px !important; line-height: 1.42 !important; letter-spacing: -0.01em !important; }
.v2-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.v2-list li { display: flex; gap: 10px; text-wrap: pretty; }
.v2-list li::before { content: "+"; color: var(--ink-3); }
.v2-list--big li { font-size: 18px; line-height: 1.35; }

.v2-stats { margin-bottom: 10px; }
.v2-stat { font-size: 64px; line-height: 1; letter-spacing: -0.04em; font-weight: 300; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-work { margin-top: 10px; }
.v2-work__aside { gap: 12px; }
.v2-roles { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 4px; }
.v2-roles > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.v2-case { min-height: 230px; gap: 12px; padding-bottom: 64px; }
.v2-case__sum { font-size: 48px; line-height: 1; letter-spacing: -0.04em; font-weight: 300; font-variant-numeric: tabular-nums; }
.v2-case__t { font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--tr-label); text-transform: uppercase; margin-top: auto; text-wrap: pretty; }

.v2-proj__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.v2-proj__media { border-radius: 16px; aspect-ratio: 16 / 9; margin-top: 8px; background-color: var(--bg); }
.v2-proj__media.is-wide { aspect-ratio: 21 / 8; }

/* Project showcase: painted backdrop + MacBook + iPhone. Devices are sized in cqh of the cover; screens in device points. */
.v2-show { position: relative; overflow: hidden; isolation: isolate; container-type: size; aspect-ratio: 16 / 10; background: none; }
.v2-show__bg { position: absolute; inset: -12%; z-index: -1; background: var(--show-paint); filter: blur(24px) saturate(1.15); }
.v2-show::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: soft-light; opacity: .9;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='700' height='700'><filter id='c'><feTurbulence type='fractalNoise' baseFrequency='.006 .012' numOctaves='5' seed='7' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23c)'/></svg>");
  background-size: 180px 180px, cover;
}
.v2-show--sunset { --show-paint:
  radial-gradient(50% 70% at 10% 14%, #ffd27a 0, transparent 62%),
  radial-gradient(45% 65% at 90% 10%, #ff8a5c 0, transparent 60%),
  radial-gradient(70% 85% at 74% 104%, #e8262f 0, transparent 66%),
  radial-gradient(55% 75% at 4% 100%, #ff4f8b 0, transparent 62%),
  radial-gradient(40% 50% at 46% 52%, #ffb070 0, transparent 70%),
  linear-gradient(160deg, #ffd9a8, #ff6248); }
.v2-show--lime { --show-paint:
  radial-gradient(55% 75% at 10% 15%, #f6fbc8 0, transparent 62%),
  radial-gradient(50% 70% at 90% 10%, #d4e93a 0, transparent 60%),
  radial-gradient(70% 85% at 78% 100%, #0b6f5b 0, transparent 66%),
  radial-gradient(55% 75% at 4% 100%, #5cc49f 0, transparent 62%),
  radial-gradient(40% 50% at 45% 55%, #e6f27a 0, transparent 70%),
  linear-gradient(160deg, #f1f6c4, #7cc58a); }
.v2-show--blue { --show-paint:
  radial-gradient(55% 75% at 10% 15%, #d8eeff 0, transparent 62%),
  radial-gradient(50% 70% at 92% 8%, #00baff 0, transparent 60%),
  radial-gradient(70% 85% at 75% 100%, #0052b8 0, transparent 66%),
  radial-gradient(55% 75% at 4% 100%, #7b6bff 0, transparent 62%),
  radial-gradient(40% 50% at 45% 55%, #7cc4ff 0, transparent 70%),
  linear-gradient(160deg, #e3f1ff, #2f8cff); }


.v2-edu { gap: 12px; }
.v2-langs { display: flex; flex-direction: column; }
.v2-langs > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.v2-langs > div:first-child { border-top: 0; }
.v2-hanzi { font-size: 56px; line-height: 1; letter-spacing: -0.03em; font-weight: 300; margin-top: auto; }
.v2-ai { padding-right: 160px; }
.v2-link { flex-direction: row !important; align-items: center; gap: 14px !important; font-size: 17px; }
.v2-link .dl-arrow { margin-left: auto; }
.v2-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.v2-foot__links { display: flex; align-items: center; gap: 20px; }
.v2-foot__legal { flex-basis: 100%; max-width: 880px; margin: 8px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.55; text-wrap: pretty; }
.v2 .dl-navpill-wrap { top: 14px; }
.v2 .mob-menu { position: fixed; inset: 8px; z-index: 82; border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.v2 .mob-menu a { font-size: var(--fs-h2); letter-spacing: var(--tr-h2); padding: 6px 0; }

@media (max-width: 1024px) {
  .v2-hero__h1 { font-size: 48px; }
  .v2-about__row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .v2-ai { padding-right: 28px; padding-top: 64px; }
}
@media (max-width: 1180px) {
  .v2-top__menu { display: inline-flex; }
}
@media (max-width: 640px) {
  .v2-top .dl-seg { display: none; }
}
@media (max-width: 640px) {
  .v2-hero { padding-top: 40px; padding-bottom: 40px; gap: 14px; }
  .v2-hero__h1 { font-size: 36px; line-height: 1.08; }
  .v2-hero__sub { font-size: 17px; }
  .v2-hero__cta .dl-btn { flex: 1 1 100%; }
  .v2-hero-bento .dl-tray { grid-auto-rows: auto; }
  .v2-photo { aspect-ratio: 4 / 5; }
  .v2-map { min-height: 180px; }
  .v2-career__row { grid-template-columns: 96px minmax(0, 1fr); font-size: 15px; }
  .v2-about { padding: 4px 20px; }
  .v2-about__text { font-size: 18px !important; }
  .v2-stat { font-size: 52px; }
  .v2-case__sum { font-size: 40px; }
  .v2-proj__head { flex-direction: column; gap: 10px; }
  .v2-proj__media.is-wide { aspect-ratio: 4 / 3; }
  .v2-show, .v2-show.is-wide { aspect-ratio: 16 / 11; }
  .v2-photo--wide { aspect-ratio: 4 / 3; }
  .v2-foot { flex-direction: column; align-items: flex-start; }
}

/* ── Home v3 ─────────────────────────────────────────────────────────── */
/* Practice-area colours = macOS Finder tag colours (system blue, purple, orange, green). Tags on one item overlap like Finder tags. */
.v3-c--arb { --area: #007AFF; }
.v3-c--courts { --area: #AF52DE; }
.v3-c--crypto { --area: #FF9500; }
.v3-c--itip { --area: #34C759; }
/* Bubbles: the gradient dots of the CV editor (blue, violet, fire, green), same in both themes */
.v3-c--arb { --g: linear-gradient(90deg, #0A6CFF 0%, #00B8FF 100%); }
.v3-c--courts { --g: linear-gradient(90deg, #5B3DF5 0%, #B57BFF 100%); }
.v3-c--crypto { --g: linear-gradient(90deg, #FF2E0F 0%, #FF7A00 55%, #FFD21A 100%); }
.v3-c--itip { --g: linear-gradient(90deg, #00A65A 0%, #5FD93A 60%, #C6F55B 100%); }
.v3-c--legaltech { --area: #FF2D55; --g: linear-gradient(90deg, #E0115F 0%, #FF77A8 100%); }
.v3-c--brand { --g: linear-gradient(90deg, #007DFF 0%, #00BAFF 100%); }
.v3-bub { display: inline-flex; flex: none; align-items: center; }
.v3-bub__i { position: relative; display: block; width: var(--bub, 10px); height: var(--bub, 10px); border-radius: 50%; background: var(--g); box-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.18); }
.v3-bub__i + .v3-bub__i { margin-left: calc(var(--bub, 10px) * -0.45); box-shadow: 0 0 0 1.5px var(--bg), 0 0.5px 1.5px rgba(0, 0, 0, 0.18); }
.v3-bub__i:first-child:not(:only-child) { box-shadow: 0 0 0 1.5px var(--bg), 0 0.5px 1.5px rgba(0, 0, 0, 0.18); }
:root[data-theme="dark"] .v3-c--arb { --area: #0A84FF; }
:root[data-theme="dark"] .v3-c--courts { --area: #BF5AF2; }
:root[data-theme="dark"] .v3-c--crypto { --area: #FF9F0A; }
:root[data-theme="dark"] .v3-c--itip { --area: #30D158; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .v3-c--arb { --area: #0A84FF; }
  :root:not([data-theme="light"]) .v3-c--courts { --area: #BF5AF2; }
  :root:not([data-theme="light"]) .v3-c--crypto { --area: #FF9F0A; }
  :root:not([data-theme="light"]) .v3-c--itip { --area: #30D158; }
}

/* Hero: full screen, statement left, round portrait right */
.v3-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: 24px; min-height: calc(100svh - 76px); padding-bottom: 24px; }
.v3-hero__text { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; padding: 48px 0; }
.v3-hero__portrait { display: block; justify-self: center; width: min(100%, 480px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
/* Hero CTAs in the brand colours of Telegram and LinkedIn */
.v3-brandbtn { --b: #229ED9; --b-hover: #1B8BC2; border-color: transparent; background: var(--b); color: #fff; }
.v3-brandbtn:hover { background: var(--b-hover); border-color: transparent; color: #fff; }
.v3-brandbtn:active { background: var(--b-hover); }
.v3-brandbtn--li { --b: #0A66C2; --b-hover: #004182; }

/* About: one text, full screen, words light up on scroll */
.v3-about { min-height: 100svh; display: flex; align-items: center; padding: 120px 0; }
.v3-about__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.v3-about__in > .dl-sechead__t { grid-column: 1 / span 3; align-self: start; position: sticky; top: 96px; }
.v3-about__text { grid-column: 4 / span 9; display: flex; flex-direction: column; gap: 1em; }
.v3-about__text .dl-reveal-text { font-size: 30px; line-height: 1.36; letter-spacing: -0.012em; }

/* Practice-area filters */
.v3-areas { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.v3-areas__list { display: flex; flex-wrap: wrap; gap: 8px; }
.v3-area { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.v3-area:not([class*="v3-c--"]) { --area: var(--ink); }
.v3-area:hover { border-color: color-mix(in srgb, var(--area) 45%, var(--line)); }
.v3-area.is-on { background: color-mix(in srgb, var(--area) 12%, var(--surface)); border-color: color-mix(in srgb, var(--area) 60%, transparent); }
.v3-area:not([class*="v3-c--"]).is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.v3-area:active { transform: scale(0.98); }
.v3-area:focus-visible, .v3-row__head:focus-visible, .v3-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v3-area__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--g, var(--area)); }
.v3-area__n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.v3-area:not([class*="v3-c--"]).is-on .v3-area__n { color: inherit; }

/* Expandable year list (experience, education) */
.v3-list { border-top: 1px solid var(--line); }
.v3-row { border-bottom: 1px solid var(--line); transition: opacity var(--dur-3) var(--ease-out); }
.v3-row.is-dim { opacity: 0.38; }
.v3-row__head { width: 100%; display: grid; grid-template-columns: 160px minmax(0, 1fr) auto 32px; align-items: center; gap: 24px; padding: 24px 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.v3-row__when { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 17px; font-variant-numeric: tabular-nums; }
.v3-row__what { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: var(--tr-h3); text-wrap: pretty; }
.v3-row__n { color: var(--ink-2); font-size: var(--fs-caption); white-space: nowrap; }
.v3-row__pm { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); transition: background-color var(--dur-2) var(--ease-out); }
.v3-row__pm::before, .v3-row__pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; border-radius: 1px; background: var(--ink); transition: transform var(--dur-3) var(--ease-out); }
.v3-row__pm::after { transform: rotate(90deg); }
.v3-row.is-open .v3-row__pm::after { transform: rotate(0deg); }
.v3-row__head:hover .v3-row__pm { background: var(--line); }
.v3-row__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-4) var(--ease-out-soft); }
.v3-row.is-open .v3-row__body { grid-template-rows: 1fr; }
.v3-row__inner { min-height: 0; overflow: hidden; padding-left: 184px; }
.v3-row__inner::after { content: ""; display: block; height: 28px; }
.v3-co { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 760px; margin-bottom: 12px; }
.v3-co__logo { height: 22px; width: auto; filter: none; opacity: 1; }
.v3-co__p { margin: 0; text-wrap: pretty; }
.v3-items { display: flex; flex-direction: column; }
.v3-item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 20px; align-items: center; gap: 16px; margin: 0 -16px; padding: 14px 16px; border: 0; border-radius: 16px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--dur-2) var(--ease-out); }
.v3-item + .v3-item::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: var(--line); }
.v3-item:hover { background-color: var(--surface-2); }
.v3-item:hover::before, .v3-item:hover + .v3-item::before { opacity: 0; }
.v3-item:hover .dl-arrow--e { transform: translateX(2px); }
.v3-item.is-static { cursor: default; }
.v3-item.is-static:hover { background: none; }
.v3-item:has(.v3-item__tags:empty) { grid-template-columns: minmax(0, 1fr) auto 20px; }
.v3-item__tags:empty { display: none; }
.v3-item__tags { display: flex; gap: 4px; }
.v3-tagdot { width: 8px; height: 8px; border-radius: 50%; background: var(--area); }
.v3-item__t { display: flex; flex-direction: column; gap: 2px; font-size: 17px; line-height: 1.35; text-wrap: pretty; }
.v3-item__sub { color: var(--ink-2); font-size: var(--fs-caption); }
.v3-item__m { display: flex; align-items: baseline; gap: 16px; color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.v3-item__sum { color: var(--ink); font-size: 17px; }
.v3-none { margin: 8px 0; color: var(--ink-3); }

/* Panel extras */
.v3-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.v3-tag { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--r-full); background: color-mix(in srgb, var(--area) 12%, transparent); font-size: 13px; }

/* Experience as in the CV: one continuous list of jobs */
.v3-jobs { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.v3-job { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 0; padding: 32px 0; border-bottom: 1px solid var(--line); transition: opacity var(--dur-3) var(--ease-out); }
.v3-job.is-dim { opacity: 0.45; }
.v3-job__when { display: flex; flex-direction: column; gap: 4px; padding-right: 24px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.v3-job__dur { color: var(--ink-2); opacity: 0.8; }
.v3-job__main { display: flex; flex-direction: column; gap: 6px; max-width: 880px; }
.v3-job__name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 22px; font-weight: 400; line-height: 1.3; letter-spacing: -0.01em; }
.v3-job__now { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-full); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-text); font-size: 13px; letter-spacing: 0; }
.v3-job__place { margin: 0; color: var(--ink-2); font-size: 15px; }
.v3-job__about { margin: 6px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.v3-job__roles { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 16px; }
.v3-job__roles li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.v3-job__period { color: var(--ink-2); font-size: 15px; }
.v3-job__listk { margin: 10px 0 0; font-size: 16px; }
.v3-bullets { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.v3-bullets li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; font-size: 17px; line-height: 1.5; text-wrap: pretty; }
.v3-bullets .v3-bub { height: 1.5em; }
.v3-ilink { color: inherit; text-decoration: underline dashed; text-decoration-color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--dur-2) var(--ease-out); }
.v3-ilink:hover { color: var(--accent-text); }
.v3-ilink .dl-arrow { margin-left: 2px; color: var(--accent-text); font-size: 0.85em; }

/* Languages: quiet 2×2 list with round flags (like the jurisdiction lists on scale-style sites) */
.v3-langs__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; max-width: 880px; margin: 0; padding: 0; list-style: none; }
.v3-langs__row { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 17px; }
.v3-langs__flag { width: 24px; height: 24px; flex: none; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.v3-langs__lvl { color: var(--ink-2); font-size: 15px; }
@media (max-width: 640px) { .v3-langs__list { grid-template-columns: minmax(0, 1fr); gap: 14px; } .v3-langs__row { font-size: 16px; } .v3-langs__lvl { font-size: 14px; } }
.v2-foot__links { flex-wrap: wrap; }
.v2-foot__links .dl-arrowlink, .v2-foot__links a { white-space: nowrap; }
.v3-panel__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Beyond work: four equal square widgets (marco.fyi) */
.v3-beyond .v3-sq { aspect-ratio: 1 / 1; min-height: 0; }

/* Telegram tile – hover on the button floods the tile from the app icon (marco.fyi "Twitter Tile Hover") */
.v3-tg-block { padding: 24px; }
.v3-tg { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.v3-tg__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.v3-tg__who { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); }
.v3-tg__who:hover { color: var(--ink); }
.v3-tg__names { display: flex; flex-direction: column; min-width: 0; }
.v3-tg__name { font-size: 17px; font-weight: 500; line-height: 1.2; transition: color 220ms ease; }
.v3-tg__handle { color: var(--ink-2); font-size: 16px; line-height: 1.4; transition: color 220ms ease; }
.v3-tg__app { position: relative; width: 56px; height: 56px; flex: none; display: block; }
.v3-tg__flood { position: absolute; inset: 1px; z-index: 0; border-radius: 13px; background-image: linear-gradient(#2AABEE, #229ED9); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transform-origin: 50% 50%; transition: transform 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.25s; }
.v3-tg__app img { position: relative; z-index: 1; display: block; width: 56px; height: 56px; }
.v3-tg__text { position: relative; z-index: 1; margin: 0; color: var(--ink); font-size: 22px; line-height: 1.35; letter-spacing: -0.01em; text-wrap: pretty; transition: color 220ms ease; }
.v3-tg__at { color: var(--accent-text); transition: color 220ms ease; }
.v3-tg__btn { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border: 2px solid rgba(0, 0, 0, 0.1); border-radius: 56px; background-color: rgba(0, 0, 0, 0); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--ink); font-size: 16px; font-weight: 500; transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease; }
.v3-tg__btn:hover { color: #fff; }
.v3-tg__btn:hover .dl-arrow--ne { transform: translate(2px, -2px); }
.v3-tg:has(.v3-tg__btn:hover) .v3-tg__flood, .v3-tg:has(.v3-tg__btn:focus-visible) .v3-tg__flood { transform: scale(18); transition: transform 180ms cubic-bezier(0.55, 0.085, 0.68, 0.53); box-shadow: none; }
.v3-tg:has(.v3-tg__btn:hover) :is(.v3-tg__name, .v3-tg__text, .v3-tg__at), .v3-tg:has(.v3-tg__btn:focus-visible) :is(.v3-tg__name, .v3-tg__text, .v3-tg__at) { color: #fff; }
.v3-tg:has(.v3-tg__btn:hover) .v3-tg__handle, .v3-tg:has(.v3-tg__btn:focus-visible) .v3-tg__handle { color: rgba(255, 255, 255, 0.6); }
.v3-tg:has(.v3-tg__btn:hover) .v3-tg__btn, .v3-tg:has(.v3-tg__btn:focus-visible) .v3-tg__btn { background-color: rgba(0, 0, 0, 0.3); border-color: rgba(0, 0, 0, 0.3); color: #fff; outline: none; }

/* Chinese flashcards – reveal floods the tile red, like Apple Music on play */
.v3-zh-block { padding: 24px; }
.v3-zh { --zh-1: #F5484A; --zh-2: #D7263D; position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.v3-zh__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.v3-zh__k { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; font-size: 17px; font-weight: 500; line-height: 1.25; transition: color 220ms ease; }
.v3-zh__cap { color: var(--ink-2); font-size: 14px; font-weight: 400; transition: color 220ms ease; }
.v3-zh__app { position: relative; width: 56px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; cursor: pointer; }
.v3-zh__flood { position: absolute; inset: 0; z-index: 0; border-radius: 12px; background-image: linear-gradient(var(--zh-1), var(--zh-2)); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transform-origin: 50% 50%; transition: transform 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.25s; }
.v3-zh__glyph { position: relative; z-index: 1; color: #fff; font-size: 30px; line-height: 1; }
.v3-zh.is-shown .v3-zh__flood { transform: scale(18); transition: transform 180ms cubic-bezier(0.55, 0.085, 0.68, 0.53); box-shadow: none; }
.v3-zh__card { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.v3-zh__han { font-size: 72px; line-height: 1; letter-spacing: 0.02em; transition: color 220ms ease; }
.v3-zh__han.is-3 { font-size: 60px; }
.v3-zh__han.is-4 { font-size: 50px; }
.v3-zh__py, .v3-zh__tr { font-size: 18px; line-height: 1.3; opacity: 0; transform: translateY(4px); filter: blur(4px); transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out), filter 280ms var(--ease-out), color 220ms ease; }
.v3-zh__py { margin-top: 4px; color: var(--ink-2); }
.v3-zh.is-shown :is(.v3-zh__py, .v3-zh__tr) { opacity: 1; transform: none; filter: none; }
.v3-zh.is-shown :is(.v3-zh__han, .v3-zh__k, .v3-zh__tr) { color: #fff; }
.v3-zh.is-shown :is(.v3-zh__py, .v3-zh__cap) { color: rgba(255, 255, 255, 0.75); }
.v3-zh__bar { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; height: 48px; padding: 0 10px; border: 2px solid rgba(0, 0, 0, 0.1); border-radius: 56px; transition: background-color 220ms ease, border-color 220ms ease; }
.v3-zh__btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: #9A9999; cursor: pointer; transition: color 220ms ease, transform 120ms ease; }
.v3-zh__btn:hover { color: var(--ink-2); }
.v3-zh__btn:active { transform: scale(0.88); }
.v3-zh__btn:focus-visible, .v3-zh__app:focus-visible, .v3-zh__card:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.v3-zh.is-shown .v3-zh__bar { background-color: rgba(0, 0, 0, 0.2); border-color: rgba(0, 0, 0, 0.2); }
.v3-zh.is-shown .v3-zh__btn { color: #fff; }
.v3-zh.is-shown .v3-zh__btn:hover { color: rgba(255, 255, 255, 0.75); }

:root[data-theme="dark"] :is(.v3-tg__btn, .v3-zh__bar) { border-color: rgba(255, 255, 255, 0.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.v3-tg__btn, .v3-zh__bar) { border-color: rgba(255, 255, 255, 0.12); } }
@media (prefers-reduced-motion: reduce) {
  .v3-row__body, .v3-tg__flood, .v3-zh__flood, .v3-tg:has(.v3-tg__btn:hover) .v3-tg__flood, .v3-zh.is-shown .v3-zh__flood, .v3-zh__py, .v3-zh__tr { transition: none; }
}

@media (max-width: 1024px) {
  .v3-about__in > .dl-sechead__t { grid-column: 1 / -1; position: static; }
  .v3-about__text { grid-column: 1 / -1; }
  .v3-about__text .dl-reveal-text { font-size: 26px; }
  .v3-row__head { grid-template-columns: 120px minmax(0, 1fr) auto 32px; gap: 16px; }
  .v3-row__inner { padding-left: 136px; }
  .v3-job { grid-template-columns: 152px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .v3-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 0; }
  .v3-hero__text { padding: 24px 0 8px; }
  .v3-hero__portrait { order: -1; justify-self: start; width: 140px; margin-top: 24px; }
  .v3-about { min-height: 0; padding: 72px 0; }
  .v3-about__text .dl-reveal-text { font-size: 21px; line-height: 1.4; }
  .v3-areas { gap: 10px; }
  .v3-area { height: 36px; padding: 0 12px; font-size: 14px; }
  .v3-row__head { grid-template-columns: minmax(0, 1fr) 32px; grid-template-areas: "when pm" "what pm" "n pm"; gap: 4px 12px; padding: 18px 0; }
  .v3-row__when { grid-area: when; font-size: 14px; }
  .v3-row__what { grid-area: what; font-size: 18px; }
  .v3-row__n { grid-area: n; }
  .v3-row__pm { grid-area: pm; }
  .v3-row__inner { padding-left: 0; }
  .v3-job { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 24px 0; }
  .v3-job__when { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; }
  .v3-job__name { font-size: 20px; }
  .v3-bullets li { grid-template-columns: 22px minmax(0, 1fr); font-size: 16px; }
  .v3-item { grid-template-columns: 20px minmax(0, 1fr) 16px; grid-template-areas: "tags t arr" ". m arr"; gap: 4px 12px; margin: 0 -12px; padding: 12px; }
  .v3-item:has(.v3-item__tags:empty) { grid-template-columns: minmax(0, 1fr) 16px; grid-template-areas: "t arr" "m arr"; }
  .v3-item__tags { grid-area: tags; padding-top: 6px; align-self: start; }
  .v3-item__t { grid-area: t; font-size: 16px; }
  .v3-item__m { grid-area: m; font-size: 14px; }
  .v3-item > :last-child { grid-area: arr; }
  .v3-item__sum { font-size: 15px; }
  .v3-tg__text { font-size: 20px; }
}

/* ── Devices ─────────────────────────────────────────────────────────── */
/* MacBook: M2/M3 Air proportions (lid 1000 × 651, bezel 16/18, chin 28), 16:10 screen without the notch, Silver aluminium. */
.dv-mac { position: absolute; left: 50%; bottom: 9cqh; width: 112cqh; transform: translateX(-60%); container-type: inline-size; filter: drop-shadow(0 3cqh 4cqh rgba(20, 10, 0, 0.22)); transition: transform 0.6s var(--ease-out); }
.v2-show.is-solo .dv-mac { transform: translateX(-50%); }
.dv-mac__lid { position: relative; aspect-ratio: 1000 / 651; border-radius: 3.4cqw 3.4cqw 1.2cqw 1.2cqw; background: #0b0b0d; box-shadow: 0 0 0 0.28cqw #c7c9ce, 0 0 0 0.42cqw #9c9ea4, inset 0 0 0 0.12cqw #26262a; }
.dv-mac__lid::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.5cqw; border-radius: 0 0 1.2cqw 1.2cqw; background: linear-gradient(180deg, #1d1d20, #3a3b40); }
.dv-mac__cam { position: absolute; top: 0.72cqw; left: 50%; width: 0.5cqw; height: 0.5cqw; margin-left: -0.25cqw; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3b4a63 0 25%, #121318 45%); box-shadow: 0 0 0 0.1cqw #1a1a1e; }
.dv-mac__screen { position: absolute; left: 1.6cqw; right: 1.6cqw; top: 1.8cqw; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 0.9cqw 0.9cqw 0.15cqw 0.15cqw; background: #fff; container-type: inline-size; --pt: calc(100cqw / 1440); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; color: #1d1d1f; }
.dv-mac__base { position: relative; z-index: -1; height: 2.1cqw; margin: -0.1cqw -1.6% 0; border-radius: 0.2cqw 0.2cqw 2.4cqw 2.4cqw / 0.2cqw 0.2cqw 1.6cqw 1.6cqw; background: linear-gradient(180deg, #f3f4f6 0%, #dfe0e4 28%, #c3c5ca 62%, #8f9298 100%); box-shadow: inset 0 0.12cqw 0 rgba(255, 255, 255, 0.9); }
.dv-mac__notch { position: absolute; top: 0; left: 50%; width: 13%; height: 46%; transform: translateX(-50%); border-radius: 0 0 1cqw 1cqw; background: linear-gradient(180deg, #a9abb1, #cfd1d5); }

.dv-ico { display: block; width: calc(16 * var(--pt)); height: calc(16 * var(--pt)); flex: none; }
.dv-batt { position: relative; width: calc(24 * var(--pt)); height: calc(11 * var(--pt)); border: calc(1 * var(--pt)) solid rgba(0, 0, 0, 0.45); border-radius: calc(3 * var(--pt)); padding: calc(1.5 * var(--pt)); box-sizing: border-box; }
.dv-batt span { display: block; width: 78%; height: 100%; border-radius: calc(1.5 * var(--pt)); background: #1d1d1f; }
.dv-batt::after { content: ""; position: absolute; right: calc(-3 * var(--pt)); top: 30%; width: calc(1.5 * var(--pt)); height: 40%; border-radius: 0 1px 1px 0; background: rgba(0, 0, 0, 0.45); }

.dv-page { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.dv-page--mac { position: absolute; inset: 0; }
.dv-page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* iPhone 16 Pro: body 71.5 × 149.6 mm, Black Titanium frame, 402 × 874 pt screen, Dynamic Island 126 × 37 pt. */
.dv-phone { position: absolute; bottom: 5cqh; left: calc(50cqw + 26cqh); width: 30cqh; container-type: inline-size; filter: drop-shadow(0 3cqh 4cqh rgba(20, 10, 0, 0.28)); transition: transform 0.6s var(--ease-out); }
.dv-phone__body { position: relative; padding: 4.4cqw; border-radius: 17.5cqw; background: #050506; box-shadow: 0 0 0 1.1cqw #3c3c3f, 0 0 0 1.35cqw #1f1f21, inset 0 0 0 0.3cqw #1a1a1c; }
.dv-phone__body::before, .dv-phone__body::after { content: ""; position: absolute; width: 1.1cqw; border-radius: 0.6cqw; background: linear-gradient(90deg, #2a2a2c, #4a4a4d); }
.dv-phone__body::before { left: -2.2cqw; top: 19%; height: 7%; box-shadow: 0 13cqw 0 #3a3a3d, 0 27cqw 0 #3a3a3d; }
.dv-phone__body::after { right: -2.2cqw; top: 27%; height: 14%; }
.dv-phone__screen { position: relative; aspect-ratio: 402 / 874; overflow: hidden; border-radius: 13.4cqw; background: var(--page-top); container-type: inline-size; --pt: calc(100cqw / 402); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; color: #000; }
.dv-status { position: absolute; top: 0; left: 0; right: 0; z-index: 3; height: calc(54 * var(--pt)); display: flex; align-items: center; justify-content: space-between; padding: calc(4 * var(--pt)) calc(34 * var(--pt)) 0 calc(52 * var(--pt)); }
.dv-status__time { font-size: calc(17 * var(--pt)); font-weight: 600; letter-spacing: -0.02em; }
.dv-status__right { display: flex; align-items: center; gap: calc(6 * var(--pt)); }
.dv-status .dv-ico { width: calc(18 * var(--pt)); height: calc(12 * var(--pt)); }
.dv-batt--ios { width: calc(25 * var(--pt)); height: calc(12 * var(--pt)); border-radius: calc(4 * var(--pt)); border-color: rgba(0, 0, 0, 0.35); }
.dv-batt--ios span { background: #000; border-radius: calc(2 * var(--pt)); }
.dv-island { position: absolute; z-index: 4; top: calc(11 * var(--pt)); left: 50%; width: calc(126 * var(--pt)); height: calc(37 * var(--pt)); transform: translateX(-50%); border-radius: 999px; background: #000; }
.dv-page--phone { position: absolute; top: calc(62 * var(--pt)); left: 0; right: 0; bottom: 0; }
.dv-home { position: absolute; z-index: 3; bottom: calc(8 * var(--pt)); left: 50%; width: calc(140 * var(--pt)); height: calc(5 * var(--pt)); transform: translateX(-50%); border-radius: 999px; background: #000; }

.v2-proj:hover .dv-phone { transform: translateY(-2cqh); }
.v2-proj:hover .dv-mac { transform: translateX(-60%) translateY(-1cqh); }
.v2-proj:hover .v2-show.is-solo .dv-mac { transform: translateX(-50%) translateY(-1cqh); }
@media (prefers-reduced-motion: reduce) { .dv-mac, .dv-phone { transition: none; } }
@media (max-width: 640px) {
  .dv-mac { width: 100cqh; bottom: 12cqh; transform: translateX(-62%); }
  .dv-phone { width: 27cqh; left: calc(50cqw + 18cqh); }
}

/* Social app icons in the top bar */
.v3-socials { display: flex; align-items: center; gap: 8px; margin-right: 8px; }
/* The shadow sits on an inner wrapper: a filter on the link itself would trap the tooltip's glass and z-index. */
.v3-social { position: relative; display: block; width: 32px; height: 32px; border-radius: 8px; transition: transform var(--dur-2) var(--ease-out); }
.v3-social__ico { display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18)); }
.v3-social img { display: block; width: 32px; height: 32px; }
.v3-social:hover { transform: translateY(-1px); }
.v3-social:active { transform: scale(0.94); }
.v3-social:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.v3-social__tip { position: absolute; top: calc(100% + 10px); left: 50%; z-index: 60; display: flex; flex-direction: column; align-items: center; padding: 8px 12px; border-radius: 14px; font-size: 13px; line-height: 1.3; white-space: nowrap; color: var(--ink); opacity: 0; transform: translate(-50%, -4px); pointer-events: none; transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.v3-social:hover .v3-social__tip, .v3-social:focus-visible .v3-social__tip { opacity: 1; transform: translate(-50%, 0); }
.v3-socials--menu { margin: auto 0 0; padding-top: 16px; gap: 12px; }
.v3-socials--menu .v3-social, .v3-socials--menu .v3-social img { width: 44px; height: 44px; }
.v3-socials--menu .v3-social__tip { display: none; }

/* Finder-style tags: overlapping dots, each with a ring in the row colour */
.v3-item { --ring: var(--bg); }
.v3-item:hover { --ring: var(--surface-2); }
.v3-item__tags { display: flex; gap: 0; }
.v3-tagdot { width: 10px; height: 10px; box-shadow: 0 0 0 1.5px var(--ring); transition: box-shadow var(--dur-2) var(--ease-out); }
.v3-tagdot + .v3-tagdot { margin-left: -4px; }
.v3-co__logo--edu { height: 40px; }
