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

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #f0f4f8, #dceefb);
  color: #333;
  line-height: 1.6;
}

 /* Task 1: Navigation Bar with Flexbox */
    .site-header {
      background: #0b3a5b;
      color: white;
      padding: 20px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    /* 2. Turn the header container into a flex container */
    .nav-container {
      display: flex;
      /* 3. Align the logo and the links horizontally */
      justify-content: space-between;
      /* 5. Make sure the logo and links are vertically centered */
      align-items: center;
      max-width: 1200px;
      margin: 0 auto;
    }

    /* 1. Website logo on the left */
    .logo {
      font-size: 1.8rem;
      font-weight: bold;
      color: white;
      text-decoration: none;
      display: flex;
      align-items: center;
      transition: transform 0.3s ease;
    }

    .logo:hover {
      transform: scale(1.05);
    }

    .logo::before {
      content: "🇰🇿";
      margin-right: 0.5rem;
      font-size: 2rem;
    }

    /* 1. List of links on the right */
    .nav-links {
      display: flex;
      list-style: none;
      /* 4. Apply spacing between the links using Flexbox properties */
      gap: 2rem;
      /* 5. Vertically center the links */
      align-items: center;
    }

    .nav-links li {
      display: flex;
      align-items: center;
    }

    .nav-links a {
      color: white;
      text-decoration: none;
      padding: 0.8rem 1.2rem;
      border-radius: 8px;
      font-weight: 500;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .nav-links a:hover {
      background-color: rgba(255,255,255,0.2);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

/* headears */
h1 {
  text-align: center;
  background: #0b3a5b;
  color: white;
  padding: 20px 0;
  margin: 0;
  letter-spacing: 1px;
}

.about h2 {
  text-align: center;
  margin-top: 30px;
  font-size: 28px;
  color: #0b3a5b;
}

.intro{
    font-size: 18px;
    margin: 20px;    
}

/*images*/
.images {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 40px 0;
}

.img-circle {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.img-circle:hover {
  transform: scale(1.05);
}

/*info*/
 .info-block {
      max-width: 800px;
      margin: 30px auto;
      padding: 25px;
      background: #ffffff;
      border-left: 6px solid #0b3a5b;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .info-block:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

    .info-block h3 {
      margin-top: 0;
      color: #0b3a5b;
    }

/* page search */
.search-box {
  margin: 50px auto;
  max-width: 400px;
  padding: 20px;
  background: #f1f5f9;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  text-align: center;
}

.search-box input {
  width: 70%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.search-box button {
  padding: 10px 15px;
  background: #0b3a5b;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.search-box button:hover {
  background: #ff8a65;
  transform: scale(1.05);
}

/*Pseudo-Elements:*/
.decorator::before {
  content: "★ ";
  color: #ff8a65;
}

.decorator::after {
  content: " ★";
  color: #ff8a65;
}

.about-section {
  text-align: center; 
  margin-top: 40px;   
}

/*Button - task 3 Objects and Methods*/
#show-info-btn {
  background-color: #0b3a5b;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s;
}

#show-info-btn:hover {
  background-color: #ff8a65;
}

/* text smoth appear */
#about-text {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s ease, opacity 0.6s ease;
  margin-top: 15px;
  color: #333;
  font-size: 18px;
  line-height: 1.6;
}

#about-text.visible {
  max-height: 200px; 
  opacity: 1;
}

/* Task 3 Higher-Order Functions */
.fun-facts {
  background-color: #f8f9fa;
  padding: 30px 20px;
  margin: 40px auto;
  text-align: center;
  border-radius: 12px;
  max-width: 700px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.fun-facts h2 {
  color: #0b3a5b;
  margin-bottom: 20px;
}

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

.fun-facts li {
  background: white;
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fun-facts li:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

/* footer */
.ftr {
  text-align: center;
  padding: 15px;
  background: hsl(205, 78%, 20%);
  color: white;
  margin-top: 30px;
}

#github5{
  display: inline-block;
  color: #f8f9fa;
  text-decoration: none;
  margin-top: 10px;
}

#email{
  color: #ccc;
}

#github5:hover{
  color: blue;
}

/* TOGGLE BUTTON Dark/Light Mode */
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #ffffff66;
  border-radius: 8px;
  background: #ffffff1a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s, color .2s;
  height: 36px;              
  margin: 0;                
}

.theme-btn:hover {
  background: #ffffff2a;
  transform: translateY(-2px);
}

/* DARK MODE */
body.dark-mode {
  background: #0f172a;
  color: #e2e8f0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header & Navigation */
body.dark-mode .site-header {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
body.dark-mode .logo {
  color: #bfdbfe;
}
body.dark-mode .nav-links a {
  color: #e2e8f0;
}
body.dark-mode .nav-links a:hover {
  background: rgba(255,255,255,0.12);
  color: #93c5fd;
}

/* Toggle button */
body.dark-mode .theme-btn {
  background: #334155;
  border: 1px solid #475569;
  color: #f8fafc;
  transition: background 0.2s, transform 0.2s;
  padding: 8px 14px;
  border-radius: 8px;
}
body.dark-mode .theme-btn:hover {
  background: #475569;
  color: #93c5fd;
}

/* Headings */
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode .decorator {
  color: #93c5fd;
}

/* Intro text */
body.dark-mode .intro {
  color: #e2e8f0;
}

/* Images */
body.dark-mode .img-circle {
  box-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

/* Info blocks */
body.dark-mode .info-block {
  background: #1e293b;
  color: #e2e8f0;
  border-left: 6px solid #2563eb;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
body.dark-mode .info-block h3 {
  color: #93c5fd;
}

/* Search box */
body.dark-mode .search-box {
  background: #1e293b;
  color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
body.dark-mode .search-box input {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid #475569;
}
body.dark-mode .search-box button {
  background: #2563eb;
}
body.dark-mode .search-box button:hover {
  background: #1d4ed8;
}

/* About section */
body.dark-mode .about-section {
  color: #e2e8f0;
}
body.dark-mode #show-info-btn {
  background: #2563eb;
}
body.dark-mode #show-info-btn:hover {
  background: #1d4ed8;
}
body.dark-mode #about-text {
  color: #f1f5f9;
}

/* Fun facts */
body.dark-mode .fun-facts {
  background: #1e293b;
  color: #e2e8f0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}
body.dark-mode .fun-facts li {
  background: #334155;
  color: #f1f5f9;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
body.dark-mode .fun-facts li:hover {
  background: #475569;
  transform: translateY(-4px);
}

/* Footer */
body.dark-mode .ftr {
  background: #1e293b;
  color: #f1f5f9;
}
body.dark-mode #github5,
body.dark-mode #email {
  color: #93c5fd;
}
body.dark-mode #github5:hover {
  color: #60a5fa;
}

* {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

mark {
  background-color: #ffeb3b;
  color: #000;
  padding: 0 3px;
  border-radius: 3px;
}

/* --- Small screens (phones) --- */
@media (max-width: 600px) {

  /* Navigation */
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    background: #0b3a5b;
    padding: 10px 0;
  }

  .nav-links li {
    width: 100%;
    text-align: left;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.8rem 1.5rem;
  }

  .theme-btn {
    margin-top: 10px;
    align-self: center;
  }

  /* Intro text */
  .intro {
    font-size: 16px;
    margin: 10px;
    text-align: justify;
  }

  /* Images */
  .images {
    flex-direction: column;
    gap: 15px;
  }

  .img-circle {
    width: 180px;
    height: 180px;
  }

  /* Info blocks */
  .info-block {
    margin: 20px;
    padding: 20px;
  }

  /* Search box */
  .search-box {
    max-width: 90%;
    padding: 15px;
  }

  /* Fun facts */
  .fun-facts {
    max-width: 90%;
    padding: 20px;
  }

  /* Footer */
  .ftr {
    font-size: 14px;
    padding: 10px;
  }
}

/* --- Medium screens (tablets) --- */
@media (min-width: 601px) and (max-width: 992px) {
  .nav-links {
    gap: 1rem;
  }

  .images {
    flex-wrap: wrap;
    justify-content: center;
  }

  .img-circle {
    width: 200px;
    height: 200px;
  }

  .info-block {
    max-width: 90%;
  }

  .search-box {
    max-width: 80%;
  }

  .fun-facts {
    max-width: 80%;
  }
}

/* --- Large screens (desktops) --- */
@media (min-width: 993px) {
  .nav-container {
    max-width: 1200px;
  }

  .info-block {
    max-width: 800px;
  }

  .fun-facts {
    max-width: 700px;
  }
}

/* Burger button hidden by default */
.burger {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* Show burger on mobile */
@media (max-width: 600px) {
  .burger {
    display: block;
  }

  .nav-links {
    display: none;
  }

  .nav-links.active {
    display: flex;
  }
}