/* ===== GENERAL STYLES AND RESET ==== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap");

:root {
  --primary-color: #007bff;
  --bg-color: #f9f9f9;
  --text-color: #333;
  --card-bg: #fff;
  --border-radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

li {
  list-style: none;
}

/* ===== HEADER AND NAVIGATION ==== */

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

.logo {
  width: 350px;
}

nav a {
  color: white;
  font-size: 3rem;
  border-radius: 5px;
  margin: 0 3px;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

nav a:hover {
  background-color: white;
  color: #007bff;
}

/* ===== MAIN CONTENT ==== */

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

section {
  margin-bottom: 3rem;
  text-align: center;
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.hero .highlight {
  color: var(--primary-color);
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  text-decoration: none;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #0056b3;
}

.about,
.certificates,
.projects,
.contact-form {
  background: white;
  margin-top: 1rem;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 1rem;
}

.project-links a {
  margin-right: 1rem;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
}

/* ===== Certificate CONTENT ==== */

.certificate-list {
  list-style: none;
  padding-left: 0;
}

.certificate-list li {
  margin-bottom: 1rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

/* ===== CONTACT FORM CONTENT ==== */
.contact-form {
  max-width: 500px;
  margin: auto;
  background: var(--bg-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.contact-form h2 {
  text-align: center;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #007bff;
  border-radius: 5px;
}
.contact-form button {
  background-color: #007bff;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.contact-form button:hover {
  background-color: #0056b3;
}

/* ===== FOOTER CONTENT ==== */

footer {
  text-align: center;
  background: #007bff;
  color: white;
  padding: 0.75rem;
}

footer a {
  color: white;
  padding: 5px;
  text-decoration: none;
}

footer a:hover {
  background-color: white;
  color: #007bff;
}

.flashes li.success {
  color: green;
}
.flashes li.danger {
  color: red;
}
.flashes li.warning {
  color: orange;
}
.flashes li.info {
  color: blue;
}

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 10px 15px;
  font-size: 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 999;
  box-shadow: var(--shadow);
  transition: background 0.3s;
}

#scrollTopBtn:hover {
  background: #0056b3;
}

/* ===== MAIN FORM CONTENT ==== */
.main-form {
  height: 80vh;
  align-content: center;
}

.main-form form {
  align-content: center;
  background: white;
  padding: 1rem;
}

/* ===== DASHBOARD CONTENT ==== */
#dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Dark mode styles */
body.dark {
  background-color: #121212;
  color: var(--text-color);
}

body.dark header {
  background: #1f1f1f;
}

body.dark main,
body.dark footer {
  background: #1c1c1c;
}

body.dark a {
  color: #90caf9;
}

body.dark .btn {
  background: #90caf9;
  color: black;
}

#themeToggle {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  color: white;
  font-size: 20px;
  border: none;
  cursor: pointer;
}

/* Scroll to the top styles */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 10px 15px;
  font-size: 20px;
  background: var(--primary-color);
  color: #0056b3;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 999;
  box-shadow: var(--shadow);
  transition: background 0.3s;
}

#scrollTopBtn:hover {
  background: white;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  header {
    display: block;
  }

  header img {
    width: 300px;
  }
  nav a {
    display: block;
    margin: 0.5rem 0;
  }
}
