/* CNK Labs global theme system */
:root{color-scheme:dark;--theme-bg:#0b1020;--theme-bg2:#0f1629;--theme-panel:#111a2e;--theme-text:#f2f5ff;--theme-muted:#98a4be;--theme-line:rgba(191,207,255,.13);--theme-card:rgba(255,255,255,.025)}
:root[data-theme="light"]{color-scheme:light;--theme-bg:#f6f8fc;--theme-bg2:#eef2f8;--theme-panel:#fff;--theme-text:#182033;--theme-muted:#596579;--theme-line:rgba(26,39,66,.14);--theme-card:#fff}
html[data-theme="light"] body{background:var(--theme-bg)!important;color:var(--theme-text)!important}
html[data-theme="light"] .site-header{background:rgba(246,248,252,.88)!important;border-color:var(--theme-line)!important}
html[data-theme="light"] .site-header a,html[data-theme="light"] .nav-links a{color:var(--theme-text)}
html[data-theme="light"] .project-card,html[data-theme="light"] .contact-card,html[data-theme="light"] .capability-grid article,html[data-theme="light"] .credential-card{background:var(--theme-card)!important;border-color:var(--theme-line)!important;color:var(--theme-text)}
html[data-theme="light"] .project-info p,html[data-theme="light"] .section-intro,html[data-theme="light"] .hero-lead,html[data-theme="light"] .about-copy p,html[data-theme="light"] .contact-copy{color:var(--theme-muted)!important}
html[data-theme="light"] .about-section,html[data-theme="light"] .capabilities-section,html[data-theme="light"] .credentials-section,html[data-theme="light"] .contact-section{background:var(--theme-bg)!important}
html[data-theme="light"] .site-footer{background:var(--theme-bg2)!important;border-color:var(--theme-line)!important;color:var(--theme-muted)}
html[data-theme="light"] .hero-video-frame{background:#e8edf5;border-color:var(--theme-line)}
html[data-theme="light"] .hero-foot{color:var(--theme-muted)}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:42px;height:36px;padding:0 12px;border:1px solid var(--theme-line,rgba(255,255,255,.2));border-radius:999px;background:transparent;color:inherit;cursor:pointer;font-size:.82rem}
.theme-toggle:hover{border-color:var(--violet,#a49bff);background:rgba(164,155,255,.1)}
@media(max-width:760px){.nav-links .theme-toggle{align-self:flex-start;margin:8px 0}}

/* V2.2 visual consistency */
html[data-theme="light"] body,html[data-theme="light"] main,html[data-theme="light"] section{color:var(--theme-text)}
html[data-theme="light"] .work-section,html[data-theme="light"] #work,html[data-theme="light"] .selected-work,html[data-theme="light"] #capabilities,html[data-theme="light"] #credentials,html[data-theme="light"] #contact,html[data-theme="light"] #about{background:var(--theme-bg)!important}
html[data-theme="light"] .project-card,html[data-theme="light"] .project-info,html[data-theme="light"] .capability-card,html[data-theme="light"] .capability-grid,html[data-theme="light"] .credential-card,html[data-theme="light"] .contact-panel,html[data-theme="light"] .contact-card,html[data-theme="light"] .about-panel{color:var(--theme-text)!important}
html[data-theme="light"] .project-info h3,html[data-theme="light"] .project-info h2,html[data-theme="light"] .capability-grid h3,html[data-theme="light"] .credential-card h3{color:var(--theme-text)!important}
html[data-theme="light"] .project-info p,html[data-theme="light"] .capability-grid p,html[data-theme="light"] .credential-card p{color:var(--theme-muted)!important}
html[data-theme="light"] .credential-image,html[data-theme="light"] .credential-card img,html[data-theme="light"] .hero-video-frame video{background:#e9edf5}
.theme-toggle{white-space:nowrap}

/* CNK Labs Visual Polish V2.3 — contrast, surfaces, rhythm */
:root{--theme-accent:#75e8dc;--theme-accent2:#a49bff}
html[data-theme="light"] .theme-toggle{color:#253047!important;border-color:#c5cedd!important;background:#fff!important;opacity:1!important;font-weight:600;box-shadow:0 2px 8px rgba(20,35,60,.06)}
html[data-theme="dark"] .theme-toggle,html:not([data-theme="light"]) .theme-toggle{color:#eaf0ff!important;border-color:rgba(191,207,255,.3)!important;background:rgba(255,255,255,.045)!important;opacity:1!important;font-weight:600}
html[data-theme="light"] .site-header .nav-links a{color:#263149!important;opacity:1!important}
html[data-theme="dark"] .site-header .nav-links a,html:not([data-theme="light"]) .site-header .nav-links a{color:#e8edff!important;opacity:1!important}
html[data-theme="light"] .work-section .project-card,html[data-theme="light"] #work .project-card{background:#fff!important;border:1px solid #dce3ee!important;box-shadow:0 12px 30px rgba(30,45,75,.07)}
html[data-theme="dark"] .work-section .project-card,html:not([data-theme="light"]) #work .project-card{background:#111a2e!important;border:1px solid rgba(191,207,255,.15)!important}
html[data-theme="dark"] .work-section .project-info,html:not([data-theme="light"]) #work .project-info{background:#111a2e!important;color:#edf2ff!important}
html[data-theme="dark"] .work-section .project-info h3,html:not([data-theme="light"]) #work .project-info h3{color:#f4f6ff!important}
html[data-theme="dark"] .work-section .project-info p,html:not([data-theme="light"]) #work .project-info p{color:#aab6d0!important}
html[data-theme="light"] .capability-grid article,html[data-theme="light"] .capability-card{background:#fff!important;border-color:#dce3ee!important;box-shadow:0 8px 22px rgba(30,45,75,.045)}
html[data-theme="light"] .hero-title,html[data-theme="light"] .hero h1{color:#172033!important}
html[data-theme="light"] .hero-title .muted,html[data-theme="light"] .hero h1 .muted{color:#68758c!important}
html[data-theme="light"] .btn,html[data-theme="light"] .button{opacity:1!important}
html[data-theme="light"] .site-footer a{color:#52617b!important}
/* balanced section spacing */
section{scroll-margin-top:90px}
.credentials-section,.about-section,.capabilities-section,.contact-section{padding-block:clamp(64px,8vw,104px)!important}
.work-section,#work,.selected-work{padding-block:clamp(48px,6vw,76px)!important}
.credential-card{overflow:hidden}
.credential-card img{object-fit:contain;max-width:100%}
@media(max-width:760px){.credentials-section,.about-section,.capabilities-section,.contact-section{padding-block:52px!important}.work-section,#work,.selected-work{padding-block:42px!important}.theme-toggle{min-height:38px}}
/* CNK Labs professional visual refinement */
.hero{background-image:linear-gradient(90deg,rgba(5,13,29,.62),rgba(5,13,29,.24)),url("/assets/images/cnk-papua-mountain-atmosphere.svg");background-size:cover;background-position:center 38%;isolation:isolate;}
.hero > .hero-grid{display:none!important;}
.hero-visual{min-width:0;}
.hero-video-frame{max-height:400px;box-shadow:0 24px 80px rgba(0,0,0,.32);}
.hero-feature-video{object-position:center;}
.project-card,.portfolio-card{border-radius:18px;}
.project-card:hover,.portfolio-card:hover{transform:translateY(-4px);}
.project-art-logo{max-width:70%;max-height:70%;object-fit:contain;}

/* Shared Papua atmosphere and portfolio hierarchy */
.portfolio-page{background-color:var(--theme-bg,#0b1020);background-image:linear-gradient(180deg,rgba(5,13,29,.25),rgba(5,13,29,.78)),url("/assets/images/cnk-papua-mountain-atmosphere.svg");background-size:cover;background-position:center top;background-attachment:fixed;}
.portfolio-hero{background:transparent;}
.portfolio-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;}
.portfolio-card-visual{height:190px;}
.portfolio-monogram{font-size:2.25rem;letter-spacing:-.05em;}
.portfolio-card-content{padding:22px;}
.project-soon{font-size:.76rem;letter-spacing:.02em;opacity:.72;}

@media(max-width:1080px){.portfolio-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:760px){
  .hero{background-position:58% center;background-size:cover;}
  .portfolio-page{background-attachment:scroll;background-position:center top;}
  .portfolio-hero{background:transparent;}
  .portfolio-grid{grid-template-columns:1fr;gap:18px;}
  .hero-video-frame{max-height:none;}
}