:root {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --card: #172033;
  --card-light: #1f2d46;
  --text: #e5e7eb;
  --muted: #aab6c8;
  --soft: #cbd5e1;
  --line: rgba(203, 213, 225, 0.18);
  --accent: #38bdf8;
  --accent-2: #a78bfa;
  --accent-3: #34d399;
  --warning: #fbbf24;
  --max-width: 1120px;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.17), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(167, 139, 250, 0.14), transparent 24rem),
    var(--bg);
  line-height: 1.65;
}

body.light {
  --bg: #f8fafc;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-light: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --soft: #334155;
  --line: rgba(15, 23, 42, 0.12);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #03111f;
  border-radius: 999px;
  z-index: 999;
}

.skip-link:focus {
  left: 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(15, 23, 42, 0.78);
  border-bottom: 1px solid var(--line);
}

body.light .site-header {
  background: rgba(248, 250, 252, 0.86);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
}

.theme-toggle {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.2rem;
}

.hero {
  padding: 6.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  color: var(--soft);
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.04);
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent-3);
  box-shadow: 0 0 18px var(--accent-3);
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.045em;
  margin: 0;
}

h1 {
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  max-width: 14ch;
  margin-top: 1.1rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.28rem;
}

.lead {
  color: var(--soft);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  max-width: 66ch;
  margin: 1.25rem 0 0;
}

.actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.78rem 1rem;
  font-weight: 700;
  border: 1px solid var(--line);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #03111f;
  border-color: transparent;
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button:hover {
  transform: translateY(-1px);
  transition: transform 160ms ease;
  color: inherit;
}

.hero-card,
.card,
.project-card,
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.2rem;
}

.signal-card {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.33);
  border: 1px solid var(--line);
}

body.light .signal-card {
  background: rgba(241, 245, 249, 0.75);
}

.mini-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.bars {
  display: grid;
  gap: 0.7rem;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.12);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.hero-tags,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.88rem;
}

section {
  padding: 4rem 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.section-head p {
  max-width: 62ch;
  color: var(--muted);
  margin: 0;
}

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

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

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

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

.project-card {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

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

.project-card .links,
.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
}

.inline-link {
  color: var(--accent);
  font-weight: 700;
}

.card,
.panel {
  padding: 1.3rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.feature-list li {
  color: var(--soft);
  padding-left: 1.5rem;
  position: relative;
}

.feature-list li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.66rem;
}

.case-hero {
  padding: 5.5rem 0 2rem;
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.2rem;
  align-items: start;
}

.case-sidebar {
  position: sticky;
  top: 90px;
}

.visual {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--card);
  margin: 1.2rem 0;
}

.visual img {
  display: block;
  width: 100%;
}

.code-panel {
  background: #020617;
  color: #dbeafe;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 1rem;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

body.light .code-panel {
  background: #0f172a;
  color: #dbeafe;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .hero-grid,
  .case-layout,
  .grid.two,
  .grid.three,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .case-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .hero {
    padding-top: 4rem;
  }
}
