/* =============================================================================
   Dinesh Thakali – public site design system ("Studio" concept)
   Poppins · neutral surfaces · one accent colour (set in Admin → Settings)
   Full light & dark themes · cross-page transitions · reduced-motion aware
   ============================================================================= */

/* ---------------------------------------------------------------- fonts (self-hosted, SIL OFL) */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/poppins-latin-300-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/poppins-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/poppins-latin-400-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/poppins-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/poppins-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/poppins-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/poppins-latin-ext-300-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/poppins-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/poppins-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/poppins-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/poppins-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------------------------------------------------------------- tokens */
:root {
    --font: 'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --rail-w: 276px;
    --topbar-h: 62px;
    --gap: 14px;
    --pad: clamp(22px, 4.4vw, 64px);
    --content: 1160px;
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 34px;
    --r-pill: 999px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-io: cubic-bezier(.65, 0, .35, 1);
}
:root, [data-theme=dark] {
    color-scheme: dark;
    --bg: #09090b;
    --surface: #111114;
    --surface-2: #17171b;
    --surface-3: #1f1f25;
    --line: #25252c;
    --line-2: #34343d;
    --ink: #f7f7f9;
    --text: #d0d0d9;
    --muted: #a3a3b1;
    --subtle: #767684;
    --shadow: 0 18px 44px -24px rgba(0, 0, 0, .9);
    --shadow-lg: 0 34px 80px -34px rgba(0, 0, 0, .95);
    --dot: rgba(255, 255, 255, .07);
    --scrim: rgba(0, 0, 0, .62);
    --glass: rgba(23, 23, 27, .74);
    --success: #4ade80;
    --error: #ff8f8f;
}
[data-theme=light] {
    color-scheme: light;
    --bg: #edeff3;
    --surface: #ffffff;
    --surface-2: #f7f8fa;
    --surface-3: #eceff4;
    --line: #e1e4ea;
    --line-2: #cdd3dc;
    --ink: #0e1117;
    --text: #363d4b;
    --muted: #586070;
    --subtle: #8b93a1;
    --shadow: 0 16px 38px -22px rgba(16, 20, 28, .28);
    --shadow-lg: 0 30px 70px -32px rgba(16, 20, 28, .38);
    --dot: rgba(16, 20, 28, .08);
    --scrim: rgba(16, 20, 28, .45);
    --glass: rgba(255, 255, 255, .8);
    --success: #15803d;
    --error: #c81e1e;
}
/* accent presets: each has a bright value for dark surfaces and a deeper value for light ones (WCAG AA) */
:root, [data-accent=coral] { --accent: #ff7a59; --accent-strong: #ff9678; --on-accent: #1d0b05; }
[data-theme=light], [data-theme=light][data-accent=coral] { --accent: #b93a0a; --accent-strong: #9a3412; --on-accent: #ffffff; }
[data-accent=blue] { --accent: #6aa9ff; --accent-strong: #8dbdff; --on-accent: #041224; }
[data-theme=light][data-accent=blue] { --accent: #1d4ed8; --accent-strong: #1e40af; --on-accent: #ffffff; }
[data-accent=emerald] { --accent: #34d399; --accent-strong: #6ee7b7; --on-accent: #03140d; }
[data-theme=light][data-accent=emerald] { --accent: #047857; --accent-strong: #065f46; --on-accent: #ffffff; }
[data-accent=violet] { --accent: #a78bfa; --accent-strong: #c4b5fd; --on-accent: #12082b; }
[data-theme=light][data-accent=violet] { --accent: #6d28d9; --accent-strong: #5b21b6; --on-accent: #ffffff; }
[data-accent=crimson] { --accent: #ff6b86; --accent-strong: #ff8fa3; --on-accent: #22040b; }
[data-theme=light][data-accent=crimson] { --accent: #be123c; --accent-strong: #9f1239; --on-accent: #ffffff; }
[data-accent=teal] { --accent: #2dd4bf; --accent-strong: #5eead4; --on-accent: #03201c; }
[data-theme=light][data-accent=teal] { --accent: #0f766e; --accent-strong: #115e59; --on-accent: #ffffff; }
:root {
    --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
    --accent-soft-2: color-mix(in srgb, var(--accent) 22%, transparent);
    --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 16px/1.75 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-family: var(--font); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-strong); }
img, svg, video, canvas, iframe { max-width: 100%; }
img { height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }
kbd { display: inline-block; min-width: 1.6em; padding: .05rem .4rem; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font: 500 .7rem/1.5 var(--font); text-align: center; }
.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.16em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 300; padding: .7rem 1.1rem; border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 16px; }
canvas.guilloche, .cta-waves, .about-rosette, .hero-rosette, .cert-rosette { display: none !important; }
@media (scripting: none) { .reveal, .load-in, .block-title { opacity: 1 !important; transform: none !important; } }

/* ---------------------------------------------------------------- progress bar */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 250; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------------------------------------------------------------- side rail (desktop sidebar / mobile drawer) */
.rail { position: fixed; z-index: 120; top: var(--gap); bottom: var(--gap); left: var(--gap); width: var(--rail-w); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.rail-inner { height: 100%; display: flex; flex-direction: column; padding: 22px 16px 18px; overflow-y: auto; scrollbar-width: thin; }
.rail-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 18px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.rail-avatar { position: relative; width: 56px; height: 56px; flex: none; border-radius: 18px; background: linear-gradient(145deg, var(--accent), var(--surface-3)); padding: 2px; }
.rail-avatar img, .rail-avatar > span:first-child { width: 100%; height: 100%; border-radius: 16px; object-fit: cover; object-position: top; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; color: var(--accent); }
.rail-status { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 3px solid var(--surface); }
.rail-id { min-width: 0; line-height: 1.3; }
.rail-id strong { display: block; font-size: 1.02rem; font-weight: 600; }
.rail-id small { display: block; margin-top: 3px; font-size: .74rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail-search { display: flex; align-items: center; gap: 10px; width: 100%; padding: .6rem .8rem; margin-bottom: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: .86rem; text-align: left; transition: border-color .2s, color .2s; }
.rail-search:hover { border-color: var(--accent-line); color: var(--ink); }
.rail-search kbd { margin-left: auto; }
.rail-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail-link { position: relative; display: flex; align-items: center; gap: 12px; padding: .62rem .85rem; border-radius: 12px; color: var(--text); text-decoration: none; font-size: .93rem; font-weight: 500; transition: background-color .2s, color .2s, transform .25s var(--ease); }
.rail-link .icon { width: 19px; height: 19px; color: var(--muted); transition: color .2s, transform .3s var(--ease); }
.rail-link:hover { background: var(--surface-3); color: var(--ink); }
.rail-link:hover .icon { color: var(--accent); transform: scale(1.1); }
.rail-link.is-active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.rail-link.is-active .icon { color: var(--accent); }
.rail-link.is-active::before { content: ''; position: absolute; left: -16px; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.rail-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 14px; border-top: 1px solid var(--line); }
.scrim { position: fixed; inset: 0; z-index: 110; background: var(--scrim); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.scrim[data-open=true] { opacity: 1; visibility: visible; }

/* top bar (tablet & mobile) */
.topbar { display: none; }
.icon-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); transition: border-color .2s, color .2s; }
.icon-btn:hover { border-color: var(--accent-line); color: var(--accent); }
.burger { display: grid; gap: 4px; width: 18px; }
.burger span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
[aria-expanded=true] .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
[aria-expanded=true] .burger span:nth-child(2) { opacity: 0; }
[aria-expanded=true] .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* theme switch */
.theme-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: .5rem .55rem .5rem .85rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: .86rem; font-weight: 500; }
.theme-toggle.is-compact { width: auto; padding: 0; border: 0; background: none; }
.theme-toggle-track { position: relative; width: 50px; height: 28px; border-radius: var(--r-pill); background: var(--surface-3); border: 1px solid var(--line-2); flex: none; transition: background-color .3s; }
.theme-toggle-thumb { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: transform .45s var(--ease); box-shadow: 0 4px 10px -3px rgba(0, 0, 0, .4); }
[data-theme=dark] .theme-toggle-thumb { transform: translateX(22px); }
.theme-toggle-icon { display: grid; place-items: center; }
.theme-toggle-icon .icon { width: 13px; height: 13px; stroke-width: 2.2; }
[data-theme=dark] .icon-sun, [data-theme=light] .icon-moon { display: none; }
.theme-toggle:hover .theme-toggle-track { border-color: var(--accent-line); }

/* ---------------------------------------------------------------- main column */
.site-main { margin-left: calc(var(--rail-w) + var(--gap) * 2); padding: var(--gap) var(--gap) var(--gap) 0; min-height: 100vh; outline: none; }
.page { display: flex; flex-direction: column; gap: var(--gap); }
.panel { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(40px, 6vw, 84px) 0; overflow: clip; }
.container { width: min(100% - var(--pad) * 2, var(--content)); margin-inline: auto; }
.page-wide .container { --content: 1320px; }
.page-landing .container { --content: 1320px; }

@media (max-width: 1099.98px) {
    .topbar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--topbar-h); padding: 0 var(--gap); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
    .topbar-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; min-width: 0; }
    .topbar-brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .topbar-mark { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .85rem; }
    .topbar-actions { display: flex; align-items: center; gap: 8px; }
    .rail { top: 0; bottom: 0; left: 0; width: min(88vw, 320px); border-radius: 0 var(--r-lg) var(--r-lg) 0; transform: translateX(-104%); transition: transform .45s var(--ease); box-shadow: var(--shadow-lg); }
    .rail[data-open=true] { transform: none; }
    .site-main { margin-left: 0; padding: var(--gap); }
}

/* ---------------------------------------------------------------- shared components */
.eyebrow { display: inline-flex; align-items: center; gap: .65rem; margin: 0 0 1rem; color: var(--accent); font-size: .76rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 26px; height: 2px; border-radius: 2px; background: currentColor; }
.text-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.text-link:hover { background-size: 100% 2px; color: var(--accent-strong); }
.text-link .icon { transition: transform .3s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .8rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: .8rem; font-weight: 500; line-height: 1.5; text-decoration: none; transition: border-color .2s, color .2s, background-color .2s; }
a.chip:hover, button.chip:hover { border-color: var(--accent-line); color: var(--accent); }
.icon-tile { width: 46px; height: 46px; flex: none; display: inline-grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); transition: transform .35s var(--ease), background-color .3s, color .3s; }
.icon-tile .icon { width: 21px; height: 21px; }
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px; padding: .8rem 1.5rem; border-radius: var(--r-pill); border: 1.5px solid transparent; font: 600 .94rem/1.2 var(--font); letter-spacing: .01em; text-decoration: none; white-space: nowrap; transition: transform .3s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .3s; }
.btn .icon { transition: transform .3s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-solid { background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 26px -14px var(--accent); }
.btn-solid::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, .28) 50%, transparent 75%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn-solid:hover { background: var(--accent-strong); color: var(--on-accent); transform: translateY(-2px); box-shadow: 0 18px 32px -16px var(--accent); }
.btn-solid:hover::after { transform: translateX(120%); }
.btn-outline, .btn-outline-light { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover, .btn-outline-light:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { min-height: 42px; padding: .6rem 1.1rem; font-size: .86rem; }
.back-link { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.4rem; color: var(--muted); font-size: .9rem; font-weight: 500; text-decoration: none; }
.back-link:hover { color: var(--accent); }
.empty-state { padding: 3rem 1.5rem; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r-md); color: var(--muted); }
.empty-title { color: var(--ink); font-weight: 600; font-size: 1.1rem; margin-bottom: .4rem; }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); animation: pulse 2.2s infinite; vertical-align: middle; }
.section-label { margin: 2.6rem 0 1rem; color: var(--ink); font-size: 1.2rem; font-weight: 600; }
.section-more { margin-top: 2rem; }

/* section & page titles */
.block-title { margin-bottom: clamp(26px, 3.6vw, 44px); }
.block-title > h2, .block-title > h1, .block-title > h3 { margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 700; letter-spacing: -.025em; }
.block-title-line { position: relative; display: block; width: 64px; height: 5px; margin: 1rem 0 1.1rem; border-radius: 5px; background: var(--accent-soft-2); overflow: hidden; }
.block-title-line::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease) .2s; }
.block-title.is-in .block-title-line::after, .no-js .block-title-line::after { transform: none; }
.block-subtitle { max-width: 62ch; margin: 0; color: var(--muted); font-size: 1.02rem; }
.page-header { position: relative; margin-bottom: clamp(30px, 4.4vw, 52px); }
.page-title { margin: 0; font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.04; }
.page-header-rule { position: relative; display: block; width: 76px; height: 5px; margin: 1.1rem 0 1.2rem; border-radius: 5px; background: var(--accent); }
.page-header-rule::after { content: ''; position: absolute; left: calc(100% + 6px); top: 0; width: 10px; height: 5px; border-radius: 5px; background: var(--accent-line); }
.page-header-desc { max-width: 64ch; margin: 0; color: var(--muted); font-size: 1.1rem; }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: clamp(30px, 5vw, 84px); min-height: min(92vh, 900px); padding: clamp(48px, 7vw, 104px) var(--pad); }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px); background-size: 24px 24px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 45%, #000 15%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 70% 45%, #000 15%, transparent 75%); pointer-events: none; }
.hero::after { content: ''; position: absolute; width: 640px; height: 640px; right: -180px; top: -220px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft-2) 0%, transparent 66%); animation: drift 18s ease-in-out infinite; pointer-events: none; }
.hero-content { position: relative; z-index: 1; }
.hero-visual { position: relative; z-index: 1; order: 2; justify-self: center; width: min(100%, 450px); aspect-ratio: 4 / 5; isolation: isolate; }
.hero-visual::before { content: ''; position: absolute; inset: 14% 0 0; z-index: -2; border-radius: var(--r-xl); background: radial-gradient(120% 90% at 30% 0%, var(--accent-soft-2), transparent 55%), linear-gradient(165deg, var(--surface-3), var(--surface-2)); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.hero-visual::after { content: ''; position: absolute; z-index: -1; left: 50%; top: 2%; width: 78%; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--accent-line); translate: -50% 0; animation: spin 60s linear infinite; }
.hero-portrait, .hero-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; border-radius: 0 0 var(--r-xl) var(--r-xl); filter: drop-shadow(0 26px 34px rgba(0, 0, 0, .28)); }
.hero-badge { position: absolute; z-index: 2; display: flex; align-items: center; gap: .75rem; max-width: 260px; padding: .75rem 1rem .75rem .8rem; border-radius: 18px; background: var(--glass); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border: 1px solid var(--line); box-shadow: var(--shadow); line-height: 1.3; }
.hero-badge-a { left: -9%; bottom: 14%; }
.hero-badge-b { right: -7%; top: 24%; }
.hero-badge-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: var(--on-accent); }
.hero-badge strong { display: block; color: var(--ink); font-size: .84rem; font-weight: 600; }
.hero-badge small { display: block; color: var(--muted); font-size: .74rem; }
.hero-kicker { display: inline-flex; align-items: center; gap: .7rem; margin: 0 0 1.4rem; padding: .45rem 1rem .45rem .8rem; border-radius: var(--r-pill); background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); font-size: .86rem; font-weight: 600; }
.hero-kicker-rule { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-line); animation: pulse-accent 2.4s infinite; }
.rotating-window { display: inline-grid; overflow: hidden; height: 1.5em; vertical-align: bottom; }
.rotating-item { grid-area: 1 / 1; white-space: nowrap; transition: transform .6s var(--ease), opacity .6s var(--ease); }
.rotating-item.is-entering { transform: translateY(105%); opacity: 0; }
.rotating-item.is-leaving { transform: translateY(-105%); opacity: 0; }
.hero-title { margin: 0 0 .35em; font-size: clamp(2.8rem, 6.6vw, 5.4rem); font-weight: 700; line-height: 1.02; letter-spacing: -.045em; }
.hero-word { display: inline-block; overflow: hidden; padding: 0 .02em .08em; margin-bottom: -.08em; vertical-align: bottom; }
.hero-word > span { display: inline-block; }
.hero-word:last-child > span { color: var(--accent); }
.hero-headline { margin: 0 0 .9rem; color: var(--ink); font-size: clamp(1.02rem, 1.6vw, 1.2rem); font-weight: 500; }
.hero-lead { max-width: 58ch; margin: 0 0 2rem; color: var(--muted); font-size: 1.04rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2.2rem; }
.hero-creds { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.hero-creds li { display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .85rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: .8rem; font-weight: 500; }
.hero-creds .icon { color: var(--accent); }
@media (max-width: 1099.98px) {
    .hero { grid-template-columns: 1fr; min-height: 0; text-align: left; }
    .hero-visual { order: 0; width: min(78vw, 380px); margin-top: 1rem; }
    .hero-badge-a { left: -4%; bottom: 8%; }
    .hero-badge-b { right: -4%; top: 18%; }
}
@media (max-width: 520px) {
    .hero-badge { max-width: 200px; padding: .55rem .7rem; }
    .hero-badge-icon { width: 32px; height: 32px; }
    .hero-badge-b { display: none; }
}

/* ---------------------------------------------------------------- stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.stat { position: relative; padding: 1.6rem 1.5rem 1.4rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.stat::before { content: ''; position: absolute; left: 1.5rem; top: 0; width: 42px; height: 4px; border-radius: 0 0 4px 4px; background: var(--accent); }
.stat-value { margin: 0 0 .35rem; color: var(--ink); font-size: clamp(2.3rem, 4.4vw, 3.2rem); font-weight: 700; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-label { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }

/* ---------------------------------------------------------------- cards & lists */
.xp-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin: 0; padding: 0; }
.xp-card { position: relative; display: flex; flex-direction: column; gap: .45rem; padding: 1.5rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; }
.xp-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.xp-title { margin: 0; color: var(--ink); font-size: 1.08rem; font-weight: 600; }
.xp-text { margin: 0; color: var(--muted); font-size: .93rem; }
.xp-count { color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.rows { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.row { position: relative; display: grid; grid-template-columns: minmax(130px, 170px) minmax(0, 1fr); gap: 1.2rem; align-items: start; padding: 1.15rem 1.3rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); transition: border-color .3s, transform .4s var(--ease); }
.row:hover { border-color: var(--accent-line); transform: translateX(4px); }
.row-when { color: var(--accent); font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.row-kicker { color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.row-main { min-width: 0; }
.row-title { margin: 0; color: var(--ink); font-size: 1.02rem; font-weight: 600; }
.row-sub { margin: .1rem 0 0; color: var(--text); font-size: .92rem; }
.row-text { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; }
.rows-compact .row { padding: .9rem 1.1rem; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; gap: .3rem; } }

/* ---------------------------------------------------------------- career timeline */
.xtl { position: relative; --progress: 0; }
.xtl-track { position: absolute; top: 8px; bottom: 8px; left: 50%; width: 2px; translate: -1px 0; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.xtl-progress { position: absolute; inset: 0; background: linear-gradient(var(--accent), var(--accent-strong)); transform-origin: top; transform: scaleY(var(--progress)); }
.xtl-list { list-style: none; display: grid; gap: 26px; margin: 0; padding: 0; }
.xtl-item { display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr); align-items: start; }
.xtl-item[data-side=left] .xtl-card { grid-column: 1; grid-row: 1; }
.xtl-item[data-side=left] .xtl-when { grid-column: 3; grid-row: 1; text-align: left; }
.xtl-item[data-side=right] .xtl-card { grid-column: 3; grid-row: 1; }
.xtl-item[data-side=right] .xtl-when { grid-column: 1; grid-row: 1; text-align: right; }
.xtl-marker { grid-column: 2; grid-row: 1; display: flex; justify-content: center; padding-top: 20px; }
.xtl-dot { position: relative; z-index: 1; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); color: var(--muted); transition: border-color .5s, color .5s, transform .5s var(--ease); }
.xtl-dot .icon { width: 18px; height: 18px; }
.xtl-item.is-in .xtl-dot { border-color: var(--accent); color: var(--accent); }
.xtl-dot.is-current { background: var(--accent); border-color: var(--accent); color: var(--on-accent) !important; box-shadow: 0 0 0 7px var(--accent-soft); }
.xtl-dot.is-current::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--accent-line); animation: ring 2.6s var(--ease) infinite; }
.xtl-when { padding: 24px 6px 0; }
.xtl-when-period { display: block; color: var(--ink); font-weight: 600; font-size: .98rem; }
.xtl-when-duration { display: block; color: var(--muted); font-size: .84rem; }
.xtl-card { position: relative; padding: 1.4rem 1.5rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); transition: border-color .3s, box-shadow .4s, transform .4s var(--ease); }
.xtl-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.xtl-card.is-current { border-color: var(--accent-line); background: linear-gradient(160deg, var(--accent-soft), transparent 55%), var(--surface-2); }
.xtl-head { display: flex; align-items: flex-start; gap: 14px; }
.xtl-heading { flex: 1; min-width: 0; }
.xtl-period { margin: 0 0 .25rem; color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.xtl-duration { color: var(--muted); text-transform: none; letter-spacing: 0; }
.xtl-title { margin: 0; color: var(--ink); font-size: 1.12rem; font-weight: 600; }
.xtl-org { margin: .15rem 0 0; color: var(--text); font-weight: 500; }
.xtl-location { display: flex; align-items: center; gap: .35rem; margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }
.xtl-badge { flex: none; padding: .22rem .65rem; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 600; letter-spacing: .04em; }
.xtl-summary { margin: .95rem 0 0; color: var(--text); }
.xtl-toggle { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; padding: .45rem .9rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--ink); font-size: .84rem; font-weight: 600; transition: border-color .2s, color .2s; }
.xtl-toggle:hover { border-color: var(--accent); color: var(--accent); }
.xtl-toggle .icon { transition: transform .35s var(--ease); }
.xtl-toggle [data-label-open], .xtl-toggle[aria-expanded=true] [data-label-closed] { display: none; }
.xtl-toggle[aria-expanded=true] [data-label-open] { display: inline; }
.xtl-toggle[aria-expanded=true] .icon { transform: rotate(180deg); }
.xtl-details { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.xtl-details.is-open { grid-template-rows: 1fr; }
.xtl-details-inner { min-height: 0; overflow: hidden; }
.xtl-details.is-open .xtl-details-inner { padding-top: 1.1rem; }
@media (min-width: 900px) { .xtl-period { display: none; } }
@media (max-width: 899.98px) {
    .xtl-track { left: 21px; }
    .xtl-item, .xtl-item[data-side] { grid-template-columns: 42px minmax(0, 1fr); column-gap: 14px; }
    .xtl-marker { grid-column: 1; padding-top: 18px; }
    .xtl-item[data-side] .xtl-card { grid-column: 2; }
    .xtl-when { display: none; }
    .xtl-card { padding: 1.2rem; }
}
.inst-badge { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line); color: var(--accent); font-size: .92rem; font-weight: 700; overflow: hidden; }
.inst-badge.has-logo { background: #fff; }
.inst-badge img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

/* attachments (photos, certificates, letters) */
.attach-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 1rem 0 0; padding: 0; }
.attach { position: relative; display: flex; flex-direction: column; width: 100%; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: inherit; text-align: left; text-decoration: none; overflow: hidden; transition: border-color .3s, transform .35s var(--ease); }
.attach:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.attach img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.attach-file { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); }
.attach-file .icon { width: 32px; height: 32px; }
.attach-meta { display: grid; gap: .1rem; padding: .55rem .7rem .65rem; }
.attach-kind { color: var(--accent); font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.attach-label { color: var(--ink); font-size: .82rem; font-weight: 500; line-height: 1.35; }

/* ---------------------------------------------------------------- certifications */
.cert-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin: 0; padding: 0; }
.cert-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; transition: transform .45s var(--ease), border-color .3s, box-shadow .45s; }
.cert-card:hover { transform: translateY(-5px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.cert-visual { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: radial-gradient(90% 90% at 20% 10%, var(--accent-soft-2), transparent 60%), linear-gradient(160deg, var(--surface-3), var(--surface-2)); border-bottom: 1px solid var(--line); }
.cert-visual::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px); background-size: 18px 18px; }
.cert-visual img, .cert-preview { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.cert-card:hover .cert-visual img { transform: scale(1.05); }
.cert-seal { position: relative; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); color: var(--accent); box-shadow: 0 0 0 10px var(--accent-soft), var(--shadow); transition: transform .6s var(--ease); }
.cert-card:hover .cert-seal { transform: rotate(-10deg) scale(1.06); }
.cert-seal .icon { width: 34px; height: 34px; }
.cert-body { display: flex; flex-direction: column; gap: .35rem; flex: 1; padding: 1.35rem 1.4rem 1.4rem; }
.cert-title { margin: 0; color: var(--ink); font-size: 1.12rem; font-weight: 600; }
.cert-issuer { margin: 0; color: var(--text); font-weight: 500; }
.cert-dates, .cert-id { margin: 0; color: var(--muted); font-size: .84rem; }
.cert-text { color: var(--text); font-size: .93rem; }
.cert-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: auto; padding-top: .8rem; }
.cert-pdf { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------------------------------------------------------------- expertise */
.chip-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2rem; }
.xp-sections { display: grid; gap: 14px; }
.xp-section { position: relative; padding: clamp(22px, 3vw, 34px); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); scroll-margin-top: 90px; }
.xp-section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 1rem; }
.xp-section-title { margin: 0; font-size: 1.3rem; font-weight: 600; }
.xp-section-text { margin: 0 0 1.2rem; color: var(--muted); max-width: 70ch; }
.skill-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 0; padding: 0; }
.skill-item { position: relative; padding: .95rem 1.05rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, transform .35s var(--ease); }
.skill-item:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.skill-item.is-top { border-color: var(--accent-line); background: linear-gradient(150deg, var(--accent-soft), transparent 60%), var(--surface); }
.skill-name { margin: 0; color: var(--ink); font-weight: 600; font-size: .95rem; }
.skill-top { display: inline-block; margin-left: .4rem; padding: .08rem .5rem; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: .64rem; font-weight: 600; letter-spacing: .05em; vertical-align: middle; }
.skill-desc { margin: .35rem 0 0; color: var(--muted); font-size: .88rem; }
.skill-desc p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- about */
.about-layout { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.about-figure { position: relative; margin: 0; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 5; background: radial-gradient(100% 80% at 30% 0%, var(--accent-soft-2), transparent 60%), linear-gradient(165deg, var(--surface-3), var(--surface-2)); border: 1px solid var(--line); }
.about-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.about-body .cms-lead, .cms-lead { color: var(--ink); font-size: 1.16rem; font-weight: 500; line-height: 1.65; }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
.facts { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; }
.facts li { padding: .9rem 1rem; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: .9rem; line-height: 1.45; }
.facts li strong, .facts li b { display: block; color: var(--ink); font-weight: 600; }
.quote-band { text-align: center; background: radial-gradient(70% 120% at 50% 0%, var(--accent-soft), transparent 70%), var(--surface); }
.pull { position: relative; max-width: 900px; margin: 0 auto; color: var(--ink); font-size: clamp(1.3rem, 2.5vw, 1.95rem); font-weight: 500; line-height: 1.45; letter-spacing: -.01em; }
.pull-mark { display: block; width: 52px; height: 52px; margin: 0 auto 1.2rem; color: var(--accent); }
.pull footer, .pull cite { display: block; margin-top: 1.2rem; color: var(--muted); font-size: .95rem; font-style: normal; font-weight: 500; }
.belief { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(24px, 4vw, 60px); align-items: center; }
.big-quote { position: relative; }
.big-quote-mark { display: block; margin-bottom: 1rem; color: var(--accent); }
.big-quote-mark .icon { width: 58px; height: 58px; }
.big-quote p { color: var(--ink); font-size: clamp(1.4rem, 2.7vw, 2.15rem); font-weight: 500; line-height: 1.38; letter-spacing: -.015em; }
.belief-aside { padding: 1.6rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 960px) { .about-layout, .belief { grid-template-columns: 1fr; } .about-figure { max-width: 440px; } }

/* call to action */
.cta-band { background: radial-gradient(60% 140% at 100% 0%, var(--accent-soft-2), transparent 60%), radial-gradient(50% 100% at 0% 100%, var(--accent-soft), transparent 70%), var(--surface); }
.cta-inner { width: min(100% - var(--pad) * 2, var(--content)); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.cta-text { max-width: 60ch; }
.cta-title { margin: 0 0 .4rem; font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 700; letter-spacing: -.03em; }
.cta-text p { margin: 0; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- gallery */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.8rem; }
.filter { display: inline-flex; align-items: center; padding: .45rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: .86rem; font-weight: 500; text-decoration: none; transition: all .2s; }
.filter:hover { border-color: var(--accent-line); color: var(--accent); }
.filter-active, .filter[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.album-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin: 0; padding: 0; }
.album-card { position: relative; display: block; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: inherit; text-decoration: none; overflow: hidden; transition: transform .45s var(--ease), border-color .3s, box-shadow .45s; }
.album-card:hover { transform: translateY(-5px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.album-cover { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.album-card:hover .album-cover img { transform: scale(1.07); }
.album-meta { padding: 1rem 1.2rem 1.15rem; }
.album-title { margin: 0; color: var(--ink); font-size: 1.05rem; font-weight: 600; }
.album-count { margin: .2rem 0 0; color: var(--muted); font-size: .85rem; }
.masonry { list-style: none; columns: 3 260px; column-gap: 12px; margin: 0; padding: 0; }
.masonry-item { break-inside: avoid; margin-bottom: 12px; }
.masonry-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3); cursor: zoom-in; }
.masonry-btn img { width: 100%; transition: transform .8s var(--ease), filter .4s; }
.masonry-btn:hover img { transform: scale(1.05); }
.masonry-zoom { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--glass); color: var(--ink); opacity: 0; transform: scale(.8); transition: opacity .3s, transform .3s var(--ease); }
.masonry-btn:hover .masonry-zoom, .masonry-btn:focus-visible .masonry-zoom { opacity: 1; transform: none; }
.masonry-caption { margin: .45rem .2rem 0; color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------------- contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(22px, 4vw, 56px); align-items: start; }
.contact-lead { color: var(--ink); font-size: 1.1rem; font-weight: 500; }
.info-blocks { display: grid; gap: 10px; }
.info-block { position: relative; display: flex; align-items: center; gap: 14px; padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); transition: border-color .3s; }
.info-block:hover { border-color: var(--accent-line); }
.info-title { margin: 0; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.info-value { margin: 0; color: var(--ink); font-weight: 500; word-break: break-word; }
.info-value a { color: var(--ink); text-decoration: none; }
.info-value a:hover { color: var(--accent); }
.contact-social { margin-top: 1.6rem; }
.contact-social .info-title { margin-bottom: .8rem; }
.contact-form-wrap { position: relative; padding: clamp(22px, 3.4vw, 40px); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field-control { position: relative; }
.field-control input, .field-control textarea, .field-control select { width: 100%; padding: 1.45rem 1rem .6rem; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); line-height: 1.5; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.field-control textarea { min-height: 170px; resize: vertical; }
.field-control label { position: absolute; left: 1rem; top: 1.02rem; color: var(--muted); font-size: .95rem; pointer-events: none; transform-origin: left top; transition: transform .25s var(--ease), color .2s; }
.field-control :is(input, textarea):focus ~ label, .field-control :is(input, textarea):not(:placeholder-shown) ~ label { transform: translateY(-.62rem) scale(.76); color: var(--accent); font-weight: 600; }
.field-control :is(input, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-line { display: none; }
.field.has-error :is(input, textarea) { border-color: var(--error); }
.field-error, .error-text { margin: .4rem 0 0; color: var(--error); font-size: .85rem; font-weight: 500; }
.form-hint { margin: 0; color: var(--muted); font-size: .84rem; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: .4rem; }
.form-status { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.2rem; padding: .85rem 1rem; border-radius: 14px; font-weight: 500; }
.form-status.is-success { background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); }
.form-status.is-error { background: color-mix(in srgb, var(--error) 13%, transparent); color: var(--error); }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.map-panel { margin-top: 1.6rem; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); }
.map-panel iframe { display: block; width: 100%; height: 380px; border: 0; }
[data-theme=dark] .map-panel iframe { filter: invert(.9) hue-rotate(180deg) saturate(.7) contrast(.92); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ---------------------------------------------------------------- social */
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.social-icon { --brand: var(--accent); --brand-ink: var(--on-accent); width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; transition: background-color .25s, color .25s, border-color .25s, transform .35s var(--ease); }
.social-icon .icon { width: 18px; height: 18px; }
a.social-icon:hover, .social-row:hover .social-icon { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); transform: translateY(-3px); }
.social-linkedin { --brand: #0a66c2; --brand-ink: #fff; }
.social-facebook { --brand: #1877f2; --brand-ink: #fff; }
.social-instagram { --brand: #e1306c; --brand-ink: #fff; }
.social-youtube { --brand: #ff0000; --brand-ink: #fff; }
.social-whatsapp { --brand: #25d366; --brand-ink: #062b14; }
.social-telegram { --brand: #26a5e4; --brand-ink: #fff; }
.social-viber { --brand: #7360f2; --brand-ink: #fff; }
.social-pinterest { --brand: #bd081c; --brand-ink: #fff; }
.social-substack { --brand: #ff6719; --brand-ink: #1b0a00; }
.social-researchgate { --brand: #00ccbb; --brand-ink: #002a26; }
.social-googlescholar { --brand: #4285f4; --brand-ink: #fff; }
.social-orcid { --brand: #a6ce39; --brand-ink: #182005; }
.social-slideshare { --brand: #0077b5; --brand-ink: #fff; }
.social-x, .social-tiktok, .social-threads, .social-github, .social-medium { --brand: var(--ink); --brand-ink: var(--surface); }
.social-list { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.social-row { display: flex; align-items: center; gap: 14px; padding: .8rem 1rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color .3s, transform .35s var(--ease); }
.social-row:hover { border-color: var(--accent-line); transform: translateX(4px); }
.social-row-text { min-width: 0; line-height: 1.35; }
.social-row-text strong { display: block; color: var(--ink); font-weight: 600; font-size: .95rem; }
.social-row-text small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-row-arrow { margin-left: auto; color: var(--subtle); transition: color .2s, transform .3s var(--ease); }
.social-row:hover .social-row-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ---------------------------------------------------------------- CMS content (rich text) */
.cms { color: var(--text); font-size: 1.02rem; line-height: 1.8; overflow-wrap: break-word; }
.cms > :first-child { margin-top: 0; }
.cms > :last-child { margin-bottom: 0; }
.cms h2 { margin: 2.2em 0 .7em; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; scroll-margin-top: 90px; }
.cms h3 { margin: 1.9em 0 .6em; font-size: 1.25rem; font-weight: 600; scroll-margin-top: 90px; }
.cms h4 { margin: 1.6em 0 .5em; font-size: 1.05rem; font-weight: 600; }
.cms a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.cms strong, .cms b { color: var(--ink); font-weight: 600; }
.cms ul, .cms ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.cms li { margin: .35em 0; }
.cms ul li::marker { color: var(--accent); }
.cms ol li::marker { color: var(--accent); font-weight: 600; }
.cms blockquote { position: relative; margin: 1.8em 0; padding: 1.2em 1.4em 1.2em 1.6em; border-left: 4px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface-2); color: var(--ink); font-size: 1.08rem; font-weight: 500; }
.cms blockquote p:last-child { margin: 0; }
.cms figure { margin: 1.8em 0; }
.cms img { border-radius: var(--r-sm); }
.cms figcaption { margin-top: .6rem; color: var(--muted); font-size: .88rem; text-align: center; }
.cms figure.image { display: table; margin-inline: auto; }
.cms .image-style-side, .cms .image-style-align-right { float: right; max-width: 45%; margin: .4em 0 1em 1.6em; }
.cms .image-style-align-left { float: left; max-width: 45%; margin: .4em 1.6em 1em 0; }
.cms figure.table { overflow-x: auto; }
.cms table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .95rem; }
.cms th, .cms td { padding: .7rem .9rem; border: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.cms th { background: var(--surface-3); color: var(--ink); font-weight: 600; }
.cms tr:nth-child(even) td { background: var(--surface-2); }
.cms code { padding: .15em .4em; border-radius: 6px; background: var(--surface-3); color: var(--ink); font-size: .88em; }
.cms pre { overflow-x: auto; padding: 1.1rem 1.2rem; border-radius: var(--r-sm); background: var(--surface-3); border: 1px solid var(--line); font-size: .88rem; line-height: 1.6; }
.cms pre code { padding: 0; background: none; }
.cms hr { height: 1px; margin: 2.4em 0; border: 0; background: var(--line-2); }
.cms iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r-sm); }
.cms figure.media { position: relative; }
.cms::after { content: ''; display: table; clear: both; }

/* ---------------------------------------------------------------- custom pages */
.page-figure { margin: 0 0 2.2rem; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.page-figure img { width: 100%; max-height: 560px; object-fit: cover; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin: 0 0 2rem; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.page-meta-item { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .88rem; }
.page-meta .share { margin-left: auto; }
.page-body { display: block; }
.page-body.has-toc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.toc { position: sticky; top: 24px; padding: 1.1rem 1.1rem 1.2rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
.toc-title { display: flex; align-items: center; gap: .45rem; margin: 0 0 .7rem; color: var(--ink); font-weight: 600; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.toc a { display: block; padding: .3rem .6rem; border-radius: 8px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.45; transition: color .2s, background-color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); background: var(--surface-3); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.toc .toc-sub a { padding-left: 1.2rem; font-size: .84rem; }
@media (max-width: 1100px) { .page-body.has-toc { grid-template-columns: 1fr; } .toc { position: static; } }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.share-label { display: inline-flex; align-items: center; gap: .4rem; margin-right: .3rem; color: var(--muted); font-size: .84rem; font-weight: 500; }
.share-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--text); text-decoration: none; transition: all .25s var(--ease); }
.share-btn .icon { width: 16px; height: 16px; }
.share-btn:hover { border-color: var(--accent); background: var(--accent); color: var(--on-accent); transform: translateY(-2px); }
.child-pages { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; }
.child-pages a { display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: 1.2rem 1.3rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: transform .4s var(--ease), border-color .3s; }
.child-pages a:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.child-title { color: var(--ink); font-weight: 600; }
.child-text { color: var(--muted); font-size: .9rem; }
.html-sandbox { display: block; width: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }

/* ---------------------------------------------------------------- explore (cross-links on every page) */
.explore { background: radial-gradient(60% 90% at 100% 0%, var(--accent-soft), transparent 65%), var(--surface); }
.explore-head { margin-bottom: 1.6rem; }
.explore-title { margin: 0; font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 700; letter-spacing: -.025em; }
.explore-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 12px; margin: 0; padding: 0; }
.explore-card { position: relative; display: flex; align-items: center; gap: 14px; height: 100%; padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: inherit; text-decoration: none; overflow: hidden; transition: transform .45s var(--ease), border-color .3s, box-shadow .45s; }
.explore-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.explore-card:hover .icon-tile { background: var(--accent); color: var(--on-accent); transform: rotate(-6deg); }
.explore-text { min-width: 0; line-height: 1.4; }
.explore-text strong { display: block; color: var(--ink); font-weight: 600; }
.explore-text small { display: block; margin-top: .15rem; color: var(--muted); font-size: .82rem; }
.explore-arrow { margin-left: auto; align-self: flex-start; color: var(--subtle); transition: color .25s, transform .35s var(--ease); }
.explore-card:hover .explore-arrow { color: var(--accent); transform: translate(3px, -3px); }

/* ---------------------------------------------------------------- footer */
.site-footer { padding: clamp(32px, 4.4vw, 56px) var(--pad) 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-name { color: var(--ink); font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.footer-role { margin: .4rem 0 .8rem; color: var(--muted); font-size: .9rem; }
.footer-meta { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; color: var(--text); font-size: .9rem; }
.footer-meta a { color: var(--text); text-decoration: none; }
.footer-meta a:hover { color: var(--accent); }
.footer-social { margin-top: .4rem; }
.footer-heading { margin: .3rem 0 1rem; color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.footer-col ul { list-style: none; display: grid; gap: .5rem; margin: 0; padding: 0; }
.footer-col a:not(.btn) { color: var(--text); font-size: .93rem; text-decoration: none; transition: color .2s, padding-left .3s var(--ease); }
.footer-col a:not(.btn):hover { color: var(--accent); padding-left: 4px; }
.footer-text { color: var(--muted); font-size: .9rem; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer-bottom p { margin: 0; }
.to-top { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--text); font-size: .84rem; font-weight: 500; transition: border-color .2s, color .2s; }
.to-top:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 1000px) { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- page arrows, admin shortcut */
.page-arrows { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; gap: 8px; }
.page-arrow { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: background-color .25s, color .25s, border-color .25s, transform .35s var(--ease); }
.page-arrow:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateY(-3px); }
.page-arrow.is-disabled { opacity: .35; pointer-events: none; }
.page-arrow-tip { position: absolute; bottom: calc(100% + 10px); right: 0; padding: .35rem .7rem; border-radius: 8px; background: var(--surface-inv, var(--ink)); color: var(--surface); font-size: .76rem; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.page-arrow:hover .page-arrow-tip, .page-arrow:focus-visible .page-arrow-tip { opacity: 1; transform: none; }
@media (max-width: 1099.98px) { .page-arrows { display: none; } }
.admin-fab { position: fixed; left: 50%; bottom: 20px; z-index: 95; translate: -50% 0; display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.05rem; border-radius: var(--r-pill); background: var(--ink); color: var(--surface); font-size: .84rem; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-lg); }
.admin-fab:hover { color: var(--surface); background: var(--accent); }
.preview-banner { position: sticky; top: 0; z-index: 130; padding: .6rem 1rem; background: var(--accent); color: var(--on-accent); text-align: center; font-size: .86rem; font-weight: 600; }

/* ---------------------------------------------------------------- search palette */
.palette { width: min(640px, 94vw); max-height: min(560px, 80vh); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.palette::backdrop { background: var(--scrim); backdrop-filter: blur(6px); }
.palette[open] { animation: pop .3s var(--ease); }
.palette-box { display: flex; flex-direction: column; max-height: inherit; }
.palette-search { display: flex; align-items: center; gap: 12px; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-search input { flex: 1; min-width: 0; padding: .3rem 0; border: 0; background: transparent; color: var(--ink); font-size: 1.05rem; outline: none; }
.palette-search input::-webkit-search-cancel-button { display: none; }
.palette-list { list-style: none; margin: 0; padding: .5rem; overflow-y: auto; }
.palette-group { padding: .6rem .7rem .3rem; color: var(--subtle); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: .6rem .7rem; border-radius: 12px; color: var(--text); text-decoration: none; }
.palette-item .icon-tile { width: 36px; height: 36px; border-radius: 10px; }
.palette-item .icon-tile .icon { width: 17px; height: 17px; }
.palette-item strong { display: block; color: var(--ink); font-weight: 600; font-size: .93rem; }
.palette-item small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.palette-item.is-active, .palette-item:hover { background: var(--accent-soft); color: var(--ink); }
.palette-item.is-active .icon-tile { background: var(--accent); color: var(--on-accent); }
.palette-empty { margin: 0; padding: 2rem 1rem; color: var(--muted); text-align: center; }
.palette-foot { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: .7rem 1.2rem; border-top: 1px solid var(--line); color: var(--subtle); font-size: .75rem; }

/* ---------------------------------------------------------------- lightbox & toast */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 5, 7, .92); color: #fff; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; animation: fade .3s ease; }
.lightbox-frame { display: grid; gap: .8rem; justify-items: center; width: min(92vw, 1200px); }
.lightbox-stage { display: grid; place-items: center; width: 100%; max-height: 80vh; }
.lightbox-stage img { max-width: 100%; max-height: 80vh; border-radius: 12px; object-fit: contain; animation: pop .35s var(--ease); }
.lightbox-stage iframe { width: min(92vw, 1000px); height: 80vh; border: 0; border-radius: 12px; background: #fff; }
.lightbox-caption { margin: 0; color: #d8d8e0; font-size: .9rem; text-align: center; }
.lightbox-btn { position: fixed; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; transition: background-color .2s; }
.lightbox-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-open { top: 18px; right: 76px; }
.lightbox-prev { left: 18px; top: 50%; translate: 0 -50%; }
.lightbox-next { right: 18px; top: 50%; translate: 0 -50%; }
.lightbox[data-single] .lightbox-prev, .lightbox[data-single] .lightbox-next { display: none; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 400; translate: -50% 0; padding: .7rem 1.2rem; border-radius: var(--r-pill); background: var(--ink); color: var(--surface); font-size: .88rem; font-weight: 500; box-shadow: var(--shadow-lg); animation: rise .4s var(--ease); }

/* ---------------------------------------------------------------- hover spotlight (set by site.js) */
.spot { --mx: 50%; --my: 50%; }
.spot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(360px circle at var(--mx) var(--my), var(--accent-soft), transparent 45%); opacity: 0; transition: opacity .35s; pointer-events: none; }
.spot:hover::after { opacity: 1; }

/* ---------------------------------------------------------------- motion */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .block-title { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .block-title.is-in { opacity: 1; transform: none; }
.js .load-in { opacity: 0; animation: rise .95s var(--ease) var(--d, 0s) forwards; }
.js .hero-badge.load-in { animation: rise .95s var(--ease) var(--d, 0s) forwards, bob 7s ease-in-out calc(var(--d, 0s) + 1s) infinite; }
.js .hero-word > span { transform: translateY(108%); animation: word-up 1.05s var(--ease) calc(.18s + var(--i, 0) * .12s) forwards; }
.js .hero-visual { animation: portrait-in 1.3s var(--ease) .15s both; }
.js .rail-nav li { animation: slide-in .7s var(--ease) calc(.08s + var(--i, 0) * .045s) both; }
.site-main.is-leaving { opacity: 0; transform: translateX(-18px); transition: opacity .2s ease, transform .2s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes word-up { to { transform: none; } }
@keyframes portrait-in { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-60px, 50px) scale(1.12); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes pulse-accent { 0% { box-shadow: 0 0 0 0 var(--accent-line); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes ring { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* cross-page transitions (Chrome, Edge, Safari 18+); other browsers use the .is-leaving fade */
@view-transition { navigation: auto; }
.site-main { view-transition-name: main; }
.rail { view-transition-name: rail; }
.topbar { view-transition-name: topbar; }
::view-transition-old(main) { animation: vt-leave .28s var(--ease-io) both; }
::view-transition-new(main) { animation: vt-enter .55s var(--ease) both; }
::view-transition-old(rail), ::view-transition-new(rail), ::view-transition-old(topbar), ::view-transition-new(topbar) { animation: none; }
@keyframes vt-leave { to { opacity: 0; transform: translateX(-28px) scale(.99); } }
@keyframes vt-enter { from { opacity: 0; transform: translateX(36px); } }
/* theme switch: circular reveal of the whole page */
html.is-switching-theme .site-main, html.is-switching-theme .rail, html.is-switching-theme .topbar { view-transition-name: none; }
html.is-switching-theme::view-transition-old(root), html.is-switching-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after { transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, fill .4s ease !important; }

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js .reveal, .js .block-title, .js .load-in, .js .hero-word > span, .js .hero-visual { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- print */
@media print {
    .rail, .topbar, .scrim, .page-arrows, .explore, .admin-fab, .progress, .share, .toc, .to-top, .hero::after, .hero::before { display: none !important; }
    body { background: #fff; color: #000; font-size: 11pt; }
    .site-main { margin: 0; padding: 0; }
    .panel, .site-footer { border: 0; border-radius: 0; padding: 12pt 0; background: #fff; break-inside: avoid-page; }
    .js .reveal, .js .load-in, .js .block-title { opacity: 1 !important; transform: none !important; }
    a { color: #000; }
}

/* ---------------------------------------------------------------- refinements */
.page-arrows { transition: opacity .3s, transform .3s var(--ease); }
.page-arrows.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
@media (max-width: 560px) {
    .xtl-head { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; }
    .xtl-head .inst-badge { width: 44px; height: 44px; grid-row: 2; }
    .xtl-heading { grid-row: 2; }
    .xtl-badge { grid-row: 1; grid-column: 1 / -1; justify-self: start; margin-bottom: .65rem; }
    .hero-title { font-size: clamp(2.5rem, 12vw, 3.2rem); }
}

/* ---------------------------------------------------------------- insights, blog & publications */
.journal-bar { display: grid; gap: 14px; margin-bottom: 1.8rem; }
.journal-search { display: flex; align-items: center; gap: 10px; max-width: 620px; padding: 6px 6px 6px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.journal-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.journal-search input { flex: 1; min-width: 0; padding: .45rem 0; border: 0; background: transparent; color: var(--ink); outline: none; }
.journal-topics { margin-bottom: 0; }
.filter-count { display: inline-grid; place-items: center; min-width: 1.5em; margin-left: .35rem; padding: 0 .35rem; border-radius: var(--r-pill); background: var(--surface-3); color: var(--muted); font-size: .72rem; font-weight: 600; }
.filter-active .filter-count, .chip.is-active .filter-count { background: color-mix(in srgb, var(--on-accent) 22%, transparent); color: inherit; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.journal-status { margin: -.4rem 0 1.6rem; color: var(--muted); }
.journal-status strong { color: var(--ink); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.post-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; transition: transform .45s var(--ease), border-color .3s, box-shadow .45s; }
.post-card:hover { transform: translateY(-5px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.post-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(90% 90% at 15% 10%, var(--accent-soft-2), transparent 60%), linear-gradient(160deg, var(--surface-3), var(--surface-2)); border-bottom: 1px solid var(--line); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.06); }
.post-cover-art { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px); background-size: 18px 18px; }
.post-cover-art .icon { width: 44px; height: 44px; stroke-width: 1.4; transition: transform .6s var(--ease); }
.post-card:hover .post-cover-art .icon { transform: scale(1.12) rotate(-6deg); }
.post-badge { position: absolute; top: 14px; left: 14px; padding: .25rem .7rem; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 600; }
.post-body { display: flex; flex-direction: column; gap: .45rem; flex: 1; padding: 1.25rem 1.35rem 1.35rem; }
.post-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.post-section { color: var(--muted); }
.post-cat { position: relative; z-index: 2; color: var(--accent); text-decoration: none; }
.post-cat:hover { text-decoration: underline; }
.post-title { margin: 0; font-size: 1.14rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.post-title a { color: var(--ink); text-decoration: none; }
.post-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.post-card:hover .post-title a { color: var(--accent); }
.post-excerpt { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.post-meta { display: flex; gap: .45rem; margin: auto 0 0; padding-top: .6rem; color: var(--muted); font-size: .8rem; }
.post-card-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin-bottom: 14px; }
.post-card-feature .post-cover { aspect-ratio: auto; min-height: 320px; border-bottom: 0; border-right: 1px solid var(--line); }
.post-card-feature .post-body { justify-content: center; padding: clamp(24px, 3.4vw, 44px); gap: .7rem; }
.post-card-feature .post-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -.025em; }
.post-card-feature .post-excerpt { font-size: 1rem; }
.post-card-feature .post-meta { margin-top: .4rem; }
@media (max-width: 860px) { .post-card-feature { grid-template-columns: 1fr; } .post-card-feature .post-cover { min-height: 0; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--line); } }
.tag-cloud { margin-top: 2.6rem; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 2.2rem; }
.pager-pages { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.pager-page, .pager-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 42px; height: 42px; padding: 0 .9rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; transition: all .2s; }
.pager-page:hover, .pager-btn:hover { border-color: var(--accent); color: var(--accent); }
.pager-page.is-current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pager-gap { color: var(--muted); padding: 0 .2rem; }
.section-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }

/* article */
.post-header { max-width: 860px; margin-bottom: 1.8rem; }
.post-header .post-kicker { margin-bottom: 1rem; }
.post-heading { margin: 0 0 .9rem; font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 700; line-height: 1.1; letter-spacing: -.035em; }
.post-lead { margin: 0 0 1.4rem; color: var(--text); font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.65; }
.post-figure figcaption { padding: .7rem 1rem; color: var(--muted); font-size: .86rem; }
.post-content { font-size: 1.06rem; }
.post .page-body:not(.has-toc) .post-content { max-width: 780px; }
.post-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 2.4rem 0 0; padding: 0; }
.author-box { position: relative; display: flex; align-items: center; gap: 18px; margin-top: 2.4rem; padding: 1.4rem 1.5rem; border-radius: var(--r-md); background: linear-gradient(140deg, var(--accent-soft), transparent 60%), var(--surface-2); border: 1px solid var(--line); }
.author-box img { width: 72px; height: 72px; flex: none; border-radius: 20px; object-fit: cover; object-position: top; background: var(--surface-3); }
.author-label { margin: 0; color: var(--accent); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.author-name { margin: .1rem 0 0; color: var(--ink); font-size: 1.15rem; font-weight: 600; }
.author-role { margin: .1rem 0 .5rem; color: var(--muted); font-size: .9rem; }
.author-links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0; font-size: .9rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 2rem; }
.post-nav-link { position: relative; display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem 1.25rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color .3s, transform .4s var(--ease); }
.post-nav-link:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.post-nav-link.is-newer { text-align: right; align-items: flex-end; }
.post-nav-dir { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.post-nav-title { color: var(--ink); font-weight: 600; line-height: 1.4; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav-link.is-newer { text-align: left; align-items: flex-start; } .author-box { flex-direction: column; align-items: flex-start; } }

/* publications */
.pub-list { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; }
.pub { position: relative; display: flex; gap: 18px; align-items: flex-start; padding: 1.3rem 1.4rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); transition: border-color .3s, transform .4s var(--ease); }
.pub:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.pub.is-featured { border-color: var(--accent-line); background: linear-gradient(140deg, var(--accent-soft), transparent 55%), var(--surface-2); }
.pub-cover { width: 76px; height: 96px; flex: none; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.pub-body { min-width: 0; flex: 1; }
.pub-kicker { display: flex; align-items: center; gap: .6rem; margin: 0 0 .25rem; color: var(--accent); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.pub-flag { padding: .1rem .55rem; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); letter-spacing: .04em; text-transform: none; }
.pub-title { margin: 0; color: var(--ink); font-size: 1.12rem; font-weight: 600; line-height: 1.4; }
.pub-meta { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.pub-summary { margin-top: .7rem; font-size: .94rem; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: .9rem; }
.pub-view { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 560px) { .pub { flex-direction: column; } }

/* ---------------------------------------------------------------- submenus */
.rail-row { display: flex; align-items: center; gap: 2px; }
.rail-row .rail-link { flex: 1; min-width: 0; }
.rail-expand { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); transition: background-color .2s, color .2s; }
.rail-expand:hover { background: var(--surface-3); color: var(--ink); }
.rail-expand .icon { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.rail-expand[aria-expanded=true] .icon { transform: rotate(180deg); }
.rail-link.is-trail { color: var(--ink); font-weight: 600; }
.rail-link.is-trail .icon { color: var(--accent); }
.rail-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.rail-sub.is-open, .no-js .rail-sub { grid-template-rows: 1fr; }
.rail-sub > ul { min-height: 0; overflow: hidden; list-style: none; display: grid; gap: 1px; margin: 0 0 0 22px; padding: 0 0 0 12px; border-left: 1px solid var(--line-2); }
.rail-sub.is-open > ul { padding-block: 2px 6px; }
.rail-sublink { display: flex; align-items: center; gap: .35rem; padding: .42rem .7rem; border-radius: 10px; color: var(--muted); font-size: .87rem; font-weight: 500; line-height: 1.35; text-decoration: none; transition: color .2s, background-color .2s; }
.rail-sublink:hover { color: var(--ink); background: var(--surface-3); }
.rail-sublink.is-active { color: var(--ink); background: var(--accent-soft); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.rail-sublink .icon { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- section pages & embedded pages */
.child-pages a { flex-direction: row; align-items: flex-start; gap: 14px; }
.child-pages .icon-tile { width: 42px; height: 42px; border-radius: 12px; }
.child-thumb { width: 64px; height: 48px; flex: none; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.child-text-wrap { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.child-kind { color: var(--accent); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.child-pages a:hover .icon-tile { background: var(--accent); color: var(--on-accent); }
.embed-intro { margin-bottom: 1.6rem; }
.embed-frame { position: relative; margin: 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); box-shadow: var(--shadow); }
.embed-frame::before { content: 'Loading…'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
.embed-frame.is-loaded::before { display: none; }
.embed-frame iframe { position: relative; display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.embed-ratio { aspect-ratio: var(--ratio, 16 / 9); }
.embed-fixed { height: var(--h, 800px); }
.embed-screen { height: calc(100vh - 150px); min-height: 520px; }
.embed-source { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: .9rem 0 0; color: var(--muted); font-size: .88rem; }
.embed-source a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
@keyframes shimmer { to { background-position: -300% 0; } }
@media (max-width: 700px) { .embed-ratio { aspect-ratio: auto; height: 70vh; min-height: 420px; } }

/* =============================================================================
   3.5 – presentation & responsive refinements
   ============================================================================= */

/* ---------------------------------------------------------------- tighter vertical rhythm */
.panel { padding: clamp(30px, 4.6vw, 68px) 0; }
.block-title { margin-bottom: clamp(20px, 2.8vw, 34px); }
.page-header { margin-bottom: clamp(22px, 3.2vw, 40px); }
.section-more { margin-top: 1.4rem; }
.explore-head { margin-bottom: 1.2rem; }
.tag-cloud { margin-top: 2rem; }

/* grids never overflow very small screens (folded phones, flip-phone cover screens) */
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.xp-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.cert-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.album-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.explore-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.post-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.child-pages { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.attach-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.btn { max-width: 100%; }
.page-title, .hero-title, .post-heading, .cta-title, .explore-title { overflow-wrap: anywhere; hyphens: auto; }

/* ---------------------------------------------------------------- hero: arch stage, badges clear of the face */
.hero { min-height: 0; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 4.5vw, 72px); padding: clamp(36px, 5.5vw, 84px) var(--pad); }
.hero-visual { --px: 0; --py: 0; width: min(100%, 470px); aspect-ratio: auto; }
.hero-visual::before, .hero-visual::after { content: none; }
.hero-stage { position: relative; width: 100%; aspect-ratio: 832 / 941; isolation: isolate; }
.hero-glow { position: absolute; inset: 20% 2% 4%; z-index: -4; border-radius: 50%; background: radial-gradient(circle, var(--accent) 0%, transparent 68%); opacity: .3; filter: blur(42px); animation: glow 9s ease-in-out infinite; }
.hero-arch, .hero-arch-outline { position: absolute; left: 7%; right: 7%; top: 17%; bottom: 0; border-radius: 999px 999px var(--r-lg) var(--r-lg); }
.hero-arch { z-index: -1; background: radial-gradient(110% 70% at 50% 0%, var(--accent-soft-2), transparent 62%), linear-gradient(172deg, var(--surface-3), var(--surface-2) 72%); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); transform: translate(calc(var(--px) * 6px), calc(var(--py) * 5px)); transition: transform .5s var(--ease); }
.hero-arch-outline { z-index: -2; border: 1.5px solid var(--accent-line); transform: translate(calc(16px + var(--px) * 13px), calc(-16px + var(--py) * 10px)); transition: transform .6s var(--ease); }
.hero-orbit { position: absolute; z-index: -3; left: 50%; top: 3%; width: 76%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; border: 1.5px dashed var(--accent-line); animation: spin 60s linear infinite; }
.hero-orbit i { position: absolute; top: -6px; left: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft-2), 0 0 18px var(--accent); }
.hero-dots { position: absolute; z-index: -3; right: -3%; bottom: 10%; width: 32%; aspect-ratio: 1; background-image: radial-gradient(var(--accent-line) 1.6px, transparent 1.6px); background-size: 14px 14px; transform: translate(calc(var(--px) * -10px), calc(var(--py) * -8px)); transition: transform .6s var(--ease); }
.hero-portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; border-radius: 0; clip-path: inset(-25% 7% 0 7% round 0 0 var(--r-lg) var(--r-lg)); filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .35)); transform: translate(calc(var(--px) * -8px), calc(var(--py) * -6px)); transition: transform .5s var(--ease); }
.hero-badges { list-style: none; margin: 0; padding: 0; }
.hero-badge { max-width: 235px; transform: translate(calc(var(--px) * 12px), calc(var(--py) * 9px)); transition: transform .6s var(--ease); }
.hero-badge-a { left: -15%; right: auto; top: auto; bottom: 6%; }
.hero-badge-b { right: -13%; left: auto; top: 57%; bottom: auto; }
.hero-badge-text { min-width: 0; }
.js .hero-visual { animation: none; }
.js .hero-glow { animation: fade-in 1.2s ease .1s both, glow 9s ease-in-out 1.3s infinite; }
.js .hero-arch { animation: arch-in 1s var(--ease) .1s both; }
.js .hero-arch-outline { animation: outline-in 1.1s var(--ease) .45s both; }
.js .hero-portrait { animation: portrait-rise 1.2s var(--ease) .25s both; }
.js .hero-orbit { animation: fade-in 1s ease .8s both, spin 60s linear infinite; }
.js .hero-dots { animation: fade-in 1s ease .9s both; }
.js .hero-badge { opacity: 0; animation: badge-pop .8s var(--ease) var(--d, 1.1s) both, bob 7s ease-in-out calc(var(--d, 1.1s) + .8s) infinite; }
@keyframes arch-in { from { opacity: 0; scale: .9; translate: 0 26px; } }
@keyframes outline-in { from { opacity: 0; translate: -16px 16px; } }
@keyframes portrait-rise { from { opacity: 0; translate: 0 44px; } }
@keyframes badge-pop { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes glow { 0%, 100% { opacity: .26; scale: 1; } 50% { opacity: .38; scale: 1.08; } }
@media (min-width: 1600px) {
    :root { --content: 1240px; }
    .hero-visual { width: min(100%, 520px); }
}
/* tablet & "desktop site" on phones: two columns without the sidebar */
@media (min-width: 760px) and (max-width: 1099.98px) {
    .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); text-align: left; }
    .hero-visual { order: 2; width: min(100%, 400px); margin-top: 0; }
    .hero-badge { max-width: 205px; padding: .6rem .8rem; }
    .hero-badge-a { left: -8%; bottom: 5%; }
    .hero-badge-b { right: -6%; top: 58%; }
}
/* phones: photo first, role badges as a tidy row under it (never over the photo) */
@media (max-width: 759.98px) {
    .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 22px; }
    .hero-visual { order: 0; width: min(74vw, 330px); margin-top: 0; }
    .hero-badges { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
    .hero-badge, .hero-badge-a, .hero-badge-b { position: static; display: flex; max-width: 100%; padding: .5rem .75rem .5rem .55rem; transform: none; }
    .js .hero-badge { animation: badge-pop .8s var(--ease) var(--d, 1.1s) both; }
    .hero-badge-icon { width: 30px; height: 30px; border-radius: 9px; }
    .hero-badge strong { font-size: .78rem; }
    .hero-badge small { font-size: .7rem; }
    .hero-actions { margin-bottom: 1.6rem; }
    .hero-lead { margin-bottom: 1.5rem; }
    .hero-kicker { margin-bottom: 1rem; }
}
@media (max-width: 420px) {
    .hero-actions .btn { flex: 1 1 100%; white-space: normal; text-align: center; }
    .btn { white-space: normal; }
}

/* ---------------------------------------------------------------- about photo: same arch presentation */
.about-figure { position: relative; overflow: visible; aspect-ratio: 832 / 941; background: none; border: 0; border-radius: 0; isolation: isolate; }
.about-figure::before, .about-figure::after { content: ''; position: absolute; left: 6%; right: 6%; top: 16%; bottom: 0; border-radius: 999px 999px var(--r-lg) var(--r-lg); }
.about-figure::before { z-index: -1; background: radial-gradient(110% 70% at 50% 0%, var(--accent-soft-2), transparent 62%), linear-gradient(172deg, var(--surface-3), var(--surface-2) 72%); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.about-figure::after { z-index: -2; border: 1.5px solid var(--accent-line); translate: 0 0; transition: translate 1s var(--ease) .3s; }
.about-figure.is-in::after, .no-js .about-figure::after { translate: 14px -14px; }
.about-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; clip-path: inset(-25% 6% 0 6% round 0 0 var(--r-lg) var(--r-lg)); filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .3)); }
.js .about-figure img { translate: 0 30px; opacity: 0; transition: translate 1.1s var(--ease) .15s, opacity .9s ease .15s; }
.js .about-figure.is-in img { translate: 0 0; opacity: 1; }
@media (max-width: 960px) { .about-figure { max-width: 360px; margin-inline: auto; } }

/* ---------------------------------------------------------------- career & education rows (logo | details | dates) */
.row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem 1.2rem; }
.row > .inst-badge { grid-column: 1; }
.row-main { grid-column: 2; }
.row-when { grid-column: 3; text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
    .row { grid-template-columns: auto minmax(0, 1fr); gap: .35rem .9rem; align-items: start; padding: 1rem; }
    .row > .inst-badge { grid-row: 1 / span 2; }
    .row-when { grid-column: 2; grid-row: 2; text-align: left; white-space: normal; }
}

/* ---------------------------------------------------------------- bigger institution logos */
.inst-badge { width: 58px; height: 58px; border-radius: 16px; font-size: .95rem; }
.inst-badge img { padding: 5px; }
.xtl-head .inst-badge { width: 68px; height: 68px; border-radius: 18px; }
.row > .inst-badge { width: 56px; height: 56px; }
@media (max-width: 560px) {
    .xtl-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; column-gap: 12px; }
    .xtl-head .inst-badge { grid-column: 1; grid-row: 1; width: 56px; height: 56px; }
    .xtl-badge { grid-column: 2; grid-row: 1; justify-self: start; margin: 0; }
    .xtl-heading { grid-column: 1 / -1; grid-row: 2; margin-top: .85rem; }
}
@media (max-width: 400px) {
    .xtl-item, .xtl-item[data-side] { grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; }
    .xtl-dot { width: 34px; height: 34px; }
    .xtl-dot .icon { width: 15px; height: 15px; }
    .xtl-track { left: 17px; }
    .xtl-card { padding: 1rem; }
}

/* ---------------------------------------------------------------- skills as coloured progress bars */
.bar-coral { --bar: #ff7a59; --bar-2: #ffb199; --bar-text: #ffb199; }
.bar-blue { --bar: #3b82f6; --bar-2: #93c5fd; --bar-text: #93c5fd; }
.bar-emerald { --bar: #10b981; --bar-2: #6ee7b7; --bar-text: #6ee7b7; }
.bar-violet { --bar: #8b5cf6; --bar-2: #c4b5fd; --bar-text: #c4b5fd; }
.bar-rose { --bar: #f43f5e; --bar-2: #fda4af; --bar-text: #fda4af; }
.bar-teal { --bar: #14b8a6; --bar-2: #5eead4; --bar-text: #5eead4; }
.bar-sky { --bar: #0ea5e9; --bar-2: #7dd3fc; --bar-text: #7dd3fc; }
.bar-indigo { --bar: #6366f1; --bar-2: #a5b4fc; --bar-text: #a5b4fc; }
[data-theme=light] .bar-coral { --bar-text: #b93a0a; }
[data-theme=light] .bar-blue { --bar-text: #1d4ed8; }
[data-theme=light] .bar-emerald { --bar-text: #047857; }
[data-theme=light] .bar-violet { --bar-text: #6d28d9; }
[data-theme=light] .bar-rose { --bar-text: #be123c; }
[data-theme=light] .bar-teal { --bar-text: #0f766e; }
[data-theme=light] .bar-sky { --bar-text: #0369a1; }
[data-theme=light] .bar-indigo { --bar-text: #4338ca; }
.skill-bars { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px 14px; margin: 0; padding: 0; }
.skill-bar-item { position: relative; padding: 1rem 1.1rem 1.05rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, transform .35s var(--ease); }
.skill-bar-item:hover { border-color: color-mix(in srgb, var(--bar) 55%, transparent); transform: translateY(-2px); }
.skill-bar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: .6rem; }
.skill-bar-item .skill-name { color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.35; }
.skill-bar-item .skill-top { display: inline-flex; align-items: center; gap: .2rem; margin-left: .35rem; padding: .08rem .5rem; border-radius: var(--r-pill); background: color-mix(in srgb, var(--bar) 18%, transparent); color: var(--bar-text); font-size: .66rem; font-weight: 600; vertical-align: middle; }
.skill-top .icon { width: 11px; height: 11px; fill: currentColor; }
.skill-level { flex: none; color: var(--bar-text); font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.skill-bar { position: relative; height: 10px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.skill-bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--bar), var(--bar-2)); box-shadow: 0 0 14px -3px var(--bar); transition: width 1.5s var(--ease) calc(.15s + var(--i, 0) * 90ms); overflow: hidden; }
.skill-bar-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .45) 50%, transparent 80%); translate: -100% 0; animation: bar-shine 3.2s ease-in-out 1.8s infinite; }
.skill-bar-item.is-in .skill-bar-fill, .no-js .skill-bar-fill { width: var(--level); }
.skill-bar-item .skill-desc { margin: .7rem 0 0; font-size: .86rem; }
@keyframes bar-shine { 0% { translate: -100% 0; } 55%, 100% { translate: 100% 0; } }

/* ---------------------------------------------------------------- gallery photo presentation */
.album-cover { position: relative; }
.album-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .45)); opacity: 0; transition: opacity .4s; }
.album-card:hover .album-cover::after { opacity: 1; }
.masonry-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .35)); opacity: 0; transition: opacity .35s; }
.masonry-btn:hover::after { opacity: 1; }
.js .masonry-item.reveal { transform: translateY(18px) scale(.98); }

/* ---------------------------------------------------------------- phones, folded phones, flip phones */
@media (max-width: 640px) {
    :root { --pad: 18px; --gap: 10px; }
    .panel { padding: 28px 0; border-radius: 18px; }
    .site-footer { border-radius: 18px; padding: 26px var(--pad) 18px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .stat { padding: 1.1rem .95rem 1rem; }
    .stat::before { left: .95rem; }
    .stat-value { font-size: 2rem; }
    .stat-label { font-size: .8rem; }
    .explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .explore-card { flex-direction: column; align-items: flex-start; gap: .6rem; padding: .85rem; }
    .explore-card .icon-tile { width: 36px; height: 36px; border-radius: 10px; }
    .explore-text small, .explore-arrow { display: none; }
    .explore-text strong { font-size: .88rem; }
    .footer-top { gap: 22px; }
    .footer-col ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; margin-top: 24px; }
    .cms table { display: block; overflow-x: auto; }
    .map-panel iframe { height: 280px; }
    .facts { grid-template-columns: 1fr; }
    .xp-section { padding: 18px; }
    .contact-form-wrap { padding: 18px; }
    .page-title { font-size: clamp(1.6rem, 8.5vw, 2.6rem); }
    .palette-foot { display: none; }
    .page-meta .share { margin-left: 0; }
}
@media (max-width: 360px) {
    :root { --pad: 14px; --gap: 8px; }
    .icon-btn { width: 38px; height: 38px; }
    .topbar { padding: 0 10px; gap: 8px; }
    .topbar-actions { gap: 6px; }
    .topbar-mark { width: 34px; height: 34px; }
    .theme-toggle-track { width: 44px; }
    [data-theme=dark] .theme-toggle-thumb { transform: translateX(16px); }
    .stat-value { font-size: 1.7rem; }
    .hero-title { font-size: clamp(2.1rem, 13vw, 2.8rem); }
    .block-title > h2 { font-size: 1.45rem; }
}
@media (max-width: 300px) {
    .explore-grid, .stats-grid, .footer-col ul { grid-template-columns: 1fr; }
    .topbar-brand span:last-child { display: none; }
}
/* phones held sideways: keep the hero compact */
@media (max-height: 520px) and (orientation: landscape) {
    .hero { padding-block: 24px; }
    .hero-visual { width: min(100%, 300px); }
}
@media (prefers-reduced-motion: reduce) {
    .js .hero-badge, .js .hero-arch, .js .hero-arch-outline, .js .hero-portrait, .js .hero-orbit, .js .hero-dots, .js .hero-glow { opacity: 1 !important; animation: none !important; }
    .js .about-figure img { opacity: 1; translate: 0 0; }
    .skill-bar-fill { width: var(--level); transition: none; }
    .skill-bar-fill::after { animation: none; }
}
.hero-badge-a { left: -10%; }
@media (min-width: 760px) and (max-width: 1099.98px) {
    .hero-badge { max-width: 182px; gap: .55rem; padding: .5rem .7rem .5rem .5rem; }
    .hero-badge-icon { width: 30px; height: 30px; border-radius: 9px; }
    .hero-badge strong { font-size: .76rem; }
    .hero-badge small { font-size: .68rem; }
    .hero-badge-a { left: -6%; bottom: 3%; }
    .hero-badge-b { right: -4%; top: 62%; }
}
@media (max-width: 960px) { .about-figure { width: min(100%, 340px); max-width: none; justify-self: center; margin-inline: auto; } }
