:root {
  --primary-color: #07e236;
  --secondary-color: #c1e207;
  --tertiary-color: #e2a807;
  --quaternary-color: #ff3d00;
  --quaternary-light-color: #ff8762;

  --bg-main: #000;
  --bg-accent-1: #212121;
  --bg-accent-2: #191919;
  
  
  --btn: #424242;
  --btn-html: rgb(106, 190, 205);
  --btn-css: rgb(62, 84, 163);
  --btn-js: rgb(207, 99, 144);
  --btn-api: rgb(170, 215, 66);

  --text-color: #fff;
  --text-color--2: #000000;
}

@media only screen and (max-width: 720px) {
  /* Styles for screens with a maximum width of 720px */
  .container-main {
    margin: 1rem 5rem;
  }
}

@media (min-width: 721px) {
  /* Styles for screens with a minimum width of 721px */
  .container-main {
    margin: 5rem 10rem;
  }
}

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

body {
  font-family: "Roboto", sans-serif;
  text-align: center;
  font-size: 62.5%; /* 1rem = 10px, so 62.5% of 10px = 6.25px */
  display: grid;
  background: var(--bg-main);
}



header {
  position: sticky;              /* 🧷 Keeps header fixed within scrollable area */
  top: 0;                        /* 📍 Stick to the very top */
  z-index: 1000;                 /* ⬆️ Ensure it stays above all content */

  height: 4rem;
  width: 100%;

  background: var(--bg-accent-2);
  color: var(--text-color);

  display: flex;
  align-items: center;
  justify-content: center;

  /* 💅 Optional UI Enhancements */
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* soft shadow when scrolling */
  backdrop-filter: blur(6px);               /* subtle glass effect */
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Optional: Change style when page is scrolled */
body.scrolled header {
  background: var(--bg-accent-3);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}


header > h1 {
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  font-size: 1.2rem;
}

.container-main {
  display: grid;
  padding: 2rem; /* 20px converted to rem */
  grid-template-columns: repeat(
    auto-fill,
    minmax(19rem, 1fr)
  ); /* 300px converted to rem */
  gap: 2rem;
  overflow: hidden;
}

.container-sub {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 1rem;
  gap: 2.8rem;

  border-radius: 0.6rem;
  padding: 0.8rem;
  width: 98%;
  height: 98%;

  background: var(--bg-accent-1);
  transition: border 0.5s linear;

  position: relative;
}

.newbie-container-sub:hover {
  border-bottom: 2px solid rgb(106, 190, 205);
}
.junior-container-sub:hover {
  border-bottom: 2px solid rgb(170, 215, 66);
}
.intermediate-container-sub:hover {
  border-bottom: 2px solid rgb(241, 182, 4);
}

.advanced-container-sub:hover {
  border-bottom: 2px solid rgb(244, 137, 37);
}

.container-description {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1.6rem;
  border-radius: 0.6rem;
  align-items: center;
  font-size: 1.2rem;
  background: var(--bg-accent-2);
}

.container-description > a {
  text-decoration: none;
  color: var(--text-color);
}

.sticker {
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  gap: 0.4rem;
  font-family: Barlow, sans-serif;
  padding: 0.6rem 0.8rem;
  letter-spacing: 0.2rem;
  color: #000;

  border-top-right-radius: 0.4rem;
  border-top-left-radius: 1.2rem;
  border-bottom-right-radius: 1.2rem;
  border-bottom-left-radius: 0.4rem;
}

.round-sticker {
  position: absolute;
  z-index: 20;
  top: -2.5%;
  left: -2.5%;
  height: 2.4rem;
  width: 2.4rem;
  font-size: 1.2rem;
  border-radius: 50%;
  background: rgb(168, 241, 50);
  display: flex;
  align-items: center;
  justify-content: center;
}

.newbie {
  background: rgb(106, 190, 205);
}
.junior {
  background: rgb(170, 215, 66);
}
.intermediate {
  background: rgb(241, 182, 4);
}

.advanced {
  background: rgb(244, 137, 37);
}

.font-style {
  padding: 0.6rem;
  border-radius: 0.2rem;
  margin-left: 0.2rem;

  font-size: 1rem;

  color: var(--text-color--2);
}

.font-html-color {
  background: var(--btn-html);
}
.font-css-color {
  background: var(--btn-css);
}

.font-js-color {
  background: var(--btn-js);
}

.font-api-color {
  background: var(--btn-api);
}

.my-animation-links {
  text-decoration: none;

  position: relative;
}

.my-animation-links::after {
  content: " ";

  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;

  transform: scaleX(0);
  transform-origin: right;
  transition: transform 250ms ease-in;
}

.newbie-link::after {
  background: rgb(106, 190, 205);
}
.junior-link::after {
  background: rgb(170, 215, 66);
}
.intermediate-link::after {
  background: rgb(241, 182, 4);
}

.advanced-link::after {
  background: rgb(244, 137, 37);
}

.my-animation-links:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.carousel {
  position: relative;

  height: 20vh;
  width: 85%;
  margin: 0 auto;
}
/*  */
.carousel__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel__track-container {
  height: 100%;
  position: relative;

  overflow: hidden;
}

.carousel__track {
  list-style: none;

  position: relative;
  height: 100%;

  transition: transform 250ms ease-in;
}

.carousel__slide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

.carousel__button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  background: transparent;
  border: none;

  cursor: pointer;
}

.carousel__button--left {
  left: -30px;
}

.carousel__button--right {
  right: -30px;
}
.carousel__button > img {
  width: 24px;

  border-radius: 50%;
}

.carousel__nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
}

.carousel__indicator {
  border: none;
  border-radius: 50%;
  width: 10px;
  aspect-ratio: 1;
  background: var(--quaternary-light-color);

  cursor: pointer;
}

.carousel__indicator.current-slide {
  background: var(--quaternary-color);
}

.is-hidden {
  display: none;
}


/* -------------- */
.sorting {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 1rem 2rem;
  font-size: 1rem;
  color: #ccc;
}

.sorting select {
  background-color: #222;
  color: #fff;
  border: 1px solid #555;
  border-radius: 5px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.sorting select:hover {
  background-color: #333;
}

/* Work in progress placeholder */
.wip-placeholder {
  background: repeating-linear-gradient(
    -45deg,
    #444,
    #444 10px,
    #555 10px,
    #555 20px
  );
  color: #fff;
  font-weight: bold;
  text-align: center;
  width: 100%;
  height: 100%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}
