:root {
  --primary: #2c3e50;
  --accent: #e74c3c;
  /* UART red/orange tone */
  --light: #ecf0f1;
  --dark: #1a252f;
  --success: #27ae60;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fafafa;
}

.header {
  background: var(--primary);
  color: white;
  padding: 2rem 5%;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5%;
}

h1,
h2,
h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.header h1 {
  font-size: 2.5rem;
  color: white;
}

.hero {
  background: linear-gradient(to right, var(--primary), var(--accent));
  color: white;
  padding: 3rem 5%;
  text-align: center;
}

.hero h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.btn {
  display: inline-block;
  background: var(--success);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
  margin: 0.5rem;
}

.btn:hover {
  background: #219653;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--accent);
}

.card h3 {
  color: var(--accent);
}

.images {
  text-align: center;
  margin: 3rem 0;
}

.images img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  margin: 1rem auto;
  display: block;
}

.code-sample {
  background: var(--dark);
  color: #f8f8f2;
  padding: 1.2rem;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.note {
  background: #fef3f2;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.mode-tag {
  background: #fdecea;
  color: var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  text-align: center;
}

footer {
  text-align: center;
  padding: 2rem;
  background: var(--dark);
  color: #aaa;
  font-size: 0.9rem;
}

@media (max-width: 768px) {

  .hero,
  .header {
    padding: 1.5rem 5%;
  }

  .hero h2 {
    font-size: 1.8rem;
  }
}

.images {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Horizontally centers images */
  justify-content: center;
  /* Vertically centers if container has height */
  gap: 30px;
  margin: 40px 0;
}

.images img {
  max-width: 90%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.images figcaption {
  text-align: center;
  font-size: 1rem;
  color: #4a5568;
  margin-top: 8px;
}
