/* ══════════════════════════════════════
   LIGHT MODE — COMPLETE OVERRIDES
   ══════════════════════════════════════ */

[data-theme="light"] {
  --bg:        #f5f3ef;
  --bg-soft:   #eceae4;
  --accent:    #9a7b55;
  --accent2:   #d4c4ab;
  --text:      #1a1f26;
  --text-muted:#4a5058;
  --border:    rgba(0,0,0,0.08);
}

/* ═══════════════════════════════════
   GLOBAL CATCH-ALL: force all white/light
   text to become dark on light bg
   ═══════════════════════════════════ */
[data-theme="light"] body {
  background-color: #f5f3ef;
  color: #2a2f36;
}

/* Any element with color #fff or #ffffff → dark */
[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3,
[data-theme="light"] h4, [data-theme="light"] h5, [data-theme="light"] h6 {
  color: #1a1f26 !important;
}

/* Paragraphs and list items */
[data-theme="light"] p,
[data-theme="light"] li,
[data-theme="light"] span,
[data-theme="light"] div {
  color: #3a3f46;
}

/* Strong/bold text */
[data-theme="light"] strong, [data-theme="light"] b {
  color: #1a1f26 !important;
}

/* Links - keep accent-colored */
[data-theme="light"] a {
  color: var(--accent);
}

/* ═══ NAVBAR ═══ */
[data-theme="light"] nav {
  background-color: #f5f3ef;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
[data-theme="light"] .nav-logo,
[data-theme="light"] .nav-logo .first,
[data-theme="light"] .nav-logo .last {
  color: #1a1f26 !important;
}
[data-theme="light"] .nav-links a {
  color: #4a5058 !important;
}
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
  color: var(--accent) !important;
}

/* ═══ LANG SWITCHER ═══ */
[data-theme="light"] .lang-switcher a {
  color: rgba(0,0,0,0.35) !important;
}
[data-theme="light"] .lang-switcher a:hover {
  color: var(--accent) !important;
}
[data-theme="light"] .lang-switcher a.active {
  color: var(--accent) !important;
  background: rgba(154,123,85,0.1) !important;
}

/* ═══ HERO (index) ═══ */
[data-theme="light"] .hero-content h1 {
  color: #1a1f26 !important;
}
[data-theme="light"] .hero-content h1 .accent-word {
  color: var(--accent) !important;
}
[data-theme="light"] .hero-content .subheading {
  color: #4a5058 !important;
}
[data-theme="light"] .photo-main {
  border-color: #ddd9d2 !important;
  box-shadow: 0 36px 90px rgba(0,0,0,0.12) !important;
}
[data-theme="light"] .btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
}
[data-theme="light"] .btn-outline {
  color: #1a1f26 !important;
  border-color: rgba(0,0,0,0.2) !important;
}
[data-theme="light"] .btn-outline:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* ═══ ABOUT ═══ */
[data-theme="light"] .about {
  background-color: #eceae4 !important;
}
[data-theme="light"] .about-label {
  color: var(--accent) !important;
}
[data-theme="light"] .about-label::before {
  background: var(--accent) !important;
}
[data-theme="light"] .about-header h2 {
  color: #1a1f26 !important;
}
[data-theme="light"] .about-header h2 .accent-word {
  color: var(--accent) !important;
}
[data-theme="light"] .about-text p {
  color: #4a5058 !important;
}
[data-theme="light"] .about-text p strong {
  color: #1a1f26 !important;
}
[data-theme="light"] .about-chart-col svg line {
  stroke: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .about-chart-col svg text {
  fill: rgba(0,0,0,0.4) !important;
}
[data-theme="light"] .about-chart-col svg rect[fill="rgba(215,195,163,0.12)"] {
  fill: rgba(154,123,85,0.12) !important;
}

/* ═══ PROJECTS ═══ */
[data-theme="light"] .projects {
  background-color: #eceae4 !important;
  border-top: 1px solid rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .projects-label {
  color: var(--accent) !important;
}
[data-theme="light"] .projects-label::before {
  background: var(--accent) !important;
}
[data-theme="light"] .projects-header h2 {
  color: #1a1f26 !important;
}
[data-theme="light"] .projects-grid {
  border-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .proj-item:first-child {
  border-right-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .proj-item:hover {
  background: rgba(0,0,0,0.025) !important;
}
[data-theme="light"] .proj-item__type {
  color: var(--accent) !important;
}
[data-theme="light"] .proj-item__name {
  color: #1a1f26 !important;
}
[data-theme="light"] .proj-item__line {
  color: #5a6068 !important;
}
[data-theme="light"] .proj-item__desc {
  color: #5a6068 !important;
}
[data-theme="light"] .proj-item__cap {
  color: #5a6068 !important;
  border-color: rgba(0,0,0,0.15) !important;
}
[data-theme="light"] .proj-item__footer {
  border-top-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .proj-item__link {
  color: var(--accent) !important;
}
[data-theme="light"] .proj-item__status {
  color: rgba(0,0,0,0.4) !important;
}
[data-theme="light"] .proj-item__status-dot {
  background: #22c55e !important;
  box-shadow: 0 0 5px #22c55e !important;
}

/* ═══ FOOTER ═══ */
[data-theme="light"] .site-footer {
  background-color: #e2e0da !important;
  border-top: 1px solid rgba(0,0,0,0.06) !important;
}
[data-theme="light"] footer[style] {
  background-color: #e2e0da !important;
  border-top-color: rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .footer-logo .first {
  color: #1a1f26 !important;
}
[data-theme="light"] .footer-logo .last {
  color: var(--accent) !important;
}
[data-theme="light"] .footer-desc {
  color: #5a6068 !important;
}
[data-theme="light"] .footer-bottom {
  border-top: 1px solid rgba(0,0,0,0.06) !important;
  color: rgba(0,0,0,0.4) !important;
}
[data-theme="light"] .footer-bottom p {
  color: rgba(0,0,0,0.4) !important;
}
[data-theme="light"] .social-link {
  color: #4a5058 !important;
  background: rgba(0,0,0,0.03) !important;
  border-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .social-link span {
  color: #4a5058 !important;
}
[data-theme="light"] .social-link:hover {
  color: #1a1f26 !important;
  background: rgba(0,0,0,0.06) !important;
  border-color: rgba(0,0,0,0.18) !important;
}
[data-theme="light"] .social-link:hover span {
  color: #1a1f26 !important;
}

/* ═══ STUDY CASES INDEX ═══ */
[data-theme="light"] .stories-page {
  background: #f5f3ef !important;
}
[data-theme="light"] .stories-hero {
  border-bottom-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .stories-hero__eyebrow {
  color: var(--accent) !important;
}
[data-theme="light"] .stories-hero__title {
  color: #1a1f26 !important;
}
[data-theme="light"] .stories-hero__title em {
  color: rgba(0,0,0,0.3) !important;
}
[data-theme="light"] .stories-hero__sub {
  color: #5a6068 !important;
}
[data-theme="light"] .stories-table__head {
  border-bottom-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .stories-table__head span {
  color: rgba(0,0,0,0.35) !important;
}
[data-theme="light"] .story-row {
  border-bottom-color: rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .story-row::before {
  background: rgba(0,0,0,0.02) !important;
}
[data-theme="light"] .story-row__num {
  color: rgba(0,0,0,0.2) !important;
}
[data-theme="light"] .story-row__industry {
  color: var(--accent) !important;
}
[data-theme="light"] .story-row__brand {
  color: #1a1f26 !important;
}
[data-theme="light"] .story-row__tagline {
  color: #5a6068 !important;
}
[data-theme="light"] .story-row__result {
  color: var(--accent) !important;
}
[data-theme="light"] .story-row__period {
  color: rgba(0,0,0,0.35) !important;
}
[data-theme="light"] .story-row__service-tag {
  color: #5a6068 !important;
  border-color: rgba(0,0,0,0.15) !important;
}
[data-theme="light"] .story-row__cta span {
  color: rgba(0,0,0,0.4) !important;
}
[data-theme="light"] .story-row__arrow {
  color: var(--accent) !important;
}

/* ═══ STUDY CASE DETAIL ═══ */
[data-theme="light"] .cs-back a {
  color: rgba(0,0,0,0.45) !important;
}
[data-theme="light"] .cs-back span {
  color: rgba(0,0,0,0.2) !important;
}
[data-theme="light"] .cs-back .current {
  color: rgba(0,0,0,0.6) !important;
}
[data-theme="light"] .cs-hero {
  background: #eceae4 !important;
  border-bottom-color: rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .cs-hero h1 {
  color: #1a1f26 !important;
}
[data-theme="light"] .cs-hero h1 span {
  color: var(--accent) !important;
}
[data-theme="light"] .cs-hero__badge {
  color: var(--accent) !important;
  background: rgba(154,123,85,0.1) !important;
  border-color: rgba(154,123,85,0.25) !important;
}
[data-theme="light"] .cs-hero__period {
  color: rgba(0,0,0,0.45) !important;
}
[data-theme="light"] .cs-hero__desc {
  color: #4a5058 !important;
}
[data-theme="light"] .cs-hero__svg {
  background: rgba(154,123,85,0.06) !important;
  border-color: rgba(154,123,85,0.15) !important;
}
[data-theme="light"] .cs-banner {
  background: rgba(154,123,85,0.06) !important;
  border-top-color: rgba(154,123,85,0.12) !important;
  border-bottom-color: rgba(154,123,85,0.12) !important;
}
[data-theme="light"] .cs-banner__from {
  color: rgba(0,0,0,0.4) !important;
}
[data-theme="light"] .cs-banner__to {
  color: var(--accent) !important;
}
[data-theme="light"] .cs-banner__label {
  color: #5a6068 !important;
}
[data-theme="light"] .cs-section {
  background: #f5f3ef !important;
}
[data-theme="light"] .cs-section--alt {
  background: #eceae4 !important;
}
[data-theme="light"] .cs-section--dark {
  background: #e2e0da !important;
}
[data-theme="light"] .cs-section h2 {
  color: #1a1f26 !important;
}
[data-theme="light"] .cs-section__sub {
  color: #5a6068 !important;
}
[data-theme="light"] .cs-challenge {
  border-color: rgba(0,0,0,0.1) !important;
  background: rgba(0,0,0,0.02) !important;
}
[data-theme="light"] .cs-challenge--hl {
  background: rgba(154,123,85,0.06) !important;
  border-color: rgba(154,123,85,0.18) !important;
}
[data-theme="light"] .cs-challenge p {
  color: #4a5058 !important;
}
[data-theme="light"] .cs-challenge__icon {
  background: rgba(154,123,85,0.15) !important;
}
[data-theme="light"] .cs-approach-card {
  background: rgba(0,0,0,0.02) !important;
  border-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .cs-approach-card h3 {
  color: #1a1f26 !important;
}
[data-theme="light"] .cs-approach-card li {
  color: #4a5058 !important;
}
[data-theme="light"] .cs-approach-card__num {
  background: rgba(154,123,85,0.12) !important;
  color: var(--accent) !important;
}
[data-theme="light"] .cs-result {
  background: rgba(0,0,0,0.03) !important;
}
[data-theme="light"] .cs-result--hl {
  background: rgba(154,123,85,0.06) !important;
  border-color: rgba(154,123,85,0.18) !important;
}
[data-theme="light"] .cs-result__val {
  color: var(--accent) !important;
}
[data-theme="light"] .cs-result__label {
  color: #5a6068 !important;
}
[data-theme="light"] .cs-chart-wrap {
  background: rgba(0,0,0,0.02) !important;
  border-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .cs-chart-title {
  color: rgba(0,0,0,0.4) !important;
}
[data-theme="light"] .cs-back-link {
  background: #eceae4 !important;
}
[data-theme="light"] .cs-back-link a {
  color: var(--accent) !important;
}
/* Logo invert fix for light mode */
[data-theme="light"] img[style*="filter:brightness(0) invert(1)"] {
  filter: none !important;
}

/* Woodtech: Dual brand cards */
[data-theme="light"] .cs-dual-card {
  background: rgba(154,123,85,0.04) !important;
  border-color: rgba(154,123,85,0.12) !important;
}
[data-theme="light"] .cs-dual-card h4 {
  color: #1a1f26 !important;
}
[data-theme="light"] .cs-dual-card li {
  color: #4a5058 !important;
}

/* Martin-valen: Market cards */
[data-theme="light"] .cs-market {
  background: rgba(154,123,85,0.04) !important;
  border-color: rgba(154,123,85,0.12) !important;
}
[data-theme="light"] .cs-market__country {
  color: #1a1f26 !important;
}
[data-theme="light"] .cs-market__lang {
  color: #5a6068 !important;
}
[data-theme="light"] .cs-market__status {
  color: var(--accent) !important;
  background: rgba(154,123,85,0.1) !important;
}

/* SVG icon color in challenge/result cards */
[data-theme="light"] .cs-challenge__icon {
  color: var(--accent) !important;
  background: rgba(154,123,85,0.12) !important;
}
[data-theme="light"] .cs-challenge--hl .cs-challenge__icon {
  background: rgba(154,123,85,0.22) !important;
}
[data-theme="light"] .cs-result__icon {
  color: var(--accent) !important;
  background: rgba(154,123,85,0.1) !important;
}

/* SVG chart lines and text in robotalp */
[data-theme="light"] .cs-chart-wrap svg line {
  stroke: rgba(0,0,0,0.07) !important;
}
[data-theme="light"] .cs-chart-wrap svg text {
  fill: rgba(0,0,0,0.35) !important;
}

/* ═══ BLOG INDEX ═══ */
[data-theme="light"] .blog-index__title {
  color: #1a1f26 !important;
}
[data-theme="light"] .blog-index__label {
  color: rgba(0,0,0,0.35) !important;
}
[data-theme="light"] .blog-card {
  border-color: rgba(0,0,0,0.08) !important;
  background: #fff !important;
}
[data-theme="light"] .blog-card:hover {
  border-color: rgba(0,0,0,0.18) !important;
}
[data-theme="light"] .blog-card__image-wrap {
  background: rgba(0,0,0,0.03) !important;
  border-bottom-color: rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .blog-card__tag {
  color: var(--accent) !important;
}
[data-theme="light"] .blog-card__title {
  color: #1a1f26 !important;
}
[data-theme="light"] .blog-card__excerpt {
  color: #5a6068 !important;
}
[data-theme="light"] .blog-card__date,
[data-theme="light"] .blog-card__read {
  color: rgba(0,0,0,0.35) !important;
}

/* ═══ BLOG POST — INLINE STYLE OVERRIDES ═══ */
/* These use !important to override inline styles */

/* Backgrounds */
[data-theme="light"] section[style*="background:#1a1f26"],
[data-theme="light"] div[style*="background:#1a1f26"] {
  background: #eceae4 !important;
}

/* All headings with inline color:#fff */
[data-theme="light"] *[style*="color:#fff"] {
  color: #1a1f26 !important;
}

/* Muted text */
[data-theme="light"] *[style*="color:#d4d8de"] {
  color: #4a5058 !important;
}

/* Accent links */
[data-theme="light"] *[style*="color:#d7c3a3"] {
  color: var(--accent) !important;
}

/* Borders */
[data-theme="light"] *[style*="border:1px solid rgba(255,255,255"] {
  border-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] *[style*="border-bottom:1px solid rgba(255,255,255"] {
  border-bottom-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] *[style*="border-top:1px solid rgba(255,255,255"] {
  border-top-color: rgba(0,0,0,0.08) !important;
}

/* Card backgrounds (step cards etc) */
[data-theme="light"] *[style*="background:rgba(255,255,255,0.03)"] {
  background: rgba(0,0,0,0.03) !important;
}

/* Callout boxes */
[data-theme="light"] *[style*="background:rgba(215,195,163"] {
  background: rgba(154,123,85,0.06) !important;
}
[data-theme="light"] *[style*="border:1px solid rgba(215,195,163"] {
  border-color: rgba(154,123,85,0.18) !important;
}
[data-theme="light"] *[style*="border-left:3px solid #d7c3a3"] {
  border-left-color: var(--accent) !important;
}

/* Inline white-alpha colors → black-alpha */
[data-theme="light"] *[style*="color:rgba(255,255,255,0."] {
  color: rgba(0,0,0,0.5) !important;
}

/* Badge overrides */
[data-theme="light"] span[style*="color:#d7c3a3"][style*="background:rgba(215,195,163"] {
  color: var(--accent) !important;
  background: rgba(154,123,85,0.1) !important;
  border-color: rgba(154,123,85,0.25) !important;
}

/* HR lines */
[data-theme="light"] hr[style] {
  border-top-color: rgba(0,0,0,0.08) !important;
}

/* Footer in blog posts */
[data-theme="light"] footer[style*="background-color:#12151a"] {
  background-color: #e2e0da !important;
}

/* ═══ THEME TOGGLE ═══ */
.theme-toggle {
  background: none;
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 0.45rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  width: 36px;
  height: 36px;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="light"] .theme-toggle {
  border-color: rgba(0,0,0,0.15);
  color: #4a5058;
}
[data-theme="light"] .theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
