/* Theme switcher and light palette */
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
  --background: #f4f8fa;
  --foreground: #0c1822;
  --card: #ffffff;
  --card-foreground: #0c1822;
  --popover: #ffffff;
  --popover-foreground: #0c1822;
  --primary: #087f94;
  --primary-foreground: #ffffff;
  --secondary: #e8f0f4;
  --secondary-foreground: #0c1822;
  --muted: #e8f0f4;
  --muted-foreground: #516575;
  --accent: #dceff3;
  --accent-foreground: #075e70;
  --border: rgba(13, 35, 49, 0.14);
  --input: rgba(13, 35, 49, 0.16);
  --ring: #087f94;
}

html,
body,
.site-shell,
.expertise-card,
.perspective-panel,
.intelligence-module,
.theme-toggle {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.theme-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: rgba(216, 248, 255, 0.9);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.theme-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(116, 232, 255, 0.32);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.theme-icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 1.7;
}

[data-theme="dark"] .theme-icon-moon,
[data-theme="light"] .theme-icon-sun {
  display: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.35rem;
}

html[data-theme="light"],
html[data-theme="light"] body {
  background: #f4f8fa;
  color: #0c1822;
}

[data-theme="light"] ::selection {
  color: #ffffff;
  background: #087f94;
}

[data-theme="light"] .site-shell {
  background:
    linear-gradient(rgba(12, 40, 55, 0.055) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, rgba(12, 40, 55, 0.055) 1px, transparent 1px) 0 0 / 80px 80px,
    radial-gradient(circle at 78% 30%, rgba(22, 156, 181, 0.13), transparent 30rem),
    #f4f8fa;
}

[data-theme="light"] .site-shell::before {
  background: linear-gradient(90deg, #f4f8fa 0%, transparent 20% 80%, #f4f8fa 100%);
}

[data-theme="light"] .noise {
  opacity: 0.012;
}

[data-theme="light"] .ambient-one {
  background: rgba(13, 152, 179, 0.15);
}

[data-theme="light"] .ambient-two {
  background: rgba(57, 130, 159, 0.1);
}

[data-theme="light"] [class*="text-white"] {
  color: #0c1822 !important;
}

[data-theme="light"] [class*="text-slate-200"] {
  color: #405563 !important;
}

[data-theme="light"] [class*="text-cyan-300"],
[data-theme="light"] [class*="text-cyan-200"] {
  color: #08758a !important;
}

[data-theme="light"] [class*="border-white"] {
  border-color: rgba(13, 35, 49, 0.14) !important;
}

[data-theme="light"] [class*="bg-white/"] {
  background-color: rgba(255, 255, 255, 0.42) !important;
}

[data-theme="light"] [class*="bg-[#070c12]"] {
  background-color: rgba(229, 239, 243, 0.78) !important;
}

[data-theme="light"] .monogram-small {
  color: #08758a;
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(8, 117, 138, 0.28);
  box-shadow: inset 0 0 20px rgba(8, 117, 138, 0.06);
}

[data-theme="light"] .nav-link {
  color: #314653;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link:focus-visible {
  color: #07151e;
  background: rgba(12, 40, 55, 0.06);
}

[data-theme="light"] .theme-toggle {
  color: #1f4655;
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(13, 35, 49, 0.16);
  box-shadow: 0 5px 18px rgba(21, 67, 84, 0.08), inset 0 1px #ffffff;
}

[data-theme="light"] .theme-toggle:hover {
  color: #056a7d;
  background: #ffffff;
  border-color: rgba(8, 117, 138, 0.34);
}

[data-theme="light"] .contact-button {
  color: #12303c;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(13, 35, 49, 0.16);
  box-shadow: 0 5px 18px rgba(21, 67, 84, 0.07), inset 0 1px #ffffff;
}

[data-theme="light"] .contact-button:hover {
  color: #ffffff;
  background: #087f94;
}

[data-theme="light"] .eyebrow-badge {
  color: #214b58;
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(13, 35, 49, 0.14);
  box-shadow: 0 8px 24px rgba(21, 67, 84, 0.06), inset 0 1px #ffffff;
}

[data-theme="light"] .status-dot {
  background: #008a70;
  box-shadow: 0 0 0 4px rgba(0, 138, 112, 0.09), 0 0 15px rgba(0, 138, 112, 0.28);
}

[data-theme="light"] .hero-title {
  text-shadow: 0 0 55px rgba(15, 126, 148, 0.08);
}

[data-theme="light"] .title-shift {
  color: #08758a;
  background: linear-gradient(105deg, #526d79, #087f94, #1d5868);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="light"] .primary-cta {
  color: #ffffff;
  background: #087f94;
  box-shadow: 0 12px 40px rgba(8, 127, 148, 0.2);
}

[data-theme="light"] .primary-cta:hover {
  color: #ffffff;
  background: #076d80;
  box-shadow: 0 14px 50px rgba(8, 127, 148, 0.28);
}

[data-theme="light"] .secondary-cta {
  color: #19343f;
}

[data-theme="light"] .secondary-cta:hover {
  color: #07151e;
  background: rgba(12, 40, 55, 0.06);
  border-color: rgba(13, 35, 49, 0.12);
}

[data-theme="light"] .hero-mark::before {
  background: radial-gradient(circle, rgba(14, 151, 177, 0.13), transparent 56%), repeating-radial-gradient(circle, transparent 0 42px, rgba(8, 117, 138, 0.07) 43px 44px);
  border-color: rgba(13, 35, 49, 0.11);
  box-shadow: inset 0 0 80px rgba(8, 117, 138, 0.07), 0 0 90px rgba(8, 117, 138, 0.05);
}

[data-theme="light"] .orbit-outer,
[data-theme="light"] .orbit-inner {
  border-color: rgba(8, 117, 138, 0.22);
}

[data-theme="light"] .vector-axis.axis-horizontal {
  background: linear-gradient(90deg, transparent, rgba(8, 117, 138, 0.22), transparent);
}

[data-theme="light"] .vector-axis.axis-vertical {
  background: linear-gradient(transparent, rgba(8, 117, 138, 0.22), transparent);
}

[data-theme="light"] .scan-line {
  background: linear-gradient(90deg, transparent, rgba(8, 117, 138, 0.6), transparent);
  box-shadow: 0 0 16px rgba(8, 117, 138, 0.18);
}

[data-theme="light"] .mark-core {
  color: #154f5e;
  background: radial-gradient(circle at 50% 42%, rgba(63, 192, 215, 0.22), transparent 50%), linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(229, 241, 245, 0.96));
  border-color: rgba(8, 117, 138, 0.3);
  box-shadow: inset 0 1px #ffffff, inset 0 0 72px rgba(44, 165, 190, 0.1), 0 28px 90px rgba(28, 72, 88, 0.16);
}

[data-theme="light"] .mark-core::before {
  background-image: linear-gradient(rgba(11, 78, 95, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 78, 95, 0.08) 1px, transparent 1px);
}

[data-theme="light"] .mark-core::after {
  border-color: rgba(8, 117, 138, 0.16);
}

[data-theme="light"] .core-scan-icon {
  color: rgba(8, 117, 138, 0.27);
}

[data-theme="light"] .trace-icon {
  color: #0b7184;
  filter: drop-shadow(0 0 20px rgba(8, 117, 138, 0.18));
}

[data-theme="light"] .mark-core small,
[data-theme="light"] .coordinate {
  color: rgba(20, 81, 95, 0.72);
}

[data-theme="light"] .intelligence-module {
  color: #153c48;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(8, 117, 138, 0.22);
  box-shadow: inset 0 1px #ffffff, 0 10px 28px rgba(22, 70, 86, 0.12);
}

[data-theme="light"] .intelligence-module svg {
  color: #087f94;
}

[data-theme="light"] .scroll-cue {
  color: #50646f !important;
}

[data-theme="light"] .focus-cell + .focus-cell,
[data-theme="light"] .work-row + .work-row,
[data-theme="light"] .credential-cell + .credential-cell {
  border-color: rgba(13, 35, 49, 0.14);
}

[data-theme="light"] .section-kicker,
[data-theme="light"] .card-number,
[data-theme="light"] .work-index {
  color: #08758a;
}

[data-theme="light"] .expertise-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(241, 247, 249, 0.72) 62%), #ffffff;
  border-color: rgba(13, 35, 49, 0.13);
  box-shadow: inset 0 1px #ffffff, 0 14px 42px rgba(20, 64, 81, 0.07);
}

[data-theme="light"] .expertise-card:hover {
  background-color: #ffffff;
  border-color: rgba(8, 117, 138, 0.3);
}

[data-theme="light"] .icon-frame {
  color: #08758a;
  background: rgba(8, 117, 138, 0.055);
  border-color: rgba(8, 117, 138, 0.16);
}

[data-theme="light"] .work-row:hover {
  background: rgba(255, 255, 255, 0.46);
}

[data-theme="light"] .perspective-panel {
  background: linear-gradient(115deg, rgba(24, 160, 185, 0.12), transparent 46%), rgba(255, 255, 255, 0.72);
  border-color: rgba(8, 117, 138, 0.2);
  box-shadow: inset 0 1px #ffffff, 0 30px 100px rgba(22, 67, 84, 0.1);
}

[data-theme="light"] .perspective-panel::before {
  background-image: linear-gradient(rgba(12, 58, 72, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(12, 58, 72, 0.07) 1px, transparent 1px);
}

[data-theme="light"] .perspective-symbol {
  color: rgba(8, 117, 138, 0.07);
}

[data-theme="light"] .credential-value {
  color: #0d2631;
}

[data-theme="light"] .credential-label {
  color: #526672;
}

[data-theme="light"] .contact-section::before {
  background: rgba(37, 174, 198, 0.12);
}

[data-theme="light"] .footer-link {
  color: #405661;
}

[data-theme="light"] .footer-link:hover {
  color: #08758a;
}

/* Privacy notice */
.legal-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 80px 80px,
    radial-gradient(circle at 85% 7%, rgba(47, 180, 213, 0.1), transparent 30rem),
    var(--background);
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 13, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.legal-container {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.7rem;
  gap: 1rem;
}

.legal-home {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--foreground);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.legal-home:hover {
  color: #8eeeff;
}

.legal-brand-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #a7f2ff;
  border: 1px solid rgba(116, 232, 255, 0.28);
  border-radius: 0.65rem;
}

.legal-brand-icon svg {
  width: 1rem;
  height: 1rem;
}

.legal-hero {
  padding-block: clamp(4.5rem, 9vw, 8rem) clamp(3.5rem, 7vw, 6rem);
}

.legal-kicker,
.legal-number {
  color: #9deefe;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legal-title {
  max-width: 56rem;
  margin: 1.25rem 0 0;
  color: var(--foreground);
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.legal-lead {
  max-width: 47rem;
  margin: 2rem 0 0;
  color: rgba(226, 237, 245, 0.82);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.85;
}

.legal-version {
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  color: rgba(226, 237, 245, 0.78);
  font-size: 0.9rem;
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.legal-section {
  padding-block: clamp(2.5rem, 5vw, 4.25rem);
  border-top: 1px solid var(--border);
}

.legal-section h2 {
  max-width: 49rem;
  margin: 0.7rem 0 0;
  color: var(--foreground);
  font-size: clamp(1.65rem, 4vw, 2.6rem);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.legal-copy {
  margin-top: 1.65rem;
  color: rgba(226, 237, 245, 0.8);
  font-size: 1rem;
  line-height: 1.82;
}

.legal-copy > * + * {
  margin-top: 1.05rem;
}

.legal-copy h3 {
  margin-top: 2rem;
  color: var(--foreground);
  font-size: 1.25rem;
  line-height: 1.4;
}

.legal-copy ul {
  padding-left: 1.35rem;
}

.legal-copy li + li {
  margin-top: 0.42rem;
}

.legal-copy a {
  color: #8eeeff;
  text-underline-offset: 0.2em;
}

.legal-copy code {
  padding: 0.14em 0.38em;
  color: #b8f5ff;
  background: rgba(255, 255, 255, 0.065);
  border-radius: 0.3rem;
}

.legal-table-wrap {
  overflow-x: auto;
  margin-top: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.legal-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  text-align: left;
}

.legal-table th,
.legal-table td {
  padding: 1rem 1.1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.legal-table th {
  color: var(--foreground);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.045);
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-note {
  padding: 1.25rem;
  color: rgba(226, 237, 245, 0.88);
  background: rgba(116, 232, 255, 0.075);
  border: 1px solid rgba(116, 232, 255, 0.2);
  border-radius: 1rem;
}

.legal-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
}

.legal-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.75rem;
  color: rgba(226, 237, 245, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-footer a {
  color: inherit;
  text-decoration: none;
}

.legal-footer a:hover {
  color: #8eeeff;
}

[data-theme="light"] .legal-page {
  background:
    linear-gradient(rgba(12, 40, 55, 0.05) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, rgba(12, 40, 55, 0.05) 1px, transparent 1px) 0 0 / 80px 80px,
    radial-gradient(circle at 85% 7%, rgba(22, 156, 181, 0.13), transparent 30rem),
    #f4f8fa;
}

[data-theme="light"] .legal-header {
  background: rgba(244, 248, 250, 0.84);
}

[data-theme="light"] .legal-home:hover,
[data-theme="light"] .legal-copy a,
[data-theme="light"] .legal-footer a:hover {
  color: #08758a;
}

[data-theme="light"] .legal-brand-icon {
  color: #08758a;
  border-color: rgba(8, 117, 138, 0.28);
}

[data-theme="light"] .legal-kicker,
[data-theme="light"] .legal-number {
  color: #08758a;
}

[data-theme="light"] .legal-lead,
[data-theme="light"] .legal-copy {
  color: #405563;
}

[data-theme="light"] .legal-version {
  color: #465a66;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 34px rgba(20, 64, 81, 0.06);
}

[data-theme="light"] .legal-copy code {
  color: #075e70;
  background: rgba(8, 117, 138, 0.08);
}

[data-theme="light"] .legal-table-wrap {
  background: rgba(255, 255, 255, 0.66);
}

[data-theme="light"] .legal-table th {
  background: rgba(8, 117, 138, 0.065);
}

[data-theme="light"] .legal-note {
  color: #234954;
  background: rgba(8, 117, 138, 0.075);
  border-color: rgba(8, 117, 138, 0.19);
}

[data-theme="light"] .legal-footer-inner {
  color: #60727d;
}

@media (max-width: 639px) {
  .footer-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-container {
    width: min(100% - 2rem, 62rem);
  }

  .legal-home span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body,
  .site-shell,
  .expertise-card,
  .perspective-panel,
  .intelligence-module,
  .theme-toggle {
    transition: none;
  }
}
