:root {
  --primary: #004e89;
  --gray: #747a82;
  --light: #f2f4f7;
  --dark: #003459;
  --white: #ffffff;
  --font: "Poppins", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font);
}
html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--white);
  color: var(--dark);
  line-height: 1.6;
  padding-top: 70px;
}

main {
  flex: 1;
}

/* Container */
.container {
  width: 90%;
  max-width: 1140px;
  margin: 0 auto;
}

/* Navbar */
.navbar {
  background: var(--light);
  border-bottom: 1px solid #eee;
  padding: 0.5rem 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar a {
  text-decoration: none;
}

.navbar-brand {
  background-color: none;
  color: var(--dark);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.navbar-brand span {
  background-color: none;
  color: var(--dark);
  font-weight: 500;
  font-size: 16px;
  padding: 2px 5px;
  border-radius: 4px;
  border: solid var(--dark) 2px;
  margin-left: 3px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 16px;
  height: 2px;
  background-color: var(--dark);
  border-radius: 2px;
  transition: all 0.3s;
}

.menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.menu-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  user-select: none;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  right: -260px;
  width: 250px;
  height: 100%;
  background: var(--light);
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  padding: 3rem 1rem;
  transition: right 0.3s ease;
  z-index: 999;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  margin-bottom: 0.8rem;
}

.sidebar ul li a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--dark);
  font-size: 1.2rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
}

.sidebar.active {
  right: 0;
}

.sidebar ul li a:hover {
  background: var(--dark);
  color: var(--light);
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
}

.overlay.active {
  display: block;
}

/* Home */
.home {
  text-align: center;
  padding: 2.5rem;
}

.home h2 {
  font-size: 2.7rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.home h2 span {
  color: var(--primary);
}

.home p {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 800px;
  margin: 0 auto;
}

.btn-aboutme {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.aboutme-btn {
  display: inline-block;
  background-color: none;
  border: solid var(--dark) 2px;
  color: var(--dark);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s, opacity 0.3s;
}

.aboutme-btn:hover {
  background: var(--dark);
  color: var(--light);
}

.about::after {
  content: "";
  display: block;
  height: 3px;
  width: 100%;
  background: linear-gradient(
    to right,
    transparent,
    var(--primary),
    transparent
  );
  margin: 2rem 0;
}

.about-after::after {
  content: "";
  display: block;
  height: 3px;
  width: 100%;
  background: linear-gradient(to right, transparent, var(--gray), transparent);
  margin: 2rem 0;
}

/* Training & Online Course*/
.course h3 {
  font-size: 2rem;
}
.list-course {
  margin: auto;
}
.list-course p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: start;
}

.list-course span {
  text-align: right;
}

/* Projects */
.projects {
  padding: 4rem 0;
}

.card-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 0 auto;
  max-width: calc(4 * 250px + 3 * 1.5rem);
}

.card-list a {
  text-decoration: none;
}

.custom-card {
  background: #204d6d;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  width: 250px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  cursor: pointer;
}

.custom-card:hover {
  background-color: var(--dark);
}

.custom-card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.custom-card img {
  width: 35px;
  margin-right: 5px;
}

.custom-card h3 {
  font-size: 1.6rem;
  font-weight: 700;
}

.custom-card hr {
  border: none;
  border-top: 2px solid rgba(255, 255, 255, 0.8);
  margin: 0 auto 1rem;
  width: 80%;
}

.custom-card p {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Footer */
footer {
  padding: 10px;
  background: var(--light);
  text-align: center;
  border-top: solid #eee 1px;
}
footer .social-links {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}

footer .social-links a {
  font-size: 1.8rem;
  color: var(--dark);
  transition: color 0.3s;
}

footer .social-links a:hover {
  color: var(--gray);
}

@media (min-width: 768px) {
  .card {
    flex-direction: row;
    align-items: center;
  }

  .card img {
    margin-bottom: 0;
    margin-right: 1rem;
    width: 150px;
    height: auto;
    flex-shrink: 0;
  }

  .card-text {
    flex: 1;
  }
}
