@import "/css/assets/normalize.css";
@font-face {
  font-family: "Glory";
  src: url(/fonts/Glory.ttf);
}
@font-face {
  font-family: "Albura";
  src: url(/fonts/Albura.ttf);
}
@font-face {
  font-family: "Catamaran";
  src: url(/fonts/Catamaran.ttf);
}
:root {
  --main-bg: light-dark(white, #2c2b2f);
  --wrapper-bg: light-dark(white, #212121);
  --header-bg: light-dark(white, #161616);
  --text-color: light-dark(rgb(0, 0, 0), #e9e9e9);
}
html {
    background: var(--main-bg);
}
.wrapper {
    width: clamp(150px, 100%, 1200px);
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
    "H"
    "M"
    "F";
    margin: 0 auto;
    transition: 0.25s;
}
*::selection {
    background: rgba(94, 139, 182, 0.442);
}
button {
    border: none;
    background: none;
    font-size: 1rem;
    cursor: pointer;
}
li {
    list-style-type: none;
}
/********** Header **********/
header {
    grid-area: H;
    display: grid;
    grid-template-columns: auto 1fr 60px;
    grid-template-rows: 20px 10px;
    grid-template-areas:
    "zacko nav toggle"
    "border border border";
    gap: 15px;
    align-items: center;
    padding-top: 1rem;
    background-color: var(--header-bg);
}
/********** Nav menu **********/
#nav-menu {
    grid-area: nav;
    display: flex;
    justify-content: center;
    gap: 0px 1rem;
    z-index: 10;
}
#nav-menu,
  #skewed-header span,
  .header__themeToggle {
    animation: slideIn 0.75s 0.8s ease both;
  }
@keyframes slideIn {
  0% {
        transform: translateY(-30px);
        opacity: 0;
    }
  100% {
        transform: translateY(0);
        opacity: 1;
    }
}
header a {
  color: var(--text-color);
  text-decoration: none;
      text-align: center;
}
#zacko {
    grid-area: zacko;
    font-family: "Glory";
    font-variation-settings: "wght" 800;
    margin-left: 20px;
}
#zacko span {
  cursor: pointer;
  display: inline-block;
  transform: translateY(-100px);
  animation: ZackoFall 1.2s ease forwards;
}
@keyframes ZackoFall {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#zacko span:hover {
  background: linear-gradient(
    90deg,
    rgb(241, 17, 17) 0%, 20%,
    rgb(245, 30, 224) 30%,
    rgb(0, 255, 247) 70%,
    rgb(17, 255, 0) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: 0.25s;
}
.border {
    grid-area: border;
    height: 10px;
    width: 100% !important;
    background: linear-gradient(
        90deg,
        rgb(241, 17, 17) 0%,
        rgb(241, 17, 17) 20%,
        rgb(245, 30, 224) 30%,
        rgb(0, 255, 247) 70%,
        rgb(17, 255, 0) 100%
    );
    animation: 1.5s fadeInUp;
}
.text-dense, li {
  font-family: "Albura";
  font-variation-settings: "wght" 500;
}
.nav-button, #nav-check {
    display: none;
}
/********** Subav/dropdown **********/
#subnav {
    margin-top: -4px;
    position: relative; /* Anchors subnav-content to subnav container */
}
#subnav .subnavbtn {
    font-family: inherit;
    font-weight: 500;
}
.subnav-content {
    display: none;
    position: absolute;
    z-index: 1000;
    /* top: 100%; */
    width: max-content;
    padding: 0; /* Removes padding from ul */
    margin: 0; /* Removes margin from ul */
    background-color: var(--wrapper-bg);
}
.subnav-content li {
    display: block; /* Changed from flex */
    padding: 12px 16px; /* Increased padding for better click area */
    list-style: none;
  }
  .subnav-content a {
    display: block;
    width: 100%;
}
#subnav:hover .subnav-content {
    display: block; /* Opens the subnav dropdown on hover */
}
/* LIGHT/DARK MODE */
.nav-button, #nav-check {
  display: none;
}
.header__themeToggle {
  grid-area: toggle;
  background-image: url(/img/sun.png);
  background-size: 95%;
  background-repeat: no-repeat;
  background-position: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.header__themeToggle:hover{
  background-image: url(/img/moon.png);
  transition: 0.3s;
}
.header__themeToggle.header__themeToggle--dark {
  background-image: url(/img/moon.png);
}
.header__themeToggle.header__themeToggle--dark:hover{
  background-image: url(/img/sun.png);
  transition: 0.3s;
}
/********** Main container **********/
.floating-buttons {
  width: 180px;
  position: absolute;
  right: 0;
}
main {
  grid-area: M;
  min-height: 100vh;
  background-color: var(--wrapper-bg);
  /* padding: 15px; */
  text-wrap: pretty;
}
h1 {
  font-size: clamp(1.25rem, 1.1724rem + 0.8276vw, 2rem);
}
h2 {
  font-size: clamp(1rem, 0.9483rem + 0.5517vw, 1.5rem);
}
h1,h2,h3, h4 {
    font-family: "Albura";
    font-variation-settings: "wght" 500;
}
p {
    font-family: "Catamaran";
    font-size: clamp(0.9rem, 0.8845rem + 0.1655vw, 1.05rem);
    letter-spacing: 0.8px;
}
p,
li {
    line-height: 1.6;
    width: 90%;
    margin: 10px auto;
}
/* main > ul {
  justify-self: center;
} */
.title, #centered {
  display: flex;
  justify-content: center;
  text-align: center;

}
/********** Light and dark mode **********/
[data-theme="light"] {
  color-scheme: light;
  /* --main-bg: linear-gradient(rgba(255, 46, 46, 0.85) 0%,rgba(248, 38, 227, 0.85) 20%,rgb(0, 255, 247, 0.85) 70%,rgb(17, 255, 0, 0.65) 100%); */
}
[data-theme="dark"] {
  color-scheme: dark;
  /* --main-bg: linear-gradient(rgba(255, 46, 46, 0.7) 0%,rgba(248, 38, 227, 0.7)30%,rgb(0, 255, 247, 0.7) 70%,rgb(17, 255, 0, 0.6) 100%); */
}
/********** Footer **********/
footer {
  grid-area: F;
  position: relative;
  pointer-events: none;
  text-align: center;
}
.bouncing-balls, .bouncing-balls-container {
  margin-top: 20px;
  width: 100%;
  height: 200px;
  overflow: hidden; /* Balls do not escape container */
}
.bouncing-balls .ball {
  position: absolute;
}
.ball img {
  border-radius: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 880px) {
header {
    grid-template-columns: 40px 125px 60px;
    grid-template-areas:
    "toggle zacko nav"
    "border border border";
    justify-content: space-between;

}
  .header__themeToggle {
    /* position: absolute; */
    left: 1rem; /* Keep it to the left */
  }
  /* Ensure hamburger icon is always clickable */
  .nav-button {
    top: 0;
    right: 0px;
    display: inline-block;
    position: absolute;
    z-index: 1100; /* Higher than the menu */
  }
  .nav-button > label {
    cursor: pointer;
    width: 40px;
    height: 40px;
    padding: 18px;
    display: inline-block;
    z-index: 1100; /* Make sure it's above the menu */
  }
  #nav-menu {
    position: fixed; /* Ensure it floats over other content */
    top: 0;
    left: 0;
    width: 100%;
    height: 0; /* Default hidden */
    background-color: var(--header-bg);
    transition: all 0.4s ease-in-out;
    overflow: hidden !important;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
        line-height: 2;
  }
  #nav-menu a {
    display: block;
    font-size: clamp(1rem, 10vw, 1.5rem);
    margin: 0 auto;
  }
  #nav-check:checked ~ #nav-menu {
    height: 100vh; /* Full screen menu on mobile */
    overflow-y: auto;
  }
  button {
    font-size: 1.5rem;
  }
  #subnav {
    margin-top: 10px;
    position: relative; /* Keep the dropdown anchored */
  }
  .subnav-content {
    border-top: 2px solid var(--text-color);
  color: var(--text-color);
  left: 50%;
  transform: translateX(-50%); /* Center the dropdown */
  width: max-content;
  z-index: 1;
  padding: 0px 15px;
}
.subnav-content li {
    font-size: 1.2rem;
    padding: 0;
    width: 100%;
  }
  #subnav:hover .subnav-content {
    display: block; /* Show dropdown on hover */
  }
  .floating-buttons {
    display: none;
  }
  p,
  li {
    line-height: 2;
  }
}