/* ============================================================
   LineSight Digital Blog — main.css
   Colors matched to linesightdigital.com
   ============================================================ */

:root {
  /* Brand colors — from linesightdigital.com */
  --navy:        #0d1b2a;
  --navy-mid:    #1a2d42;
  --navy-card:   #152234;
  --blue-accent: #00aaff;
  --blue-light:  #33bbff;
  --blue-dim:    rgba(0, 170, 255, 0.12);
  --blue-border: rgba(0, 170, 255, 0.25);

  --text-primary:   #e8f0f8;
  --text-secondary: #8ba3be;
  --text-muted:     #556b82;
  --white:          #ffffff;

  --border:         rgba(255,255,255,0.07);
  --card-bg:        #152234;
  --card-bg-hover:  #1c2f46;

  /* Typography */
  --font-display: 'Manrope', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing */
  --max-width: 1200px;
  --section-px: clamp(1rem, 5vw, 2rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--navy);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-accent); text-decoration: none; }
a:hover { color: var(--blue-light); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 27, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-logo span { color: var(--blue-accent); }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--white); background: var(--blue-dim); }

.nav-links a.nav-cta {
  background: var(--blue-accent);
  color: var(--navy);
  font-weight: 700;
  padding: 0.4rem 1rem;
}
.nav-links a.nav-cta:hover { background: var(--blue-light); }

.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.4rem; cursor: pointer; }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem var(--section-px);
  border-top: 1px solid var(--border);
  gap: 0.25rem;
}
.mobile-menu a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.5rem 0;
  font-weight: 500;
}
.mobile-menu a.nav-cta {
  color: var(--blue-accent);
  font-weight: 700;
}
.mobile-menu.open { display: flex; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ============================================================
   MAIN
   ============================================================ */
.site-main { min-height: 60vh; }

/* ============================================================
   BLOG HERO
   ============================================================ */
.blog-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem var(--section-px);
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,170,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.blog-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.blog-hero-tag {
  display: inline-block;
  background: var(--blue-dim);
  border: 1px solid var(--blue-border);
  color: var(--blue-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  max-width: 640px;
}

.blog-hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
}

/* ============================================================
   BLOG LIST
   ============================================================ */
.blog-list-section {
  padding: 3rem var(--section-px) 4rem;
}

.blog-list-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Featured card */
.post-card--featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.post-card--featured:hover {
  border-color: var(--blue-border);
  transform: translateY(-2px);
}

.post-card--featured .post-card-image-link { display: block; height: 100%; }
.post-card--featured .post-card-image { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }

.post-card--featured .post-card-body {
  padding: 2rem 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.post-card:hover {
  border-color: var(--blue-border);
  transform: translateY(-2px);
}

.post-card-image-link { display: block; overflow: hidden; }
.post-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.post-card:hover .post-card-image { transform: scale(1.03); }

.post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.post-card-tag {
  background: var(--blue-dim);
  border: 1px solid var(--blue-border);
  color: var(--blue-accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.post-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.post-card-title a { color: var(--white); }
.post-card-title a:hover { color: var(--blue-accent); }

.post-card-summary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
}

.post-card-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-accent);
  align-self: flex-start;
}
.post-card-cta:hover { color: var(--blue-light); }

@media (max-width: 768px) {
  .post-card--featured { grid-template-columns: 1fr; }
  .post-card--featured .post-card-image { min-height: 200px; }
}

/* ============================================================
   CTA BAND
   ============================================================ */
.blog-cta-band {
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy) 100%);
  border-top: 1px solid var(--border);
  padding: 4rem var(--section-px);
  text-align: center;
}

.blog-cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.blog-cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.blog-cta-inner p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.btn-primary {
  display: inline-block;
  background: var(--blue-accent);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover {
  background: var(--blue-light);
  color: var(--navy);
  transform: translateY(-1px);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-single { }

.post-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem var(--section-px) 3rem;
  position: relative;
  overflow: hidden;
}
.post-header::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,170,255,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.post-header-inner {
  max-width: 820px;
  margin: 0 auto;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.post-updated {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.post-summary {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.post-hero-image {
  max-width: 820px;
  margin: 2.5rem auto 0;
  padding: 0 var(--section-px);
}
.post-hero-image img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Post body layout: content + sidebar */
.post-body-container {
  max-width: var(--max-width);
  margin: 2.5rem auto;
  padding: 0 var(--section-px);
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .post-body-container {
    grid-template-columns: 1fr;
  }
  .post-sidebar { order: -1; }
}

/* ============================================================
   POST CONTENT (Markdown prose)
   ============================================================ */
.post-content {
  min-width: 0;
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--white);
  margin: 2.25rem 0 0.75rem;
  letter-spacing: -0.01em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.75rem 0 0.5rem;
}

.post-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 1.5rem 0 0.4rem;
}

.post-content p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  font-size: 0.975rem;
  line-height: 1.75;
}

.post-content strong { color: var(--text-primary); font-weight: 600; }

.post-content a {
  color: var(--blue-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-content a:hover { color: var(--blue-light); }

.post-content ul, .post-content ol {
  color: var(--text-secondary);
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
}

.post-content li {
  margin-bottom: 0.4rem;
  font-size: 0.975rem;
  line-height: 1.7;
}

.post-content li strong { color: var(--text-primary); }

.post-content blockquote {
  border-left: 3px solid var(--blue-accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--blue-dim);
  border-radius: 0 8px 8px 0;
}
.post-content blockquote p { color: var(--text-primary); margin: 0; }

.post-content code {
  background: var(--navy-mid);
  color: var(--blue-light);
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}

.post-content pre {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}
.post-content pre code { background: none; padding: 0; color: var(--text-primary); }

.post-content img {
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--blue-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.sidebar-card--subtle {
  border-color: var(--border);
}

.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.sidebar-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.sidebar-card ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

.sidebar-card ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-card ul li::before {
  content: '✓';
  color: var(--blue-accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.sidebar-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-accent);
}

/* ============================================================
   POST TAGS
   ============================================================ */
.post-tags-container {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 0 var(--section-px);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy-mid);
  border-top: 1px solid var(--border);
  padding: 3rem var(--section-px) 0;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
}

.footer-brand .nav-logo { display: inline-block; margin-bottom: 0.75rem; }
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.footer-col a,
.footer-col span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--blue-accent); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-container { grid-template-columns: 1fr; gap: 2rem; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}
