/* Base styles */
:root {
  --primary: #00a6ff;
  --primary-dark: #0078c2;
  --accent: #fbc02d;
  --surface: rgba(255, 255, 255, 0.8);
  --text: #111826;
  --muted: #5f6b7a;
  --background: #f3f7fb;
  --shadow: 0 24px 60px rgba(0, 27, 73, 0.08);
  --radius-xl: 32px;
  font-size: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

.pattern-background {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 100%),
    radial-gradient(200px at 10% 20%, rgba(0, 166, 255, 0.12), transparent),
    radial-gradient(250px at 80% 30%, rgba(251, 192, 45, 0.1), transparent),
    repeating-linear-gradient(
      45deg,
      rgba(0, 166, 255, 0.05) 0,
      rgba(0, 166, 255, 0.05) 10px,
      transparent 10px,
      transparent 20px
    );
  z-index: -1;
}

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

.section {
  padding: 6rem 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.section-heading p {
  margin: 0 auto;
  max-width: 520px;
  color: var(--muted);
}

.section-heading.align-left {
  text-align: left;
  margin-bottom: 2rem;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9);
  z-index: 10;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.tagline {
  color: var(--muted);
  font-size: 0.85rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-weight: 500;
}

.nav a {
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  width: 100%;
}

/* Hero */
.hero {
  padding: 6rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 1.5rem;
}

.lead {
  margin: 0 0 2rem;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.1rem;
}

.brow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--primary-dark);
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 166, 255, 0.35);
}

.btn.secondary {
  background: rgba(0, 166, 255, 0.12);
  border-color: rgba(0, 166, 255, 0.3);
  color: var(--primary-dark);
}

.btn.ghost {
  border-color: rgba(0, 0, 0, 0.12);
  background: #fff;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  text-decoration: none;
}

.hero-snippet {
  position: relative;
  background: rgba(12, 24, 44, 0.92);
  color: #f7fbff;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-snippet::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(200px at 20% 20%, rgba(0, 166, 255, 0.25), transparent),
    radial-gradient(220px at 80% 90%, rgba(251, 192, 45, 0.18), transparent);
  opacity: 0.9;
  pointer-events: none;
}

.snippet-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.snippet-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  background: rgba(255, 255, 255, 0.3);
}

.dot.red {
  background: #ff5f57;
}

.dot.amber {
  background: #fdbc2c;
}

.dot.green {
  background: #28c940;
}

pre,
code {
  margin: 0;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.95rem;
}

.snippet-code {
  margin: 0;
  background: rgba(2, 10, 24, 0.6);
  border-radius: 20px;
  padding: 1.2rem 1.4rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow-x: auto;
  white-space: pre;
}

.snippet-terminal {
  background: rgba(2, 10, 24, 0.75);
  border-radius: 20px;
  padding: 1.1rem 1.4rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 110px;
}

.terminal-label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

#hero-code {
  display: block;
  white-space: pre;
}

#hero-output {
  margin: 0;
  color: #f1f6ff;
  white-space: pre-wrap;
  word-break: break-word;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  align-items: stretch;
}

.about-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  text-align: center;
}

.profile {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  margin-bottom: 1.5rem;
}

.subtitle {
  color: var(--muted);
  margin: 0.3rem 0 1.5rem;
}

.link-list {
  display: grid;
  gap: 0.75rem;
}

.link-list a {
  font-weight: 600;
}

.about-copy {
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.about-copy h2 {
  margin-top: 0;
}

/* Syntax section */
.syntax-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.code-card {
  background: #0f2038;
  color: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-xl);
  position: relative;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.code-card pre {
  overflow-x: auto;
}

.label-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.label {
  background: rgba(0, 166, 255, 0.2);
  border: 1px solid rgba(0, 166, 255, 0.5);
  color: #86d6ff;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.syntax-copy article {
  background: var(--surface);
  padding: 1.75rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.syntax-copy h3 {
  margin-top: 0;
}

.keyword {
  color: var(--primary-dark);
  font-weight: 600;
}

/* Install cards */
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}

.install-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.install-card pre {
  background: #081c33;
  color: #e4f4ff;
  padding: 1.2rem;
  border-radius: 16px;
  overflow-x: auto;
}

.cta-link {
  font-weight: 600;
  color: var(--primary-dark);
}

.cta-link::after {
  content: "";
  display: inline-block;
  width: 100%;
  height: 2px;
  background: rgba(0, 166, 255, 0.2);
  margin-top: 0.15rem;
}

/* Roadmap */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 12px;
  width: 4px;
  background: linear-gradient(180deg, rgba(0, 166, 255, 0.2), rgba(251, 192, 45, 0.25));
}

.timeline li {
  background: rgba(255, 255, 255, 0.93);
  padding: 1.8rem 1.8rem 1.8rem 3.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  left: 4px;
  top: 2rem;
  border: 3px solid #fff5d6;
}

.version {
  font-weight: 700;
  color: var(--primary-dark);
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Docs */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: start;
}

.doc-cards {
  display: grid;
  gap: 1.5rem;
}

.doc-card {
  background: var(--surface);
  padding: 1.8rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 166, 255, 0.1);
}

.doc-card h3 {
  margin-top: 0;
}

.doc-card a {
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: rgba(8, 24, 48, 0.95);
  color: #dde9f6;
  padding: 3rem 0;
  position: relative;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-logo {
  width: 56px;
  height: 56px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-weight: 600;
}

.footer-links a {
  color: #dde9f6;
}

.footer-links a:hover {
  color: #ffffff;
}

.back-to-top {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 1.4rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 166, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .about-card,
  .about-copy,
  .code-card,
  .syntax-copy article,
  .install-card,
  .timeline li,
  .doc-card {
    border-radius: 24px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
  }

  .back-to-top {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
