*{margin:0;padding:0;box-sizing:border-box}
:root{--bg:#070b12;--panel:#0e1520;--panel2:#111a27;--text:#eef3f8;--muted:#8995a7;--line:#202c3d;--accent:#20e3a2;--accent2:#36a8ff;--max:1160px}
html{scroll-behavior:smooth}
body{font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--text);line-height:1.7;overflow-x:hidden}
/* Reliable theme variables before body scripts finish loading. */
html[data-theme="light"]{--bg:#f4f7fb;--panel:#ffffff;--panel2:#eef3f8;--text:#102033;--muted:#5d6b7d;--line:#dbe3ed;--accent:#079e72;--accent2:#1689d8}
html[data-theme="dark"]{--bg:#070b12;--panel:#0e1520;--panel2:#111a27;--text:#eef3f8;--muted:#8995a7;--line:#202c3d;--accent:#20e3a2;--accent2:#36a8ff}
body, .header, .section, footer, .theme-toggle, .project, .skill-card, .fact, .timeline-card, .education, .research-card, .certificate, .repo-card, .github-profile-card{transition:background-color .22s ease,color .22s ease,border-color .22s ease}

a{text-decoration:none;color:inherit}button{font:inherit}.container{width:min(var(--max),90%);margin:auto}
.header{position:fixed;top:0;left:0;width:100%;z-index:1000;background:var(--bg);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.05)}
.nav{height:76px;display:flex;align-items:center;justify-content:space-between}
.brand{font-weight:800;font-size:22px;letter-spacing:-1px}.brand span{color:var(--accent)}
.nav-menu{display:flex;align-items:center;gap:26px}.nav-menu>a{font-size:13px;color:#aeb8c8;transition:.25s}.nav-menu>a:hover{color:var(--accent)}
.nav-cv{padding:8px 13px;border:1px solid var(--accent);border-radius:7px;color:var(--accent)!important}.nav-cv:hover{background:var(--accent);color:#04100b!important}
.menu-toggle{display:none;border:0;background:transparent;color:white;font-size:22px}
.hero{min-height:100vh;display:flex;align-items:center;position:relative;padding-top:80px;overflow:hidden}
.hero:before{content:"";position:absolute;width:650px;height:650px;left:28%;top:0;background:radial-gradient(circle,rgba(32,227,162,.13),transparent 67%);pointer-events:none}
.hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:50px;align-items:center}
.availability{display:inline-flex;align-items:center;gap:8px;color:var(--accent);font-size:12px;border:1px solid rgba(32,227,162,.22);padding:7px 11px;border-radius:99px;background:rgba(32,227,162,.05);margin-bottom:22px}.availability span{width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 12px var(--accent)}
.eyebrow,.section-head>span{font-size:12px;color:var(--accent);letter-spacing:2px;font-weight:700}
.hero h1{font-size:clamp(42px,6vw,76px);line-height:1.03;letter-spacing:-3px;margin:10px 0 20px}.hero h1 span{background:linear-gradient(90deg,var(--accent),var(--accent2));-webkit-background-clip:text;color:transparent}
.hero h2{font-size:clamp(20px,3vw,28px);color:#d7deea;margin-bottom:18px}.hero h2 #typing{color:var(--accent)}.cursor{animation:blink .7s infinite;color:var(--accent)}@keyframes blink{50%{opacity:0}}
.hero-text{max-width:650px;color:var(--muted);font-size:15px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}.btn{display:inline-flex;align-items:center;gap:9px;padding:12px 18px;border-radius:8px;font-size:13px;font-weight:700;transition:.3s}.btn-primary{background:var(--accent);color:#03110c}.btn-primary:hover{transform:translateY(-3px);box-shadow:0 12px 35px rgba(32,227,162,.18)}.btn-ghost{border:1px solid var(--line);color:#d8e0eb}.btn-ghost:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-3px)}
.socials{display:flex;gap:10px;margin-top:25px}.socials a{width:39px;height:39px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;color:#8e9aab;transition:.25s}.socials a:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-4px)}
.hero-visual{min-height:500px;display:grid;place-items:center;position:relative}.profile{width:330px;height:390px;border-radius:28px;border:1px solid rgba(32,227,162,.3);background:linear-gradient(145deg,#142131,#0a111b);box-shadow:0 35px 90px rgba(0,0,0,.35),inset 0 0 50px rgba(32,227,162,.04);display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;transform:rotate(3deg);transition:.5s}.profile:hover{transform:rotate(0) scale(1.025)}
.profile:before{content:"";position:absolute;inset:18px;border:1px dashed rgba(32,227,162,.15);border-radius:20px}.profile-photo{width:210px;height:210px;object-fit:cover;object-position:center top;border-radius:50%;display:block;border:3px solid rgba(32,227,162,.45);box-shadow:0 0 45px rgba(32,227,162,.12);position:relative;z-index:2}
.profile-initials{width:155px;height:155px;border-radius:50%;display:grid;place-items:center;font-size:42px;font-weight:800;background:linear-gradient(135deg,rgba(32,227,162,.18),rgba(54,168,255,.18));border:1px solid rgba(32,227,162,.4);color:var(--accent);box-shadow:0 0 70px rgba(32,227,162,.12)}
.profile-caption{text-align:center;margin-top:28px;display:flex;flex-direction:column}.profile-caption strong{font-size:18px}.profile-caption span{color:var(--muted);font-size:12px}
.orbit{position:absolute;border:1px solid rgba(32,227,162,.09);border-radius:50%;pointer-events:none}.orbit-1{width:480px;height:480px;animation:spin 20s linear infinite}.orbit-2{width:570px;height:570px;animation:spin 30s linear infinite reverse}@keyframes spin{to{transform:rotate(360deg)}}
.float-card{position:absolute;padding:10px 13px;border:1px solid var(--line);background:rgba(12,19,29,.88);backdrop-filter:blur(10px);border-radius:8px;font-size:11px;color:#b9c3d1;display:flex;gap:8px;align-items:center;box-shadow:0 15px 40px rgba(0,0,0,.25)}.float-card i{color:var(--accent)}.fc-one{top:90px;right:10px;animation:float 4s ease-in-out infinite}.fc-two{left:0;bottom:125px;animation:float 4s ease-in-out infinite 1s}.fc-three{right:0;bottom:65px;animation:float 4s ease-in-out infinite 2s}@keyframes float{50%{transform:translateY(-10px)}}

.section{padding:110px 0}.section-dark{background:#0b111a}.section-head{margin-bottom:48px}.section-head.center{text-align:center;max-width:750px;margin:0 auto 48px}.section-head h2{font-size:clamp(31px,4.5vw,48px);line-height:1.15;letter-spacing:-1.8px;margin-top:8px}.section-head h2 em,.contact-box h2 em{font-style:normal;color:var(--accent)}.section-head p{color:var(--muted);font-size:14px;margin-top:12px}
.about-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:70px}.about-copy p{color:var(--muted);font-size:15px;margin-bottom:18px}.about-copy strong{color:#dfe7f1}
.fact-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fact{background:var(--panel);border:1px solid var(--line);border-radius:11px;padding:17px;display:flex;gap:12px;align-items:center;transition:.3s}.fact:hover{border-color:rgba(32,227,162,.5);transform:translateY(-3px)}.fact i{color:var(--accent);width:35px;height:35px;display:grid;place-items:center;background:rgba(32,227,162,.08);border-radius:8px}.fact small,.fact strong{display:block}.fact small{color:#6f7c8e;font-size:10px}.fact strong{font-size:12px;color:#cbd4e0}
.skill-groups{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.skill-card{background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:25px;transition:.35s}.skill-card:hover{transform:translateY(-6px);border-color:rgba(32,227,162,.55)}.skill-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:9px;background:rgba(32,227,162,.08);color:var(--accent);margin-bottom:17px}.skill-card h3{font-size:16px;margin-bottom:15px}.tags{display:flex;flex-wrap:wrap;gap:7px}.tags span{font-size:10px;color:#9eabbd;border:1px solid #273446;background:#101925;padding:6px 8px;border-radius:5px}.skill-note{color:#59677a;font-size:10px;margin-top:12px}
.project-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.project{background:var(--panel);border:1px solid var(--line);padding:27px;border-radius:13px;transition:.35s}.project:hover{transform:translateY(-7px);border-color:rgba(32,227,162,.55);box-shadow:0 20px 60px rgba(0,0,0,.2)}.project-top{display:flex;justify-content:space-between;margin-bottom:24px}.project-number{font-size:12px;color:var(--accent);font-weight:700}.project-top a{color:#7f8da0;font-size:19px}.project-top a:hover{color:var(--accent)}.project h3{font-size:19px;margin-bottom:11px}.project p{font-size:13px;color:var(--muted);margin-bottom:18px}.center{text-align:center;margin-top:35px}
.timeline{max-width:880px;margin:auto;position:relative}.timeline:before{content:"";position:absolute;left:9px;top:0;bottom:0;width:1px;background:#263243}.timeline-item{position:relative;padding-left:45px;margin-bottom:42px}.timeline-marker{position:absolute;left:2px;top:4px;width:15px;height:15px;background:var(--accent);border-radius:50%;box-shadow:0 0 18px rgba(32,227,162,.45)}.timeline-date{color:var(--accent);font-size:11px;margin-bottom:7px}.timeline-card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:23px}.timeline-card h3{font-size:20px}.timeline-card h4{font-size:13px;color:#a0acbc;font-weight:500;margin-bottom:11px}.timeline-card p{font-size:13px;color:var(--muted);margin-top:7px}
.education{max-width:900px;margin:auto;padding:30px;border:1px solid var(--line);background:var(--panel);border-radius:14px;display:flex;gap:20px}.edu-icon{min-width:55px;height:55px;border-radius:11px;background:rgba(32,227,162,.08);color:var(--accent);display:grid;place-items:center;font-size:22px}.edu-date{color:var(--accent);font-size:11px}.education h3{font-size:21px;margin:4px 0}.education h4{font-size:13px;color:#a2aebf;font-weight:500}.education p{font-size:13px;color:var(--muted);margin-top:9px}
.research-card{max-width:900px;margin:auto;padding:30px;background:var(--panel);border:1px solid var(--line);border-radius:14px;display:grid;grid-template-columns:55px 1fr;gap:20px}.research-icon{width:55px;height:55px;background:rgba(32,227,162,.08);color:var(--accent);display:grid;place-items:center;border-radius:10px}.research-card h3{font-size:19px}.research-card p{font-size:13px;color:var(--muted);margin:10px 0 18px}.research-interests{max-width:900px;margin:18px auto 0;display:flex;gap:8px;flex-wrap:wrap}.research-interests span{padding:8px 11px;border-radius:6px;border:1px solid var(--line);font-size:10px;color:#8d9bad}
.cert-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.certificate{display:flex;gap:16px;padding:23px;background:var(--panel);border:1px solid var(--line);border-radius:12px;transition:.3s}.certificate:hover{border-color:rgba(32,227,162,.5);transform:translateY(-4px)}.certificate>i{width:45px;height:45px;min-width:45px;border-radius:9px;display:grid;place-items:center;background:rgba(32,227,162,.08);color:var(--accent)}.certificate h3{font-size:15px}.certificate p{font-size:12px;color:#8996a8}.certificate small{font-size:10px;color:#5f6c7e}
.contact{padding-bottom:120px}.contact-box{text-align:center;max-width:850px;margin:auto;padding:65px 25px;border:1px solid rgba(32,227,162,.2);border-radius:20px;background:radial-gradient(circle at 50% 0,rgba(32,227,162,.08),transparent 50%),var(--panel)}.contact-box>span{font-size:11px;color:var(--accent);letter-spacing:2px;font-weight:700}.contact-box h2{font-size:clamp(34px,5vw,54px);line-height:1.12;letter-spacing:-2px;margin:12px 0}.contact-box>p{color:var(--muted);font-size:14px}.email{display:inline-block;color:var(--accent);font-size:clamp(18px,3vw,28px);margin:28px 0 22px;border-bottom:1px solid rgba(32,227,162,.5);padding-bottom:5px}.contact-links{display:flex;justify-content:center;gap:9px;flex-wrap:wrap}.contact-links a{border:1px solid var(--line);padding:9px 13px;border-radius:7px;color:#a8b3c3;font-size:11px;transition:.25s}.contact-links a:hover{border-color:var(--accent);color:var(--accent)}.location{margin-top:22px;color:#687689;font-size:11px}
footer{border-top:1px solid #172131;background:#05080d}.footer-inner{min-height:90px;display:flex;align-items:center;justify-content:space-between;gap:20px}.footer-inner p{font-size:10px;color:#5e6b7d}.footer-social{display:flex;gap:10px}.footer-social a{color:#718095}.footer-social a:hover{color:var(--accent)}

.reveal{opacity:0;transform:translateY(28px);transition:opacity .75s ease,transform .75s ease}.reveal.show{opacity:1;transform:none}
#preloader{position:fixed;inset:0;background:var(--bg);z-index:5000;display:grid;place-items:center;transition:.5s}#preloader span{width:46px;height:46px;border:3px solid #203040;border-top-color:var(--accent);border-radius:50%;animation:load .8s linear infinite}@keyframes load{to{transform:rotate(360deg)}}

@media(max-width:900px){
  .menu-toggle{display:block}.nav-menu{position:fixed;right:-100%;top:76px;width:280px;height:calc(100vh - 76px);padding:30px;background:#09101a;border-left:1px solid var(--line);display:flex;flex-direction:column;align-items:flex-start;gap:22px;transition:.35s}.nav-menu.open{right:0}
  .hero-grid,.about-grid{grid-template-columns:1fr}.hero-copy{text-align:center}.hero-text{margin:auto}.hero-actions,.socials{justify-content:center}.hero-visual{order:-1;min-height:390px}.profile{transform:scale(.82) rotate(3deg)}.orbit-1{width:400px;height:400px}.orbit-2{width:470px;height:470px}.float-card{display:none}
  .skill-groups{grid-template-columns:1fr 1fr}
}
@media(max-width:650px){
  .section{padding:80px 0}.hero h1{font-size:43px}.hero-visual{min-height:310px}.profile{transform:scale(.66) rotate(3deg);margin-top:-35px;margin-bottom:-55px}.orbit{display:none}.skill-groups,.project-grid,.cert-grid{grid-template-columns:1fr}.fact-grid{grid-template-columns:1fr}.research-card{grid-template-columns:1fr}.education{flex-direction:column}.footer-inner{flex-direction:column;justify-content:center;padding:25px 0}.contact-box{padding:45px 18px}.email{font-size:18px}
}


/* ===== Portfolio Ready Additions ===== */
.brand-logo{display:flex;align-items:center;height:42px}
.brand-logo img{display:block;width:122px;height:42px;object-fit:contain;object-position:left center}
.project{overflow:hidden}
.project-cover{height:210px;margin:-27px -27px 24px;position:relative;overflow:hidden;background:#0a111b;border-bottom:1px solid var(--line)}
.project-cover img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease,filter .5s ease}
.project:hover .project-cover img{transform:scale(1.045);filter:saturate(1.08)}
.cover-label{position:absolute;left:14px;bottom:14px;padding:6px 9px;border-radius:5px;background:rgba(7,11,18,.82);border:1px solid rgba(32,227,162,.35);color:var(--accent);font-size:9px;letter-spacing:1px;font-weight:700;backdrop-filter:blur(8px)}
.company-heading{display:flex;align-items:center;gap:15px;margin-bottom:10px}
.company-heading img{width:118px;height:42px;object-fit:contain;border-radius:7px}
.company-heading h3{margin:0}
.company-heading h4{margin:2px 0 0}
.footer-logo img{width:108px;height:38px}
.footer-copy{display:flex;flex-direction:column;gap:2px}
.footer-copy span{font-size:9px;color:#465366}
footer .footer-inner{padding:12px 0}
@media(max-width:650px){
  .brand-logo img{width:105px;height:38px}
  .project-cover{height:190px}
  .company-heading{align-items:flex-start;flex-direction:column;gap:10px}
  .company-heading img{width:145px;height:48px}
  .footer-copy{text-align:center;align-items:center}
}


/* ===== Advanced Portfolio Features ===== */
body.light{--bg:#f4f7fb;--panel:#ffffff;--panel2:#eef3f8;--text:#102033;--muted:#5d6b7d;--line:#dbe3ed;--accent:#079e72;--accent2:#1689d8}body.light .header{background:var(--bg)}body.light .section-dark{background:#eaf0f6}body.light .nav-menu{background:#fff}body.light .project,body.light .skill-card,body.light .fact,body.light .timeline-card,body.light .education,body.light .research-card,body.light .certificate{box-shadow:0 8px 30px rgba(20,40,70,.06)}
.theme-toggle{width:38px;height:38px;border:1px solid var(--line);background:var(--panel);color:var(--accent);border-radius:50%;cursor:pointer;margin-left:auto;margin-right:12px;transition:.25s}.theme-toggle:hover{transform:rotate(18deg);border-color:var(--accent)}
.brand-logo img{width:78px;height:28px;object-fit:contain;object-position:left center}.footer-logo img{width:78px;height:28px}.brand-logo{height:32px}
#particles{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;opacity:.55}.header,main,footer,.hero:before{z-index:0}.cursor-dot,.cursor-ring{position:fixed;top:0;left:0;pointer-events:none;z-index:30001;border-radius:50%;opacity:0;will-change:transform}.cursor-dot{width:6px;height:6px;background:var(--accent)}.cursor-ring{width:30px;height:30px;border:1px solid var(--accent);transition:width .18s,height .18s,opacity .18s,transform .09s linear}.cursor-ring.active{width:48px;height:48px;opacity:.5}@media(pointer:fine){body.has-custom-cursor{cursor:none}body.has-custom-cursor a,body.has-custom-cursor button{cursor:none}.cursor-dot,.cursor-ring{opacity:0}.has-custom-cursor .cursor-dot,.has-custom-cursor .cursor-ring{opacity:1}}@media(pointer:coarse){.cursor-dot,.cursor-ring{display:none}}
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin-top:48px}.stat{min-height:134px;padding:26px 20px;background:var(--panel);border:1px solid var(--line);border-radius:15px;text-align:center;display:flex;flex-direction:column;justify-content:center}.stat strong{display:block;font-size:38px;line-height:1.1;color:var(--accent)}.stat span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:1px;margin-top:9px}.project-details{display:inline-flex;align-items:center;gap:7px;margin-top:18px;color:var(--accent);font-size:11px;font-weight:700}.project-details i{transition:.2s}.project-details:hover i{transform:translateX(4px)}
.github-section{margin-top:42px;border-top:1px solid var(--line);padding-top:28px}.github-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.github-heading span{font-size:10px;letter-spacing:2px;color:var(--accent);font-weight:700}.github-heading small{font-size:10px;color:var(--muted)}.repo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.repo-card{padding:17px;background:var(--panel);border:1px solid var(--line);border-radius:10px;min-height:145px;transition:.25s}.repo-card:hover{transform:translateY(-4px);border-color:rgba(32,227,162,.5)}.repo-card h4{font-size:14px;margin-bottom:7px}.repo-card p{font-size:11px;color:var(--muted);min-height:34px}.repo-meta{display:flex;gap:12px;margin-top:13px;color:#738196;font-size:9px}.repo-meta b{color:var(--accent);font-weight:600}.repo-card a{display:inline-block;margin-top:10px;font-size:10px;color:var(--accent)}.paper-meta{display:block;margin-top:12px;color:#637084;font-size:10px}
.research-list{display:grid;gap:16px}.research-card{grid-template-columns:55px 1fr}.preview-btn{margin-top:10px;border:1px solid var(--line);background:transparent;color:var(--accent);border-radius:5px;padding:6px 9px;font-size:9px}.preview-btn:hover{background:rgba(32,227,162,.08);border-color:var(--accent)}
.modal{position:fixed;inset:0;z-index:7000;display:none;align-items:center;justify-content:center;padding:20px}.modal.open{display:flex}.modal-backdrop{position:absolute;inset:0;background:rgba(2,6,12,.82);backdrop-filter:blur(8px)}.certificate-preview{position:relative;width:min(620px,92vw);z-index:2}.modal-close{position:absolute;right:-8px;top:-48px;width:36px;height:36px;border-radius:50%;border:1px solid #536176;background:#0c1420;color:#fff;font-size:24px}.certificate-sheet{aspect-ratio:1.45/1;background:linear-gradient(135deg,#fff,#edf3f7);color:#1b2a3b;border:12px solid #c8d5df;outline:2px solid #6ea08e;box-shadow:0 25px 80px rgba(0,0,0,.35);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:35px}.cert-ribbon{font-size:10px;letter-spacing:4px;color:#087b59;font-weight:800}.cert-seal{width:60px;height:60px;border-radius:50%;border:2px solid #087b59;display:grid;place-items:center;color:#087b59;margin:18px 0}.certificate-sheet h2{font-family:Georgia,serif;font-size:28px;margin:5px 0 8px}.certificate-sheet p{font-size:13px}.cert-small{letter-spacing:2px}.cert-line{width:190px;border-top:1px solid #9cafbd;margin:18px}.certificate-sheet small{max-width:390px;color:#6a7887;font-size:9px}
@media(max-width:900px){.stats-grid{grid-template-columns:1fr 1fr}.repo-grid{grid-template-columns:1fr 1fr}.theme-toggle{margin-left:auto}}
@media(max-width:650px){.brand-logo img{width:70px;height:25px}.stats-grid,.repo-grid{grid-template-columns:1fr}.github-heading{align-items:flex-start;flex-direction:column;gap:5px}.certificate-sheet h2{font-size:21px}.certificate-sheet{padding:20px}}

/* ===== Final polish: footer, GitHub page, subpage cursor and light-mode readability ===== */
.footer-grid{display:grid;grid-template-columns:1.7fr 1fr 1fr 1.2fr;gap:42px;padding:46px 0 34px}
.footer-about p{max-width:330px;color:#8995a7;font-size:11px;margin-top:14px;line-height:1.8}
.footer-column{display:flex;flex-direction:column;gap:8px}.footer-column h4{font-size:11px;letter-spacing:1px;color:var(--text);margin-bottom:5px}.footer-column a{font-size:10px;color:#78869a;transition:.2s}.footer-column a:hover{color:var(--accent);transform:translateX(2px)}
.footer-social{display:flex;gap:8px;margin-top:10px}.footer-social a{width:31px;height:31px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;color:#718095}.footer-bottom{border-top:1px solid #172131;display:flex;justify-content:space-between;gap:20px;padding:15px 0;font-size:9px;color:#657286}.footer-bottom span{color:#4f5c6e}
.github-cta{text-align:center;margin-top:32px}.github-cta .skill-note{margin-top:9px}
.subnav-actions{display:flex;align-items:center;gap:10px}.subnav-actions .theme-toggle{margin:0}
.github-page{padding-top:140px;min-height:100vh}.github-page h1{font-size:clamp(38px,5vw,58px);line-height:1.1}.github-profile-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 22px;background:var(--panel);border:1px solid var(--line);border-radius:13px;margin-bottom:24px}.github-profile-card>div{display:flex;align-items:center;gap:14px}.github-profile-card>div>i{font-size:32px;color:var(--accent)}.github-profile-card strong,.github-profile-card span{display:block}.github-profile-card strong{font-size:16px}.github-profile-card span{font-size:10px;color:var(--muted);margin-top:2px}.repo-grid-page{grid-template-columns:repeat(3,1fr)}.repo-card-large{min-height:185px}.repo-title{display:flex;align-items:center;gap:9px}.repo-title>i{color:var(--accent)}.repo-title h3{font-size:14px;word-break:break-word}.repo-card-large p{margin-top:12px;min-height:50px}.repo-card a i{transition:.2s}.repo-card a:hover i{transform:translateX(4px)}.repo-error{grid-column:1/-1;padding:40px;text-align:center;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--muted)}.repo-error i{font-size:28px;color:var(--accent);margin-bottom:10px}
/* Make explicit dark-theme hard-coded grays readable in light mode */
body.light .hero h2,body.light .socials a,body.light .nav-menu>a,body.light .btn-ghost,body.light .float-card,body.light .fact strong,body.light .tags span,body.light .skill-note,body.light .timeline-card p,body.light .timeline-card small,body.light .education p,body.light .education small,body.light .research-card p,body.light .research-card small,body.light .certificate p,body.light .certificate small,body.light .repo-meta,body.light .footer-about p,body.light .footer-column a,body.light .footer-bottom,body.light .footer-bottom span{color:#425268}
body.light .tags span{background:#f0f4f8;border-color:#ccd7e2}.light .float-card{background:rgba(255,255,255,.92)}body.light .nav-menu{border-color:#dbe3ed}body.light footer{background:#e8eef5;border-top-color:#d4dde8}body.light .footer-bottom{border-top-color:#d2dce7}body.light .footer-column h4{color:#17263a}body.light .github-profile-card,body.light .repo-card{background:#fff}
@media(max-width:900px){.footer-grid{grid-template-columns:1fr 1fr;gap:28px}.repo-grid-page{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.footer-grid{grid-template-columns:1fr 1fr;gap:24px}.footer-about{grid-column:1/-1}.footer-bottom{flex-direction:column;text-align:center;align-items:center}.github-profile-card{align-items:flex-start;flex-direction:column}.repo-grid-page{grid-template-columns:1fr}}

/* ===== Mobile Navigation & Layout Polish ===== */
@media (max-width: 900px){
  .header{z-index:3000;}
  .nav{height:72px;position:relative;}
  .brand-logo{flex:0 0 auto;}
  .theme-toggle{margin-left:auto;}
  .menu-toggle{display:grid;place-items:center;width:42px;height:42px;margin-left:8px;position:relative;z-index:3100;}
  .nav-menu{
    position:fixed;
    top:72px;
    left:0;
    right:0;
    width:100%;
    height:auto;
    max-height:calc(100dvh - 72px);
    overflow-y:auto;
    padding:24px 22px 30px;
    background:#09101a;
    border:0;
    border-top:1px solid rgba(255,255,255,.08);
    box-shadow:0 24px 45px rgba(0,0,0,.35);
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    right:auto;
    transform:translateY(-12px);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .25s ease,transform .25s ease,visibility .25s ease;
    z-index:3050;
  }
  .nav-menu.open{
    right:auto;
    transform:translateY(0);
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .nav-menu>a{
    width:100%;
    padding:13px 14px;
    border-radius:9px;
    font-size:14px;
    color:#d8e0eb;
  }
  .nav-menu>a:hover,.nav-menu>a:active{background:rgba(32,227,162,.08);color:var(--accent);}
  .nav-menu .nav-cv{text-align:center;margin-top:6px;padding:11px 14px;}
  body.menu-open{overflow:hidden;}

  .hero{padding-top:88px;min-height:auto;}
  .hero-grid{gap:24px;}
  .hero-visual{order:-1;min-height:320px;margin-top:5px;overflow:visible;}
}

@media (max-width:650px){
  .nav{width:min(var(--max),92%);}
  .brand-logo img{width:70px;height:25px;}
  .theme-toggle{width:38px;height:38px;}
  .menu-toggle{width:40px;height:40px;}
  .nav-menu{top:72px;max-height:calc(100dvh - 72px);padding:20px 18px 28px;}
  .hero{padding-top:88px;}
  .hero-grid{gap:10px;}
  .hero-visual{min-height:285px;margin-bottom:4px;}
  .profile{transform:scale(.62) rotate(3deg);margin-top:-30px;margin-bottom:-70px;}
  .hero-copy{padding-top:8px;}
  .hero h1{font-size:clamp(38px,11vw,46px);letter-spacing:-2px;}
  .hero h2{font-size:21px;line-height:1.35;min-height:30px;}
  .hero-text{font-size:14px;line-height:1.7;}
  .hero-actions .btn{width:100%;justify-content:center;}
  .socials{margin-top:20px;}
  .section{padding:72px 0;}
  .section-head{margin-bottom:34px;}
  .section-head h2{font-size:32px;}
  .project,.skill-card,.education,.research-card{padding:21px;}
  .project-cover{margin:-21px -21px 20px;}
  .timeline-item{padding-left:35px;}
  .timeline-card{padding:19px;}
  .contact-box{padding:40px 16px;}
  .email{word-break:break-word;}
}

body.light .nav-menu{background:#fff;box-shadow:0 24px 45px rgba(20,40,70,.16);border-top-color:#dbe3ed;}
body.light .nav-menu>a{color:#425268;}
body.light .nav-menu>a:hover,body.light .nav-menu>a:active{background:#eef7f4;color:#079e72;}

@media (min-width:901px){body.menu-open{overflow:auto;}}

/* ===== Portfolio improvements ===== */
body{font-family:"Manrope",Arial,sans-serif}
.subpage{padding-top:145px;min-height:78vh}
.subpage h1{font-size:clamp(38px,5vw,64px);line-height:1.08;letter-spacing:-2px}
.subpage .section-head h1{margin-top:8px}
.company-heading{display:flex;align-items:center;gap:14px}
.company-heading img{width:48px;height:48px;object-fit:contain;border-radius:9px;background:#fff;padding:5px;border:1px solid var(--line)}
.research-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:12px}
.report-link{display:inline-flex;align-items:center;gap:7px;color:var(--accent);font-size:11px;font-weight:700;border:1px solid var(--line);padding:7px 10px;border-radius:6px;transition:.25s}
.report-link:hover{border-color:var(--accent);background:rgba(32,227,162,.06);transform:translateY(-2px)}
.education-list{display:grid;gap:18px;max-width:900px;margin:auto}
.education-list .education{max-width:none}
.gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.gallery-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden;transition:.3s}
.gallery-card:hover{transform:translateY(-5px);border-color:rgba(32,227,162,.55);box-shadow:0 18px 45px rgba(0,0,0,.15)}
.gallery-card img{width:100%;aspect-ratio:4/3;display:block;object-fit:cover}
.gallery-card>div{padding:14px}
.gallery-card span{font-size:9px;color:var(--accent);letter-spacing:1.5px;font-weight:800}
.gallery-card h3{font-size:13px;margin-top:4px}
.research-detail-hero{display:grid;grid-template-columns:90px 1fr;gap:24px;align-items:start;max-width:980px;margin:auto}
.research-icon.large{width:90px;height:90px;font-size:30px}
.research-detail-hero h1{margin:9px 0 14px}
.research-detail-hero p{color:var(--muted);font-size:15px;max-width:850px}
.detail-box p{color:var(--muted);margin:8px 0}
.detail-box strong{color:var(--text)}
.project{overflow:hidden}
.project-cover{margin:-27px -27px 22px;position:relative;overflow:hidden;background:var(--panel2)}
.project-cover img{width:100%;aspect-ratio:16/8;object-fit:cover;display:block;transition:.4s}
.project:hover .project-cover img{transform:scale(1.03)}
.cover-label{position:absolute;left:12px;bottom:12px;padding:6px 9px;border-radius:6px;background:rgba(4,10,16,.82);backdrop-filter:blur(8px);color:#fff;font-size:9px;letter-spacing:1.5px;font-weight:800}
body.light .cover-label{background:rgba(255,255,255,.88);color:#102033}
body.light .nav-menu>a{color:#425166}
body.light .nav-menu>a:hover{color:var(--accent)}
body.light .menu-toggle{color:#102033}
body.light .hero h2{color:#304156}
body.light .hero-text,.light .about-copy p,.light .project p,.light .timeline-card p,.light .education p,.light .research-card p,.light .contact-box>p{color:#536276}
body.light .about-copy strong,body.light .fact strong{color:#17283d}
body.light .fact small{color:#718095}
body.light .fact i,body.light .skill-icon,body.light .research-icon,body.light .edu-icon,body.light .certificate>i{background:rgba(7,158,114,.08)}
body.light .tags span{background:#f4f7fb;border-color:#d4deea;color:#4d5c70}
body.light .skill-note,body.light .paper-meta{color:#68788d}
body.light .project-top a{color:#607087}
body.light .timeline:before{background:#c9d5e2}
body.light .timeline-card h4,body.light .education h4{color:#536276}
body.light .research-interests span{color:#536276;background:#fff}
body.light .certificate p{color:#536276}
body.light .float-card{background:rgba(255,255,255,.9);color:#425166;box-shadow:0 15px 40px rgba(20,40,70,.1)}
body.light .btn-ghost{color:#23364d}
body.light .btn-ghost:hover{color:var(--accent)}
body.light .footer-column a,body.light .footer-about p{color:#536276}
body.light footer{background:#eef3f8;border-top-color:#d8e1eb}
body.light .footer-bottom{border-top-color:#d8e1eb}
body.light .footer-inner{color:#536276}
body.light .header{border-bottom-color:rgba(20,40,70,.08)}
body.light .subnav-actions .btn-ghost{background:#fff}
code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.85em;color:var(--accent)}
@media(max-width:950px){.gallery-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.gallery-grid{grid-template-columns:1fr}.research-detail-hero{grid-template-columns:1fr}.research-icon.large{width:65px;height:65px}.subpage{padding-top:120px}}

.project-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:16px}.project-actions .project-details,.project-actions .report-link{margin-top:0}.report-link{white-space:nowrap}

/* ===== Auto-expanding managed content =====
   All portfolio collections expand automatically as new content is added.
   No fixed section height is used, so adding items automatically pushes the
   following section downward without leaving overlap or artificial blank space.
*/
#skills,
#projects,
#experience,
#research,
section.section:has(.cert-grid){
  height:auto;
  min-height:0;
}

.skill-groups,
.project-grid,
.cert-grid,
.research-list,
.timeline{
  height:auto;
  min-height:0;
  align-content:start;
}

.skill-groups,
.project-grid,
.cert-grid{
  grid-auto-rows:auto;
}

.timeline{
  display:block;
}

.timeline-item:last-child{
  margin-bottom:0;
}

/* Keep long titles/descriptions from forcing horizontal overflow. */
.skill-card,
.project,
.certificate,
.timeline-card,
.research-card{
  min-width:0;
  height:auto;
}

.skill-card h3,
.project h3,
.certificate h3,
.timeline-card h3,
.research-card h3,
.skill-card p,
.project p,
.certificate p,
.timeline-card p,
.research-card p{
  overflow-wrap:anywhere;
}

/* ===== Final UI/UX Upgrade ===== */
.hero-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:28px;max-width:620px}.hero-metrics>div{padding:13px 14px;border:1px solid var(--line);border-radius:10px;background:rgba(14,21,32,.72)}.hero-metrics strong{display:block;color:var(--accent);font-size:20px;line-height:1.1}.hero-metrics span{display:block;color:var(--muted);font-size:9px;margin-top:4px}.language-list{display:grid;gap:13px}.language-item{min-width:0}.language-top{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#cdd7e3;margin-bottom:5px}.language-top strong{color:var(--accent);font-size:10px}.language-track{height:7px;border-radius:99px;background:#1a2635;overflow:hidden}.language-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),var(--accent2))}.project-actions,.research-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.project-actions .btn,.research-actions .btn{min-height:38px}.project-actions .report-link,.research-actions .report-link{margin-top:0}.report-link{display:inline-flex;align-items:center;justify-content:center;min-height:38px}.certificate>div{min-width:0}.certificate .preview-btn{margin-top:12px}.modal{z-index:5000}.certificate-preview{width:min(1000px,92vw);max-height:90vh;overflow:hidden}.certificate-preview-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;border-bottom:1px solid var(--line)}.certificate-preview-head h2{font-size:24px;margin-top:4px}.certificate-preview-head p{color:var(--muted);font-size:12px}.certificate-preview-frame{height:min(72vh,720px);background:#101722;display:grid;place-items:center}.certificate-preview-frame iframe{width:100%;height:100%;border:0}.certificate-preview-frame img{max-width:100%;max-height:100%;object-fit:contain}.certificate-placeholder{text-align:center;color:var(--muted);padding:30px}.certificate-placeholder i{font-size:38px;color:var(--accent);margin-bottom:12px}.modal-close{z-index:2}.company-heading{min-width:0}.company-heading>div{min-width:0}.research-card>div:last-child{min-width:0}.paper-meta{display:block}
@media(max-width:900px){.hero-grid{grid-template-columns:1fr}.hero-visual{order:-1}.hero-copy{max-width:760px}.skill-groups{grid-template-columns:1fr 1fr}.project-grid,.cert-grid{grid-template-columns:1fr 1fr}.about-grid{grid-template-columns:1fr;gap:35px}.hero{padding-bottom:65px}.float-card{font-size:10px}.fc-one{right:0}.fc-two{left:0}.fc-three{right:0}}
@media(max-width:650px){.container{width:min(92%,1160px)}.nav{height:68px}.brand-logo img{max-width:76px;height:auto}.hero{padding-top:82px}.hero-grid{gap:4px}.hero-visual{min-height:260px}.profile{transform:scale(.56) rotate(2deg);margin-top:-45px;margin-bottom:-90px}.orbit-1{width:360px;height:360px}.orbit-2{width:420px;height:420px}.float-card{padding:8px 10px;font-size:9px}.fc-one{top:30px}.fc-two{bottom:82px}.fc-three{bottom:30px}.availability{font-size:10px}.hero h1{font-size:clamp(36px,10.5vw,46px);letter-spacing:-2px}.hero h2{font-size:19px}.hero-text{font-size:13px}.hero-actions{display:grid;grid-template-columns:1fr;gap:9px}.hero-actions .btn{width:100%;justify-content:center}.hero-metrics{grid-template-columns:1fr 1fr;max-width:none}.hero-metrics>div:last-child{grid-column:1/-1}.section{padding:68px 0}.section-head h2{font-size:29px}.skill-groups,.project-grid,.cert-grid{grid-template-columns:1fr}.skill-card,.project,.certificate,.research-card{padding:18px}.project-cover{margin:-18px -18px 18px}.project-actions,.research-actions{display:grid;grid-template-columns:1fr}.project-actions>* ,.research-actions>*{width:100%;justify-content:center}.research-card{grid-template-columns:1fr;gap:13px}.research-icon{width:48px;height:48px}.timeline-item{padding-left:29px}.timeline-card{padding:17px}.company-heading{align-items:flex-start}.company-heading img{width:42px;height:42px}.fact-grid{grid-template-columns:1fr}.certificate-preview{width:94vw}.certificate-preview-head{padding:16px;align-items:flex-start}.certificate-preview-head .btn{padding:9px 11px}.certificate-preview-frame{height:65vh}.subpage{padding-top:105px}}
@media(max-width:380px){.hero-metrics{grid-template-columns:1fr}.hero-metrics>div:last-child{grid-column:auto}.hero h1{font-size:34px}.nav-menu{width:calc(100vw - 20px);right:10px}.profile{transform:scale(.5) rotate(2deg)}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.orbit,.float-card{animation:none!important}.project,.skill-card,.fact,.profile,.btn{transition:none!important}}

/* ===== Theme Button Contrast Fix ===== */
body.light .btn-primary, body.light .btn-primary:visited { color:#062218 !important; }
body.light .btn-ghost, body.light .btn-ghost:visited { color:#23364d !important; background:transparent; }
body.light .btn-ghost:hover { color:var(--accent) !important; }
body.light .preview-btn { color:#087b59 !important; background:#ffffff; border-color:#cbd7e4; }
body.light .preview-btn:hover { color:#056c4e !important; background:#eef8f4; }
body.light .mini-btn { color:#23364d !important; background:#ffffff; }
body.light .mini-btn:hover { color:var(--accent) !important; }
body.light .admin-tabs button { color:#425268 !important; }
body.light .admin-tabs button.active { color:var(--accent) !important; }
body.light .menu-toggle { color:#23364d !important; }
body.light 
body.light .theme-toggle { color:var(--accent) !important; }

/* Certificate preview is an instant in-page modal; never load the PDF inside it. */
.certificate-preview { width:min(760px,92vw); max-height:90vh; }
.certificate-sheet { width:100%; }
@media(max-width:650px){ .certificate-preview{width:94vw;} .certificate-sheet{padding:22px 16px;border-width:8px;} .certificate-sheet h2{font-size:21px;} .cert-seal{width:52px;height:52px;margin:14px 0;} }

/* ===== Project/research action buttons: text-only style ===== */
.project-actions .project-details,
.research-actions .project-details {
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0;
  margin-top:0;
  min-height:auto;
  border:0 !important;
  border-radius:0;
  background:transparent !important;
  box-shadow:none !important;
  color:var(--accent) !important;
  font-size:11px;
  font-weight:700;
  transform:none !important;
}
.project-actions .project-details:hover,
.research-actions .project-details:hover {
  color:var(--accent) !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
.project-actions .project-details i,
.research-actions .project-details i { transition:transform .2s ease; }
.project-actions .project-details:hover i,
.research-actions .project-details:hover i { transform:translateX(4px); }

/* ===== Portfolio polish / responsive cursor ===== */
body.light .nav-menu{background:transparent}
body.light .nav-menu>a{background:transparent}
body.light .nav-cv{background:transparent}
body.light .theme-toggle{background:transparent}
body.light .hero-metrics>div,
body.light .float-card{
  background:#2b3440;
  border-color:#3b4654;
  color:#f3f6f9;
}
body.light .stat{
  background:#fff;
  border-color:#d7e0ea;
  color:#23364d;
  box-shadow:0 8px 24px rgba(28,48,72,.04);
}
body.light .hero-metrics span,
body.light .float-card{color:#d1d9e2}
body.light .stat span{color:#718096}
body.light .hero-metrics strong,
body.light .float-card i{color:var(--accent)}
body.light .language-top{color:#253447}
body.light .language-top strong{color:#078e69}
body.light .language-track{background:#d5dde6}
body.light .skill-card .language-list{color:#253447}
body.light .tags span{color:#44546a;background:#f1f4f8;border-color:#d5dee8}
body.light .skill-note{color:#617087}
body.light .certificate p,body.light .certificate small{color:#536276}
body.light .research-interests span{background:#fff;color:#425166;border-color:#d4deea}
.see-more-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-top:18px;text-decoration:none}
.see-more-link:hover{gap:10px}
.research-interests .see-more-link{margin-top:0}
.collection-more{grid-column:1/-1;text-align:center}
.cert-grid .collection-more{margin-top:4px}
/* Magnetic CTA buttons */
.magnetic{transform:translate3d(0,0,0);will-change:transform;transition:transform .18s ease,box-shadow .25s ease,border-color .25s ease,color .25s ease,background-color .25s ease}
.magnetic.magnetic-active{transition:box-shadow .25s ease,border-color .25s ease,color .25s ease,background-color .25s ease}
@media(prefers-reduced-motion:reduce){.magnetic,.magnetic.magnetic-active{transform:none!important;transition:none!important}}
@media(max-width:650px){.collection-more{grid-column:1}.hero-metrics{grid-template-columns:1fr}.float-card{font-size:10px}}
/* Header navigation buttons stay clean in both themes. */
.subnav-actions .btn-ghost{background:transparent!important}

/* ===== Requested light-mode polish ===== */
body.light .hero-metrics>div{
  background:#ffffff;
  border-color:#d7e0ea;
  color:#23364d;
  box-shadow:0 8px 24px rgba(28,48,72,.04);
}
body.light .hero-metrics span{color:#718096;}
body.light .stats-grid .stat{
  background:#ffffff;
  border-color:#d7e0ea;
  color:#23364d;
  box-shadow:0 8px 24px rgba(28,48,72,.04);
}
body.light .stats-grid .stat span{color:#718096;}

.research-interests .collection-more{
  width:100%;
  text-align:center;
  margin-top:14px;
}
.research-more .see-more-link,.cert-grid .collection-more .see-more-link{
  margin-top:0;
}

body.light .contact-links a{
  color:#23364d;
  background:#ffffff;
  border-color:#d4deea;
  box-shadow:0 6px 18px rgba(28,48,72,.04);
}
body.light .contact-links a:hover{
  color:#087b59;
  border-color:#079e72;
}

.certificate-preview-frame{
  min-height:420px;
  overflow:auto;
}
.certificate-preview-frame iframe{
  display:block;
  width:100%;
  height:min(72vh,720px);
  border:0;
  background:#fff;
}
.generated-certificate{
  width:min(680px,92%);
  margin:28px auto;
  min-height:390px;
}
@media(max-width:650px){
  .research-interests .collection-more{margin-top:12px;}
  .contact-links{gap:8px;}
  .contact-links a{padding:10px 12px;}
  .certificate-preview-frame{min-height:360px;}
  .certificate-preview-frame iframe{height:65vh;}
  .generated-certificate{min-height:330px;margin:18px auto;}
}

/* ===== Global theme persistence + floating quick navigation ===== */
html.theme-light-preload body{background:#f4f7fb;color:#102033}
.quick-menu{position:fixed;right:22px;bottom:22px;z-index:4500;font-family:inherit}
.quick-menu-toggle{width:48px;height:48px;border:1px solid rgba(32,227,162,.45);border-radius:50%;background:var(--panel);color:var(--accent);display:grid;place-items:center;cursor:pointer;box-shadow:0 14px 35px rgba(0,0,0,.2);transition:.25s}
.quick-menu-toggle:hover{transform:translateY(-3px) scale(1.03);border-color:var(--accent);box-shadow:0 18px 42px rgba(32,227,162,.15)}
.quick-menu-panel{position:absolute;right:0;bottom:60px;width:235px;max-height:min(72vh,520px);overflow-y:auto;padding:9px;border:1px solid var(--line);border-radius:14px;background:rgba(14,21,32,.97);backdrop-filter:blur(18px);box-shadow:0 22px 60px rgba(0,0,0,.28);opacity:0;visibility:hidden;pointer-events:none;transform:translateY(10px) scale(.98);transform-origin:bottom right;transition:.22s}
.quick-menu.open .quick-menu-panel{opacity:1;visibility:visible;pointer-events:auto;transform:none}
.quick-menu-head{display:flex;align-items:center;justify-content:space-between;padding:8px 8px 10px;margin-bottom:3px;border-bottom:1px solid var(--line);font-size:12px}
.quick-menu-head strong{color:var(--text)}
.quick-menu-close{width:28px;height:28px;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--muted);cursor:pointer}
.quick-menu-close:hover{color:var(--accent);border-color:var(--accent)}
.quick-menu-panel>a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;color:#c8d2df;font-size:11px;transition:.18s}
.quick-menu-panel>a i{width:16px;text-align:center;color:var(--accent)}
.quick-menu-panel>a:hover{background:rgba(32,227,162,.08);color:var(--accent);transform:translateX(2px)}
.quick-menu-panel .quick-whatsapp{border-top:1px solid var(--line);margin-top:5px;padding-top:12px}
body.light .quick-menu-panel{background:rgba(255,255,255,.98);box-shadow:0 22px 60px rgba(20,40,70,.16)}
body.light .quick-menu-panel>a{color:#425268}
body.light .quick-menu-panel>a:hover{color:var(--accent)}
body.light .quick-menu-head strong{color:#17263a}
@media(max-width:650px){.quick-menu{right:15px;bottom:15px}.quick-menu-toggle{width:46px;height:46px}.quick-menu-panel{right:0;bottom:57px;width:min(235px,calc(100vw - 30px));max-height:68vh}}

/* Slight logo size increase — intentionally subtle */
.brand-logo img{width:88px;height:30px}
.footer-logo img{width:84px;height:29px}
@media(max-width:650px){.brand-logo img{width:80px;height:27px}.footer-logo img{width:78px;height:26px}}
html.theme-light-preload{--bg:#f4f7fb;--panel:#ffffff;--panel2:#eef3f8;--text:#102033;--muted:#5d6b7d;--line:#dbe3ed;--accent:#079e72;--accent2:#1689d8}

/* ===== Portfolio UX enhancements ===== */




#siteToast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,12px);padding:11px 16px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);font-size:12px;box-shadow:0 15px 40px rgba(0,0,0,.2);opacity:0;visibility:hidden;z-index:10001;transition:.22s;pointer-events:none}
#siteToast.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
.collection-tools{display:flex;align-items:center;gap:10px;margin:0 0 24px;padding:10px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--panel) 92%,transparent);box-shadow:0 10px 25px rgba(0,0,0,.05)}
.collection-search{display:flex;align-items:center;gap:9px;flex:1;min-width:180px}.collection-search i{color:var(--accent)}
.collection-search input,.collection-tools select{width:100%;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:9px;padding:10px 12px;outline:none;font:inherit;font-size:12px}.collection-tools select{width:auto;min-width:140px}.collection-search input:focus,.collection-tools select:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(32,227,162,.08)}
.collection-count{font-size:11px;color:var(--muted);white-space:nowrap;padding:0 5px}.collection-tools+* [hidden],.collection-tools~[hidden]{display:none!important}
.project-grid>.project[hidden],.cert-grid>.certificate[hidden],.research-list>.research-card[hidden],.repo-grid>.repo-card[hidden]{display:none!important}
.lightbox{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;opacity:0;visibility:hidden;transition:.2s}.lightbox.open{opacity:1;visibility:visible}.lightbox-backdrop{position:absolute;inset:0;background:rgba(2,7,14,.84);backdrop-filter:blur(8px)}.lightbox-box{position:relative;width:min(92vw,1000px);max-height:88vh;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--panel);z-index:1;box-shadow:0 30px 90px rgba(0,0,0,.4)}.lightbox-box img{display:block;max-width:100%;max-height:74vh;width:auto;height:auto;margin:auto;border-radius:10px;object-fit:contain;background:#fff}.lightbox-caption{text-align:center;margin-top:10px;color:var(--text);font-size:12px}.lightbox-close{position:absolute;right:10px;top:10px;width:34px;height:34px;border:1px solid var(--line);border-radius:50%;background:rgba(0,0,0,.45);color:#fff;cursor:pointer;z-index:2}.lightbox-close:hover{border-color:var(--accent);color:var(--accent)}
.keyboard-user :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.image-failed{object-fit:contain!important;padding:20px;background:var(--panel2)}
@media(max-width:650px){.collection-tools{flex-wrap:wrap}.collection-search{flex-basis:100%}.collection-tools select{flex:1;min-width:0}.collection-count{margin-left:auto}.lightbox-box{width:94vw;padding:10px}.lightbox-box img{max-height:70vh}}
@media(prefers-reduced-motion:reduce){.collection-tools *{scroll-behavior:auto}}
.certificate-credential{display:inline-flex;align-items:center;gap:5px;margin:8px 8px 0 0;font-size:11px;color:var(--accent);text-decoration:none}.certificate-credential:hover{text-decoration:underline}

/* Collection search/filter improvements */
.collection-tools{display:flex;align-items:center;gap:10px;margin:0 0 24px;padding:11px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--panel) 94%,transparent);box-shadow:0 10px 25px rgba(0,0,0,.05)}
.collection-search{display:flex;align-items:center;gap:9px;flex:1;min-width:220px}.collection-search i{color:var(--accent)}
.collection-search input,.collection-tools select{width:100%;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:9px;padding:10px 12px;outline:none;font:inherit;font-size:12px}.collection-tools select{width:auto;min-width:180px}.collection-search input:focus,.collection-tools select:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(32,227,162,.08)}
.collection-reset{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:transparent;color:var(--muted);border-radius:9px;padding:10px 12px;font:inherit;font-size:11px;font-weight:800;cursor:pointer;white-space:nowrap}.collection-reset:hover{color:var(--text);border-color:var(--accent);transform:translateY(-1px)}
.collection-count{font-size:11px;color:var(--muted);white-space:nowrap;padding:0 5px}.collection-tools+* [hidden],.collection-tools~[hidden]{display:none!important}
.collection-empty{grid-column:1/-1;min-height:180px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;border:1px dashed var(--line);border-radius:14px;color:var(--muted);text-align:center}.collection-empty i{font-size:22px;color:var(--accent)}.collection-empty strong{color:var(--text);font-size:14px}.collection-empty span{font-size:12px}
@media(max-width:650px){.collection-tools{flex-wrap:wrap}.collection-search{flex-basis:100%;min-width:100%}.collection-tools select{flex:1;min-width:0}.collection-reset{flex:0 0 auto}.collection-count{margin-left:auto}}


/* ===== Final logo, favicon and header polish ===== */
.brand-logo{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  height:54px;
  width:150px;
  min-width:150px;
  flex:0 0 150px;
  overflow:visible;
}
.brand-logo img{
  display:block;
  width:150px;
  height:54px;
  max-width:none;
  object-fit:contain;
  object-position:left center;
}
.footer-logo{
  width:138px;
  min-width:138px;
  flex-basis:138px;
}
.footer-logo img{
  width:138px;
  height:48px;
}
@media(max-width:900px){
  .brand-logo{
    width:128px;
    min-width:128px;
    flex-basis:128px;
    height:48px;
  }
  .brand-logo img{
    width:128px;
    height:48px;
  }
  .footer-logo{
    width:128px;
    min-width:128px;
    flex-basis:128px;
  }
  .footer-logo img{
    width:128px;
    height:44px;
  }
}


/* ===== Cross-page light-mode fixes ===== */
body.light .profile{background:linear-gradient(145deg,#ffffff,#edf4f8);border-color:rgba(7,158,114,.28);box-shadow:0 30px 75px rgba(20,40,70,.14),inset 0 0 45px rgba(7,158,114,.04)}
body.light .profile-caption strong{color:#102033}
body.light .profile-caption span{color:#536276}
body.light .certificate-preview{background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:0 28px 90px rgba(20,40,70,.22);overflow:hidden}
body.light .certificate-preview-head{background:#fff;color:#102033}
body.light .certificate-preview-head span{color:var(--accent)}
body.light .certificate-preview-head h2{color:#102033}
body.light .certificate-preview-head p{color:#536276}
body.light .modal-close{background:#fff;color:#23364d;border-color:#cbd7e4}
body.light .modal-close:hover{color:var(--accent);border-color:var(--accent)}
body.light .certificate-preview-frame{background:#eef3f8}
.preview-pdf-link{display:inline-flex;align-items:center;gap:7px;color:var(--accent);font-size:11px;font-weight:800;white-space:nowrap;border:1px solid var(--line);padding:8px 11px;border-radius:7px}
.preview-pdf-link:hover{border-color:var(--accent);transform:translateY(-1px)}
body.light .preview-pdf-link{background:#fff;color:#087b59;border-color:#cbd7e4}
.gallery-card img{background:var(--panel2)}

/* Experience work samples: company-specific and hidden until requested */
.experience-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.experience-works-button{font-size:.82rem;padding:10px 14px}
.experience-works-button .fa-arrow-right{font-size:.72rem;opacity:.7}
.experience-works-panel{margin:28px 0 10px;padding:30px;border:1px solid var(--line);border-radius:24px;background:var(--panel2);scroll-margin-top:110px}
.experience-works-panel[hidden]{display:none!important}
.experience-works-panel .section-head{margin-bottom:22px}
.experience-works-panel .gallery-grid{margin-top:0}
@media(max-width:700px){
  .experience-works-panel{padding:20px;border-radius:18px}
  .experience-actions{width:100%}.experience-works-button{width:100%;justify-content:center}
}

/* Professional experience details */
.experience-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:22px 0 18px}
.experience-meta-grid>div{padding:13px 15px;border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
.experience-meta-grid small,.experience-detail-group>span{display:block;font-size:10px;letter-spacing:.14em;font-weight:800;color:var(--muted);margin-bottom:6px}
.experience-meta-grid strong{font-size:13px;color:var(--text)}
.experience-detail-group{margin:17px 0}.experience-detail-group .tags{margin-top:8px}
.experience-more{margin-top:26px}.experience-more .see-more-link{min-width:190px;justify-content:center}
.experience-works-button.btn-primary{color:#061b14}
.check-label{display:flex;align-items:center;gap:9px;flex-direction:row!important;padding-top:25px}.check-label input{width:18px!important;height:18px}
@media(max-width:700px){.experience-meta-grid{grid-template-columns:1fr}.check-label{padding-top:0}}

.course-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.course-card{display:grid;grid-template-columns:auto 1fr;gap:16px;padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:16px;transition:.25s}.course-card:hover{transform:translateY(-4px);border-color:rgba(32,227,162,.5)}.course-icon{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;background:var(--panel2);color:var(--accent);font-size:18px}.course-year{font-size:10px;letter-spacing:1.5px;color:var(--accent);font-weight:800}.course-card h3{font-size:17px;margin:5px 0}.course-card h4{font-size:11px;color:var(--muted);margin:0 0 10px}.course-card p{font-size:12px;color:var(--muted);line-height:1.7}.course-detail-group{margin-top:12px}.course-detail-group>span{display:block;font-size:9px;letter-spacing:1.4px;font-weight:800;color:var(--muted);margin-bottom:6px}.experience-works-button .toggle-icon{transition:transform .2s}.experience-works-panel{scroll-margin-top:110px}@media(max-width:700px){.course-list{grid-template-columns:1fr}.course-card{grid-template-columns:1fr}.course-icon{width:42px;height:42px}}
.course-meta{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 12px}.course-meta span{font-size:10px;font-weight:700;color:var(--muted);border:1px solid var(--line);padding:5px 8px;border-radius:999px}.empty-state{padding:28px;text-align:center;border:1px dashed var(--line);border-radius:14px;background:var(--panel2);color:var(--muted)}.empty-state i{font-size:22px;color:var(--accent);margin-bottom:10px}.empty-state p{margin:0 0 4px;color:var(--text);font-weight:700}.empty-state small{font-size:11px}

/* Education: equal visual cards and clear major/group information */
.education-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;max-width:1200px;margin:auto;align-items:stretch}
.education-list .education{max-width:none;width:100%;height:100%;box-sizing:border-box;align-items:flex-start}
.education-list .education>div:last-child{flex:1;min-width:0}
.edu-major{display:flex;flex-direction:column;gap:4px;margin:12px 0 10px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:var(--panel2)}
.edu-major span{font-size:10px;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:var(--muted)}
.edu-major strong{font-size:13px;color:var(--text)}
.course-empty,.collection-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:180px;padding:28px;border:1px dashed var(--line);border-radius:16px;color:var(--muted);text-align:center}
.course-empty i,.collection-empty i{font-size:28px;color:var(--accent)}
img[src*="take-bite-logo"]{background:#000;border-radius:10px;padding:8px;object-fit:contain}
@media (max-width:900px){.education-list{grid-template-columns:1fr}.education-list .education{height:auto}}

/* Certificate preview navigation */
.certificate-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.modal-back{margin-left:auto;flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:7px;padding:8px 12px;font-size:11px;font-weight:700;cursor:pointer}
.modal-back:hover{border-color:var(--accent);color:var(--accent)}
/* Keep native cursors usable inside form controls while custom cursor is enabled. */
@media(pointer:fine){
 body.has-custom-cursor input,body.has-custom-cursor textarea,body.has-custom-cursor select,body.has-custom-cursor [contenteditable="true"]{cursor:text!important}
 body.has-custom-cursor input[type="checkbox"],body.has-custom-cursor input[type="radio"],body.has-custom-cursor input[type="file"]{cursor:pointer!important}
}
html[data-theme="light"] .nav-menu>a{color:#4f6074}
html[data-theme="light"] .menu-toggle{color:#102033}
html[data-theme="light"] .quick-menu-panel{background:rgba(255,255,255,.98);color:#102033}
html[data-theme="light"] .quick-menu-panel>a{color:#43546a}
html[data-theme="light"] .project-detail-copy .tags span,
html[data-theme="light"] .feature-card p{color:var(--muted)}

/* ===== Central component + Phase 3 performance polish ===== */
.subpage-back{margin-left:auto;white-space:nowrap}
.nav-menu a i{display:none}
@media(max-width:900px){.subpage-back{display:none}.nav-menu a i{display:inline-block;width:16px;text-align:center}.nav-menu a{display:flex;align-items:center;gap:8px}}
section:not(.hero),main.subpage section{content-visibility:auto;contain-intrinsic-size:600px}
img{max-width:100%;height:auto}

/* Original-style shared navigation */
.nav{position:relative;gap:22px}
.nav-menu{display:flex;align-items:center;justify-content:center;gap:24px;flex:1;margin-left:24px}
.nav-menu>a{white-space:nowrap}
.nav-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);background:transparent;color:var(--text);padding:8px 10px;border-radius:7px;cursor:pointer;font-size:12px}
.theme-toggle span{display:inline}
.nav-cv{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;padding:8px 13px;border:1px solid var(--accent);border-radius:7px;color:var(--accent)!important}
.nav-menu a i{display:none}
@media(max-width:1100px){.nav-menu{gap:15px;margin-left:10px}.nav-menu>a{font-size:12px}.theme-toggle span{display:none}}
@media(max-width:900px){.nav-menu{position:absolute;top:76px;left:0;right:0;display:none;flex-direction:column;align-items:stretch;gap:0;margin:0;padding:12px 5%;background:var(--panel);border-bottom:1px solid var(--line);box-shadow:0 12px 30px rgba(0,0,0,.16)}.nav-menu.open{display:flex}.nav-menu>a{padding:11px 0;font-size:14px}.nav-menu a i{display:inline-block;width:18px;text-align:center}.menu-toggle{display:inline-flex;align-items:center;justify-content:center}.nav-actions{margin-left:auto}.nav-cv{padding:8px 10px}.nav-cv span{display:inline}.theme-toggle span{display:none}}
@media(max-width:520px){.nav-cv span{display:none}.nav-cv{padding:8px 9px}.brand-logo img{width:82px;height:auto}}

/* Shared component safety overrides */
body > header.header { display:block; visibility:visible; opacity:1; }
body > footer { display:block; visibility:visible; opacity:1; }
@media (pointer:fine) { body.has-custom-cursor { cursor:none !important; } }


/* ===== Original header format + quick navigator final polish ===== */
.header .nav{min-height:72px;display:flex;align-items:center;gap:20px}
.header .brand{margin-right:auto}
.header .theme-toggle,.header .menu-toggle{flex:0 0 auto}
.header .nav-menu{order:4}
.header .nav-cv{white-space:nowrap;display:inline-flex;align-items:center;justify-content:center}
.quick-theme-toggle{width:100%;display:flex;align-items:center;gap:10px;padding:10px;border:0;border-top:1px solid var(--line);margin-top:5px;background:transparent;color:var(--muted);font:inherit;font-size:11px;text-align:left;cursor:pointer}
.quick-theme-toggle i{width:16px;text-align:center;color:var(--accent)}
.quick-theme-toggle:hover{color:var(--accent);background:rgba(32,227,162,.08)}
@media(max-width:900px){.header .nav-menu{order:initial}.header .theme-toggle{margin-left:auto}.header .brand{margin-right:0}}

/* Final scroll/header stability */
#scrollProgress{position:fixed;top:0;left:0;height:3px;width:0;background:var(--accent);z-index:10001;pointer-events:none;transition:width .08s linear}
.hero .reveal{opacity:1;transform:none}
.header{box-shadow:0 1px 0 var(--line),0 8px 24px rgba(0,0,0,.08)}
html{scroll-padding-top:88px}

/* ===== Final stability fixes: home visibility + fixed header layering ===== */
html, body { min-height: 100%; }
body { position: relative; }
body > header.header {
  position: fixed !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  width: 100% !important;
  height: auto !important;
  z-index: 10000 !important;
  isolation: isolate;
  background: var(--bg) !important;
  background-image: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body > main { position: relative; z-index: 1; }
body > footer { position: relative; z-index: 1; }
#particles { z-index: 0 !important; }
#preloader {
  z-index: 20000 !important;
  pointer-events: none !important;
  animation: forcePreloaderExit .2s ease 1.2s forwards;
}
@keyframes forcePreloaderExit {
  to { opacity: 0 !important; visibility: hidden !important; }
}
.hero { position: relative; z-index: 1; }
.hero-grid { position: relative; z-index: 2; }
/* Keep normal page flow below the fixed header. */
main { padding-top: 0; }
.hero { scroll-margin-top: 88px; }

/* ===== Final header behavior: auto-hide on downward scroll ===== */
body > header.header{transition:transform .28s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease;}
body > header.header.header-hidden{transform:translateY(-105%);}
@media(prefers-reduced-motion:reduce){body > header.header{transition:none;}}

/* ===== Certificate preview: modal scroll isolation + responsive document fit ===== */
html.certificate-modal-open,
body.certificate-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
}
body.certificate-modal-open {
  touch-action: none;
}
.certificate-preview {
  width: min(1000px, 94vw) !important;
  max-width: 1000px;
  max-height: calc(100dvh - 32px) !important;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.certificate-preview-head {
  flex: 0 0 auto;
}
.certificate-preview-frame {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: min(72dvh, 720px) !important;
  max-height: calc(100dvh - 150px);
  overflow: hidden !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.certificate-preview-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.certificate-preview-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}
@media (max-width: 650px) {
  .modal {
    padding: 10px !important;
    align-items: center;
  }
  .certificate-preview {
    width: 96vw !important;
    max-width: 96vw;
    max-height: calc(100dvh - 20px) !important;
    border-radius: 12px;
  }
  .certificate-preview-head {
    padding: 12px 14px !important;
    gap: 10px;
  }
  .certificate-preview-head h2 {
    font-size: 17px !important;
    line-height: 1.25;
  }
  .certificate-preview-head p {
    font-size: 11px;
  }
  .certificate-preview-head .modal-back,
  .certificate-preview-head .preview-pdf-link {
    font-size: 10px;
    padding: 7px 8px;
  }
  .certificate-preview-frame {
    height: min(64dvh, 560px) !important;
    max-height: calc(100dvh - 125px);
  }
  .certificate-preview-frame img {
    max-width: 100%;
    max-height: 100%;
  }
  .certificate-preview-frame iframe {
    height: 100%;
    width: 100%;
  }
  .modal-close {
    top: 8px !important;
    right: 8px !important;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
}

/* ===== Final header/theme control ===== */
.header .theme-toggle,
.header .theme-toggle:hover,
.header .theme-toggle:focus-visible {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  margin-left: auto !important;
  margin-right: 4px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  outline-offset: 4px;
}
.header .theme-toggle:hover { transform: none !important; color: var(--accent) !important; }
.header .theme-toggle i { font-size: 15px; line-height: 1; }

/* The certificate modal must always sit above the fixed header/footer/quick navigation. */
body > header.header { z-index: 3000 !important; }
.modal.certificate-modal-layer,
#certificateModal.modal { z-index: 20000 !important; }
#certificateModal .modal-backdrop { z-index: 0; }
#certificateModal .certificate-preview { z-index: 1; }

/* Certificate preview is an isolated viewport, not a second page. */
html.certificate-modal-open,
body.certificate-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
body.certificate-modal-open { touch-action: none; }
#certificateModal .certificate-preview-frame {
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#certificateModal .certificate-preview-frame img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}
#certificateModal .certificate-preview-frame iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block !important;
}
@media (max-width: 650px) {
  #certificateModal.modal { padding: 8px !important; }
  #certificateModal .certificate-preview {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: calc(100dvh - 16px) !important;
  }
  #certificateModal .certificate-preview-head {
    padding: 12px 46px 12px 12px !important;
    min-height: 66px;
  }
  #certificateModal .certificate-preview-head h2 { font-size: 16px !important; }
  #certificateModal .certificate-preview-head p { font-size: 10px !important; }
  #certificateModal .certificate-preview-frame {
    height: calc(100dvh - 105px) !important;
    max-height: calc(100dvh - 105px) !important;
    min-height: 0 !important;
  }
  #certificateModal .certificate-preview-frame img {
    max-width: calc(100% - 10px) !important;
    max-height: calc(100% - 10px) !important;
  }
  #certificateModal .modal-close {
    top: 8px !important;
    right: 8px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 18px !important;
  }
}

/* ===== Final visual corrections ===== */
#education .education-list{grid-template-columns:1fr;max-width:1200px}
#education .education-list .education{width:100%}
#courses,#certificates,#contact{background:var(--bg)!important;border-top-color:var(--line)}
.header .theme-toggle{width:38px;height:38px;padding:0!important;border:0!important;border-radius:50%;background:transparent!important;box-shadow:none!important;outline:none!important}
.header .theme-toggle:hover,.header .theme-toggle:focus,.header .theme-toggle:focus-visible{border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;color:var(--accent)}
.modal-close{display:none!important}
.certificate-preview-head .modal-back{margin-left:auto}
@media(max-width:900px){#education .education-list{max-width:100%}}

/* ===== Final certificate + section corrections ===== */
#certificates.section-dark{background:#0b111a;}
body.light #certificates.section-dark{background:#eaf0f6;}
#contact.section{background:var(--bg);}
#certificateModal .certificate-preview{position:relative;z-index:1;}
#certificateModal .modal-back{position:relative;z-index:3;}


/* HERO PORTRAIT — final layout refinement */
.hero{overflow:hidden;}
.hero-grid{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:clamp(18px,3vw,44px);align-items:stretch;}
.hero-copy{position:relative;z-index:2;align-self:center;}
.hero-visual{position:relative;align-self:stretch;min-width:0;height:auto!important;min-height:0!important;display:flex;align-items:stretch;justify-content:center;overflow:visible;background:transparent!important;}
.hero-visual .profile{position:relative;width:100%!important;height:100%!important;min-height:0!important;margin:0;display:flex;align-items:center;justify-content:center;overflow:visible!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;transform:none!important;animation:none!important;}
.hero-visual .profile:before{display:none!important;}
.hero-visual .profile-photo{display:block;width:auto!important;height:100%!important;max-width:none!important;max-height:100%!important;aspect-ratio:auto;object-fit:contain!important;object-position:center bottom!important;position:relative;z-index:2;flex:0 0 auto;margin-left:clamp(14px,2.1vw,30px);background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;filter:drop-shadow(0 16px 32px rgba(0,132,255,.17));-webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 62%,rgba(0,0,0,.96) 72%,rgba(0,0,0,.78) 82%,rgba(0,0,0,.42) 91%,rgba(0,0,0,.16) 97%,transparent 100%)!important;mask-image:linear-gradient(to bottom,#000 0%,#000 62%,rgba(0,0,0,.96) 72%,rgba(0,0,0,.78) 82%,rgba(0,0,0,.42) 91%,rgba(0,0,0,.16) 97%,transparent 100%)!important;animation:portraitRise 1s cubic-bezier(.2,.75,.25,1) both,portraitFloat 6s ease-in-out 1s infinite;}
.hero-visual .profile-caption,.hero-visual .float-card{display:none!important;}
.hero-visual .orbit{pointer-events:none;animation:orbitPulse 7s ease-in-out infinite;}
.hero-visual .orbit-2{animation-delay:-3.5s;}
@keyframes portraitRise{from{opacity:0;transform:translateY(24px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes portraitFloat{0%,100%{translate:0 0}50%{translate:0 -6px}}
@keyframes orbitPulse{0%,100%{opacity:.35}50%{opacity:.8}}
@media(max-width:900px){.hero-visual .profile-photo{margin-left:0!important}.hero-grid{grid-template-columns:1fr;gap:18px;align-items:center}.hero-visual{height:clamp(380px,52vh,520px)!important;min-height:0!important;order:-1;margin:0 auto;width:100%;}.hero-visual .profile-photo{height:100%!important;max-height:100%!important;width:auto!important;max-width:100%!important;}.hero-copy{align-self:auto}}
@media(max-width:600px){.hero-visual{height:clamp(300px,42vh,390px)!important}.hero-grid{gap:10px}.hero-visual .profile-photo{height:100%!important;width:auto!important;max-width:100%!important}}
@media(prefers-reduced-motion:reduce){.hero-visual .profile-photo,.hero-visual .orbit,.hero-copy .eyebrow,.hero-copy h1,.hero-copy h2,.hero-copy .hero-text,.hero-copy .hero-actions,.hero-copy .hero-metrics,.hero-copy .socials{animation:none!important;transition:none!important}}

/* Advanced hero motion: restrained orbit glow, portrait depth and polished hover states */
.hero-visual .orbit{border-color:rgba(45,145,255,.20);box-shadow:0 0 24px rgba(35,130,255,.08),inset 0 0 24px rgba(35,130,255,.04);will-change:transform;}
.hero-visual .orbit-1{animation:heroOrbitSpin 26s linear infinite,heroOrbitGlow 6s ease-in-out infinite;}
.hero-visual .orbit-2{animation:heroOrbitSpinReverse 38s linear infinite,heroOrbitGlow 8s ease-in-out -2s infinite;}
.hero-visual .orbit:after{content:"";position:absolute;left:50%;top:-3px;width:6px;height:6px;border-radius:50%;background:#60a5fa;box-shadow:0 0 10px 3px rgba(59,130,246,.48);}
@keyframes heroOrbitSpin{to{transform:rotate(360deg)}}
@keyframes heroOrbitSpinReverse{to{transform:rotate(-360deg)}}
@keyframes heroOrbitGlow{0%,100%{opacity:.55}50%{opacity:1}}
.hero-visual .profile-photo{transition:filter .35s ease;will-change:transform;}
.hero-visual .profile-photo:hover{filter:drop-shadow(0 18px 38px rgba(0,132,255,.28));}
.hero-actions .btn,.socials a,.nav a{transition:transform .25s cubic-bezier(.2,.8,.2,1),box-shadow .25s ease,color .25s ease,border-color .25s ease;}
.hero-actions .btn:hover{box-shadow:0 8px 28px rgba(30,130,255,.20);}
.socials a:hover{transform:translateY(-3px) scale(1.06);}
.nav a{position:relative;}
.nav a:after{content:"";position:absolute;left:50%;right:50%;bottom:-5px;height:2px;border-radius:2px;background:var(--accent);transition:left .22s ease,right .22s ease;}
.nav a:hover:after,.nav a:focus-visible:after{left:0;right:0;}
body.light .hero-visual .orbit{border-color:rgba(37,99,235,.16);box-shadow:0 0 22px rgba(37,99,235,.045),inset 0 0 20px rgba(37,99,235,.025);}
body.light .hero-visual .orbit:after{background:#3b82f6;box-shadow:0 0 9px 2px rgba(59,130,246,.25);}
@media(prefers-reduced-motion:reduce){.hero-visual .orbit-1,.hero-visual .orbit-2,.hero-actions .btn,.socials a,.nav a,.hero-visual .profile-photo{animation:none!important;transition:none!important;transform:none!important}}

/* Mobile hero order: greeting + name, portrait, then animated designation */
@media(max-width:600px){
  .hero-grid{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;}
  .hero-copy{display:contents!important;}
  .hero-copy .availability{order:0;}
  .hero-copy .eyebrow{order:1;margin-bottom:4px;}
  .hero-copy h1{order:2;margin-bottom:8px;}
  .hero-visual{order:3!important;height:clamp(270px,38vh,340px)!important;width:100%;margin:0 auto 2px!important;}
  .hero-copy h2{order:4;margin:0 0 4px;min-height:30px;}
  .hero-subtitle{order:5;margin:0 0 14px!important;}
  .hero-copy .hero-text{order:6;}
  .hero-copy .hero-actions{order:7;}
  .hero-copy .hero-metrics{order:8;}
  .hero-copy .socials{order:9;}
}


/* Final mobile light-theme menu fix: keep the open navigation opaque and readable. */
@media(max-width:900px){
  body.light .nav-menu, html[data-theme="light"] .nav-menu{background:#fff!important;background-color:#fff!important;opacity:1!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:0 18px 40px rgba(20,40,70,.18)!important;z-index:1005!important;}
  body.light .nav-menu>a, html[data-theme="light"] .nav-menu>a{background:transparent!important;color:#425268!important;}
  body.light .nav-menu .nav-cv, html[data-theme="light"] .nav-menu .nav-cv{background:#fff!important;color:#079e72!important;border:1px solid #079e72!important;}
}
/* The editable subtitle belongs directly below the animated designation on every screen. */
.hero-subtitle{margin:8px 0 12px;color:var(--accent);font-weight:650;font-size:clamp(14px,1.45vw,17px);line-height:1.5;min-height:0;}
.hero-subtitle:empty{display:none;}
@media(max-width:900px){.hero-subtitle{margin:4px 0 10px;font-size:14px;text-align:center;}}
