:root {
  --primary-color: #0b132b;
  --secondary-color: #1c2541;
  --accent-color: #5bc0be;
  --text-light: #ffffff;
  --text-dark: #222;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-dark);
  background-color: #f9f9f9;
  margin: 0;
}

/* Header */
header {
  background-color: var(--primary-color);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header i {
  font-size: 1.8rem;
  color: var(--accent-color);
}

#menu-toggle {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.8rem;
}

/* Navigation */
nav {
  display: none;
}

nav.open {
  display: block;
  background-color: var(--secondary-color);
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav a {
  display: block;
  color: var(--text-light);
  text-decoration: none;
  padding: 1rem;
}

nav a:hover, nav a.active {
  background-color: var(--accent-color);
}

/* Main */
main {
  padding: 1rem;
}

.about {
  text-align: center;
}

.about img {
  width: 150px;
  border-radius: 50%;
  margin-top: 1rem;
}

.courses {
  margin-top: 2rem;
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: var(--text-light);
  text-align: center;
  padding: 1.5rem 1rem;
}

footer .socials {
  margin-bottom: 0.5rem;
}

footer a i {
  font-size: 1.6rem;
  color: var(--accent-color);
  margin: 0 0.3rem;
  transition: color 0.3s ease;
}

footer a i:hover {
  color: var(--text-light);
}

/* --- Course Section Styles --- */
.course-list-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.course-card {
  background-color: white;
  border-left: 6px solid var(--accent-color);
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.course-card:hover {
  transform: scale(1.02);
}

.course-card.completed {
  background-color: #e6f9f8;
}

/* Filter buttons */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.filter-buttons button {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  background-color: var(--accent-color);
}

/* --- Responsive layout --- */
@media (min-width: 768px) {
  nav {
    display: block !important;
  }

  #menu-toggle {
    display: none;
  }

  .course-list-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    text-align: left;
  }

  .about img {
    width: 200px;
  }
}

.course-details {
  display: none !important;
}

/* --- Modal Styles --- */
.modal-overlay {
  display: none; /* hidden by default */
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  font-size: 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
  color: #333;
}

.modal-title {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.modal-description-box {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid #ddd;
}

/* --- Modal Overlay and Content Styling --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 19, 43, 0.8); /* translucent dark overlay */
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #fff;
  color: var(--text-dark);
  border-radius: 10px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
}

.modal-title {
  margin-top: 0;
  color: var(--primary-color);
}

.modal-course-code {
  font-weight: bold;
  color: var(--accent-color);
  margin-top: 0.3rem;
}

.modal-detail {
  margin: 0.4rem 0;
  font-size: 0.95rem;
}

.modal-description-box {
  background-color: #f7f7f7;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  border-left: 4px solid var(--accent-color);
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--accent-color);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.modal-close-btn:hover {
  transform: scale(1.2);
  color: var(--primary-color);
}

/* Animation */
@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}