/* Portfolio themes. Original HTML, layout and interactions are preserved.
   Change the colour variables here to customise all three options. */
html { color-scheme: dark; }

html[data-palette="blue"] {--bg:#11151E;--panel:#1A202C;--panel2:#242D3C;--ink:#F2F4F8;--muted:#ACB4C3;--line:#30394A;--accent:#74B9FF;--button-ink:#0C1829; --theme-glow:#16395D; --theme-intro:#0C111C; --theme-baseline:#607B87;}
html[data-palette="blue"] .project-visual.lending{background:#1B333C;}
html[data-palette="blue"] .project-visual.gold{background:#333229;}
html[data-palette="blue"] .project-visual.ai{background:#16392F;}
html[data-palette="blue"] .project-visual.diligence{background:#293343;}
html[data-palette="blue"] .project-visual.research{background:#29303C;}
html[data-palette="blue"] .project-visual.risk{background:#1C333B;}
html[data-palette="blue"] .portfolio-intro {background:#0C111C;color:#F2F4F8;}
html[data-palette="blue"] .portfolio-intro::backdrop {background:#0C111C;}
html[data-palette="blue"] .intro-shell {background:radial-gradient(ellipse at 50% 48%,#16395D88 0,transparent 62%);}
html[data-palette="blue"] .intro-shell:before {background-image:linear-gradient(#74B9FF10 1px,transparent 1px),linear-gradient(90deg,#74B9FF10 1px,transparent 1px);}
html[data-palette="blue"] .intro-monogram>span,html[data-palette="blue"] .intro-last,html[data-palette="blue"] .intro-disciplines>span,html[data-palette="blue"] .intro-dot,html[data-palette="blue"] .intro-kicker,html[data-palette="blue"] .intro-proof strong {color:#74B9FF;}
html[data-palette="blue"] .intro-proof>div {background:#1A202Cdd;border-color:#30394A;}
html[data-palette="blue"] .intro-top,html[data-palette="blue"] .intro-bottom,html[data-palette="blue"] #intro-description,html[data-palette="blue"] .intro-proof p,html[data-palette="blue"] .intro-pillar {color:#ACB4C3;}
html[data-palette="blue"] .intro-first,html[data-palette="blue"] .intro-monogram {color:#F2F4F8;}
html[data-palette="blue"] .intro-entry .button {background:#74B9FF;border-color:#74B9FF;color:#0C1829;}
html[data-palette="blue"] .intro-track {background:#30394A;}
html[data-palette="blue"] .intro-track>span {background:#74B9FF;box-shadow:0 0 12px #74B9FF55;}
html[data-palette="blue"] .intro-skip {border-color:#30394A;color:#F2F4F8;}
html[data-palette="blue"] .process i {background:#74B9FF;}
html[data-palette="blue"] .process span {border-color:#30394A;}
html[data-palette="blue"] .bar.baseline {background:#607B87;}
html[data-palette="blue"] .bar.after {background:#74B9FF;}
html[data-palette="blue"] input[type=range] {accent-color:#74B9FF;}

/* Banker: white and Oxford blue. Clean, minimal and institutional. */
html[data-palette="light"] {color-scheme:light;--bg:#FFFFFF;--panel:#F8FAFD;--panel2:#EDF3F9;--ink:#1F3A5F;--muted:#667B95;--line:#D9E2EC;--accent:#274C77;--button-ink:#FFFFFF;--theme-glow:#E7EEF7;--theme-intro:#FFFFFF;--theme-baseline:#93A8BF;}
html[data-palette="light"] header.wrap {box-shadow:0 10px 30px #1F3A5F12;}
html[data-palette="light"] .floating {box-shadow:0 14px 32px #1F3A5F14;}
html[data-palette="light"] .portrait-frame {border-color:#E8EDF4;box-shadow:0 0 0 1px #D9E2EC;}
html[data-palette="light"] .portrait-frame img {filter:saturate(.97);}
html[data-palette="light"] .project {box-shadow:0 2px 12px #1F3A5F08;}
html[data-palette="light"] .project:hover {box-shadow:0 14px 32px #1F3A5F16;}
html[data-palette="light"] .proof,html[data-palette="light"] .chart-panel,html[data-palette="light"] .simulation-panel,html[data-palette="light"] .lab-evidence,html[data-palette="light"] .workflow-demo,html[data-palette="light"] .interest-panel {box-shadow:0 10px 26px #1F3A5F07;}
html[data-palette="light"] .project-visual.lending{background:#274C77;}
html[data-palette="light"] .project-visual.gold{background:#355B89;}
html[data-palette="light"] .project-visual.ai{background:#325C79;}
html[data-palette="light"] .project-visual.diligence{background:#3B5F82;}
html[data-palette="light"] .project-visual.research{background:#4B6486;}
html[data-palette="light"] .project-visual.risk{background:#395D74;}
html[data-palette="light"] .project-visual .mini-label,html[data-palette="light"] .project-visual .visual-bottom {color:#E7EFF8;}
html[data-palette="light"] .project-visual .visual-bottom strong {color:#FFFFFF;}
html[data-palette="light"] .project-visual .process span {border-color:#AFC3D9;color:#FFFFFF;}
html[data-palette="light"] .project-visual .process i {background:#C1D6EA;}
html[data-palette="light"] .project-visual .ai-number {color:#D0E3F5;}
html[data-palette="light"] .project-visual.risk .ai-number {color:#D1E6EE;}
html[data-palette="light"] .project-visual .research-formula span {color:#D8E2F8;}
html[data-palette="light"] .gold-title {color:#EAF2FB;}
html[data-palette="light"] .gold-title span{color:#F2F6FB;}
html[data-palette="light"] .portfolio-intro,html[data-palette="light"] .portfolio-intro::backdrop {background:#FFFFFF;color:#1F3A5F;}
html[data-palette="light"] .intro-shell {background:radial-gradient(ellipse at 50% 48%,#E7EEF7 0,transparent 67%);}
html[data-palette="light"] .intro-shell:before {background-image:linear-gradient(#274C7710 1px,transparent 1px),linear-gradient(90deg,#274C7710 1px,transparent 1px);}
html[data-palette="light"] .intro-monogram>span,html[data-palette="light"] .intro-last,html[data-palette="light"] .intro-disciplines>span,html[data-palette="light"] .intro-dot,html[data-palette="light"] .intro-kicker,html[data-palette="light"] .intro-proof strong {color:#274C77;}
html[data-palette="light"] .intro-proof>div {background:#FFFFFFF0;border-color:#D9E2EC;box-shadow:0 4px 20px #1F3A5F08;}
html[data-palette="light"] .intro-top,html[data-palette="light"] .intro-bottom,html[data-palette="light"] #intro-description,html[data-palette="light"] .intro-proof p,html[data-palette="light"] .intro-pillar {color:#667B95;}
html[data-palette="light"] .intro-first,html[data-palette="light"] .intro-monogram {color:#1F3A5F;}
html[data-palette="light"] .intro-disciplines {color:#3B5D86;}
html[data-palette="light"] .intro-entry .button {background:#274C77;border-color:#274C77;color:#FFFFFF;}
html[data-palette="light"] .intro-track {background:#D9E2EC;}
html[data-palette="light"] .intro-track>span {background:#274C77;box-shadow:0 0 12px #274C7744;}
html[data-palette="light"] .intro-skip {border-color:#C7D3E0;color:#1F3A5F;}
html[data-palette="light"] #intro-status {color:#667B95;}
html[data-palette="light"] .portfolio-intro :focus-visible {outline-color:#274C77;}
html[data-palette="light"] .bar.baseline {background:#93A8BF;}
html[data-palette="light"] .bar.after {background:#274C77;}
html[data-palette="light"] input[type=range] {accent-color:#274C77;}
html[data-palette="light"] .journey-tabs button,html[data-palette="light"] .lab-tabs button,html[data-palette="light"] .workflow-steps button {border-color:#B9C7D8;}
html[data-palette="light"] .theme-menu {box-shadow:0 18px 48px #1F3A5F18;}
html[data-palette="light"] .theme-swatch-light {border-color:#D9E2EC;}
html[data-palette="brass"] {--bg:#15191D;--panel:#22282D;--panel2:#2B343A;--ink:#F3F2EE;--muted:#B6B9BA;--line:#3E494B;--accent:#D7B879;--button-ink:#302411; --theme-glow:#5A492A; --theme-intro:#121719; --theme-baseline:#7D807D;}
html[data-palette="brass"] .project-visual.lending{background:#333A37;}
html[data-palette="brass"] .project-visual.gold{background:#3A3529;}
html[data-palette="brass"] .project-visual.ai{background:#283D36;}
html[data-palette="brass"] .project-visual.diligence{background:#34363E;}
html[data-palette="brass"] .project-visual.research{background:#30323C;}
html[data-palette="brass"] .project-visual.risk{background:#293A3C;}
html[data-palette="brass"] .portfolio-intro {background:#121719;color:#F3F2EE;}
html[data-palette="brass"] .portfolio-intro::backdrop {background:#121719;}
html[data-palette="brass"] .intro-shell {background:radial-gradient(ellipse at 50% 48%,#5A492A88 0,transparent 62%);}
html[data-palette="brass"] .intro-shell:before {background-image:linear-gradient(#D7B87910 1px,transparent 1px),linear-gradient(90deg,#D7B87910 1px,transparent 1px);}
html[data-palette="brass"] .intro-monogram>span,html[data-palette="brass"] .intro-last,html[data-palette="brass"] .intro-disciplines>span,html[data-palette="brass"] .intro-dot,html[data-palette="brass"] .intro-kicker,html[data-palette="brass"] .intro-proof strong {color:#D7B879;}
html[data-palette="brass"] .intro-proof>div {background:#22282Ddd;border-color:#3E494B;}
html[data-palette="brass"] .intro-top,html[data-palette="brass"] .intro-bottom,html[data-palette="brass"] #intro-description,html[data-palette="brass"] .intro-proof p,html[data-palette="brass"] .intro-pillar {color:#B6B9BA;}
html[data-palette="brass"] .intro-first,html[data-palette="brass"] .intro-monogram {color:#F3F2EE;}
html[data-palette="brass"] .intro-entry .button {background:#D7B879;border-color:#D7B879;color:#302411;}
html[data-palette="brass"] .intro-track {background:#3E494B;}
html[data-palette="brass"] .intro-track>span {background:#D7B879;box-shadow:0 0 12px #D7B87955;}
html[data-palette="brass"] .intro-skip {border-color:#3E494B;color:#F3F2EE;}
html[data-palette="brass"] .process i {background:#D7B879;}
html[data-palette="brass"] .process span {border-color:#3E494B;}
html[data-palette="brass"] .bar.baseline {background:#7D807D;}
html[data-palette="brass"] .bar.after {background:#D7B879;}
html[data-palette="brass"] input[type=range] {accent-color:#D7B879;}


html[data-palette="brass"] .gold-title {color:#e3cc91;}
html[data-palette="brass"] .floating {box-shadow:0 10px 30px #0004;}

/* Quiet, persistent appearance selector in the existing sticky navigation. */
header.wrap {gap:20px;}
header.wrap nav {margin-left:auto;}
.theme-picker {position:relative;flex-shrink:0;z-index:80;}
.theme-trigger {display:inline-flex;align-items:center;justify-content:center;gap:9px;background:var(--panel2);border:1px solid var(--line);border-radius:30px;padding:9px 13px;color:var(--ink);font-size:.8125rem;line-height:1.2;font-weight:600;min-height:39px;white-space:nowrap;transition:background .18s,border-color .18s;}
.theme-trigger:hover,.theme-trigger[aria-expanded="true"] {background:var(--panel);border-color:var(--accent);filter:none;}
.theme-trigger-icon {color:var(--accent);}
.theme-caret {color:var(--muted);transition:transform .18s;}
.theme-trigger[aria-expanded="true"] .theme-caret {transform:rotate(180deg);}
.theme-menu {position:absolute;right:0;top:calc(100% + 12px);width:min(325px,calc(100vw - 32px));padding:12px;border-radius:18px;background:var(--panel);border:1px solid var(--line);box-shadow:0 18px 55px #0008;display:flex;flex-direction:column;gap:4px;color:var(--ink);}
.theme-menu[hidden] {display:none!important;}
.theme-menu-header {display:flex;justify-content:space-between;align-items:center;padding:9px 9px 13px;gap:10px;border-bottom:1px solid var(--line);margin-bottom:5px;}
.theme-menu-header>span:first-child {font-size:.6875rem;letter-spacing:.12em;font-weight:700;color:var(--muted);}
.theme-menu-subtitle {font-size:.75rem;color:var(--muted);}
.theme-option {width:100%;display:flex;align-items:center;gap:11px;text-align:left;background:transparent;color:var(--ink);border:1px solid transparent;border-radius:11px;padding:10px 9px;min-height:59px;}
.theme-option:hover,.theme-option:focus-visible {background:var(--panel2);filter:none;}
.theme-option[aria-pressed="true"] {background:var(--panel2);border-color:var(--line);}
.theme-option-copy {min-width:0;display:flex;flex-direction:column;gap:2px;flex:1;}
.theme-option-copy strong {font-size:.82rem;font-weight:600;line-height:1.25;}
.theme-option-copy small {font-size:.69rem;color:var(--muted);line-height:1.3;}
.theme-selected {visibility:hidden;font-size:.95rem;color:var(--accent);font-weight:700;}
.theme-option[aria-pressed="true"] .theme-selected {visibility:visible;}
.theme-swatch {width:42px;height:32px;display:flex;gap:2px;padding:4px;border-radius:8px;border:1px solid #ffffff20;overflow:hidden;flex-shrink:0;align-items:stretch;}
.theme-swatch i {display:block;flex:1;border-radius:2px;}
.theme-swatch-blue {background:#11151e}.theme-swatch-blue i:nth-child(1){background:#1a202c}.theme-swatch-blue i:nth-child(2){background:#30394a}.theme-swatch-blue i:nth-child(3){background:#74b9ff}
.theme-swatch-light {background:#FFFFFF}.theme-swatch-light i:nth-child(1){background:#FFFFFF;border:1px solid #D9E2EC}.theme-swatch-light i:nth-child(2){background:#F4F7FB}.theme-swatch-light i:nth-child(3){background:#274C77}
.theme-swatch-brass {background:#15191d}.theme-swatch-brass i:nth-child(1){background:#22282d}.theme-swatch-brass i:nth-child(2){background:#3e494b}.theme-swatch-brass i:nth-child(3){background:#d7b879}
@media(max-width:1050px) {header.wrap{gap:12px;}header.wrap nav{gap:11px;}.theme-trigger{padding-inline:11px;gap:6px;}}
@media(max-width:830px) and (min-width:701px) {.theme-trigger-label,.theme-caret{display:none}.theme-trigger{width:41px;padding:9px;}}
@media(max-width:700px) {header.wrap{justify-content:space-between;gap:10px 16px}.brand{order:1}.theme-picker{order:2;margin-left:auto}.theme-trigger{min-width:96px}.theme-trigger-label,.theme-caret{display:inline}.theme-picker .theme-menu{right:0}header.wrap nav{order:3;flex-basis:100%;width:100%;margin-left:0}.theme-menu{max-width:calc(100vw - 36px)}}
@media(max-width:390px){.theme-trigger{min-width:0}.theme-trigger-label{display:none} .theme-menu{right:-8px}}
@media(prefers-reduced-motion:reduce){.theme-trigger,.theme-caret{transition:none!important}}

/* Maintain filter behaviour with the V5 equal-height card flex layout. */
.project-grid > .project[hidden] {display:none!important;}

/* Mobile: give each navigation destination a predictable tap target. */
@media(max-width:700px) {
  header.wrap nav {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 5px;align-items:center;}
  header.wrap nav>a {font-size:.77rem;white-space:nowrap;text-align:center;line-height:1.4;padding:6px 1px;}
  header.wrap nav>.nav-cta {justify-self:center;background:var(--panel2);border:1px solid var(--line);padding:5px 10px;}
  .theme-trigger-label {display:inline!important;}
  .theme-caret {display:inline!important;}
}

/* Ensure the header call-to-action remains readable on the light palette. */
html[data-palette="light"] header.wrap .nav-cta {background:#274C77;color:#FFFFFF;border:1px solid #274C77;}
html[data-palette="light"] header.wrap .nav-cta:hover {background:#1F3F67;color:#FFFFFF;}
@media(max-width:700px) {
  html[data-palette="light"] header.wrap nav>.nav-cta {background:#274C77;color:#FFFFFF;}
}

/* Perspective label is consistent across all three identities. */
.theme-trigger-label {letter-spacing:.005em;}
.theme-menu {width:min(342px,calc(100vw - 32px));}
.theme-menu-header>span:first-child {letter-spacing:.095em;}
@media(min-width:831px) and (max-width:1080px){header.wrap{gap:10px}header.wrap nav{gap:9px}.theme-trigger{padding-inline:10px}}
@media(max-width:700px){.theme-trigger{min-width:116px}}
@media(max-width:390px){.theme-trigger-label{display:inline!important}.theme-trigger{min-width:0;font-size:.75rem;gap:5px;padding-inline:9px}}


/* Publication polish: quiet, consistent hierarchy across all three prisms. */
.theme-menu-header {padding:10px 11px 12px;}
.theme-menu-header>span:first-child {color:var(--accent);font-size:.69rem;}
.theme-menu-subtitle {font-size:.75rem;white-space:nowrap;}
.theme-option {padding:11px;min-height:64px;transition:background .18s ease,border-color .18s ease;}
.theme-option-copy strong {font-size:.875rem;}
.theme-option-copy small {font-size:.72rem;line-height:1.4;}
.theme-menu {gap:5px;}
.theme-trigger {min-height:42px;}
/* Banker is white/Oxford blue only: crisp surfaces and deliberate spacing. */
html[data-palette="light"] .project,html[data-palette="light"] .chart-panel,html[data-palette="light"] .interest-panel,html[data-palette="light"] .lending-feature {border-color:#D9E2EC;}
html[data-palette="light"] .metric-options button[aria-pressed="true"] {transform:none;}
html[data-palette="light"] .project-body {background:#FFFFFF;}
html[data-palette="light"] .proof {background:#F8FAFD;}
html[data-palette="light"] header.wrap {background:#FFFFFF;}
html[data-palette="light"] .theme-menu {background:#FFFFFF;}
html[data-palette="light"] .theme-option[aria-pressed="true"],html[data-palette="light"] .theme-option:hover {background:#EDF3F9;}
/* Navigation is a compact, accessible disclosure on phones. Desktop is unchanged. */
.mobile-nav-toggle {display:none;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 12px;border:1px solid var(--line);border-radius:24px;background:var(--panel2);color:var(--ink);font-size:.8125rem;font-weight:600;line-height:1;}
.mobile-nav-icon {display:flex;flex-direction:column;gap:4px;width:16px;}
.mobile-nav-icon span {height:2px;width:16px;background:currentColor;border-radius:2px;transition:transform .2s ease,opacity .2s ease;}
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon span:nth-child(2){opacity:0}
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
@media(max-width:700px){
  header.wrap {display:flex;align-items:center;justify-content:space-between;gap:8px;width:94%!important;padding:12px 15px;min-height:64px;flex-wrap:wrap;}
  header.wrap .brand {order:1;font-size:1.6rem;line-height:1.1;}
  header.wrap .theme-picker {order:2;margin-left:auto;}
  .mobile-nav-toggle {display:inline-flex;order:3;flex-shrink:0;}
  header.wrap nav,header.wrap nav:not(.nav-open) {display:none;}
  header.wrap nav.nav-open {display:grid;order:4;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;flex-basis:100%;width:100%;margin:4px 0 0;padding:12px 0 2px;border-top:1px solid var(--line);}
  header.wrap nav.nav-open>a {display:flex;align-items:center;justify-content:center;text-align:center;border-radius:9px;padding:10px 8px;font-size:.82rem;line-height:1.3;min-height:42px;white-space:normal;}
  header.wrap nav.nav-open>a:hover,header.wrap nav.nav-open>a.active:not(.nav-cta) {background:var(--panel2);text-decoration:none;}
  header.wrap nav.nav-open>.nav-cta {justify-self:stretch;min-width:0;background:var(--panel2);border:1px solid var(--line);padding:10px 8px;}
  html[data-palette="light"] header.wrap nav.nav-open>.nav-cta {background:#274C77;color:#FFFFFF;}
  .theme-trigger {min-height:42px;min-width:0!important;padding:9px 10px;}
  .theme-trigger-icon {width:16px;height:16px;}
  .theme-menu {top:calc(100% + 10px)}
}
@media(max-width:360px){
  header.wrap {padding-inline:11px;gap:6px;}
  .theme-trigger {gap:5px;padding-inline:8px;}
  .mobile-nav-toggle {padding-inline:9px;}
  .mobile-nav-label {font-size:.76rem;}
}
@media(prefers-reduced-motion:reduce){.mobile-nav-icon span,.theme-option{transition:none!important}}

/* Keep the Prism popover fully on-screen even at 320px device width. */
@media(max-width:700px){
  .theme-picker .theme-menu {
    position:fixed;
    top:84px;
    left:50%;
    right:auto;
    transform:translateX(-50%);
    width:min(342px,calc(100vw - 24px));
    max-width:calc(100vw - 24px);
    z-index:90;
  }
}
