@font-face {
  font-family: "Inter";
  src: url("./assets/inter-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Clash Display";
  src: url("./assets/clash-display-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: var(--bg);
  --foreground: var(--text-strong);
  --muted: var(--text-secondary);
  --border: var(--line-strong);
  --page-gutter: clamp(24px, 4.166667vw, 80px);
  --hero-scroll: 0;
  --copy-primary-size: 26px;
  --copy-secondary-size: 15px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: var(--background);
  color: var(--foreground);
}

* { box-sizing: border-box; }
/* Applies to home/detail pages, including dynamically generated media. */
html body, html body * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none;
}
html body :is(input, textarea, [contenteditable]:not([contenteditable="false"])) {
  -webkit-user-select: text !important;
  user-select: text !important;
}
img, video, canvas, svg, a { -webkit-user-drag: none; }
body, h1, h2, h3, p { margin: 0; }
body { min-width: 320px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; }

.cursor-dot { position: fixed; z-index: 2147483647; display: grid; place-items: center; width: 90px; height: 44px; border-radius: 999px; background: #fff; color: #000; mix-blend-mode: difference; pointer-events: none; transform: translate(-50%, -50%); visibility: hidden; overflow: hidden; }
.cursor-label { font-family: "Clash Display",sans-serif; font-size: 16px; font-weight: 600; line-height: 1; letter-spacing: 0; opacity: 0; transform: scale(.75); transition: opacity 160ms ease, transform 240ms cubic-bezier(.22,1,.36,1); }
.cursor-cover .cursor-label { opacity: 1; transform: scale(1); transition-delay: 60ms; }
html:lang(zh-CN) .cursor-label { font-family: Inter,"HarmonyOS Sans SC","PingFang SC",sans-serif; }
.scramble-word { display:inline-block; white-space:nowrap; }
.scramble-glyph { display:inline-block; overflow:hidden; vertical-align:bottom; white-space:pre; text-align:left; letter-spacing:0; }
@media (prefers-reduced-motion: reduce) { .cursor-dot, .cursor-label { transition: none; } }
@media (hover: hover) and (pointer: fine) {
  .custom-cursor-active, .custom-cursor-active * { cursor: none !important; }
  .custom-cursor-active .cursor-dot.cursor-cover { visibility: visible; }
}
button:focus-visible, a:focus-visible { outline: 2px solid var(--foreground); outline-offset: 5px; }

.hero {
  --hero-title-size: min(273.24px, 21.6vw);
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-inline: var(--page-gutter);
  isolation: isolate;
}

.hero-background { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-background > img, .hero-background > canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hero-background > canvas { filter: var(--portrait-filter); opacity: 0.82; }
.hero-background > img { object-fit: cover; opacity: 0.1; filter: var(--portrait-fallback-filter); visibility: hidden; }
.hero-background.particles-fallback > img { visibility: visible; }
.hero-background::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 55%, rgb(var(--background-rgb) / 8%) 75%, rgb(var(--background-rgb) / 25%) 100%); }
.hero-background.particles-ready > img { visibility: hidden; }
.hero-background.particles-loading > img { visibility: hidden; }
.motion-entered .hero-background { animation: background-reveal 1400ms ease-out both; }
@keyframes background-reveal { from { opacity: 0; } to { opacity: 1; } }

.hero-scroll { overflow-x: clip; }
.hero-scroll.motion-enabled { height: calc(100svh + min(32svh, 320px)); }
.motion-enabled .hero { position: sticky; top: 0; overflow: clip; }
.motion-enabled .hero-background { transform: translate3d(0, var(--portrait-parallax, 0px), 0); will-change: transform; }
.motion-enabled .hero-content h1 { transform: translate3d(0, calc(var(--hero-scroll) * -125px), 0); }
.motion-enabled .positioning { transform: translate3d(0, calc(var(--hero-scroll) * -62px), 0); }
.motion-enabled .background-note { transform: translate3d(0, calc(var(--hero-scroll) * -44px), 0); }
.motion-enabled .expertise-item { transform: translate3d(0, calc(var(--hero-scroll) * -30px), 0); }

@keyframes hero-reveal {
  from { opacity: 0; translate: 0 28px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes header-reveal {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}

.motion-entered .avatar,
.motion-entered .greeting p,
.motion-entered .language-switch,
.motion-entered .theme-toggle,
.motion-entered .contact-button {
  animation: header-reveal 650ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.motion-entered .greeting p { animation-delay: 80ms; }
.motion-entered .language-switch { animation-delay: 120ms; }
.motion-entered .theme-toggle { animation-delay: 150ms; }
.motion-entered .contact-button { animation-delay: 180ms; }
.motion-entered .positioning,
.motion-entered .background-note,
.motion-entered .expertise-item > img,
.motion-entered .expertise-icon,
.motion-entered .expertise-copy h2,
.motion-entered .expertise-copy p,
.motion-entered .hero-scroll-cue {
  animation: hero-reveal 950ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.motion-entered .positioning { animation-delay: 320ms; }
.motion-entered .background-note { animation-delay: 430ms; }
.expertise-item { --entrance-delay: 570ms; }
.expertise-item:nth-child(2) { --entrance-delay: 650ms; }
.expertise-item:nth-child(3) { --entrance-delay: 730ms; }
.motion-entered .expertise-item > img,
.motion-entered .expertise-icon { animation-duration: 750ms; animation-delay: var(--entrance-delay); }
.motion-entered .expertise-copy h2 { animation-duration: 750ms; animation-delay: calc(var(--entrance-delay) + 80ms); }
.motion-entered .expertise-copy p { animation-duration: 750ms; animation-delay: calc(var(--entrance-delay) + 160ms); }
/* This entrance plays once. Title morphs never restart or hide the cue. */
.motion-entered .hero-scroll-cue { animation-duration: 850ms; animation-delay: 950ms; }

.site-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 34px;
}

.greeting { display: flex; align-items: center; gap: 12px; }
.avatar { display: block; width: 36px; height: 36px; flex: none; border-radius: 50%; }
.greeting p { color: var(--text-strong); font-size: 15px; line-height: normal; white-space: nowrap; }
.greeting-wave { display: inline-block; transform-origin: 70% 75%; animation: greeting-wave 5s ease-in-out infinite; }
@keyframes greeting-wave {
  0%, 71.2%, 100% { transform: rotate(0deg); }
  76% { transform: rotate(-18deg); }
  80.8% { transform: rotate(14deg); }
  85.6% { transform: rotate(-12deg); }
  90.4% { transform: rotate(8deg); }
  95.2% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .greeting-wave { animation: none; } }
.header-actions { display: flex; align-items: center; gap: 12px; }
.language-switch { --language-idle:#8A8A8A; height: 40px; border: 1px solid var(--border); border-radius: 999px; display: flex; align-items: center; gap: 6px; padding-inline: 14px; font-size: 14px; }
:root[data-theme="light"] .language-switch { --language-idle:#92928F; }
.language-switch button { border: 0; padding: 0; background: none; color: var(--language-idle); transition: color 300ms cubic-bezier(.22,1,.36,1); }
.language-switch button[aria-pressed="true"] { font-weight: 500; color: var(--foreground); }
.language-switch span { color: var(--language-idle); }
.language-switch button:disabled { opacity: 1; }
.contact-button { position: relative; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; height: 40px; width: 136px; padding-inline: 12px; border: 0; border-radius: 999px; background: var(--fill); color: var(--on-fill); font-size: 14px; font-weight: 700; white-space: nowrap; transition: background-color 180ms ease, box-shadow 180ms ease; }
.contact-button-content { display: inline-flex; align-items: center; justify-content: center; gap: 0; line-height: 1; transition: gap 800ms cubic-bezier(0.23, 1, 0.32, 1); }
.contact-button-arrow { display: inline-flex; width: 0; height: 20px; flex: 0 0 auto; align-items: center; justify-content: flex-start; overflow: hidden; opacity: 0; transform: translateX(-6px); transition: width 800ms cubic-bezier(0.23, 1, 0.32, 1), opacity 500ms ease, transform 800ms cubic-bezier(0.23, 1, 0.32, 1); }
.contact-button-arrow svg { display: block; width: 22.5px; height: 20px; flex: none; }
.contact-button:is(:hover, :focus-visible) { background: var(--action-hover); }
.contact-button:focus-visible:not(:hover) { box-shadow: 0 8px 24px rgb(var(--ink-rgb) / 12%); }
.contact-button:is(:hover, :focus-visible) .contact-button-content { gap: 7.54px; }
.contact-button:is(:hover, :focus-visible) .contact-button-arrow { width: 22.5px; opacity: 1; transform: translateX(0); }
.contact-button:active { background: var(--action-active); box-shadow: 0 3px 10px rgb(var(--ink-rgb) / 8%); }
@media (prefers-reduced-motion: reduce) { .contact-button-content, .contact-button-arrow { transition: none; } }

.hero-content { flex: 1; min-height: min(400px, 50svh); display: flex; flex-direction: column; justify-content: center; align-items: center; transform: translateY(20px); }
.hero-content h1 { position: relative; width: 100%; text-align: center; font-family: "Clash Display", sans-serif; font-weight: 600; font-size: var(--hero-title-size); line-height: 0.85; white-space: nowrap; }
.hero-content h1 { display: grid; }
.hero-name-static, [data-morph-word] { grid-area: 1 / 1; min-width: 0; white-space: pre; }
[data-morph-word] { visibility: hidden; }
.morph-ready .hero-name-static { visibility: hidden; }
.morph-punctuation { font-size: .85em; }
/* Compensate for the display font's space below its capital letters. */
.hero-message { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 24px; margin-top: calc(var(--hero-title-size) * -0.06); text-align: center; width: min(1060px, 100%); }
.positioning { color: var(--text-body); width: 100%; font-size: var(--copy-primary-size); font-weight: 400; line-height: 1.3; }
.background-note { color: var(--text-secondary); font-size: var(--copy-secondary-size); line-height: 1.4; }

.expertise { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 112px; transform: translateY(-30px); }
.expertise-item { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.expertise-item > img, .expertise-icon { display: block; flex: none; }
.expertise-copy { display: flex; flex-direction: column; gap: 14px; }
.expertise-copy h2 { font-size: 18px; font-weight: 500; line-height: 1.4; letter-spacing: 0.08em; }
.expertise-copy p { color: var(--muted); font-size: 15px; line-height: normal; }

/* Reused from the UU Wallet homepage, with theme-aware ink. */
.hero-scroll-cue { position: absolute; z-index: 2; bottom: 32px; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-tertiary); opacity: 1; transform: translateX(-50%); pointer-events: none; }
.hero-scroll-cue::before { content: ""; position: absolute; z-index: -1; width: 68px; height: 80px; top: -16px; border-radius: 50%; background: radial-gradient(ellipse, rgb(var(--background-rgb) / 65%) 15%, transparent 72%); }
.hero-scroll-mouse { display: flex; justify-content: center; width: 19px; height: 29px; padding-top: 6px; border: 1.6px solid currentColor; border-radius: 999px; }
.hero-scroll-wheel { width: 2px; height: 5px; border-radius: 999px; background: currentColor; animation: hero-scroll-down 2.2s ease-in-out infinite; }
@keyframes hero-scroll-down {
  0%, 15% { transform: translateY(0); opacity: 0.3; }
  40% { opacity: 1; }
  75%, 100% { transform: translateY(8px); opacity: 0; }
}

.contact-dialog { width: min(480px, calc(100% - 48px)); margin: auto; padding: 30px; border: 1px solid var(--border); border-radius: 24px; background: var(--dialog-surface); color: var(--foreground); }
.contact-dialog::backdrop { background: var(--dialog-backdrop); backdrop-filter: blur(8px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dialog-header h2 { font-size: 24px; font-weight: 600; }
.close-button { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; background: none; color: var(--text-soft); font-size: 26px; }
.contact-details { margin-top: 24px; display: flex; flex-direction: column; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 22px; border-top: 1px solid var(--dialog-divider); }
.contact-row > div { display: flex; flex-direction: column; gap: 8px; }
.contact-label { color: var(--muted); font-size: 11px; letter-spacing: 0.12em; }
.contact-value { font-size: 18px; }
.copy-button { padding: 8px 14px; border: 1px solid var(--control-border); border-radius: 999px; color: var(--foreground); background: none; font-size: 13px; }
.telegram-link { color: var(--foreground); text-decoration: none; }
.telegram-link:hover .contact-value { text-decoration: underline; text-underline-offset: 4px; }
.copy-status { min-height: 18px; color: var(--text-soft); font-size: 13px; }

@media (min-width: 768px) and (max-height: 800px) {
  .site-header { padding-block: 21px; }
  .hero-message { padding-top: 16px; }
  .expertise { margin-top: 54px; padding-bottom: 78px; }
  .motion-enabled .hero-content h1 { transform: translate3d(0, calc(var(--hero-scroll) * -100px), 0); }
  .motion-enabled .positioning { transform: translate3d(0, calc(var(--hero-scroll) * -52px), 0); }
  .motion-enabled .background-note { transform: translate3d(0, calc(var(--hero-scroll) * -30px), 0); }
  .motion-enabled .expertise-item { transform: translate3d(0, calc(var(--hero-scroll) * -22px), 0); }
}

/* These adaptive rules are a provisional layout until the H5 design is approved. */
@media (max-width: 1023px) {
  :root { --copy-primary-size: clamp(18px, 2.4vw, 24px); --copy-secondary-size: 14px; }
  .expertise { gap: 20px; padding-bottom: 64px; }
  .expertise-copy h2 { font-size: 14px; }
  .expertise-copy p { font-size: 12px; line-height: 1.5; }
}

@media (max-width: 600px) {
  .site-header { gap: 12px; padding-block: 24px; }
  .greeting { gap: 8px; }
  .greeting p { font-size: 12px; }
  .avatar { width: 32px; height: 32px; }
  .header-actions { gap: 8px; }
  .language-switch { height: 36px; padding-inline: 10px; gap: 4px; font-size: 12px; }
  .contact-button { width: auto; height: 36px; padding-inline: 14px; font-size: 11px; }
  .hero-content { min-height: 360px; padding-block: 38px; }
  .hero { --hero-title-size: 20.493vw; }
  .hero-message { padding-top: 20px; gap: 18px; }
  :root { --copy-primary-size: 18px; --copy-secondary-size: 11px; }
  .positioning { line-height: 1.45; }
  .background-note { max-width: 260px; line-height: 1.5; }
  .expertise { grid-template-columns: 1fr; gap: 28px; padding-block: 26px 40px; }
  .expertise-item { flex-direction: row; gap: 18px; text-align: left; }
  .expertise-copy { gap: 6px; }
  .expertise-copy h2 { font-size: 14px; }
  .expertise-copy p { font-size: 12px; }
  .contact-dialog { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-scroll.motion-enabled { height: auto; }
  .motion-enabled .hero { position: relative; }
  .motion-enabled .hero-content h1,
  .motion-enabled .positioning,
  .motion-enabled .background-note,
  .motion-enabled .expertise-item { transform: none; }
}

/* Thinking: the divider and carousel reach both viewport edges. */
.thinking { overflow: clip; }
.thinking-content { position: relative; top: -15px; display: flex; flex-direction: column; justify-content: center; min-height: calc(100svh - var(--header-height) - 56px); padding-top: 48px; padding-bottom: 24px; }
.section-label { position: sticky; top: var(--header-height); z-index: 90; display: grid; grid-template-columns: 300px 1fr 300px; align-items: center; height: 56px; padding: 0 var(--page-gutter); border-block: 1px solid var(--section-divider); background: rgb(var(--background-rgb) / 80%); -webkit-backdrop-filter: blur(var(--navigation-glass-blur)); backdrop-filter: blur(var(--navigation-glass-blur)); font-size: 13px; line-height: 20px; letter-spacing: 1.12px; }
.section-label > :nth-child(2) { text-align: center; }
.section-label > :last-child { text-align: right; color: var(--text-secondary); }
.thinking-heading { height: clamp(230px, 19.93056vw, 287px); display: flex; align-items: center; padding-inline: var(--page-gutter); }
.thinking-heading h2 { position: relative; top: 5px; font-family: "Clash Display", sans-serif; font-weight: 600; font-size: clamp(36px, 5vw, 72px); line-height: 1.2; }
.thinking-heading h2 > span { display: block; }
.thinking-carousel { width: 100%; overflow: visible; touch-action: pan-y; outline-offset: -4px; }
.thinking-track { display: flex; gap: 24px; padding-left: var(--page-gutter); will-change: transform; }
.thinking-card { --card-scale: 1; width: min(900px, 62.5vw); height: min(400.2px, 27.791667vw); flex: none; position: relative; overflow: hidden; background-color: var(--checker-a); background-image: conic-gradient(var(--checker-a) 25%, var(--checker-b) 0 50%, var(--checker-a) 0 75%, var(--checker-b) 0); background-size: 6px 6px; box-shadow: none; border-radius: 24px; }
.thinking-card { cursor: grab; user-select: none; -webkit-user-select: none; }
.thinking-carousel.is-dragging, .thinking-carousel.is-dragging .thinking-card { cursor: grabbing; }
.card-design { position: relative; width: 900px; height: 400.2px; padding: 48px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; transform: scale(var(--card-scale)); transform-origin: top left; }
.step-label { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 500; letter-spacing: .84px; color: var(--text-strong); text-transform: uppercase; }
.card-copy { position: relative; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.card-copy h3 { font-size: calc(var(--copy-primary-size) / var(--card-scale)); font-weight: 500; line-height: 1.15; }
.card-copy p { font-size: calc(var(--copy-secondary-size) / var(--card-scale)); line-height: 1.5; color: var(--text-body); }
.card-art { position: absolute; overflow: hidden; --hairline-plate: var(--checker-b); --hairline-hi: var(--art-hi); --hairline-edge: var(--art-edge); --hairline-mid: var(--art-mid); --hairline-lo: var(--border); --hairline-stroke: 1.05; }
.card-art img { display: block; }
.card-art.is-animated img { visibility: hidden; }
.card-figure { position: absolute; left: 0; pointer-events: auto; }
.card-art-phosphor .card-figure { width: 424.7399px; height: 339.7919px; top: -29.06px; }
.card-art-riffle .card-figure { width: 377.7705px; height: 302.2164px; top: -20.67px; }
.card-art-ideate .card-figure { width: 472.853px; height: 378.2824px; top: -104.13px; }
.card-art-loupe .card-figure { width: 384.1487px; height: 307.3189px; top: -11.58px; }
.card-art-phosphor { left: 490.13px; top: -29.06px; }
.card-art-riffle { left: 512.78px; top: -20.67px; }
.card-art-ideate { left: 489.72px; top: -104.13px; }
.card-art-loupe { left: 510.43px; top: -11.58px; }
.thinking-progress { padding: 30px var(--page-gutter) 0; display: flex; justify-content: center; position: relative; }
.carousel-dots { display: flex; align-items: center; gap: 2.4px; }
.carousel-dot { display: grid; place-items: center; width: 14.4px; height: 30px; padding: 0; background: transparent; border: 0; transition: width 550ms cubic-bezier(.16,1,.3,1); }
.carousel-dot span { width: 6px; height: 6px; border-radius: 999px; background: rgb(var(--ink-rgb) / 30%); transition: width 550ms cubic-bezier(.16,1,.3,1), background 300ms; }
.carousel-dot[aria-pressed="true"] { width: 34.8px; }
.carousel-dot[aria-pressed="true"] span { width: 28.8px; background: var(--foreground); }
.carousel-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.scroll-motion .scroll-layer { opacity: var(--reveal-opacity, 1); translate: 0 var(--reveal-y, 0px); }
@media (max-width: 1023px) {
  .section-label { grid-template-columns: 1fr 1fr 1fr; font-size: 12px; }
  .thinking-card { width: 78vw; height: calc(78vw * 400.2 / 900); }
}
@media (max-width: 600px) {
  .section-label { font-size: 10px; letter-spacing: .6px; }
  .thinking-heading { height: 220px; }
  .thinking-heading h2 { font-size: clamp(28px, 6.6vw, 40px); }
  .thinking-track { gap: 16px; }
  .thinking-card { width: calc(100vw - 48px); height: 295.8px; border-radius: 20px; }
  .card-design { transform: none; width: 100%; height: 100%; padding: 24px; }
  .card-art { transform: scale(.53); transform-origin: top right; left: auto; right: -5px; }
  .card-art-phosphor { top: -12px; }
  .card-art-riffle { top: 0; }
  .card-art-ideate { top: -46px; }
  .card-art-loupe { top: 0; }
  .card-copy { gap: 14px; }
  .card-copy h3 { font-size: var(--copy-primary-size); }
  .card-copy p { font-size: var(--copy-secondary-size); line-height: 1.5; }
  .step-label { font-size: 11px; padding: 7px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-motion .scroll-layer { opacity: 1; translate: none; }
}

.expertise-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; outline-offset: 6px; border-radius: 6px; }
.expertise-icon svg { display: block; width: 80%; height: 80%; }
.expertise-icon:focus-visible { outline: 1px solid rgb(var(--ink-rgb) / 45%); }

/* The header belongs to the page, outside the cover's sticky/fading layers. */
:root { --header-height: 80px; --navigation-glass-blur: 30px; }
.hero { padding-top: var(--header-height); }
.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  padding-block: 0;
  padding-inline: var(--page-gutter);
  background: rgb(var(--background-rgb) / var(--header-glass-alpha, 0));
  border: 0;
  -webkit-backdrop-filter: blur(var(--header-glass-blur, 0px));
  backdrop-filter: blur(var(--header-glass-blur, 0px));
}
#thinking { scroll-margin-top: var(--header-height); }
/* SVG exports include only the artwork visible inside the original card. */
.card-art-phosphor, .card-art-riffle, .card-art-ideate, .card-art-loupe { top: 0; }
.thinking-card[data-card="0"] .card-copy p { width: 535px; max-width: 100%; }

/* Cards stay in place on hover; only carousel navigation moves the track. */
.thinking-card { isolation: isolate; }
.card-design { z-index: 2; }

/* Soft pointer illumination is clipped to the surface, below all content. */
@media (hover: hover) and (pointer: fine) {
  .thinking-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(220px circle at var(--card-light-x, 50%) var(--card-light-y, 50%), rgb(var(--card-glow-rgb) / var(--card-glow-opacity)), transparent 100%);
    opacity: 0;
    transition: opacity 280ms ease;
  }
  .thinking-card:hover::before { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .thinking-card::before { transition: none; }
}

/* One docked chapter bar persists across all four sections. */
.chapter-number { display: flex; height: 20px; line-height: 20px; }
.chapter-digit-window { display: block; height: 20px; overflow: hidden; }
.chapter-digit-reel { display: flex; flex-direction: column; transform: translateY(0); transition: transform 650ms cubic-bezier(.16,1,.3,1); }
.chapter-digit-reel > span { display: block; height: 20px; flex: none; }
.chapter-digit-reel { transform: translateY(calc(var(--chapter-index, 0) * -20px)); }
.chapter-name, .chapter-caption { white-space: nowrap; }
.portfolio { padding-bottom: 120px; scroll-margin-top: calc(var(--header-height) + 56px); }
.portfolio-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; padding: 96px var(--page-gutter) 56px; }
.portfolio-heading h2 { font-family: "Clash Display", sans-serif; font-weight: 600; font-size: clamp(36px,5vw,72px); line-height: 1.2; }
.portfolio-heading h2 > span { display: block; }
.portfolio-heading > p { width: 393px; max-width: 42%; color: var(--text-secondary); font-size: var(--copy-secondary-size); line-height: 1.5; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 20px; row-gap: 56px; padding: 0 var(--page-gutter) 56px; }
.portfolio-card { min-width: 0; }
.portfolio-cover { position: relative; aspect-ratio: 16 / 9; background: var(--surface); border: 0; border-radius: 12px; overflow: hidden; }
.portfolio-cover-content > span { position: absolute; top: 19px; left: 19px; color: var(--text-faint); font-size: 14px; }
.portfolio-card-caption { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 18px 4px 0; }
.portfolio-card-caption h3 { font-family: Inter,sans-serif; font-weight: 600; font-size: 22px; line-height: 27px; }
.portfolio-card-caption p { color: var(--text-secondary); font-size: 14px; line-height: 17px; margin-top: 6px; }
.portfolio-card-arrow { width: 28px; height: 28px; flex: none; display: grid; place-items: center; overflow: hidden; color: var(--foreground); }
.portfolio-card-arrow svg { display: block; }
@media (max-width: 1023px) {
  .portfolio-card-caption h3 { font-size: 20px; }
}
@media (max-width: 600px) {
  .portfolio-heading { padding-top: 64px; flex-direction: column; align-items: flex-start; gap: 24px; }
  .portfolio-heading > p { max-width: 100%; width: auto; }
  .portfolio-grid { grid-template-columns: 1fr; row-gap: 40px; }
  .portfolio-card-caption p { line-height: 1.5; }
  .portfolio { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .chapter-digit-reel { transition: none; }
  .hero-background { transform: none !important; }
}

@font-face {
  font-family: "Clash Display";
  src: url("./assets/clash-display-medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
/* Experience preserves the wider heading gap from the updated Figma frame. */
.experience, .contact-section { scroll-margin-top: calc(var(--header-height) + 56px); }
.experience { padding-bottom: 120px; }
.experience-layout { display: grid; grid-template-columns: min(478px,33.194444vw) minmax(0,1fr); gap: min(72px,5vw); padding: 96px var(--page-gutter) 0; }
.experience-heading h2 { font-family: "Clash Display",sans-serif; font-weight: 600; font-size: clamp(36px,5vw,72px); line-height: .92; }
.experience-list { min-width: 0; }
.experience-row { display: grid; grid-template-columns: min(200px,13.888889vw) minmax(0,1fr); gap: min(40px,2.777778vw); padding-block: 36px; }
.experience-row:first-child { padding-top: 2px; }
.experience-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; min-width: 0; }
.experience-date { margin-top: 6px; font-size: 14px; line-height: 17px; letter-spacing: .84px; color: var(--text-secondary); }
.experience-details h3 { font-family: Inter,sans-serif; font-size: 24px; font-weight: 600; line-height: 1.2; }
.experience-role { font-size: 14px; line-height: 17px; letter-spacing: .56px; }
.experience-details { min-width: 0; padding-top: 4px; }
.experience-summary { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 18px; row-gap: 8px; }
.experience-description { min-width: 0; margin-top: 12px; color: var(--text-body); font-size: var(--copy-secondary-size); line-height: 1.6; }
.contact-section-content { display: flex; flex-direction: column; align-items: center; gap: 40px; min-height: 845px; padding: 160px var(--page-gutter) 40px; }
.contact-image-row { display: flex; gap: 40px; }
.contact-image-placeholder { position: relative; width: 240px; height: 240px; flex: none; background: var(--surface); border: 1px solid var(--surface-border); border-radius: 8px; }
.contact-image-placeholder > span { position: absolute; left: 19px; top: 19px; color: var(--text-faint); font-size: 14px; }
.contact-handle-row { position: relative; display: flex; align-items: center; gap: 40px; }
.contact-handle { display: flex; gap: 12px; align-items: center; font-family: "Clash Display",sans-serif; font-weight: 500; font-size: 20px; line-height: 25px; letter-spacing: .8px; white-space: nowrap; }
.contact-handle > span { color: var(--text-secondary); }
.contact-handle-value { border: 0; padding: 0; background: none; color: var(--foreground); text-decoration: none; }
.contact-handle-value:hover { text-decoration: underline; text-underline-offset: 5px; }
.contact-handle-divider { color: var(--text-tertiary); font-size: 20px; line-height: 24px; }
.contact-section-status { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.contact-section-title { display: block; padding: 0; border: 0; background: none; color: var(--foreground); font-family: "Clash Display",sans-serif; font-weight: 600; font-size: min(180px,12.5vw); line-height: .9; white-space: nowrap; }
.contact-section-title:hover { color: var(--text-soft); }
.contact-footer { display: flex; justify-content: space-between; width: 100%; padding-top: 80px; font-size: 12px; font-weight: 400; line-height: 20px; }
.contact-footer p { color: var(--footer-ink); }
.back-to-top { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--footer-link); text-decoration: none; transition: color 240ms ease; }
.back-to-top:is(:hover, :focus-visible) { color: var(--foreground); }
.back-to-top-arrow { display: inline-block; flex: none; width: 10px; height: 14px; overflow: hidden; font-size: 10px; line-height: 14px; text-align: center; }
.back-to-top-arrow > span { display: block; }
.back-to-top-arrow > span::after { content: '▲'; display: block; }
.back-to-top:is(:hover, :focus-visible) .back-to-top-arrow > span { animation: back-arrow-pass 1400ms cubic-bezier(.45,0,.2,1) infinite; }
/* Identical triangles one row apart make each reset visually seamless. */
@keyframes back-arrow-pass { 0%, 16% { transform: translateY(0); } 76%, 100% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } .back-to-top:is(:hover, :focus-visible) .back-to-top-arrow > span { animation: none; } }
@media (max-width: 1023px) {
  .experience-layout { grid-template-columns: 1fr; gap: 48px; }
  .experience-row { grid-template-columns: 200px minmax(0,1fr); gap: 40px; }
  .contact-section-content { padding-top: 120px; min-height: auto; }
}
@media (max-width: 600px) {
  .experience { padding-bottom: 64px; }
  .experience-layout { padding-top: 64px; gap: 32px; }
  .experience-heading h2 { font-size: clamp(32px,8vw,48px); }
  .experience-row { grid-template-columns: 1fr; gap: 18px; padding-block: 28px; }
  .experience-date { margin-top: 0; }
  .experience-details h3 { font-size: 22px; }
  .experience-details { padding-top: 0; }
  .contact-section-content { gap: 32px; padding-top: 80px; }
  .contact-image-row { gap: 24px; width: 100%; }
  .contact-image-placeholder { width: calc((100% - 24px) / 2); height: auto; aspect-ratio: 1; }
  .contact-handle-row { flex-direction: column; gap: 16px; }
  .contact-handle { font-size: 18px; }
  .contact-handle-divider { display: none; }
  .contact-footer { padding-top: 56px; font-size: 12px; }
}

/* Portfolio views — Figma 86:24 / pinned state 92:36. */
.portfolio { overflow-anchor: none; }
.portfolio-heading { padding-top: 48px; padding-bottom: 20px; }
.portfolio-heading-side { display: flex; flex-direction: column; align-items: flex-end; gap: 28px; width: 393px; max-width: 42%; }
.portfolio-heading-side > p { color: var(--text-secondary); font-size: var(--copy-secondary-size); line-height: 1.5; width: 100%; }
.portfolio-view-switch { position: relative; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; flex: none; }
.portfolio-view-switch button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; z-index: 1; }
.portfolio-view-switch button:focus-visible { outline: 2px solid var(--foreground); outline-offset: 5px; }
.portfolio-view-switch img { display: block; width: 20px; height: 20px; }
.portfolio-view-switch [aria-pressed="true"] img { filter: var(--selected-icon-filter); }
.portfolio-view-switch [aria-pressed="false"] img { filter: var(--inactive-icon-filter); }
.portfolio-switch-thumb { position: absolute; width: 38px; height: 38px; left: 3px; top: 3px; border-radius: 999px; background: var(--foreground); pointer-events:none; }
.portfolio-grid { padding-top: 76px; }
.portfolio-cover-content > img, .portfolio-cover-content > video { display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
/* Only still-image covers gently zoom; video posters and playback stay unchanged. */
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .portfolio-cover-content:not(:has(video)) > img,
  .detail-more-card .detail-media:not(:has(video)) > img {
    transition:transform 600ms cubic-bezier(.16,1,.3,1);
    transform-origin:center;
  }
  .portfolio-cover:hover .portfolio-cover-content:not(:has(video)) > img,
  .portfolio-card-motion:focus-visible .portfolio-cover-content:not(:has(video)) > img,
  .detail-more-card:is(.is-cover-hovered,:focus-visible) .detail-media:not(:has(video)) > img {
    transform:scale(1.035);
  }
}
.portfolio-cover.media-error::after { content: 'Media unavailable'; position: absolute; top: 24px; left: 24px; color: var(--text-error); font-size: 14px; }
.portfolio-card-motion { display: block; text-decoration: none; color: inherit; }
a.portfolio-card-motion:focus-visible { outline: 2px solid var(--foreground); outline-offset: 6px; }
.portfolio-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.portfolio[data-view="stack"] .portfolio-runway { height: var(--portfolio-runway-height); position: relative; }
.portfolio[data-view="stack"] .portfolio-stage { position: sticky; top: var(--portfolio-dock); height: var(--portfolio-stage-height); overflow: clip; background: var(--background); }
.portfolio[data-view="stack"] .portfolio-grid { position: absolute; top: 10.2%; bottom: 10.2%; left: calc(var(--page-gutter) + min(52px,3.611111vw)); right: var(--page-gutter); display: block; padding: 0; }
.portfolio[data-view="stack"] .portfolio-card { position: absolute; inset: 0; background: var(--background); will-change: transform; }
.portfolio[data-view="stack"] .portfolio-card-motion { height: 100%; display: grid; grid-template-columns: min(274px,19.027778vw) minmax(0,1fr); grid-template-rows: minmax(0,1fr); gap: min(40px,2.777778vw); align-items: stretch; background: var(--background); }
.portfolio[data-view="stack"] .portfolio-cover { grid-column: 2; grid-row: 1; width: min(100%, var(--cover-fit-width, 100%)); height: auto; aspect-ratio: 16 / 9; align-self: center; justify-self: center; border: 0; border-radius: 16px; background: var(--stack-surface); }
.portfolio[data-view="stack"] .portfolio-cover-content > span { top: 24px; left: 24px; color: var(--text-tertiary); }
.portfolio[data-view="stack"] .portfolio-card-caption { grid-column: 1; grid-row: 1; margin: 0; display: block; overflow-wrap: anywhere; }
.portfolio[data-view="stack"] .portfolio-card-caption h3 { font-family: Inter,sans-serif; font-weight: 600; font-size: 32px; line-height: 1.2; }
.portfolio[data-view="stack"] .portfolio-card-caption p { font-size: 16px; line-height: 1.5; color: var(--text-secondary); margin-top: 12px; }
.portfolio[data-view="stack"] .portfolio-card-caption > span { display: none; }
/* Figma 101:109: one ruler tick per project, with a name on hover/focus. */
.portfolio-progress { position: absolute; width: 30px; top: 33.284%; bottom: auto; height: 33.432%; left: calc(var(--page-gutter) + 5px); z-index: 3; display: flex; flex-direction: column; justify-content: space-between; }
.portfolio-progress[data-count="1"] { justify-content: center; }
.portfolio-progress[hidden] { display: none; }
.portfolio-tick { position: relative; display: flex; align-items: center; flex: 0 0 2px; height: 2px; width: 30px; padding: 0; border: 0; background: transparent; cursor: pointer; overflow: visible; }
.portfolio-tick::before { content: ''; position: absolute; inset: -8px 0; }
.portfolio-tick-line { display: block; width: var(--tick-width,10px); height: 2px; border-radius: 1px; background: var(--tick); transition: width 240ms cubic-bezier(.22,1,.36,1), background-color 240ms ease; }
.portfolio-tick[data-near="true"] .portfolio-tick-line { background: var(--tick-near); }
.portfolio-tick[data-highlighted="true"] .portfolio-tick-line { background: var(--tick-active); }
.portfolio-tick-name { width: max-content; text-align: left; position: absolute; left: 40px; top: 50%; transform: translate(4px,-50%); padding: 9px 14px; border-radius: 10px; background: var(--tip-bg); color: var(--tip-text); font-family: "Clash Display",sans-serif; font-size: 14px; font-weight: 500; line-height: normal; white-space: nowrap; max-width: min(360px,calc(100vw - var(--page-gutter) - 90px)); overflow: hidden; text-overflow: ellipsis; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 160ms ease, transform 160ms ease, visibility 160ms; }
.portfolio-tick:hover .portfolio-tick-name, .portfolio-tick:focus-visible .portfolio-tick-name { opacity: 1; visibility: visible; transform: translate(0,-50%); }
.portfolio-tick-title { font-family: Inter,sans-serif; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.portfolio-tick-description { font-family: Inter,"PingFang SC","Microsoft YaHei",sans-serif; font-weight: 350; display: block; margin-top: 5px; max-width: 260px; white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; color: var(--tip-text); opacity: .75; }
.portfolio-tick-description[hidden] { display: none; }
.portfolio-tick:focus-visible { outline: 1px solid var(--foreground); outline-offset: 2px; border-radius: 2px; }
.portfolio-transition-ghost { position: fixed; margin: 0; z-index: 80; pointer-events: none; }
@media (max-width: 767px) {
  .portfolio-heading-side { max-width: 100%; width: 100%; gap: 24px; }
  .portfolio-heading { flex-direction: column; align-items: flex-start; gap: 24px; }
  .portfolio-heading-side > p { width: min(100%,393px); align-self: flex-start; }
  .portfolio-grid { padding-top: 40px; }
  .portfolio[data-view="stack"] .portfolio-grid { left: calc(var(--page-gutter) + 40px); top: 6%; bottom: 6%; }
  .portfolio[data-view="stack"] .portfolio-card-motion { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); gap: 20px; }
  .portfolio[data-view="stack"] .portfolio-card-caption { grid-row: 1; grid-column: 1; }
  .portfolio[data-view="stack"] .portfolio-cover { grid-row: 2; grid-column: 1; }
  .portfolio[data-view="stack"] .portfolio-card-caption h3 { font-size: 26px; }
  .portfolio[data-view="stack"] .portfolio-card-caption p { font-size: 14px; margin-top: 8px; }
  .portfolio-progress { top: 31.52%; height: 36.96%; left: var(--page-gutter); }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio-switch-thumb, .portfolio-tick-line, .portfolio-tick-name { transition: none; }
}

/* Stationary stack copy; media alone overlaps with clean rounded corners. */
.portfolio-stack-caption { display: none; }
.portfolio[data-view="stack"] .portfolio-card,
.portfolio[data-view="stack"] .portfolio-card-motion { background: transparent; }
.portfolio[data-view="stack"] .portfolio-card-caption { visibility: hidden; }
.portfolio[data-view="stack"] .portfolio-stack-caption {
  display: block; position: absolute; top: 0; left: 0;
  width: min(274px,19.027778vw); z-index: 2; overflow-wrap: anywhere;
}
.portfolio-stack-caption h3 { font-family: Inter,sans-serif; font-weight: 600; font-size: 32px; line-height: 1.2; }
.portfolio-stack-caption p { font-size: 16px; line-height: 1.5; color: var(--text-secondary); margin-top: 12px; }
.portfolio-stack-caption :is(h3,p){max-width:100%;min-width:0}
@media (max-width: 767px) {
  .portfolio[data-view="stack"] .portfolio-stack-caption { width: 100%; }
  .portfolio-stack-caption h3 { font-size: 26px; }
  .portfolio-stack-caption p { font-size: 14px; margin-top: 8px; }
}

/* Scale and fade the whole frame; blur only the media inside its clipped edges. */
.portfolio-cover-content { position: absolute; inset: 0; transform-origin: center center; }
.portfolio[data-view="stack"] .portfolio-cover {
  transform: scale(var(--cover-scale, 1));
  opacity: var(--cover-opacity, 1);
  transform-origin: center center;
  will-change: transform, opacity;
}
.portfolio[data-view="stack"] .portfolio-cover-content {
  transform: scale(1.04);
  filter: var(--cover-filter, none);
}
/* Keep the website screenshot's navigation inside the large cover frame. */
.portfolio[data-view="stack"] .portfolio-card[data-project-id="work-001"] .portfolio-cover-content {
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .portfolio[data-view="stack"] .portfolio-cover-content { transition: none; transform: none; filter: none; }
}

/* Keep the subtle frame above image/video content in both portfolio layouts. */
.portfolio-cover::before {
  content: ''; position: absolute; inset: 0; z-index: 3;
  border: 1px solid var(--cover-border); border-radius: inherit; opacity: .45; pointer-events: none;
}

/* A sharp still overlays the moving cover; fade it in before resetting video. */
.has-video-cover { position:relative; }
.video-cover-badge {
  position:absolute; top:16px; right:16px; width:32px; height:32px; z-index:4;
  display:block; opacity:1; pointer-events:none; transform:scale(1); transform-origin:center;
  transition:opacity 220ms ease,transform 460ms cubic-bezier(.16,1,.3,1);
}
.has-video-cover:hover > .video-cover-badge,
.is-hover-cover-playing > .video-cover-badge,
.portfolio-card-motion:focus-visible .video-cover-badge,
.detail-more-card:focus-visible .video-cover-badge {
  opacity:0; transform:scale(.65);
  transition:opacity 160ms ease,transform 200ms cubic-bezier(.22,1,.36,1);
}
@media(prefers-reduced-motion:reduce) { .video-cover-badge { transition:none; } }
.hover-cover-media { position: relative; }
@font-face { font-family: 'Enterprise Cover Manrope'; src:url('./assets/enterprise-login/manrope.woff2') format('woff2'); font-weight:200 800; font-display:swap; }
.hover-cover-media .enterprise-cover-layer { position:absolute; top:50%; left:50%; width:1728px; height:968px; overflow:hidden; background:#000; color:#fff; font:400 16px/1.4 'Enterprise Cover Manrope',sans-serif; transform-origin:center; pointer-events:none; }
.hover-cover-media .enterprise-cover-layer * { box-sizing:border-box; }
.hover-cover-media .enterprise-cover-layer > :is(video,.enterprise-cover-still) { position:absolute; left:-268px; top:0; width:1394px; height:871.2px; max-width:none; object-fit:cover; mask-image:linear-gradient(90deg,#000 75%,transparent); }
.hover-cover-media .enterprise-cover-still { opacity:1; transition:opacity 140ms linear; }
.hover-cover-media.is-hover-cover-playing > .enterprise-cover-layer > .enterprise-cover-still { opacity:0; transition-duration:0ms; }
.hover-cover-media .enterprise-cover-brand { position:absolute; top:32px; left:32px; display:flex; align-items:center; gap:2px; font-size:24px; font-weight:700; letter-spacing:.15px; transform:scale(.8); transform-origin:left top; }
.hover-cover-media .enterprise-cover-brand img { width:42.082px; height:42.082px; padding:4px; }
.hover-cover-media .enterprise-cover-tools { position:absolute; right:32px; top:39px; display:flex; gap:29px; }
.hover-cover-media .enterprise-cover-tools img { width:20px; height:20px; filter:brightness(0) invert(1); }
.hover-cover-media .enterprise-cover-copy { position:absolute; left:134.9375px; top:631px; width:720px; text-align:left; }
.hover-cover-media .enterprise-cover-copy > strong { display:block; font-size:52px; font-weight:800; line-height:1.08; letter-spacing:0; white-space:nowrap; }
.hover-cover-media .enterprise-cover-copy > p { margin:26px 0 0; color:#ffffffb3; font:400 15px/24px 'Enterprise Cover Manrope',sans-serif; letter-spacing:0; }
.hover-cover-media .enterprise-cover-copy > .enterprise-copy-title-mask { display:grid; overflow:hidden; padding-bottom:.08em; margin-bottom:-.08em; }
.hover-cover-media .enterprise-copy-title { grid-area:1 / 1; display:block; transform:translateY(130%); visibility:hidden; will-change:transform; }
.hover-cover-media .enterprise-copy-title:first-child { transform:none; visibility:visible; }
.hover-cover-media .enterprise-cover-copy > p { display:grid; height:72px; }
.hover-cover-media .enterprise-copy-description-mask { grid-area:1 / 1; display:block; overflow:hidden; align-self:start; }
.hover-cover-media .enterprise-copy-description { display:block; transform:translateY(130%); visibility:hidden; will-change:transform; }
.hover-cover-media .enterprise-copy-description-mask:first-child > .enterprise-copy-description { transform:none; visibility:visible; }
.hover-cover-media .enterprise-copy-clock { position:absolute; width:1px; height:1px; visibility:hidden; pointer-events:none; }
.hover-cover-media .enterprise-cover-card { position:absolute; left:1033px; top:206px; width:560px; height:556px; padding:40px; border-radius:16px; background:#fff; color:#1a1e1c; text-align:left; }
.hover-cover-media .enterprise-cover-heading { display:block; height:45px; margin-bottom:32px; font-size:32px; font-weight:700; line-height:1.4; }
.hover-cover-media .enterprise-cover-tabs { height:58px; margin-bottom:20px; padding:12px 0; display:flex; gap:32px; color:#6b7370; font-weight:500; }
.hover-cover-media .enterprise-cover-tabs > span:first-child { position:relative; color:#1a1e1c; font-weight:700; }
.hover-cover-media .enterprise-cover-tabs > span:first-child::after { content:''; position:absolute; width:32px; height:3px; left:5px; top:30px; border-radius:10px; background:#1a1e1c; }
.hover-cover-media .enterprise-cover-fields { display:grid; gap:20px; }
.hover-cover-media .enterprise-cover-fields > div { height:54px; padding:0 16px; display:flex; align-items:center; justify-content:space-between; border:1px solid #dadddb; border-radius:12px; color:#6b7370; font-weight:500; }
.hover-cover-media .enterprise-cover-fields img { width:22px; height:22px; opacity:.7; }
.hover-cover-media .enterprise-cover-submit { height:52px; margin-top:20px; display:grid; place-items:center; border-radius:12px; background:#1a1e1c; color:white; font-size:13px; font-weight:700; line-height:20px; }
.hover-cover-media .enterprise-cover-social { margin-top:40px; }
.hover-cover-media .enterprise-cover-divider { display:flex; align-items:center; gap:8px; height:17px; color:#6b7370; font-size:12px; white-space:nowrap; }
.hover-cover-media .enterprise-cover-divider i { height:1px; flex:1; background:#eceeed; }
.hover-cover-media .enterprise-cover-providers { display:flex; gap:16px; margin-top:24px; }
.hover-cover-media .enterprise-cover-providers > div { flex:1; height:40px; display:flex; align-items:center; justify-content:center; gap:4px; background:#f6f7f6; border:1px solid #e4e7e5; border-radius:8px; font-size:12px; font-weight:600; }
.hover-cover-media .enterprise-cover-providers img { width:22px; height:22px; }
.hover-cover-media .enterprise-cover-providers > div:nth-child(2) img { width:18.3333px; height:18.3333px; }
.hover-cover-media .enterprise-cover-footer { position:absolute; left:32px; right:32px; bottom:24px; display:flex; justify-content:space-between; color:#fff6; font-size:12px; }
.hover-cover-media .enterprise-cover-footer::before { content:''; position:absolute; top:-16px; width:100%; height:1px; background:#ffffff14; }
.hover-cover-media > :is(video,.hover-cover-poster) { position:absolute; inset:0; width:100%; height:100%; display:block; }
.hover-cover-media > video { z-index:0; pointer-events:none; }
.hover-cover-media > .hover-cover-poster { z-index:1; opacity:1; pointer-events:none; }
.portfolio-cover-content.hover-cover-media { position:absolute; }
.portfolio-cover-content.hover-cover-media > .hover-cover-poster,
.detail-media.hover-cover-media > .hover-cover-poster {
  transition:opacity var(--poster-fade,140ms) linear;
}
.portfolio-cover-content.is-hover-cover-playing > .hover-cover-poster,
.detail-media.is-hover-cover-playing > .hover-cover-poster { opacity:0; transition-duration:0ms; }
@media(prefers-reduced-motion:reduce) {
  .portfolio-cover-content.hover-cover-media > .hover-cover-poster,
  .detail-media.hover-cover-media > .hover-cover-poster { transition:none; }
}

/* Keep stills and videos at the same size throughout hover and focus. */
.portfolio-cover-content > img, .portfolio-cover-content > video {
  transform: none; filter: none;
}
@media (prefers-reduced-motion: reduce) {
  .portfolio-cover-content > img, .portfolio-cover-content > video { transition: none; }
  .portfolio .portfolio-card-motion:hover .portfolio-cover-content > img,
  .portfolio .portfolio-card-motion:hover .portfolio-cover-content > video,
  .portfolio a.portfolio-card-motion:focus-visible .portfolio-cover-content > img,
  .portfolio a.portfolio-card-motion:focus-visible .portfolio-cover-content > video { transform: none; }
}

/* Approved editorial line breaks, shared by both language layouts. */
.portfolio-heading-side > [data-copy="portfolioSummary"] { white-space: pre-line; }

/* Chinese uses locally hosted, unicode-range subsets; Latin project labels stay Inter. */
html:lang(zh-CN) { font-family: Inter,"HarmonyOS Sans SC","PingFang SC",sans-serif; }
html:lang(zh-CN) :is(.thinking-heading h2,.portfolio-heading h2,.experience-heading h2) { font-family: "HarmonyOS Sans SC",Inter,"PingFang SC",sans-serif; }
html:lang(zh-CN) :is(.experience-details h3,.contact-channel,.dialog-header h2) { font-family: Inter,"HarmonyOS Sans SC","PingFang SC",sans-serif; }
html:lang(zh-CN) .expertise-copy h2 { letter-spacing: .04em; }

/* Center each complete phrase in both languages. */
.contact-cube .contact-talk-title { text-align: center; }
.contact-cube .contact-title-fixed { display: none; }
.contact-cube .contact-title-morph { justify-items: center; text-align: center; }

/* Both locale summaries share the view switch's right edge. */
.portfolio-heading-side { width: min(560px, 54%); max-width: 54%; }
.portfolio-heading-side > [data-copy="portfolioSummary"] { text-align: right; }
:is(#hero-title,.contact-title-morph):not(.morph-ready) > canvas { visibility: hidden; }
@media (max-width: 767px) {
  .portfolio-heading-side { max-width: 100%; width: 100%; }
  .portfolio-heading-side > [data-copy="portfolioSummary"] { width: 100%; align-self: flex-end; }
}
