:root {
  --bg: #090b14;
  --bg-soft: #111726;
  --surface: rgba(18, 24, 38, 0.65);
  --text: #e9ecf4;
  --muted: #abb3c7;
  --brand-a: #46d2ff;
  --brand-b: #8af08d;
  --brand-c: #ffd479;
  --ring: rgba(70, 210, 255, 0.5);
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  --bg: #f5f7fc;
  --bg-soft: #e9edf7;
  --surface: rgba(255, 255, 255, 0.72);
  --text: #151c2d;
  --muted: #4f5b75;
  --brand-a: #0078ff;
  --brand-b: #059669;
  --brand-c: #b45309;
  --ring: rgba(0, 120, 255, 0.45);
  --shadow: 0 12px 34px rgba(21, 28, 45, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(70, 210, 255, 0.22), transparent),
    radial-gradient(900px 500px at 90% 0%, rgba(138, 240, 141, 0.15), transparent),
    radial-gradient(1100px 600px at 50% 120%, rgba(255, 212, 121, 0.12), transparent),
    var(--bg);
  z-index: -3;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  opacity: 0.2;
  z-index: -2;
  pointer-events: none;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

.section-title {
  font-size: clamp(1.8rem, 2.7vw, 2.7rem);
  margin: 0 0 0.75rem;
}

.section-sub {
  color: var(--muted);
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 1rem 0;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
}

.glass {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--brand-a), var(--brand-b));
  box-shadow: 0 0 22px var(--brand-a);
}

.menu {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.menu a:hover,
.menu a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
}

.icon-btn,
.menu-btn,
.btn,
.chip,
.back-to-top {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.icon-btn,
.menu-btn {
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.menu-btn {
  display: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--brand-a);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08;
  margin: 0.2rem 0 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 60ch;
}

.hero-card {
  padding: 1.2rem 1.3rem;
}

.hero-cta {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.3rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #071222;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: linear-gradient(130deg, var(--brand-a), var(--brand-b));
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.quick-stats {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.quick-stats li {
  min-width: 120px;
}

.quick-stats strong {
  display: block;
}

.quick-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.cards {
  display: grid;
  gap: 1rem;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 1.1rem;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
}

.card p,
.card li {
  color: var(--muted);
}

.card a {
  color: var(--brand-a);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.tag-cloud span,
.chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  color: var(--text);
  text-decoration: none;
}

.inline-cta {
  margin-top: 1rem;
}

.masonry {
  columns: 3;
  column-gap: 1rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.3rem 0 2rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.08s;
}

.delay-2 {
  transition-delay: 0.16s;
}

.palette {
  position: fixed;
  inset: 0;
  display: none;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(0, 0, 0, 0.45);
  z-index: 60;
}

.palette.open {
  display: grid;
}

.palette-panel {
  width: min(560px, 92vw);
  padding: 1rem;
}

.palette-panel input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0.7rem;
}

.palette-panel ul {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
  max-height: 240px;
  overflow: auto;
}

.palette-panel li button {
  width: 100%;
  text-align: left;
  padding: 0.55rem;
  background: transparent;
  border: 0;
  color: var(--text);
  border-radius: 8px;
}

.palette-panel li button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
}

@media (max-width: 1024px) {
  .menu {
    display: none;
    position: absolute;
    top: 4.4rem;
    left: 1rem;
    right: 1rem;
    padding: 0.8rem;
    background: var(--bg-soft);
    border-radius: 14px;
  }

  .menu.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-btn {
    display: inline-block;
    margin-left: auto;
  }

  .nav-actions {
    margin-left: 0;
  }

  .hero-grid,
  .three-up,
  .two-up {
    grid-template-columns: 1fr;
  }

  .masonry {
    columns: 2;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4rem 0;
  }

  .masonry {
    columns: 1;
  }
}
