/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --blue:          #2d8cf0;
  --blue-dark:     #1a6fcb;
  --blue-light:    #e8f3fe;
  --dark:          #0f1623;
  --dark-2:        #1a2233;
  --mid:           #333344;
  --muted:         #6b7a99;
  --nav-text:      #c8d8f0;
  --border:        #e4eaf4;
  --bg:            #f8fafc;
  --white:         #ffffff;
  --mono:          'JetBrains Mono', 'Fira Mono', monospace;
  --sans:          'Inter', system-ui, -apple-system, sans-serif;
  --radius:        8px;
  --shadow:        0 2px 18px rgba(0,0,0,.07);
}


/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  font-family: var(--sans);
  color: var(--mid);
}
html {
  scroll-behavior: smooth;

}
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  background-color: var(--bg);
}

/* ── Header ────────────────────────────────────────────────────────────── */
header {
  padding: 16px 40px;
  background-color: var(--dark);
}
header h1 {
  margin: 0;
  padding: 0 0 0 16px;
  border-left: solid 3px var(--blue);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}
header h1 .version {
  font-size: 13px;
  color: var(--blue);
  margin-left: 8px;
  font-weight: 400;
  vertical-align: middle;
}
header nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
header nav a:hover {
  background-color: rgba(45, 140, 240, 0.15);
  color: var(--blue);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  background-color: var(--dark);
  border: none;
  border-radius: 0;
  padding: 0 40px 32px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--blue);
  border-radius: 50%;
  display: inline-block;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin: 0 0 18px;
}
.hero h1 .accent { color: var(--blue); }
.hero-subtitle {
  font-size: 17px;
  font-weight: 400;
  color: #8fa4c8;
  line-height: 1.7;
  max-width: 760px;
  margin: 0 0 28px;
}
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.hero-pill {
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-text);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 5px 12px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--blue);
  color: var(--white) !important;
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline {
  background: transparent;
  border-color: rgba(45,140,240,.5);
  color: var(--blue) !important;
}
.btn-outline:hover {
  background: rgba(45,140,240,.12);
  border-color: var(--blue);
}
.hero-install {
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 14px 18px;
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
}
.hero-install code {
  font-family: var(--mono);
  font-size: 13px;
  color: #e0f4ff;
  background: transparent;
}

/* ── Main grid ─────────────────────────────────────────────────────────── */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas:
    'article_0 aside_0';
  column-gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px;
  min-width: 0;
}


/* ── Article ───────────────────────────────────────────────────────────── */
article {
  grid-area: article_0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  line-height: 1.7;
  min-width: 0;
  overflow: hidden;
}
article h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  margin: 32px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--blue);
}
article h3:first-child {
  margin-top: 0;
}
article h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin: 20px 0 8px;
}
article p {
  margin: 0 0 14px;
  color: var(--mid);
}
article ol, article ul {
  padding-left: 24px;
  color: var(--mid);
  margin-bottom: 14px;
}
article li {
  margin-bottom: 6px;
}
article a {
  color: var(--blue);
  text-decoration: none;
}
article a:hover {
  text-decoration: underline;
}
article pre {
  background: var(--dark);
  border-radius: 6px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 18px;
  max-width: 100%;
}
article pre code {
  font-family: var(--mono);
  font-size: 13px;
  color: #82cfff;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}
article code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--blue-light);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--blue-dark);
}
article pre code {
  background: transparent;
  color: #82cfff;
  padding: 0;
}
article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
  font-size: 14px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
article th {
  background: var(--dark);
  color: var(--white);
  text-align: left;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
article td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--mid);
  vertical-align: top;
}
article tr:nth-child(even) td {
  background: var(--bg);
}

/* ── Aside / Sidebar ───────────────────────────────────────────────────── */
aside {
  grid-area: aside_0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  position: sticky;
  top: 72px;
  min-width: 0;
}
aside h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--blue);
}

/* ── Sections (sidebar cards) ──────────────────────────────────────────── */
section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}
section p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px;
}
section pre {
  background: var(--dark);
  border-radius: 5px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 0 0 14px;
  max-width: 100%;
}
section pre code {
  font-family: var(--mono);
  font-size: 11px;
  color: #82cfff;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}
section ul {
  margin: 0;
  padding-left: 18px;
}
section ul li {
  margin-bottom: 6px;
  font-size: 13px;
}
section ul li a {
  color: var(--blue);
  text-decoration: none;
}
section ul li a:hover {
  text-decoration: underline;
}

/* ── Feature grid ──────────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow .15s, border-color .15s;
}
.feature-card:hover {
  box-shadow: 0 4px 20px rgba(45,140,240,.08);
  border-color: rgba(45,140,240,.3);
}
.feature-icon { font-size: 24px; margin-bottom: 10px; }
.feature-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 8px;
  border: none;
  padding: 0;
}
.feature-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

/* ── Layer cards ───────────────────────────────────────────────────────── */
.layer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}
.layer-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.layer-card.layer-media { border-top: 3px solid #10b981; }
.layer-card.layer-web   { border-top: 3px solid var(--blue); }
.layer-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
}
.layer-card.layer-media .layer-title { color: #10b981; }
.layer-card.layer-web   .layer-title { color: var(--blue); }
.layer-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 10px;
  border: none;
  padding: 0;
}
.layer-card ul { margin: 0; padding-left: 18px; }
.layer-card li { font-size: 13px; color: var(--muted); margin-bottom: 5px; }

/* ── Callout ───────────────────────────────────────────────────────────── */
.callout {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: 0 6px 6px 0;
  padding: 14px 18px;
  margin: 0 0 18px;
}
.callout p { margin: 0; font-size: 14px; color: var(--blue-dark); }
.callout code { background: rgba(45,140,240,.15); color: var(--blue-dark); }
.callout.warning { background: #fffbeb; border-left-color: #f59e0b; }
.callout.warning p { color: #92400e; }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.badge-row img { height: 20px; }

/* ── Section subtitle ──────────────────────────────────────────────────── */
.section-lead {
  font-size: 15px;
  color: var(--muted);
  margin: -4px 0 24px;
  line-height: 1.65;
}

/* ── Project cards (personal site) ─────────────────────────────────────── */
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.project-card h4 {
  margin: 0 0 6px;
  color: var(--dark);
}
.project-card p {
  margin: 0 0 10px;
  font-size: 14px;
}
.project-card .tech {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.project-card a {
  font-size: 13px;
  font-weight: 500;
}

/* ── Service list (personal site) ──────────────────────────────────────── */
.service-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.service-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.service-list li:last-child {
  border-bottom: none;
}
.service-list li strong {
  color: var(--dark);
}

/* ── Sponsor button ────────────────────────────────────────────────────── */
a.sponsor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  margin-top: 4px;
  background-color: var(--blue-light);
  border: 1px solid rgba(45, 140, 240, 0.35);
  border-radius: 6px;
  color: var(--blue-dark) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
a.sponsor-btn:hover {
  background-color: var(--blue);
  border-color: var(--blue);
  color: var(--white) !important;
}
a.sponsor-btn:hover svg {
  fill: var(--white);
}
a.sponsor-btn svg {
  fill: var(--blue);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
  background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
  padding: 28px 40px;
  text-align: center;
  margin-top: 48px;
}
footer p {
  margin: 4px 0;
  font-size: 14px;
  color: var(--muted) !important;
}
footer p.tagline {
  font-size: 12px;
  color: #3d4f6e !important;
  margin-top: 8px;
}
footer a {
  color: #8fa4c8 !important;
  text-decoration: none;
  transition: color 0.15s;
}
footer a:hover {
  color: var(--white) !important;
  text-decoration: underline;
}

/* ── Responsive — tablet ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  header {
    padding: 12px 20px;
  }
  main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'article_0'
      'aside_0';
    padding: 24px 20px;

  }
  aside {
    position: static;
  }
  .hero {
    padding: 60px 32px !important;
  }
  .layer-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Responsive — phone ────────────────────────────────────────────────── */
@media (max-width: 540px) {
  header h1 {
    font-size: 18px;
  }
  header nav a {
    font-size: 13px;
    padding: 4px 8px;
  }
  main {
    padding: 16px 12px;

  }
  article {
    padding: 20px 16px;
  }
  article h3 {
    font-size: 16px;
  }
  article pre {
    padding: 12px 14px;
  }
  article pre code {
    font-size: 11px;
  }
  .hero {
    padding: 40px 20px !important;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  section {
    padding: 16px 14px;
  }
  footer {
    padding: 20px 16px;
  }
  footer p {
    font-size: 12px;
  }
}
