:root {
  /* Dark gray theme */
  --bg: #121212;          /* main background */
  --primary: #e5e5e5;     /* primary accent (light gray/white) */
  --secondary: #a1a1aa;   /* secondary gray */
  --text: #f5f5f5;        /* main text */
  --card: #1c1c1c;        /* card / panel background */
  --border: #2a2a2a;      /* subtle borders */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
	Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

header {
  background: linear-gradient(180deg, #1a1a1a, #0f0f0f);
  color: #ffffff;
  padding: 2.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

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

header p {
  margin: 0;
  opacity: 0.9;
}

nav {
  background: #141414;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* restored original spacing */
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem; /* restored original padding */
  justify-content: center;
}

nav a {
  text-decoration: none;
  color: #ffffff; /* white tone for top menu */
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.9;
}

nav a:hover {
  opacity: 1;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

section {
  background: linear-gradient(180deg, #1c1c1c, #151515);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

section h2 {
  margin-top: 0;
  color: #ffffff; /* white tone for table of contents titles */
  font-size: 1.45rem;
  letter-spacing: 0.3px;
}

section h3 {
  margin-top: 1.2rem;
  font-size: 1.1rem;
}

ul, ol {
  padding-left: 1.2rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.spec-table th,
.spec-table td {
  border: 1px solid var(--border);
  padding: 0.6rem;
  text-align: left;
  font-size: 0.95rem;
}

.spec-table th {
  background: #1a1a1a;
  width: 35%;
}

.warning {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.15);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 6px;
}

.tip {
  border-left: 4px solid #22c55e;
  background: rgba(34, 197, 94, 0.15);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 6px;
}

/* Image styles */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.image-grid figure {
   border: 1px solid var(--border);
   border-radius: 12px;
   padding: 0.75rem;
   margin: 0; /* remove outer margin */
   background: #161616;
   display: flex;              /* place image and caption side by side */
   /* align-items: center; */
   gap: 0.75rem;
 }

.image-grid img {
   width: 50%;                 /* image on the left */
   height: auto;
   object-fit: contain;
 }

figcaption {
   font-size: 1rem;
   color: var(--secondary);
   margin-top: 0;              /* remove bottom layout behavior */
   width: 45%;                 /* caption on the right */
 }

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background: #0f0f0f;
}

@media (max-width: 600px) {
  header h1 {
	font-size: 1.6rem;
  }

  nav ul {
	gap: 0.5rem; /* original mobile spacing */
  }
}

  nav ul {
	gap: 1.8rem; /* reduced but still comfortable on mobile */
  }
}

  nav ul {
	gap: 0.5rem;
  }
}