/* ===========================
   Reset and Base Styles
   =========================== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

/* ===========================
   Header Styles
   =========================== */
header {
  background-color: #24292e;
  color: white;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
  margin: 0;
  font-size: 2em;
}

header p {
  margin-top: 8px;
  font-size: 1.1em;
  color: #ddd;
}

/* ===========================
   Navigation Bar
   =========================== */
nav {
  background-color: #0366d6;
  padding: 10px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

nav li {
  margin: 5px 10px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

nav a:hover {
  background-color: rgba(255,255,255,0.2);
}

nav a.active {
  background-color: #024ea2;
  text-decoration: none;
}

/* ===========================
   Main Content
   =========================== */
main {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

h2 {
  color: #0366d6;
  margin-top: 0;
  border-left: 4px solid #0366d6;
  padding-left: 8px;
}

/* ===========================
   Lists
   =========================== */
ul, ol {
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
}

ul li::before {
  content: "• ";
  color: #0366d6;
  font-weight: bold;
}

/* ===========================
   Links
   =========================== */
a {
  color: #0366d6;
}

a:hover {
  text-decoration: underline;
}

/* ===========================
   Aside Callouts
   =========================== */
aside {
  background: #eef6ff;
  border-left: 4px solid #0366d6;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 4px;
}

/* ===========================
   Figures and Images
   =========================== */
figure {
  margin: 20px 0;
  text-align: center;
}

figure img {
  max-width: 100%;       /* responsive scaling */
  height: auto;          /* maintain aspect ratio */
  border-radius: 6px;    /* optional rounded corners */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

figcaption {
  margin-top: 8px;
  font-size: 0.9em;
  color: #555;
  line-height: 1.4;
}

/* ===========================
   Footer
   =========================== */
footer {
  text-align: center;
  background-color: #24292e;
  color: white;
  padding: 15px;
  margin-top: 40px;
  font-size: 0.9em;
}

footer a {
  color: #ddd;
  margin: 0 5px;
}

footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
  }

  figure img {
    border-radius: 0;   /* full-width look on mobile */
  }

  figcaption {
    font-size: 0.85em;
  }
}
