:root {
  color-scheme: dark;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(121, 190, 231, .22);
  border-radius: 999px;
  color: #ddecf6;
  background: rgba(11, 28, 45, .72);
  font-size: 12.5px;
  font-weight: 720;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.theme-toggle:hover {
  color: #ffffff;
  border-color: rgba(103, 213, 255, .48);
  background: rgba(18, 43, 67, .92);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(103, 213, 255, .30);
  outline-offset: 3px;
}

.theme-icon {
  font-size: 15px;
  line-height: 1;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f9fc;
  --bg-soft: #eaf2f7;
  --panel: rgba(255, 255, 255, .86);
  --panel-strong: #ffffff;
  --border: rgba(37, 72, 98, .17);
  --border-strong: rgba(0, 118, 168, .42);
  --text: #102536;
  --muted: #496477;
  --faint: #647c8d;
  --cyan: #007eae;
  --cyan-strong: #0076a8;
  --green: #087b59;
  --amber: #9a5c00;
  --blue: #405dc4;
  --orange: #b64b2f;
  --violet: #6550a8;
  --shadow: 0 22px 60px rgba(27, 63, 87, .14);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 8% 7%, rgba(0, 151, 211, .12), transparent 30rem),
    radial-gradient(circle at 92% 10%, rgba(12, 153, 108, .09), transparent 29rem),
    radial-gradient(circle at 78% 48%, rgba(84, 105, 194, .065), transparent 32rem),
    linear-gradient(180deg, #f8fbfd 0%, #edf4f8 48%, #f7fafc 100%);
}

:root[data-theme="light"] .ambient-one { opacity: .08; }
:root[data-theme="light"] .ambient-two { opacity: .07; }

:root[data-theme="light"] .site-header {
  background: rgba(248, 251, 253, .90);
  border-bottom-color: rgba(39, 90, 120, .18);
  box-shadow: 0 8px 30px rgba(28, 63, 85, .06);
}

:root[data-theme="light"] .brand small,
:root[data-theme="light"] .nav-links a {
  color: #476377;
}

:root[data-theme="light"] .nav-links .linkedin-link,
:root[data-theme="light"] .footer-links a:first-child {
  color: #007ca9;
}

:root[data-theme="light"] .nav-links .contact-link {
  color: #0d3348;
  border-color: rgba(0, 126, 174, .30);
  background: linear-gradient(135deg, rgba(0,126,174,.08), rgba(8,123,89,.065));
}

:root[data-theme="light"] .theme-toggle {
  color: #17394d;
  border-color: rgba(34, 91, 123, .24);
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 7px 20px rgba(36, 72, 94, .08);
}

:root[data-theme="light"] .theme-toggle:hover {
  color: #071f2d;
  border-color: rgba(0, 126, 174, .45);
  background: #ffffff;
}

:root[data-theme="light"] .hero-enterprise {
  color: #102536;
}

:root[data-theme="light"] .hero-cloud {
  background-image: linear-gradient(90deg, #102536 0%, #007ca9 58%, #405dc4 100%);
}

:root[data-theme="light"] .hero-resilience {
  background-image: linear-gradient(90deg, #007ca9 0%, #087b59 72%, #176746 100%);
}

:root[data-theme="light"] .hero-text,
:root[data-theme="light"] .section-heading > p:last-child,
:root[data-theme="light"] .contact-intro > p:not(.eyebrow) {
  color: #3e5b6e;
}

:root[data-theme="light"] .hero-text strong,
:root[data-theme="light"] .owner-name {
  color: #102f43;
}

:root[data-theme="light"] .owner-prefix { color: #587184; }

:root[data-theme="light"] .button.secondary,
:root[data-theme="light"] .platform-strip span {
  color: #29495d;
  border-color: rgba(39, 85, 113, .20);
  background: rgba(255, 255, 255, .78);
}

:root[data-theme="light"] .hero-architecture {
  border-color: rgba(0, 126, 174, .27);
  background:
    radial-gradient(circle at 78% 5%, rgba(64,93,196,.10), transparent 17rem),
    linear-gradient(155deg, rgba(255,255,255,.97), rgba(233,243,249,.96));
  box-shadow: 0 30px 80px rgba(33, 75, 101, .16), inset 0 1px 0 #ffffff;
}

:root[data-theme="light"] .arch-header strong,
:root[data-theme="light"] .arch-focus p,
:root[data-theme="light"] .stats span,
:root[data-theme="light"] .card ul {
  color: #456477;
}

:root[data-theme="light"] .arch-focus {
  background: linear-gradient(135deg, rgba(183,112,0,.08), rgba(0,126,174,.06));
}

:root[data-theme="light"] .arch-node,
:root[data-theme="light"] .arch-control {
  background: rgba(255, 255, 255, .74);
}

:root[data-theme="light"] .arch-control strong,
:root[data-theme="light"] .next-action strong,
:root[data-theme="light"] .safety-grid strong {
  color: #17364a;
}

:root[data-theme="light"] .stats,
:root[data-theme="light"] .track-tabs {
  background: linear-gradient(120deg, rgba(255,255,255,.90), rgba(232,242,248,.84));
  box-shadow: 0 18px 48px rgba(31, 72, 98, .08);
}

:root[data-theme="light"] .track-tab:hover {
  background: rgba(0, 126, 174, .06);
}

:root[data-theme="light"] .command-panel {
  border-color: rgba(0, 126, 174, .22);
  background:
    radial-gradient(circle at 95% 0%, rgba(0,126,174,.07), transparent 23rem),
    linear-gradient(155deg, rgba(255,255,255,.98), rgba(235,244,249,.94));
  box-shadow: 0 26px 68px rgba(31, 72, 98, .12);
}

:root[data-theme="light"] .next-action {
  background: linear-gradient(145deg, rgba(183,112,0,.07), rgba(8,123,89,.06));
}

:root[data-theme="light"] .progress {
  background: rgba(27, 67, 92, .11);
}

:root[data-theme="light"] .card {
  border-color: rgba(49, 89, 116, .18);
  background: linear-gradient(160deg, rgba(255,255,255,.97), rgba(235,244,249,.88));
  box-shadow: 0 18px 48px rgba(31, 72, 98, .09);
}

:root[data-theme="light"] .card:hover {
  border-color: rgba(0, 126, 174, .34);
  box-shadow: 0 28px 64px rgba(31, 72, 98, .15);
}

:root[data-theme="light"] .card p,
:root[data-theme="light"] .cloud-grid p,
:root[data-theme="light"] .safety-grid p {
  color: #496679;
}

:root[data-theme="light"] .linux-lab-section::before {
  opacity: .60;
}

/* The command simulator remains intentionally dark in both themes. */
:root[data-theme="light"] .linux-console-card {
  --text: #edf6ff;
  --muted: #9eb0c3;
  --faint: #6e8298;
  --cyan: #67d5ff;
  --green: #71e4b6;
  --amber: #ffd479;
  --border: rgba(147, 181, 211, .16);
  color: #edf6ff;
}

:root[data-theme="light"] .cloud-section {
  background:
    radial-gradient(circle at 18% 18%, rgba(183,112,0,.07), transparent 25rem),
    radial-gradient(circle at 77% 12%, rgba(0,126,174,.10), transparent 30rem),
    linear-gradient(180deg, rgba(232,242,248,.82), rgba(247,250,252,.94));
}

:root[data-theme="light"] .cloud-grid article,
:root[data-theme="light"] .cloud-flow,
:root[data-theme="light"] .safety-grid article {
  background: rgba(255, 255, 255, .78);
  border-color: rgba(49, 89, 116, .18);
  box-shadow: 0 15px 38px rgba(31, 72, 98, .07);
}

:root[data-theme="light"] .contact-section {
  background:
    radial-gradient(circle at 10% 18%, rgba(0,126,174,.10), transparent 28rem),
    radial-gradient(circle at 88% 72%, rgba(8,123,89,.08), transparent 27rem),
    linear-gradient(145deg, rgba(232,243,249,.98), rgba(248,251,253,.98));
  border-color: rgba(42, 87, 114, .16);
}

:root[data-theme="light"] .contact-trust span {
  color: #496679;
  border-color: rgba(49, 89, 116, .18);
  background: rgba(255, 255, 255, .72);
}

:root[data-theme="light"] .contact-card,
:root[data-theme="light"] .contact-card.satya-card {
  border-color: rgba(49, 89, 116, .20);
  background:
    radial-gradient(circle at 100% 0%, rgba(8,123,89,.055), transparent 19rem),
    linear-gradient(155deg, rgba(255,255,255,.97), rgba(234,244,249,.92));
  box-shadow: 0 24px 60px rgba(31, 72, 98, .12);
}

:root[data-theme="light"] .contact-card p { color: #466477; }
:root[data-theme="light"] .contact-email { color: #12364a; }
:root[data-theme="light"] .contact-code { color: #627c8e; }

:root[data-theme="light"] .footer {
  border-top-color: rgba(42, 87, 114, .16);
  background: rgba(235, 243, 248, .88);
}

:root[data-theme="light"] .footer-brand > p,
:root[data-theme="light"] .footer-links a {
  color: #536d7e;
}

:root[data-theme="light"] .footer-links a:hover {
  color: #0b2b3e;
}

@media (max-width: 760px) {
  .theme-toggle {
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    margin-top: 5px;
    padding-inline: 12px;
  }

  :root[data-theme="light"] .nav-links {
    background: #f5f9fc;
    box-shadow: 0 22px 60px rgba(27, 63, 87, .16);
  }
}

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