/* ─────────────────────────────────────────────
   RESET & GLOBAL
───────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
  background-color: #050505;
  color: #fff;
  line-height: 1.6;
}
a {
  color: #ff6600;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────────
   HEADER & NAV
───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
}
.site-header .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.site-logo {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(0, -50%);
  font-size: 1.5rem;
}
.main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.main-nav a {
  font-weight: 500;
  transition: color 0.2s;
}

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 100px 1.5rem 4rem;
  background: #333;
}
.hero-content {
  flex: 1 1 300px;
  max-width: 580px;
}
.hero-content h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}
.hero-content .subtitle {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #ddd;
}
.btn {
  display: inline-block;
  background: #ff6600;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.3s;
}
.btn:hover {
  background: #e65500;
}
.hero-image {
  flex: 0 0 500px;
  margin-top: 2rem;
}
.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

/* ─────────────────────────────────────────────
   TABLE OF CONTENTS
───────────────────────────────────────────── */
.toc {
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}
.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  list-style: none;
  background: #222;
  border-radius: 8px;
  padding: 0.5rem 1rem;
}
.toc a {
  font-size: 0.9rem;
  color: #fff;
}

/* ─────────────────────────────────────────────
   GENERIC CARD
───────────────────────────────────────────── */
.card {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #333;
  padding-bottom: 0.5rem;
}

/* ─────────────────────────────────────────────
   TWO‑COLUMN LAYOUT
───────────────────────────────────────────── */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.two-column figure {
  margin: 0;
}
.two-column figcaption {
  font-size: 0.9rem;
  color: #ccc;
  text-align: center;
  margin-top: 0.5rem;
}

/* ─────────────────────────────────────────────
   CODE BLOCKS
───────────────────────────────────────────── */
pre {
  background: #111;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}
code {
  font-family: monospace;
  font-size: 0.9rem;
}

/* ─────────────────────────────────────────────
   GALLERY
───────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.gallery figure {
  background: #222;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  margin: 0;
}
.gallery img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.gallery figcaption {
  font-size: 0.9rem;
  color: #ccc;
  margin-top: 0.5rem;
  text-align: center;
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.site-footer {
  background: #000;
  padding: 2rem 0 1rem;
  margin-top: 4rem;
}
.site-footer .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}
.site-footer p {
  color: #888;
  font-size: 0.9rem;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 120px;
  }
  .hero-image {
    margin-top: 1rem;
  }
  .two-column {
    grid-template-columns: 1fr;
  }
  /* Add a little breathing room above the image */
  .two-column figure {
    margin-top: 1.5rem;
  }

  #hardware.two-column,
  #software.two-column {
    grid-template-columns: 1fr !important;
  }

  /* Give some breathing room above each image */
  #hardware.two-column figure,
  #software.two-column figure {
    margin-top: 1.3rem;
  }
}


/* Image controls
*/
/* Make hardware section grid 2 columns: text (fluid) + image (fixed 300px) */
#hardware.two-column {
  grid-template-columns: 1fr 300px;
}

/* Then clamp the <img> inside that figure to fill but not exceed */
#hardware.two-column figure img {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: cover;
}

#software.two-column{
  grid-template-columns:1fr 300px ;
}

#software.two-column figure img {
  width: 100%;
  max-width: 300px;
  height: 400;
  object-fit: cover;
}


/*full screen button design*/
.img-wrapper {
  position: relative;
  display: inline-block;
}

.img-wrapper .fullscreen-btn {
  position: absolute;
  bottom: 0.5rem;
  right: 0.1rem;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.img-wrapper .fullscreen-btn:hover {
  background: rgba(0,0,0,0.8);
}

/* FULL‑SCREEN OVERLAY */
.img-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.img-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}
.img-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
}
