:root {
  color-scheme: light dark;
  --bg: #e9eef5;
  --surface: #f8fafc;
  --surface-soft: #dfe7f1;
  --text: #172033;
  --muted: #556274;
  --line: #c3cedb;
  --accent: #405ccf;
  --accent-strong: #3148b8;
  --dark: #172238;
  --dark-soft: #22314d;
  --shadow: 0 20px 50px rgba(23, 32, 51, 0.16);
  --header-bg: rgba(233, 238, 245, 0.92);
  --nav-text: #46556a;
  --secondary-bg: rgba(248, 250, 252, 0.86);
  --card-bg: rgba(248, 250, 252, 0.92);
  --footer-bg: #dfe6ef;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111827;
  --surface: #182235;
  --surface-soft: #151f31;
  --text: #eef3fb;
  --muted: #b2bfd1;
  --line: #344258;
  --accent: #8ea6ff;
  --accent-strong: #a7b9ff;
  --dark: #0b1220;
  --dark-soft: #121d30;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
  --header-bg: rgba(17, 24, 39, 0.92);
  --nav-text: #c3cede;
  --secondary-bg: rgba(30, 42, 61, 0.92);
  --card-bg: rgba(24, 34, 53, 0.94);
  --footer-bg: #0f1726;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eef2f7 0%, var(--bg) 26%, #e5ebf3 100%);
}

.brand-mark,
.eyebrow,
.code-content,
.card-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] body {
  background: linear-gradient(180deg, #121b2b 0%, var(--bg) 28%, #0d1523 100%);
}

.site-header {
  border-bottom-color: color-mix(in srgb, var(--line) 78%, transparent);
  background: var(--header-bg);
}

.site-nav a:not(.nav-cta),
.hero-lead,
.prose {
  color: var(--nav-text);
}

.brand-mark,
.nav-cta {
  background: #1b2942;
}

html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .nav-cta {
  background: #263756;
}

.button-primary {
  box-shadow: 0 12px 30px rgba(64, 92, 207, 0.28);
}

html[data-theme="dark"] .button-primary {
  background: #738ef7;
  color: #09111f;
  box-shadow: 0 12px 30px rgba(115, 142, 247, 0.22);
}

html[data-theme="dark"] .button-primary:hover {
  background: #91a7ff;
}

.button-secondary {
  background: var(--secondary-bg);
}

.hero-card,
.section-dark {
  background: linear-gradient(145deg, #172238 0%, #101a2d 100%);
}

html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .section-dark {
  background: linear-gradient(145deg, #0b1220 0%, #0e1829 100%);
}

.availability {
  background: var(--dark-soft);
}

.hero-glow-one {
  background: radial-gradient(circle, rgba(64, 92, 207, 0.24), transparent 68%);
}

.hero-glow-two {
  background: radial-gradient(circle, rgba(53, 174, 143, 0.16), transparent 68%);
}

html[data-theme="dark"] .hero-glow-one {
  background: radial-gradient(circle, rgba(112, 137, 255, 0.22), transparent 68%);
}

html[data-theme="dark"] .hero-glow-two {
  background: radial-gradient(circle, rgba(60, 193, 157, 0.13), transparent 68%);
}

.service-card,
.contact-panel {
  background: var(--card-bg);
}

.service-card:hover {
  border-color: #9fb0c5;
  box-shadow: 0 16px 34px rgba(23, 32, 51, 0.11);
}

html[data-theme="dark"] .service-card:hover {
  border-color: #5d7190;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.section-muted {
  background: linear-gradient(180deg, #dfe7f1 0%, #e4ebf3 100%);
}

html[data-theme="dark"] .section-muted {
  background: linear-gradient(180deg, #151f31 0%, #182337 100%);
}

html[data-theme="dark"] .service-card p,
html[data-theme="dark"] .section-heading > p:last-child,
html[data-theme="dark"] .contact-panel p:last-child,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .experience-card p {
  color: var(--muted);
}

html[data-theme="dark"] .service-card h3,
html[data-theme="dark"] .contact-panel h2,
html[data-theme="dark"] .section:not(.section-dark) h2,
html[data-theme="dark"] .experience-card h3 {
  color: var(--text);
}

.tags span {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

.site-footer {
  background: var(--footer-bg);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.theme-icon {
  grid-area: 1 / 1;
  font-size: 1rem;
  line-height: 1;
  transition: opacity 160ms ease, transform 160ms ease;
}

html[data-theme="light"] .theme-icon-light {
  opacity: 0;
  transform: rotate(30deg) scale(0.75);
}

html[data-theme="light"] .theme-icon-dark {
  opacity: 1;
  transform: none;
}

html[data-theme="dark"] .theme-icon-light {
  opacity: 1;
  transform: none;
}

html[data-theme="dark"] .theme-icon-dark {
  opacity: 0;
  transform: rotate(-30deg) scale(0.75);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.experience-card {
  padding: 1.5rem;
  border-top: 3px solid var(--accent);
  border-radius: 0 0 16px 16px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.experience-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.experience-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 900px) {
  .experience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-nav {
    background: var(--surface);
  }

  .theme-toggle {
    width: 100%;
    height: 44px;
    margin-top: 0.35rem;
    border-radius: 10px;
  }

  .experience-grid {
    grid-template-columns: 1fr;
  }
}
