:root {
  --main: #7ed957;
  --text: #000000;
  --background: #ffffff;
  --light-gray: #f5f5f5;
}

/* Global Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--background);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === Sticky Header === */
header {
  background: var(--background);
  border-bottom: 1px solid var(--light-gray);
  padding: 1.2em 2em;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* === Header Inner Container === */
.blog-header {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
}

/* === Logo === */
.blog-header .logo {
  height: 42px;
  max-width: 100%;
}

/* === Navigation Links === */
.blog-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2em;
}

.blog-header nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.blog-header nav a:hover,
.blog-header nav a:focus {
  color: var(--main);
  outline: none;
}

/* ================================================
   Hero / Search Section
   ================================================ */
.hero {
  background: linear-gradient(to right, var(--main), #a5f490);
  text-align: center;
  padding: 3em 1em;
  color: white;
}

.hero h1 {
  font-size: 1.8em;
  margin-bottom: 1em;
}

.hero input[type="text"],
#searchBox {
  margin-top: 1em;
  width: 90%;
  max-width: 500px;
  padding: 0.8em 1em;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ================================================
   Blog Content Area
   ================================================ */
.blog-content {
  max-width: 800px;
  margin: 3em auto 2em;
  padding: 0 1.5em;
  line-height: 1.75;
  font-size: 1.05rem;
  color: #333;
}

.blog-content h1 {
  font-size: 2.5rem;
  margin-bottom: 0.3em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blog-date {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 2em;
  font-style: italic;
}

.blog-content h2 {
  font-size: 1.8rem;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
  color: var(--main);
  border-bottom: 2px solid var(--main);
  padding-bottom: 0.3em;
}

.blog-content p {
  margin-bottom: 1.5em;
}

.blog-content a {
  color: var(--main);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted var(--main);
  transition: border-color 0.2s, color 0.2s;
}
.blog-content a:hover {
  color: #66b347; /* slightly darker */
  border-color: transparent;
}

.blog-content ul,
.blog-content ol {
  margin: 1.5em 0;
  padding-left: 1.5em;
}
.blog-content li {
  margin-bottom: 0.6em;
}

/* Blockquotes */
.blog-content blockquote {
  border-left: 4px solid var(--main);
  padding-left: 1em;
  color: #555;
  font-style: italic;
  margin: 1.5em 0;
  background: var(--light-gray);
  border-radius: 4px;
}

/* Code blocks */
.blog-content pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
}
.blog-content code {
  background: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.95em;
}

/* Tables */
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
}
.blog-content thead {
  background: var(--light-gray);
}
.blog-content th,
.blog-content td {
  padding: 0.75em 1em;
  border: 1px solid var(--light-gray);
  text-align: left;
}

/* Images */
.blog-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ================================================
   Section Cards (Optional)
   ================================================ */
.section {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 1.5em;
  margin-bottom: 1.5em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.section h2 {
  font-size: 1.2em;
  margin-bottom: 0.3em;
}
.section p {
  color: #444;
  font-size: 0.95em;
  margin-bottom: 0.8em;
}
.section ul {
  list-style: none;
  padding-left: 0;
}
.section li {
  margin-bottom: 0.5em;
}
.section a {
  color: var(--main);
  font-weight: 600;
  text-decoration: none;
}
.section a:hover {
  text-decoration: underline;
}

/* ================================================
   Footer
   ================================================ */
footer {
  background: var(--light-gray);
  padding: 1.5em 1em;
  text-align: center;
  font-size: 0.9em;
  color: #555;
}
footer a {
  color: var(--text);
  text-decoration: underline;
}

/* ================================================
   Responsive Breakpoints
   ================================================ */
@media (max-width: 768px) {
  .blog-content {
    padding: 0 1em;
  }
  .blog-content h1 {
    font-size: 2rem;
  }
  .blog-content h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  header {
    padding: 1em;
  }
  .blog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75em;
  }
  .blog-content {
    margin: 2em auto 1.5em;
  }
  .blog-content h1 {
    font-size: 1.75rem;
  }
  .blog-content h2 {
    font-size: 1.3rem;
  }
  .hero input[type="text"],
  #searchBox {
    width: 100%;
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .blog-content p {
    font-size: 1rem;
  }
  .blog-content h2 {
    font-size: 1.2rem;
  }
}
