/* New navigation controls only. The existing dark stylesheet is untouched. */
.nav-preferences{display:flex;align-items:center;gap:8px;flex-shrink:0}
.language-switcher{display:flex;align-items:center;gap:2px;white-space:nowrap}
.language-switcher>span{font-size:.75rem;color:var(--quiet)}
.language-choice{border:0;background:transparent;padding:0;width:26px;min-height:36px;font-size:.75rem;font-weight:500;color:var(--muted);border-radius:5px;transition:color .2s,background .2s}
.language-choice[aria-pressed="true"]{color:var(--accent-bright)}
.language-choice:hover{color:var(--text);background:rgba(160,150,215,.07)}
.theme-toggle{width:36px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid var(--border);border-radius:7px;background:transparent;color:#a9a1bf;transition:color .2s,background .2s}
.theme-toggle .icon{width:18px;height:18px}
.theme-toggle:hover{color:var(--accent-bright);background:rgba(160,150,215,.07)}
/* Use the existing mobile-menu treatment when the additional controls need room. */
@media(max-width:900px){
 .nav-preferences{order:2;margin-left:auto}
 .menu-toggle{display:flex;order:3}
 .language-choice{width:32px;min-height:44px}
 .theme-toggle{width:40px;height:44px}
 .nav-shell nav{display:none;position:absolute;top:100%;left:0;right:0;background:rgba(13,14,23,.98);backdrop-filter:blur(20px);padding:18px 20px 24px;border-bottom:1px solid #2c2739;grid-template-columns:1fr 1fr;gap:7px}
 .nav-shell nav.is-open{display:grid}
 .nav-shell nav>a{padding:12px 15px;font-size:.875rem;border-radius:6px;min-height:45px}
 .nav-shell nav>a.active{background:#27213670;color:var(--accent-bright)}
 .nav-shell nav>a.active:after{display:none}
 .nav-shell nav>a:last-child{justify-content:flex-start}
 .menu-toggle[aria-expanded="true"]>span:first-child{transform:translateY(3.5px) rotate(45deg)}
 .menu-toggle[aria-expanded="true"]>span:last-child{transform:translateY(-3.5px) rotate(-45deg)}
}
@media(max-width:520px){.nav-shell .brand-name{display:none}}

/* Light mode is an independent color layer. No content sizing, spacing, type,
   grid, illustration geometry, or animation rules are changed below. */
html[data-theme="light"]{color-scheme:light;--bg:#f7f6f4;--surface:#fff;--surface-light:#f1eff5;--text:#29262f;--muted:#716b79;--quiet:#78717f;--border:rgba(92,76,119,.16);--accent-ink:#6b5293}
html[data-theme="light"] a:focus-visible,
html[data-theme="light"] button:focus-visible{outline-color:var(--accent-ink)}
html[data-theme="light"] ::selection{background:#d9d2f4;color:#302442}
html[data-theme="light"] .site-header{background:rgba(249,248,246,.9);border-bottom-color:var(--border)}
html[data-theme="light"] .nav-shell nav>a{color:#696270}
html[data-theme="light"] .nav-shell nav>a:hover,
html[data-theme="light"] .nav-shell nav>a.active,
html[data-theme="light"] .nav-shell nav>a:last-child{color:#342b41}
html[data-theme="light"] .language-choice{color:#716979}
html[data-theme="light"] .language-choice[aria-pressed="true"]{color:var(--accent-ink)}
html[data-theme="light"] .language-choice:hover,
html[data-theme="light"] .theme-toggle:hover{background:#eee9f7;color:#503967}
html[data-theme="light"] .theme-toggle{color:#6c5a81}
html[data-theme="light"] .eyebrow{color:var(--accent-ink)}
html[data-theme="light"] h1>span:not(.name-period){background-image:linear-gradient(115deg,#7960ad 5%,#8d77c1 85%)}
html[data-theme="light"] .name-period{color:#77638f}
html[data-theme="light"] .hero-role{color:#49404f}
html[data-theme="light"] .hero-role>span{color:#887495}
html[data-theme="light"] .hero-description{color:#69616f}
html[data-theme="light"] .button.primary{box-shadow:0 3px 14px rgba(111,88,157,.1)}
html[data-theme="light"] .button.secondary{background:#fff;border-color:#dcd5e5;color:#4d3d60}
html[data-theme="light"] .button.secondary:hover{background:#f1ecf8;border-color:#b9a6ce}
html[data-theme="light"] .button.cv-button{color:#6c528a;border-color:#d9cce6;background:rgba(255,255,255,.6)}
html[data-theme="light"] .button.cv-button:hover{color:#49305f;border-color:#b199cb;background:#f2ecf8}
html[data-theme="light"] .hero-socials{color:#6c6375}
html[data-theme="light"] .hero-socials>a:hover,
html[data-theme="light"] .footer-socials>a:hover{color:#6b4e96}
html[data-theme="light"] .hero-visual{background:radial-gradient(ellipse at 55% 47%,rgba(157,139,211,.09),transparent 60%)}
html[data-theme="light"] .visual-label{color:#746a7d}
html[data-theme="light"] .plus-mark,
html[data-theme="light"] .tiny-cross{color:#887993}
html[data-theme="light"] .graph-axis{color:#786785}
html[data-theme="light"] .visual-caption{border-top-color:var(--border);color:#756a80}
html[data-theme="light"] .visual-caption strong{color:#564062}
html[data-theme="light"] .visual-index{color:#786d82}
html[data-theme="light"] .hero-proof{background:linear-gradient(90deg,transparent,rgba(228,220,241,.24),transparent)}
html[data-theme="light"] .proof-intro .eyebrow{color:#776c83}
html[data-theme="light"] .proof-intro>p{color:#584d64}
html[data-theme="light"] .proof-stat>strong{color:#44324f}
html[data-theme="light"] .proof-stat>strong>small,
html[data-theme="light"] .proof-stat>p>small{color:#786d81}
html[data-theme="light"] .proof-stat>p{color:#63556f}
html[data-theme="light"] .scroll-cue{color:#796c85}
html[data-theme="light"] .scroll-cue:hover{color:var(--accent-ink)}
html[data-theme="light"] .section-bordered{background:linear-gradient(130deg,rgba(222,214,237,.15),transparent 65%)}
html[data-theme="light"] .section-number{color:#807189}
html[data-theme="light"] .muted{color:#807584}
html[data-theme="light"] .section-aside,
html[data-theme="light"] .about-principles p{color:#726876}
html[data-theme="light"] .about-copy{color:#6b626f}
html[data-theme="light"] .about-copy strong{color:#403347}
html[data-theme="light"] .principle-icon{color:#7b6199;background:#f0eaf7;border-color:#ddd1e9}
html[data-theme="light"] .timeline-content,
html[data-theme="light"] .timeline-item,
html[data-theme="light"] .featured-experience .timeline-content:after{border-color:#d9cde5}
html[data-theme="light"] .timeline-meta .company{color:#35293f}
html[data-theme="light"] .timeline-meta .timeline-date{color:#746a7c}
html[data-theme="light"] .timeline-meta .role-type{color:#71558e;background:#efe8f5;border-color:#ddcde9}
html[data-theme="light"] .timeline-content:before{background:#a18ab9;border-color:#8d6da6;box-shadow:0 0 0 6px #f7f6f4}
html[data-theme="light"] .timeline-meta:before{background:#a18ab9;border-color:#8d6da6;box-shadow:0 0 0 5px #f7f6f4}
html[data-theme="light"] .current-tag,
html[data-theme="light"] .featured-tag{background:#eee6f7;color:#75578f;border-color:#d8c7e6}
html[data-theme="light"] .experience-list,
html[data-theme="light"] .experience-lead{color:#6b6074}
html[data-theme="light"] .experience-list>li:before{color:#8a759b}
html[data-theme="light"] .experience-list strong{color:#6c4c89}
html[data-theme="light"] .featured-experience .timeline-content{background:linear-gradient(120deg,rgba(228,215,244,.35),rgba(255,255,255,.6));border-color:#d8c7e7}
html[data-theme="light"] .featured-experience .timeline-content:before{background:var(--accent);box-shadow:0 0 0 6px #f7f6f4,0 0 20px rgba(152,131,191,.13)}
html[data-theme="light"] .featured-experience .timeline-meta .company{color:#72518f}
html[data-theme="light"] .tags>span{background:#f4f1f8;border-color:#e5dfea;color:#6d5e7c}
html[data-theme="light"] .project-card{background:linear-gradient(135deg,#fff,#fdfcfe);border-color:#e0d9e8;box-shadow:0 4px 18px rgba(47,30,64,.035)}
html[data-theme="light"] .project-card:hover{border-color:#bca7d1}
html[data-theme="light"] .project-visual{background:radial-gradient(ellipse at 50% 100%,rgba(221,207,241,.48),transparent 80%),#f5f1fa}
html[data-theme="light"] .project-visual-heading,
html[data-theme="light"] .project-visual-heading .icon{color:#7b638f}
html[data-theme="light"] .chart-grid{stroke:#d6cde1}
html[data-theme="light"] .chart-line{stroke:#8670b4}
html[data-theme="light"] .chart-secondary{stroke:#92899e}
html[data-theme="light"] #chart-fill stop{stop-color:var(--accent)}
html[data-theme="light"] #chart-fill stop:first-child{stop-opacity:.3}
html[data-theme="light"] .project-chart circle{fill:#856daf}
html[data-theme="light"] .visual-footnote{color:#765087}
html[data-theme="light"] .similarity-visual{background:radial-gradient(ellipse at 70% 70%,rgba(201,215,232,.33),transparent 75%),#f2f5f9}
html[data-theme="light"] .similarity-visual .project-visual-heading{color:#64758b}
html[data-theme="light"] .peer-row>span{color:#6e687c}
html[data-theme="light"] .peer-row>div{background:repeating-linear-gradient(90deg,transparent 0px,transparent calc(25% - 1px),rgba(83,68,110,.09) calc(25% - 1px),rgba(83,68,110,.09) 25%)}
html[data-theme="light"] .peer-row i{background:linear-gradient(90deg,#c7bbdf,#9984bd)}
html[data-theme="light"] .peer-row:nth-child(2) i{background:linear-gradient(90deg,#b7c4d6,#8198b4)}
html[data-theme="light"] .gap-area{border-color:#a58dbb;background:repeating-linear-gradient(135deg,rgba(159,128,188,.14) 0 2px,transparent 2px 6px)}
html[data-theme="light"] .peer-legend{color:#7b638c}
html[data-theme="light"] .peer-legend>span{border-color:#a58dbb}
html[data-theme="light"] .project-category{color:#7b5d97}
html[data-theme="light"] .project-summary dt{color:#584561}
html[data-theme="light"] .project-summary dd,
html[data-theme="light"] .project-small .project-summary dd{color:#726579}
html[data-theme="light"] .project-summary .summary-impact dt,
html[data-theme="light"] .project-summary .summary-impact dd strong{color:#73508f}
html[data-theme="light"] .project-actions .details-button{color:#74508f;border-color:#d4c3e2;background:#f4edf9}
html[data-theme="light"] .project-actions .details-button:hover{color:#553367;border-color:#b698cd;background:#eae0f4}
html[data-theme="light"] .project-actions .details-button .icon,
html[data-theme="light"] .project-github{color:#85629e}
html[data-theme="light"] .project-icon{background:linear-gradient(120deg,#f0e6f7,#f9f5fc);border-color:#ded0e9;color:#89669f}
html[data-theme="light"] .project-count{color:#7b6b86}
html[data-theme="light"] .achievement{background:linear-gradient(120deg,rgba(255,255,255,.82),rgba(251,249,253,.7));box-shadow:0 3px 13px rgba(47,30,64,.02)}
html[data-theme="light"] .achievement:hover{border-color:#c8b4d8}
html[data-theme="light"] .rank-badge{background:linear-gradient(135deg,#eee4f6,#f6f0fa);border-color:#ded0e9;color:#81609b}
html[data-theme="light"] .rank-badge>small{color:#70537f}
html[data-theme="light"] .achievement h3{color:#44334e}
html[data-theme="light"] .achievement-heading>span{color:#7e6d89}
html[data-theme="light"] .achievement-content>p{color:#716277}
html[data-theme="light"] .achievement-details{color:#7a6885}
html[data-theme="light"] .award-label{background:#f4ecf8;color:#765087;border-color:#decce9}
html[data-theme="light"] .achievement-trophy{color:#a88fbb}
html[data-theme="light"] .skill-card{background:linear-gradient(125deg,#fff,#fcfbfd);box-shadow:0 3px 14px rgba(47,30,64,.025)}
html[data-theme="light"] .skill-icon{color:#87659f}
html[data-theme="light"] .quantum-card{background:linear-gradient(140deg,#f5edf9,#fff);border-color:#d9c7e6}
html[data-theme="light"] .quantum-card .skill-icon{color:#8b65a7}
html[data-theme="light"] .education-card{background:linear-gradient(130deg,#fff,#fbf9fd);box-shadow:0 3px 14px rgba(47,30,64,.025)}
html[data-theme="light"] .education-icon{background:#efe5f6;border-color:#ddcbe9;color:#87629e}
html[data-theme="light"] .education-date{color:#856998}
html[data-theme="light"] .degree{color:#76607f}
html[data-theme="light"] .thesis-block>.eyebrow{color:#846c92}
html[data-theme="light"] .thesis-block h4{color:#57405f}
html[data-theme="light"] .mentors>p{color:#6d5379}
html[data-theme="light"] .mentors>p>span,
html[data-theme="light"] .mentors small{color:#80698c}
html[data-theme="light"] .certifications-heading>span{color:#7e6a88}
html[data-theme="light"] .certification{background:rgba(255,255,255,.7)}
html[data-theme="light"] .certification>.icon{color:#8d68a3}
html[data-theme="light"] .certification p{color:#846791}
html[data-theme="light"] .certification h4{color:#624a6d}
html[data-theme="light"] .contact-panel{background:radial-gradient(ellipse at 50% 110%,rgba(211,188,233,.35),transparent 68%),linear-gradient(160deg,#fff,#f8f3fc);border-color:#decee9;box-shadow:0 6px 26px rgba(65,37,87,.035)}
html[data-theme="light"] .contact-panel:before{background-image:linear-gradient(rgba(134,91,168,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(134,91,168,.04) 1px,transparent 1px)}
html[data-theme="light"] .contact-panel>.eyebrow{color:#87649a}
html[data-theme="light"] .contact-panel h2>span{color:#9774b0}
html[data-theme="light"] .contact-description{color:#7b6386}
html[data-theme="light"] .contact-socials>a{color:#80618f}
html[data-theme="light"] .contact-socials>a:hover{color:#5d3474}
html[data-theme="light"] .site-footer>p{color:#7c6887}
html[data-theme="light"] .footer-socials,
html[data-theme="light"] .back-top{color:#88699a}
html[data-theme="light"] dialog{background:#fff;border-color:#d5c2e3;box-shadow:0 25px 85px rgba(48,25,65,.2)}
html[data-theme="light"] dialog::backdrop{background:rgba(38,28,49,.4)}
html[data-theme="light"] .dialog-close{background:#f4ecf9;color:#88609e}
html[data-theme="light"] .dialog-block>h3{color:#84569c}
html[data-theme="light"] .dialog-block>p,
html[data-theme="light"] .dialog-block>ul{color:#796182}
html[data-theme="light"] .dialog-impact{background:#f6edf9;border-color:#dcc6e8}
html[data-theme="light"] .dialog-impact>p{color:#875a9e}
@media(max-width:900px){
 html[data-theme="light"] .nav-shell nav{background:rgba(250,249,247,.98);border-bottom-color:#e0d7e8}
 html[data-theme="light"] .nav-shell nav>a.active{background:#eee6f7;color:#6b4b88}
}
