
/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: #171717;
  background-color: #ffffff;
  font-size: 1.125rem;
}

/* Container */
.blog-container {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #171717;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
  color: #171717;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #171717;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #171717;
}

h5 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #171717;
}

p {
  margin-bottom: 1.75rem;
  color: #171717;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: #737373;
  margin-bottom: 2rem;
}

.meta-info {
  color: #737373;
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* Links */
a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

a:hover {
  border-bottom-color: #2563eb;
}

a[rel="nofollow"] {
  border-bottom: none;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0 1rem 0;
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1.75rem;
}

ul li, ol li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

ul li em {
  color: #737373;
  font-style: italic;
}

/* Table of Contents */
#toc {
  background-color: rgba(0, 0, 0, 0.02);
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

#toc h5 {
  margin-bottom: 1rem;
  color: #171717;
}

#toc ul {
  list-style: none;
  margin-left: 0;
}

#toc ul li {
  margin-bottom: 0.5rem;
}

#toc a {
  color: #2563eb;
  border-bottom: none;
}

#toc a:hover {
  text-decoration: underline;
}

/* Code */
code {
  background-color: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

pre {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.75rem;
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid #2563eb;
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: #737373;
  font-style: italic;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.75rem;
}

table th,
table td {
  padding: 0.75rem;
  border: 1px solid #e5e5e5;
  text-align: left;
}

table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

/* Key Takeaways Box */
.key-takeaways-box {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 1.75rem;
  margin: 2.5rem 0;
}

.key-takeaways-box h4 {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Next Article CTA */
.next-article {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.next-article h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Footer */
.automatesmt-footer {
  margin-top: 4rem;
  padding: 2.5rem 1rem;
  border-top: 1px solid #e5e5e5;
  color: #737373;
  font-size: 0.875rem;
}

.automatesmt-footer-content {
  max-width: 48rem;
  margin: 0 auto;
}

.automatesmt-footer-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.automatesmt-footer-logo img {
  max-width: 200px;
  height: auto;
  margin: 0 auto;
}

.automatesmt-footer-mission {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.automatesmt-mission-statement {
  font-weight: 600;
  margin-top: 0.75rem;
}

.automatesmt-footer-links {
  text-align: center;
  margin-bottom: 1.5rem;
}

.automatesmt-footer-links a {
  color: #2563eb;
  margin: 0 0.5rem;
}

.automatesmt-footer-links .separator {
  color: #737373;
}

.automatesmt-footer-portfolio {
  margin-bottom: 1.5rem;
}

.automatesmt-footer-portfolio h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.automatesmt-footer-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}

.automatesmt-footer-portfolio-grid a {
  color: #2563eb;
}

.automatesmt-footer-copyright {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #737373;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #0a0a0a;
    color: #fafafa;
  }

  h1, h2, h3, h4, h5 {
    color: #fafafa;
  }

  p {
    color: #fafafa;
  }

  .lead {
    color: #a3a3a3;
  }

  .meta-info {
    color: #a3a3a3;
  }

  h2 {
    border-bottom-color: #262626;
  }

  a {
    color: #60a5fa;
  }

  a:hover {
    border-bottom-color: #60a5fa;
  }

  #toc {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: #262626;
  }

  code {
    background-color: #171717;
  }

  pre {
    background-color: #171717;
  }

  blockquote {
    border-left-color: #60a5fa;
    color: #a3a3a3;
  }

  table th,
  table td {
    border-color: #262626;
  }

  table th {
    background-color: #171717;
  }

  .key-takeaways-box {
    background: #171717;
    border-color: #262626;
  }

  .next-article {
    border-top-color: #262626;
  }

  .automatesmt-footer {
    border-top-color: #262626;
    color: #a3a3a3;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .blog-container {
    padding: 1.5rem 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.375rem;
  }

  body {
    font-size: 1rem;
  }

  .lead {
    font-size: 1.125rem;
  }
}
