/* Public theme layer. Loaded after style.css so the original theme remains untouched. */

html[data-theme="editorial-light"]{
  color-scheme:light;
  --accent:#D98A00;
  --bg:#F8F7F2;
  --line:rgba(180,112,0,.34);
  --line2:rgba(23,23,23,.12);
  --muted:#6F6D68;
  --text:#171717;
  --theme-body:#ECEAE4;
  --theme-surface:#FFFFFF;
  --theme-surface-2:#F3F1EB;
  --theme-surface-deep:#F8F7F2;
  --theme-copy:#45433E;
  --theme-soft:#5F5D58;
  --theme-nav:#2D2C29;
  --theme-strong:#171717;
  --theme-subtle:#77736C;
  --theme-faint:#98938A;
  --theme-header:rgba(248,247,242,.93);
  --theme-shadow:rgba(54,45,28,.14);
  --theme-accent-rgb:217,138,0;
  --theme-grid-rgb:116,105,84;
  --theme-teal:#346F73;
}

html[data-theme="midnight-navy"]{
  color-scheme:dark;
  --accent:#C7A45D;
  --bg:#071523;
  --line:rgba(199,164,93,.38);
  --line2:rgba(226,197,138,.13);
  --muted:#AEB7BF;
  --text:#F3F0E8;
  --theme-body:#040C14;
  --theme-surface:#111C26;
  --theme-surface-2:#0C1924;
  --theme-surface-deep:#071523;
  --theme-copy:#C3C9CE;
  --theme-soft:#D0D4D6;
  --theme-nav:#D6D8D6;
  --theme-strong:#F3F0E8;
  --theme-subtle:#8F9AA4;
  --theme-faint:#687681;
  --theme-header:rgba(7,21,35,.93);
  --theme-shadow:rgba(0,0,0,.38);
  --theme-accent-rgb:199,164,93;
  --theme-grid-rgb:174,183,191;
  --theme-teal:#145E63;
}

html[data-theme]:not([data-theme="original"]) body{
  background:var(--theme-body);
  color:var(--text);
}

html[data-theme]:not([data-theme="original"]) ::selection{
  background:var(--accent);
  color:var(--theme-body);
}

html[data-theme]:not([data-theme="original"]) ::-webkit-scrollbar-thumb{
  background:var(--theme-subtle);
}

html[data-theme]:not([data-theme="original"]) .page{
  background-color:var(--bg);
  background-image:
    radial-gradient(1100px 560px at 78% 6%,rgba(var(--theme-accent-rgb),.11),transparent 62%),
    radial-gradient(820px 480px at 8% 42%,rgba(var(--theme-accent-rgb),.055),transparent 64%),
    radial-gradient(900px 520px at 88% 68%,rgba(var(--theme-accent-rgb),.05),transparent 64%),
    radial-gradient(rgba(var(--theme-grid-rgb),.075) 1px,transparent 1px);
  background-repeat:no-repeat,no-repeat,no-repeat,repeat;
  background-size:auto,auto,auto,26px 26px;
}

html[data-theme]:not([data-theme="original"]) .bg-fx-grid{
  background-image:
    linear-gradient(rgba(var(--theme-accent-rgb),.055) 1px,transparent 1px),
    linear-gradient(90deg,rgba(var(--theme-accent-rgb),.055) 1px,transparent 1px),
    linear-gradient(rgba(var(--theme-grid-rgb),.04) 1px,transparent 1px),
    linear-gradient(90deg,rgba(var(--theme-grid-rgb),.04) 1px,transparent 1px);
}

html[data-theme]:not([data-theme="original"]) .bg-fx-scan{
  background:linear-gradient(to bottom,transparent,rgba(var(--theme-accent-rgb),.075),transparent);
}

html[data-theme]:not([data-theme="original"]) .bg-fx-node{
  box-shadow:0 0 12px rgba(var(--theme-accent-rgb),.28);
}

html[data-theme]:not([data-theme="original"]) .bg-fx-glyph{
  color:rgba(var(--theme-accent-rgb),.62);
}

/* Global chrome and navigation */
html[data-theme]:not([data-theme="original"]) .ann-bar{
  background:var(--theme-surface-deep);
}

html[data-theme]:not([data-theme="original"]) .site-header{
  background:var(--theme-header);
  box-shadow:0 8px 30px var(--theme-shadow);
}

html[data-theme]:not([data-theme="original"]) .site-nav a,
html[data-theme]:not([data-theme="original"]) .nav-dd-btn,
html[data-theme]:not([data-theme="original"]) .social-btn,
html[data-theme]:not([data-theme="original"]) .filter-btn,
html[data-theme]:not([data-theme="original"]) .console-preset-btns button,
html[data-theme]:not([data-theme="original"]) .console-actions button{
  color:var(--theme-nav);
}

html[data-theme]:not([data-theme="original"]) .site-nav a:hover,
html[data-theme]:not([data-theme="original"]) .nav-dd:hover .nav-dd-btn,
html[data-theme]:not([data-theme="original"]) .nav-dd.open .nav-dd-btn,
html[data-theme]:not([data-theme="original"]) .nav-dd-panel a:hover .t,
html[data-theme]:not([data-theme="original"]) .footer-col a:hover{
  color:var(--theme-strong);
}

html[data-theme]:not([data-theme="original"]) .nav-dd-panel,
html[data-theme]:not([data-theme="original"]) .cmdk,
html[data-theme]:not([data-theme="original"]) .hero-panel,
html[data-theme]:not([data-theme="original"]) .package-card,
html[data-theme]:not([data-theme="original"]) .est-box,
html[data-theme]:not([data-theme="original"]) .console-panel{
  background:linear-gradient(180deg,color-mix(in srgb,var(--theme-surface) 96%,transparent),color-mix(in srgb,var(--theme-surface-2) 96%,transparent));
  box-shadow:0 22px 54px var(--theme-shadow);
}

html[data-theme]:not([data-theme="original"]) .nav-dd-panel a:hover,
html[data-theme]:not([data-theme="original"]) .est-opts button.active,
html[data-theme]:not([data-theme="original"]) .cmdk-item.active,
html[data-theme]:not([data-theme="original"]) .console-preset-btns button.active,
html[data-theme]:not([data-theme="original"]) .cap-stack-chips span:hover{
  background:rgba(var(--theme-accent-rgb),.09);
}

html[data-theme]:not([data-theme="original"]) .mobile-menu{
  background:var(--theme-surface-deep);
}

html[data-theme]:not([data-theme="original"]) .mobile-nav a,
html[data-theme]:not([data-theme="original"]) .nav-dd-panel a .t,
html[data-theme]:not([data-theme="original"]) .cmdk-input,
html[data-theme]:not([data-theme="original"]) .cmdk-item .lb{
  color:var(--theme-strong);
}

/* Reusable surfaces */
html[data-theme]:not([data-theme="original"]) :is(
  .showreel-placeholder,.resume-card,.exp-item,.philo-card,.work-card,.highlight-card,
  .service-card,.service-detail-card,.step-card,.testi-card,.contact-chip,.contact-panel,
  .contact-side-block,.connect-panel,.faq-card,.gallery-placeholder,.cap-dw-card,
  .cap-proc-card,.cap-stack-group,.insight-card
){
  background:var(--theme-surface);
  box-shadow:0 14px 34px color-mix(in srgb,var(--theme-shadow) 62%,transparent);
}

html[data-theme]:not([data-theme="original"]) :is(
  .form-input,.form-select,.form-textarea,.admin-quick-btn,.est-opts button,
  .hero-mobile-status,.cap-top
){
  background:var(--theme-surface-2);
  color:var(--text);
}

html[data-theme]:not([data-theme="original"]) :is(.portfolio-gallery .gallery-hero,.portfolio-gallery .gallery-thumb){
  background:var(--theme-surface-2);
}

html[data-theme]:not([data-theme="original"]) .result-band{
  background:linear-gradient(120deg,rgba(var(--theme-accent-rgb),.08),color-mix(in srgb,var(--theme-surface) 72%,transparent));
}

html[data-theme]:not([data-theme="original"]) .site-footer-big{
  background:linear-gradient(180deg,color-mix(in srgb,var(--theme-surface) 68%,transparent),var(--theme-surface-deep));
}

/* Body copy and secondary labels */
html[data-theme]:not([data-theme="original"]) :is(
  .page-header p,.section-lead,.showreel-placeholder p,.edu-desc,.resume-card .desc,
  .exp-points li,.philo-desc,.work-desc,.highlight-desc,.service-desc,.service-detail-long,
  .package-desc,.step-desc,.contact-side-text,.faq-a,.legal-body p,.hero-p,.hero-mobile .lead,
  .cap-dw-desc,.cap-proc-desc
){
  color:var(--theme-copy);
}

html[data-theme]:not([data-theme="original"]) :is(
  .ann-bar .left,.client-chip,.service-deliverables li,.package-items li,.est-summary span,
  .result-text,.testi-quote,.cap-dw-tags span,.cap-stack-chips span,.hero-panel-caps,
  .hero-panel-rows .row span:last-child,.hero-mobile-status-rows .row span
){
  color:var(--theme-soft);
}

html[data-theme]:not([data-theme="original"]) :is(
  .section-index,.lang-toggle button,.mobile-lang button,.est-disclaimer,.console-note,
  .footer-bottom,.hero-scene-tab,.hero-rail-item .l,.cmdk-item .ht,.cmdk-esc,
  .hero-panel-rows .row,.hero-panel-foot,.hero-mobile-status-rows .row
){
  color:var(--theme-subtle);
}

html[data-theme]:not([data-theme="original"]) :is(
  .ann-bar .sub,.hero-badges,.hero-mobile-badges,.metric-label,.footer-col a,.footer-line,
  .footer-bottom a
){
  color:var(--theme-subtle);
}

html[data-theme]:not([data-theme="original"]) :is(
  .est-chip,.cmdk-input::placeholder,.cmdk-foot,.console-actions .hint,.hero-scene-tab .n,
  .hero-rail-item .n
){
  color:var(--theme-faint);
}

/* Inline legacy color declarations inside public templates */
html[data-theme]:not([data-theme="original"]) .page [style*="color:#a7a7a2"],
html[data-theme]:not([data-theme="original"]) .page [style*="color:#8f8f89"]{
  color:var(--theme-copy) !important;
}

html[data-theme]:not([data-theme="original"]) .page [style*="color:#c9c9c4"],
html[data-theme]:not([data-theme="original"]) .page [style*="color:#c4c4bf"],
html[data-theme]:not([data-theme="original"]) .page [style*="color:#d6d6d1"],
html[data-theme]:not([data-theme="original"]) .page [style*="color:#e6e6e1"]{
  color:var(--theme-soft) !important;
}

html[data-theme]:not([data-theme="original"]) .page [style*="background:#0b0b0d"],
html[data-theme]:not([data-theme="original"]) .page [style*="background:#0e0e11"]{
  background:var(--theme-surface) !important;
}

/* Home visual system */
html[data-theme]:not([data-theme="original"]) .hero-desktop,
html[data-theme]:not([data-theme="original"]) .hero-mobile{
  background-image:
    radial-gradient(720px 420px at 74% 12%,rgba(var(--theme-accent-rgb),.16),transparent 62%),
    radial-gradient(560px 360px at 30% 78%,color-mix(in srgb,var(--theme-teal) 13%,transparent),transparent 65%);
}

html[data-theme]:not([data-theme="original"]) .hero-beam-1,
html[data-theme]:not([data-theme="original"]) .hero-glow-plane{
  background:radial-gradient(closest-side,rgba(var(--theme-accent-rgb),.28),transparent 70%);
}

html[data-theme]:not([data-theme="original"]) .hero-beam-2{
  background:radial-gradient(closest-side,color-mix(in srgb,var(--theme-teal) 16%,transparent),transparent 70%);
}

html[data-theme]:not([data-theme="original"]) .hero-spark-2,
html[data-theme]:not([data-theme="original"]) .hero-spark-3{
  background:var(--theme-teal);
  box-shadow:0 0 10px color-mix(in srgb,var(--theme-teal) 65%,transparent);
}

html[data-theme]:not([data-theme="original"]) .skill-bar-track,
html[data-theme]:not([data-theme="original"]) .hero-scenes-bar{
  background:var(--theme-surface-2);
}

html[data-theme]:not([data-theme="original"]) .skill-bar-fill{
  background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 56%,#fff));
}

/* Light theme details */
html[data-theme="editorial-light"] .site-header .brand-mark img,
html[data-theme="editorial-light"] .site-footer-big .brand-mark img{
  filter:invert(1);
}

html[data-theme="editorial-light"] .work-tag-cat,
html[data-theme="editorial-light"] .work-tag-docs,
html[data-theme="editorial-light"] .gallery-nav,
html[data-theme="editorial-light"] .gallery-counter{
  color:#fff;
  background:rgba(23,23,23,.76);
}

html[data-theme="editorial-light"] .cmdk-overlay{
  background:rgba(30,28,24,.42);
}

html[data-theme="editorial-light"] .footer-brand-col .brand > div:last-child > div:first-child{
  color:var(--theme-strong) !important;
}

html[data-theme="editorial-light"] .nav-cta:hover,
html[data-theme="editorial-light"] .btn-primary,
html[data-theme="editorial-light"] .filter-btn.active,
html[data-theme="editorial-light"] .mobile-cta,
html[data-theme="editorial-light"] .package-cta:hover{
  color:#171717;
}

/* Midnight Navy keeps teal subtle and functional. */
html[data-theme="midnight-navy"] .hero-panel-top .live,
html[data-theme="midnight-navy"] .hero-panel-foot .ok,
html[data-theme="midnight-navy"] .console-stage-top .live,
html[data-theme="midnight-navy"] .footer-status{
  color:#5BA8A5;
}

html[data-theme="midnight-navy"] .hero-panel-top .live .d,
html[data-theme="midnight-navy"] .console-stage-top .live .d,
html[data-theme="midnight-navy"] .footer-status .d{
  background:#5BA8A5;
}

/* Admin theme selector */
.theme-picker-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}

.theme-option{
  position:relative;
  display:flex;
  min-height:178px;
  flex-direction:column;
  padding:18px;
  border:1px solid var(--line2);
  background:#0E0E11;
  cursor:pointer;
  transition:border-color .18s ease,transform .18s ease,background .18s ease;
}

.theme-option:hover{
  border-color:var(--line);
  transform:translateY(-2px);
}

.theme-option.active{
  border-color:var(--accent);
  background:rgba(242,168,28,.055);
}

.theme-option input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
  opacity:0;
  cursor:pointer;
}

.theme-option:has(input:focus-visible){
  outline:2px solid var(--accent);
  outline-offset:3px;
}

.theme-option-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.theme-option-name{
  font-family:'Oswald',sans-serif;
  font-size:17px;
  font-weight:600;
  letter-spacing:.035em;
  text-transform:uppercase;
}

.theme-option-check{
  display:grid;
  width:24px;
  height:24px;
  place-items:center;
  border:1px solid var(--line2);
  color:transparent;
  font:700 12px/1 'JetBrains Mono',monospace;
}

.theme-option.active .theme-option-check{
  border-color:var(--accent);
  background:var(--accent);
  color:#050506;
}

.theme-option-colors{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  height:42px;
  margin-top:18px;
  border:1px solid rgba(255,255,255,.09);
}

.theme-option-colors span{ background:var(--swatch); }

.theme-option-description{
  margin-top:14px;
  color:var(--muted);
  font-family:'Archivo',sans-serif;
  font-size:12px;
  line-height:1.55;
}

.settings-subheading{
  margin-top:28px;
  padding-top:24px;
  border-top:1px solid var(--line2);
}

@media (max-width:980px){
  .theme-picker-grid{ grid-template-columns:1fr; }
  .theme-option{ min-height:0; }
}

@media (prefers-reduced-motion:reduce){
  .theme-option{ transition:none; }
}
