/* ===========================
   Engineering Blog Theme (Responsive)
   =========================== */

/* Global Styles */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  background: #f9fafc;
  color: #222;
}

/* Header */
header {
  background: #1a365d; /* Deep engineering blue */
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}
header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}
header p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-top: 0.5rem;
}

/* Main Content */
main {
  max-width: 850px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
main h2 {
  border-left: 4px solid #2563eb; /* Accent blue */
  padding-left: 0.6rem;
  margin-top: 2.2rem;
  color: #1e3a8a;
  font-size: 1.4rem;
}
main p {
  margin: 1rem 0;
}
main ul, main ol {
  margin: 1rem 0 1rem 1.5rem;
}

/* Code Styling */
code {
  background: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}
pre {
  background: #111827;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.95rem;
  margin: 1.5rem 0;
}

/* Images */
img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
  display: block;
  height: auto;
}

/* Links */
a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 2rem 1rem;
  background: #e5e7eb;
  margin-top: 3rem;
  color: #374151;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1024px) {
  main {
    margin: 1.5rem;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.6rem;
  }
  main {
    margin: 1rem;
    padding: 1.2rem;
  }
  main h2 {
    font-size: 1.2rem;
  }
  pre {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 1.5rem 0.5rem;
  }
  header h1 {
    font-size: 1.4rem;
  }
  header p {
    font-size: 0.85rem;
  }
  main {
    margin: 0.5rem;
    padding: 1rem;
  }
  main h2 {
    font-size: 1.1rem;
  }
  body {
    font-size: 0.95rem;
  }
  footer {
    font-size: 0.8rem;
    padding: 1.2rem 0.5rem;
  }
}
/* Sidebar Navigation */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100%;
  background: #1e3a8a;
  padding-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease-in-out;
}
.sidebar a {
  color: white;
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  display: block;
  font-weight: 500;
}
.sidebar a:hover {
  background: #2563eb;
}

/* Push content right when sidebar visible */
main {
  margin-left: 240px;
}

/* Menu Toggle Button */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: #1e3a8a;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 6px;
  z-index: 999;
}

/* Responsive Behavior */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .menu-toggle {
    display: block;
  }
  main {
    margin-left: 0;
    padding-top: 3.5rem; /* space for top menu */
  }
}
/* Hero Section */
.hero {
  background: linear-gradient(to right, #1e3a8a, #2563eb);
  color: white;
  padding: 4rem 2rem;
  text-align: left;
}
.hero-content {
  max-width: 900px;
  margin: auto;
}
.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.hero p {
  font-size: 1.05rem;
  margin: 1rem 0;
  line-height: 1.8;
}
.hero strong {
  color: #facc15; /* golden highlight */
}
.hero em {
  font-style: italic;
  color: #e0f2fe;
}
.hero blockquote {
  margin-top: 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-left: 4px solid #facc15;
  padding-left: 1rem;
  color: #fffbea;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem;
    text-align: center;
  }
  .hero h2 {
    font-size: 1.5rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .hero blockquote {
    font-size: 1rem;
    padding-left: 0.8rem;
  }
}
/* Buttons */
.hero .buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}
.btn.primary {
  background: #facc15; /* golden yellow */
  color: #08101a;
}
.btn.primary:hover {
  background: #fde047;
}
.btn.outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn.outline:hover {
  background: rgba(255, 255, 255, 0.1);
}
@media (max-width: 768px) {
  .hero .buttons {
    justify-content: center;
  }
}
