/* Appearance switch and a complete, purpose-designed light palette.
   The original dark design in styles.css is deliberately preserved. */
:root { color-scheme: dark; }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-2: #edf2f8;
  --line: #d3dfeb;
  --line-soft: rgba(54, 81, 112, .13);
  --text: #192b3e;
  --muted: #526276;
  --dim: #65738a;
  --mint: #087b66;
  --violet: #6950b4;
  --blue: #2863aa;
}

/* The same 44px-high switch is reachable in the sticky header on all screens. */
.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.theme-toggle {
  position: relative; display: inline-flex; align-items: center;
  flex-shrink: 0; isolation: isolate; width: 78px; height: 44px;
  padding: 4px; border: 1px solid #344154; border-radius: 25px;
  background: #121b28; color: #9ba8b9;
}
.theme-toggle:hover { border-color: #799b95; }
.theme-toggle:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
.theme-thumb {
  position: absolute; left: 4px; top: 4px; z-index: -1;
  width: 34px; height: 34px; border-radius: 50%;
  background: #c5efdf; box-shadow: 0 2px 8px #0003;
  transform: translateX(34px);
}
.theme-symbol { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; }
.theme-symbol .icon { width: 17px; height: 17px; stroke-width: 1.75; }
.theme-moon { color: #15372e; }
:root[data-theme="light"] .theme-toggle { background: #e6edf5; border-color: #c7d5e3; color: #596d82; }
:root[data-theme="light"] .theme-toggle:hover { border-color: #84a69f; }
:root[data-theme="light"] .theme-thumb { transform: translateX(0); background: #ffffff; box-shadow: 0 2px 8px #344b6426; }
:root[data-theme="light"] .theme-sun { color: #087b66; }
:root[data-theme="light"] .theme-moon { color: #596d82; }
@media (prefers-reduced-motion: no-preference) {
  .theme-thumb { transition: transform .22s ease, background-color .22s ease; }
  .theme-symbol { transition: color .18s ease; }
}
@media (max-width: 980px) {
  .nav-actions .nav-cta { display: none; }
}
@media (max-width: 767px) {
  .nav-actions { gap: 8px; }
  .nav-wrap { gap: 8px; }
  .brand { gap: 8px; }
}
@media (max-width: 374px) {
  .site-header .brand-name { font-size: 9px; letter-spacing: 1px; }
  .site-header .brand-name > span { display: none; }
}

/* Light theme - foundations, navigation, and typography. */
:root[data-theme="light"] ::selection { background: #c4eadd; color: #173d33; }
:root[data-theme="light"] .gradient-text {
  color: #08745f;
  background-image: linear-gradient(110deg, #08745f 6%, #346d96 51%, #7357bd 100%);
}
:root[data-theme="light"] .text-muted { color: #63728a; }
:root[data-theme="light"] .status-dot { box-shadow: 0 0 10px #087b662b; }
:root[data-theme="light"] .button-primary { color: #ffffff; background: #087b66; border-color: #087b66; box-shadow: 0 6px 20px #087b6612; }
:root[data-theme="light"] .button-primary:hover { background: #076654; border-color: #076654; box-shadow: 0 8px 24px #087b6626; }
:root[data-theme="light"] .button-ghost { color: #273d54; border-color: #bdcddd; background: #ffffffb3; }
:root[data-theme="light"] .button-ghost:hover { border-color: #899eb5; background: #eaf1f8; }
:root[data-theme="light"] .section-grid {
  background-image: linear-gradient(#45628309 1px, transparent 1px), linear-gradient(90deg, #45628309 1px, transparent 1px);
}
:root[data-theme="light"] .site-header { background: rgba(245, 248, 252, .91); }
:root[data-theme="light"] .brand-mark { background: linear-gradient(140deg, #e3f4eb, #f0f1fb); border-color: #b9d0ca; color: #25473e; }
:root[data-theme="light"] .brand-name > span { color: #647389; }
:root[data-theme="light"] .nav-cta { color: #24483e; border-color: #b8d5c8; background: #087b6605; }
:root[data-theme="light"] .nav-cta:hover { background: #087b6610; }
:root[data-theme="light"] .mobile-nav { background: #f8fafdfc; box-shadow: 0 18px 30px #273a5414; }

/* Hero and the connected-finance illustration. */
:root[data-theme="light"] .hero-glow { background: radial-gradient(ellipse at center, #d9d8f6a3, #b5e4dc26 60%, transparent 70%); }
:root[data-theme="light"] .hero-intro { color: #43576e; }
:root[data-theme="light"] .hero-intro strong { color: #172e43; }
:root[data-theme="light"] .hero-detail { color: #54667d; }
:root[data-theme="light"] .hero-context strong { color: #38546b; }
:root[data-theme="light"] .context-divider { background: #c7d4e2; }
:root[data-theme="light"] .visual-orbit { border-color: #869eb725; }
:root[data-theme="light"] .lab-card { border-color: #c6d3e5; background: linear-gradient(145deg, #ffffff, #f7f9ff 45%, #eaeefb); box-shadow: 0 25px 75px #2f45641a, 0 0 80px #7863c50a; }
:root[data-theme="light"] .lab-topline { color: #506680; border-color: #cdd9e966; }
:root[data-theme="light"] .lab-topline .lab-version { color: #65758e; }
:root[data-theme="light"] .lab-grid { background-image: radial-gradient(#738ba538 .7px, transparent .7px); }
:root[data-theme="light"] .lab-stage { border-color: #b8d7d0; background: linear-gradient(110deg, #e1f2ec, #e9f1fb); }
:root[data-theme="light"] .stage-icon { border-color: #afcec1; background: #d3eadf; }
:root[data-theme="light"] .lab-stage .micro-label { color: #366959; }
:root[data-theme="light"] .lab-stage small { color: #4c7068; }
:root[data-theme="light"] .stage-indicator { box-shadow: 0 0 10px #087b6626; }
:root[data-theme="light"] .connector { background: linear-gradient(#3a9a8199, #8473c366); }
:root[data-theme="light"] .connector span { box-shadow: 0 0 10px #087b6640; }
:root[data-theme="light"] .connector-bottom:after { background: linear-gradient(90deg, transparent, #6684ae70, transparent); }
:root[data-theme="light"] .intelligence-core { background: radial-gradient(ellipse at center, #d7d0f47a, transparent 68%); }
:root[data-theme="light"] .core-ring { border-color: #837db452; box-shadow: 0 0 34px #7881e012, inset 0 0 30px #9b7ce20a; }
:root[data-theme="light"] .core-ring:after,
:root[data-theme="light"] .core-ring:before { border-color: #7782a03b; }
:root[data-theme="light"] .core-ring.ring-two { border-color: #419a8866; }
:root[data-theme="light"] .core-grid { border-color: #657c9c29; background: repeating-linear-gradient(0deg, transparent 0 17px, #6b87a024 17px 18px); }
:root[data-theme="light"] .core-caption > span,
:root[data-theme="light"] .core-side-label { color: #586b84; }
:root[data-theme="light"] .orbit-point { box-shadow: 0 0 10px #6950b435; }
:root[data-theme="light"] .p-two { box-shadow: 0 0 10px #087b6640; }
:root[data-theme="light"] .branch { border-color: #c9d3e5; background: #f5f7ff; }
:root[data-theme="light"] .branch > span { color: #5e708b; }
:root[data-theme="light"] .lab-footer { color: #426959; border-color: #cdd9e96e; background: #eaf2f7; }
:root[data-theme="light"] .lab-footer .lab-footnote { color: #5b7086; }
:root[data-theme="light"] .floating-proof { border-color: #bbd3ca; background: linear-gradient(130deg, #e9f5ed, #f5f4fd); box-shadow: 0 16px 34px #213e5224; }
:root[data-theme="light"] .proof-icon { background: #087b6612; }
:root[data-theme="light"] .floating-proof strong > span,
:root[data-theme="light"] .floating-proof small { color: #4c7166; }
:root[data-theme="light"] .visual-caption { color: #5e7382; }
:root[data-theme="light"] .caption-line { background: #5e7382; }
:root[data-theme="light"] .hero-bottom { color: #61758c; }
:root[data-theme="light"] .hero-bottom a { color: #435c78; }
:root[data-theme="light"] .impact-section { background: linear-gradient(100deg, #eaf4f199, #eaf0fb88); }
:root[data-theme="light"] .impact-item p { color: #52677e; }
:root[data-theme="light"] .pursuing-tag { border-color: #c8bde3; background: #ede6fa80; }

/* Project cards, controls, and all three illustrative previews. */
:root[data-theme="light"] .filters { background: #ebf0f6; }
:root[data-theme="light"] .filter { color: #506378; }
:root[data-theme="light"] .filter.active { background: #d5eade; color: #0a6e5b; }
:root[data-theme="light"] .filter:hover { color: #163b32; }
:root[data-theme="light"] .work-note { color: #497263; }
:root[data-theme="light"] .project-card { border-color: #cedae6; background: #ffffff; box-shadow: 0 5px 18px #30476705; }
:root[data-theme="light"] .project-card:hover { border-color: #95b3b0; box-shadow: 0 16px 45px #263c5814; }
:root[data-theme="light"] .automation-visual { background: radial-gradient(ellipse at bottom, #bfe8d755, transparent 75%), #eaf4f0; }
:root[data-theme="light"] .ai-visual { background: radial-gradient(ellipse at bottom, #c7bbec66, transparent 85%), #f1eefb; }
:root[data-theme="light"] .analytics-visual { background: radial-gradient(ellipse at bottom right, #b1cdea66, transparent 85%), #eaf2fb; }
:root[data-theme="light"] .preview-topline { color: #437261; }
:root[data-theme="light"] .preview-index { color: #60748a; }
:root[data-theme="light"] .ai-visual .preview-topline { color: #726091; }
:root[data-theme="light"] .analytics-visual .preview-topline { color: #506d93; }
:root[data-theme="light"] .workflow-node { background: #f6fbf8; border-color: #b2cfc0; color: #385f50; }
:root[data-theme="light"] .node-active { background: linear-gradient(145deg, #c8e8d9, #e0f2e9); border-color: #73a88e; color: #176e56; box-shadow: 0 0 30px #087b6610; }
:root[data-theme="light"] .workflow-link { background: #739b86; }
:root[data-theme="light"] .workflow-link:after { border-left-color: #548a6d; }
:root[data-theme="light"] .preview-outcome { color: #42715b; }
:root[data-theme="light"] .outcome-tick { background: #087b6612; }
:root[data-theme="light"] .illustration-note { color: #5c6c80; }
:root[data-theme="light"] .chat-question { background: #e4ddf3; color: #514170; border-color: #c4b8dc; }
:root[data-theme="light"] .chat-answer { background: #fbfaff; border-color: #c9bfdf; }
:root[data-theme="light"] .chat-symbol { background: #6950b410; }
:root[data-theme="light"] .chat-answer strong { color: #493a65; }
:root[data-theme="light"] .chat-answer div > span { color: #6b5b81; }
:root[data-theme="light"] .dashboard-illustration { border-color: #b9ccdf; background: #f9fcff; box-shadow: 0 10px 20px #365a7a12; }
:root[data-theme="light"] .mini-dashboard-side { border-color: #cbd9e7; background: #e8f0f8; }
:root[data-theme="light"] .mini-dashboard-side span { background: #93b1ce; }
:root[data-theme="light"] .mini-dashboard-side span:first-child { background: #3d709f; }
:root[data-theme="light"] .mini-kpis div { border-color: #c0d2e5; background: #eaf2fb; }
:root[data-theme="light"] .mini-kpis div > span { color: #4d6b8c; }
:root[data-theme="light"] .mini-kpis i { background: #527fa8; }
:root[data-theme="light"] .mini-chart { background: repeating-linear-gradient(to top, #8faec940 0 1px, transparent 1px 15px); }
:root[data-theme="light"] .mini-chart span { background: linear-gradient(to top, #93bcda, #32699b); }
:root[data-theme="light"] .mini-chart span:nth-child(2n) { background: linear-gradient(to top, #a2b8e0, #546aaf); }
:root[data-theme="light"] .project-type { color: #5c6f82; }
:root[data-theme="light"] .project-state { color: #4d6a66; border-color: #c6d8d0; background: #f2f7f4; }
:root[data-theme="light"] .project-body > p { color: #54677e; }
:root[data-theme="light"] .tags span { border-color: #d0dce8; color: #50677f; background: #f8fafc; }
:root[data-theme="light"] .project-result { border-color: #d7e2ea; }
:root[data-theme="light"] .project-result > span { color: #586d86; }
:root[data-theme="light"] .work-footer p { color: #61738c; }

/* Expertise, career timeline, and learning. */
:root[data-theme="light"] .expertise-section { background: #edf2f8; border-color: #cad6e644; }
:root[data-theme="light"] .expertise-card { border-color: #d0dbe8; background: linear-gradient(140deg, #ffffff, #f6f8fd); }
:root[data-theme="light"] .expertise-icon { border-color: #c4d9cd; background: #087b6608; }
:root[data-theme="light"] .expertise-number { color: #607289; }
:root[data-theme="light"] .expertise-card > p { color: #566b82; }
:root[data-theme="light"] .skill-list li { color: #425a71; border-color: #d5dfeb88; }
:root[data-theme="light"] .skill-list li:before { background: #537e67; }
:root[data-theme="light"] .tool-pills span { border-color: #c8d8e7; background: #ffffffa6; color: #46617c; }
:root[data-theme="light"] .expertise-footnote { color: #62758e; }
:root[data-theme="light"] .direction-strip { border-color: #cfc5e5; background: linear-gradient(90deg, #e8e1f7a6, #f8faff00); }
:root[data-theme="light"] .direction-icon { background: #6950b411; }
:root[data-theme="light"] .direction-strip strong { color: #564474; }
:root[data-theme="light"] .direction-strip p { color: #596a81; }
:root[data-theme="light"] .direction-tag { color: #715e8b; }
:root[data-theme="light"] .experience-quote { border-color: #89b39b; }
:root[data-theme="light"] .experience-quote p { color: #3f5a61; }
:root[data-theme="light"] .experience-quote > span:last-child { color: #4c7462; }
:root[data-theme="light"] .timeline { border-color: #c0d3d8; }
:root[data-theme="light"] .timeline-dot { background: #7796a7; }
:root[data-theme="light"] .timeline-dot.current { background: var(--mint); box-shadow: 0 0 13px #087b662b; }
:root[data-theme="light"] .date { color: #506c80; }
:root[data-theme="light"] .current-label { border-color: #b0d1bf; background: #e3f2e9; }
:root[data-theme="light"] .timeline h4 { color: #405971; }
:root[data-theme="light"] .timeline-item > p { color: #566b83; }
:root[data-theme="light"] .experience-highlights span { background: #e2f1e9; color: #3e6b56; border-color: #b7d6c3; }
:root[data-theme="light"] .recognition { color: #7a6323; }
:root[data-theme="light"] .early-career summary { color: #446078; }
:root[data-theme="light"] .early-career-content h4 { color: #304c68; }
:root[data-theme="light"] .early-career-content div > span,
:root[data-theme="light"] .early-career-content p { color: #546e88; }
:root[data-theme="light"] .about-panel { border-color: #c9dbdc; background: radial-gradient(ellipse at top left, #cfe9dc66, transparent 75%), linear-gradient(135deg, #fbfffc, #f0f3fb); }
:root[data-theme="light"] .about-copy > p { color: #4e657c; }
:root[data-theme="light"] .signature-monogram { border-color: #95bda4; background: linear-gradient(130deg, #d6eedf, #e7edf7); color: #3b6b51; }
:root[data-theme="light"] .about-signature div > span { color: #527084; }
:root[data-theme="light"] .education-panel { border-color: #c6d7df; }
:root[data-theme="light"] .education-panel > .micro-label { color: #47647e; }
:root[data-theme="light"] .edu-icon { color: #4c7778; border-color: #b5d0cf; background: #e9f3ef; }
:root[data-theme="light"] .education-item p { color: #496580; }
:root[data-theme="light"] .education-item div > span:last-child { color: #5a7390; }
:root[data-theme="light"] .learning-list { border-color: #c6d8e4; }
:root[data-theme="light"] .learning-list > .micro-label { color: #526e8a; }
:root[data-theme="light"] .learning-list p { color: #44617f; }
:root[data-theme="light"] .learning-list small { color: #5d7793; }
:root[data-theme="light"] .principles > div { border-color: #c9d8e5; }
:root[data-theme="light"] .principles div > span { color: #4a7462; }
:root[data-theme="light"] .principles strong { color: #4b667e; }

/* Contact, footer, case-study dialogs, and feedback. */
:root[data-theme="light"] .contact-section { background-color: #edf4f7; }
:root[data-theme="light"] .contact-orbit { background: radial-gradient(ellipse at center, #b0dfc53d, transparent 65%); }
:root[data-theme="light"] .contact-layout > div > p { color: #4e6a82; }
:root[data-theme="light"] .contact-card { border-color: #b8d3c8; background: linear-gradient(135deg, #eff9f2, #f6f8ff); }
:root[data-theme="light"] .contact-card > .micro-label { color: #4b735e; }
:root[data-theme="light"] .copy-email { color: #4b715e; }
:root[data-theme="light"] .copy-email:hover { color: #087b66; }
:root[data-theme="light"] .social-links { border-color: #c0d9cb; }
:root[data-theme="light"] .social-links a { color: #426957; border-color: #b9d3c5; }
:root[data-theme="light"] .social-links a:hover { background: #087b660a; }
:root[data-theme="light"] .contact-card > p { color: #4d7460 !important; }
:root[data-theme="light"] .footer-name > span { color: #5c7486; }
:root[data-theme="light"] .footer-note { color: #57708b; }
:root[data-theme="light"] .footer-note > span:last-child { color: #5e758f; }
:root[data-theme="light"] .back-top { color: #3a725b; border-color: #bad2ce; }
:root[data-theme="light"] .case-dialog { background: #f9fbff; border-color: #aebfd2; box-shadow: 0 30px 140px #2136514d; }
:root[data-theme="light"] .case-dialog::backdrop { background: #2b3d5966; }
:root[data-theme="light"] .dialog-top { background: #f4f8fdf5; border-color: #cad8e8; }
:root[data-theme="light"] .dialog-close { background: #e8f0f8; border-color: #bdcfe4; }

:root[data-theme="light"] .dialog-content .case-intro,
:root[data-theme="light"] .dialog-content p,
:root[data-theme="light"] .dialog-content li { color: #4b6683; }
:root[data-theme="light"] .case-impact { border-color: #abd1bb; background: #e7f3ec; }

:root[data-theme="light"] .toast { background: #e4f3e9; border-color: #87b59a; color: #28543c; box-shadow: 0 8px 32px #274e3b29; }

@media print {
  .theme-toggle { display: none !important; }
  :root[data-theme="light"] .gradient-text { background: none; -webkit-text-fill-color: #175343; }
}
