/* Light-by-default theme, dark-mode preservation, and recruiter-v3 layout additions */

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fb;
  --bg-2: #eef2f7;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --text: #111827;
  --muted: #5e6a7d;
  --line: rgba(17, 24, 39, .10);
  --line-strong: rgba(17, 24, 39, .18);
  --accent: #0b6f8a;
  --accent-2: #08765f;
  --warm: #647c0a;
}

html[data-theme="dark"] { color-scheme: dark; }

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 15% 10%, rgba(59, 130, 246, .08), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(16, 185, 129, .07), transparent 24%),
    var(--bg);
}

html[data-theme="light"] .noise { opacity: .012; }
html[data-theme="light"] .site-header { background: rgba(246, 248, 251, .86); }
html[data-theme="light"] .site-nav { color: #4b5563; }
html[data-theme="light"] .site-nav a:hover { color: #111827; }
html[data-theme="light"] .menu-button span { background: #111827; }
html[data-theme="light"] .brand-mark {
  background: linear-gradient(135deg, rgba(11, 111, 138, .10), rgba(8, 118, 95, .05));
}
html[data-theme="light"] .hero-lede,
html[data-theme="light"] .project-copy > p,
html[data-theme="light"] .project-card > p,
html[data-theme="light"] .time-content > p:not(.role-org) { color: #4b5563; }
html[data-theme="light"] .button:hover { border-color: rgba(17, 24, 39, .30); }
html[data-theme="light"] .button.primary { background: #111827; color: #ffffff; border-color: #111827; }
html[data-theme="light"] .button.secondary { background: rgba(17, 24, 39, .025); }
html[data-theme="light"] .recruiter-proof {
  background: linear-gradient(155deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .82));
  box-shadow: 0 30px 70px rgba(15, 23, 42, .10);
}
html[data-theme="light"] .proof-stack span { color: #475569; }
html[data-theme="light"] .signal-strip,
html[data-theme="light"] .section-alt { background: rgba(15, 23, 42, .018); }
html[data-theme="light"] .project-feature {
  background: linear-gradient(145deg, rgba(11, 111, 138, .055), rgba(255, 255, 255, .88));
}
html[data-theme="light"] .project-card,
html[data-theme="light"] .supporting-work,
html[data-theme="light"] .expertise-grid article,
html[data-theme="light"] .credentials div { background: rgba(255, 255, 255, .64); }
html[data-theme="light"] .project-points { color: #374151; }
html[data-theme="light"] .tags span { background: rgba(15, 23, 42, .025); color: #475569; }
html[data-theme="light"] .project-card:hover { border-color: rgba(11, 111, 138, .32); }
html[data-theme="light"] .contact-box {
  background: linear-gradient(120deg, rgba(11, 111, 138, .07), rgba(8, 118, 95, .035));
}

/* Technical diagrams intentionally keep their dark-console treatment in light mode. */
html[data-theme="light"] .system-board { color: #f3f6fb; }
html[data-theme="light"] .system-board .system-title { color: #9ca8bb; }
html[data-theme="light"] .system-board .sys-block { color: #f3f6fb; }
html[data-theme="light"] .system-board .sys-arrow { color: #8be9fd; }
html[data-theme="light"] .system-board .mini-readouts { color: #7cf6c5; }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .025);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: block; }
html[data-theme="light"] .theme-toggle { background: rgba(255, 255, 255, .68); }

/* Deeper experience section */
.recruiter-timeline .time-content { min-width: 0; }
.role-summary { margin: 14px 0 18px; max-width: 840px; }
.experience-points {
  margin: 0;
  padding-left: 19px;
  max-width: 900px;
  color: var(--text);
}
.experience-points li { margin: 10px 0; padding-left: 4px; }
.experience-points li::marker { color: var(--accent-2); }
.role-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}
.role-stack span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 10px;
}

/* Projects are distinct from employment history. */
.project-support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 26px;
}
.project-support-card { min-height: 405px; }
.project-support-card .project-points { font-size: 14px; }
.project-support-card .tags { margin-top: auto; padding-top: 20px; }
.project-support-card .pcb-art + .tags { margin-top: 20px; padding-top: 0; }
.card-status { color: var(--accent-2); }

html[data-theme="light"] .experience-points { color: #374151; }
html[data-theme="light"] .role-stack span { background: rgba(255,255,255,.55); }

/* LinkedIn profile badge in Contact. Keep only the actual card visible. */
.linkedin-profile-badge {
  margin-top: 4px;
  width: 330px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: transparent !important;
}
.linkedin-badge-variant { display: none; background: transparent !important; }
html[data-theme="light"] .linkedin-badge-light { display: block; }
html[data-theme="dark"] .linkedin-badge-dark { display: block; }

.linkedin-profile-badge .badge-base,
.linkedin-profile-badge .LI-profile-badge {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* LinkedIn renders this fallback name link outside the card. We already expose the profile inside the badge. */
.linkedin-profile-badge .badge-base__link,
.linkedin-profile-badge .LI-simple-link {
  display: none !important;
}

/* Prevent the badge wrapper's default light canvas from leaking around the dark card. */
html[data-theme="dark"] .linkedin-profile-badge,
html[data-theme="dark"] .linkedin-profile-badge .badge-base,
html[data-theme="dark"] .linkedin-profile-badge .LI-profile-badge {
  background: transparent !important;
}

.linkedin-profile-badge .profile-badge {
  margin: 0 !important;
  max-width: 100% !important;
  box-shadow: none !important;
}
.contact-actions { min-width: 330px; }

@media (max-width: 980px) {
  .project-support-grid { grid-template-columns: 1fr 1fr; }
  .project-support-grid > article:last-child { grid-column: 1 / -1; min-height: 330px; }
}

@media (max-width: 760px) {
  .nav-actions { gap: 7px; }
  html[data-theme="light"] .site-nav { background: rgba(246, 248, 251, .985); }
  .theme-toggle { width: 38px; height: 38px; }
  .contact-actions { min-width: 0; width: 100%; }
  .linkedin-profile-badge { width: 100%; max-width: 330px; }
}

@media (max-width: 680px) {
  .project-support-grid { grid-template-columns: 1fr; }
  .project-support-grid > article:last-child { grid-column: auto; min-height: 405px; }
}