/* EchoLinux – site.css */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Base */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px; line-height: 1.65; color: #1e293b; background: #f8fafc;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; color: #0f172a; }
h1 { font-size: 2.1rem; margin-bottom: 0.6rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
p  { margin-bottom: 1rem; max-width: 72ch; }
a  { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }
strong { font-weight: 600; }

/* Navigation */
nav {
  background: #0f172a;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; height: 54px; gap: 2rem;
}
.nav-brand {
  color: #f1f5f9; font-size: 1.15rem; font-weight: 800;
  letter-spacing: -0.03em; text-decoration: none; flex-shrink: 0;
}
.nav-brand span { color: #38bdf8; }
.nav-links { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.nav-links a { color: #94a3b8; font-size: 0.875rem; text-decoration: none; }
.nav-links a:hover { color: #f1f5f9; }

/* Hero */
.hero { background: #0f172a; padding: 4rem 1.5rem; }
.hero-inner { max-width: 1100px; margin: 0 auto; }
.hero h1 { color: #f1f5f9; font-size: 2.6rem; margin-bottom: 0.75rem; }
.hero p { color: #94a3b8; font-size: 1.05rem; max-width: 580px; margin-bottom: 1.5rem; }
.cta-btn {
  display: inline-block; padding: 0.65rem 1.4rem;
  background: #2563eb; color: #fff; border-radius: 5px;
  font-size: 0.925rem; font-weight: 600; text-decoration: none;
}
.cta-btn:hover { background: #1d4ed8; text-decoration: none; }

/* Page title bar */
.page-bar { background: #1e293b; padding: 2.5rem 1.5rem 2rem; }
.page-bar-inner { max-width: 1100px; margin: 0 auto; }
.page-bar h1 { color: #f1f5f9; font-size: 1.9rem; margin-bottom: 0.3rem; }
.page-bar p { color: #94a3b8; margin: 0; }

/* Layout */
.page-wrap  { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.narrow     { max-width: 780px; }

/* Sections */
.section { padding: 2.5rem 0; }
.section + .section { border-top: 1px solid #e2e8f0; }
.section-lead { color: #64748b; margin-bottom: 1.5rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.25rem; margin-top: 1.25rem; }
.card  { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1.4rem; display: flex; flex-direction: column; }
.card-tag { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; background: #eff6ff; color: #2563eb; padding: 0.2rem 0.5rem; border-radius: 3px; margin-bottom: 0.75rem; font-weight: 600; }
.card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.card p { color: #64748b; font-size: 0.875rem; flex: 1; margin-bottom: 0.75rem; }
.card a.read { font-size: 0.875rem; font-weight: 600; }

/* Post */
.post-header { padding-bottom: 1.5rem; border-bottom: 1px solid #e2e8f0; margin-bottom: 2rem; }
.post-header h1 { font-size: 2rem; }
.post-meta { color: #64748b; font-size: 0.82rem; margin-top: 0.35rem; }
.post-body h2 { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0; }
.post-body h3 { margin-top: 1.75rem; }
.post-body p, .post-body li { max-width: 72ch; }

/* Code */
pre {
  background: #1e1e2e; color: #cdd6f4;
  padding: 1.2rem 1.4rem; border-radius: 7px;
  overflow-x: auto; font-size: 0.845rem; line-height: 1.55;
  margin-bottom: 1.4rem; max-width: 100%;
}
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.87em; background: #e8eef7; color: #c0392b;
  padding: 0.15em 0.4em; border-radius: 3px;
}
pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* Callouts */
.callout { padding: 1rem 1.25rem; border-radius: 0 6px 6px 0; margin-bottom: 1.4rem; }
.callout p { margin: 0; max-width: 100%; }
.callout-info  { background: #dbeafe; border-left: 4px solid #2563eb; }
.callout-warn  { background: #fef9c3; border-left: 4px solid #ca8a04; }
.callout-tip   { background: #dcfce7; border-left: 4px solid #16a34a; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin-bottom: 1.4rem; font-size: 0.9rem; }
th { background: #0f172a; color: #e2e8f0; padding: 0.7rem 1rem; text-align: left; font-weight: 600; }
td { padding: 0.6rem 1rem; border-bottom: 1px solid #e2e8f0; }
tr:nth-child(even) td { background: #f8fafc; }

/* FAQ */
.faq-item { border-bottom: 1px solid #e2e8f0; padding: 1.3rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1.05rem; color: #0f172a; }

/* Related box */
.related { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1.4rem; margin-top: 2.5rem; }
.related h3 { margin-bottom: 0.75rem; font-size: 1rem; }
.related ul { margin: 0; padding-left: 1.25rem; }
.related li { margin-bottom: 0.4rem; }
.related a { font-size: 0.9rem; }

/* Contributors */
.contributors { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.25rem; }
.contrib-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1.25rem; flex: 1; min-width: 220px; }
.contrib-card h3 { font-size: 0.975rem; margin-bottom: 0.2rem; }
.contrib-card .handle { color: #2563eb; font-size: 0.8rem; margin-bottom: 0.5rem; display: block; }
.contrib-card p { font-size: 0.875rem; color: #64748b; margin: 0; }

/* Footer */
footer { background: #0f172a; color: #475569; padding: 2rem 1.5rem; margin-top: 4rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
footer p { font-size: 0.82rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: #475569; font-size: 0.82rem; }
.footer-links a:hover { color: #94a3b8; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-links { gap: 0.75rem; }
  .cards { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
