:root {
  --black: #000000;
  --white: #ffffff;
  --light-blue: #e4e4e4; /* Neutral accent to match monochrome theme */
  --dark-blue: #b3b3b3;
  --grey: #9a9a9a;
}
* {
  padding: 0;
  margin: 0;
  font-family: "Times New Roman", Times, serif;
}
html {
  scroll-behavior: smooth;
}
/*  */
/* NAV */
/*  */
nav {
  position: fixed;
  z-index: 1818;
  width: 100%;
  /* background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px); */
  background-color: var(--black);
  box-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;

  .nav-container {
    margin: 8px;

    .nav-menu {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5%;

      li {
        list-style: none;

        a {
          text-decoration: none;
          letter-spacing: 2px;
          color: var(--white);
          font-weight: bold;
          text-shadow: 1px 1px var(--black), -1px -1px var(--black),
            1px -1px var(--black), -1px 1px var(--black);

          img {
            border-radius: 4px;
            border: 1px solid var(--black);
          }
        }
      }

      .ctfs-menu-item {
        position: relative;
      }

      .ctfs-nav-link {
        position: relative;
        cursor: pointer;
        transition: all 0.3s ease;
        display: inline-block;

        &:hover {
          transform: translateY(-2px);
        }

        &::after {
          content: "";
          position: absolute;
          bottom: -4px;
          left: 0;
          width: 0;
          height: 2px;
          background: linear-gradient(90deg, var(--white), var(--dark-blue));
          transition: width 0.3s ease;
        }

        &:hover::after {
          width: 100%;
        }
      }

      .ctfs-dropdown {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 12px;
        width: 280px;
        background: rgba(12, 12, 12, 0.9);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
          0 0 20px rgba(100, 128, 155, 0.2);
        opacity: 0;
        visibility: hidden;
        transform: translateX(-50%) translateY(-10px);
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        z-index: 2000;
        overflow: hidden;

        &::before {
          content: "";
          position: absolute;
          top: -6px;
          left: 50%;
          transform: translateX(-50%);
          width: 12px;
          height: 12px;
          background: rgba(12, 12, 12, 0.9);
          border-top: 1px solid rgba(255, 255, 255, 0.15);
          border-left: 1px solid rgba(255, 255, 255, 0.15);
          border-radius: 2px;
          transform: translateX(-50%) rotate(45deg);
        }

        .ctf-item {
          display: flex;
          align-items: center;
          gap: 12px;
          padding: 14px 16px;
          text-decoration: none;
          color: var(--white);
          transition: all 0.3s ease;
          border-left: 3px solid transparent;
          position: relative;
          overflow: hidden;

          &::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
              90deg,
              rgba(255, 255, 255, 0.18),
              transparent
            );
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: -1;
          }

          &:hover {
            border-left-color: var(--white);
            padding-left: 20px;

            &::before {
              opacity: 0.2;
            }

            .ctf-badge {
              transform: scale(1.15);
              color: var(--white);
            }

            .fa-arrow-right {
              transform: translateX(4px);
              color: var(--white);
            }

            .ctf-name {
              color: var(--white);
              letter-spacing: 1px;
            }
          }

          .ctf-badge {
            font-weight: bold;
            font-size: 12px;
            background: rgba(255, 255, 255, 0.12);
            padding: 4px 8px;
            border-radius: 4px;
            min-width: 32px;
            text-align: center;
            color: var(--white);
            transition: all 0.3s ease;
          }

          .ctf-name {
            flex: 1;
            font-weight: 600;
            font-size: 14px;
            letter-spacing: 1px;
            transition: all 0.3s ease;
          }

          .ctf-year {
            font-size: 12px;
            color: var(--grey);
            transition: all 0.3s ease;
          }

          .fa-arrow-right {
            font-size: 12px;
            color: var(--grey);
            transition: all 0.3s ease;
          }
        }

        .ctf-item:first-child {
          animation: slideInItem 0.5s ease 0.05s backwards;
        }

        .ctf-item:nth-child(2) {
          animation: slideInItem 0.5s ease 0.1s backwards;
        }

        .ctf-item:nth-child(3) {
          animation: slideInItem 0.5s ease 0.15s backwards;
        }

        .ctf-item:nth-child(4) {
          animation: slideInItem 0.5s ease 0.2s backwards;
        }
      }

      .ctfs-menu-item:hover .ctfs-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
      }
    }
  }
}

@keyframes slideInItem {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/*  */
/* ALL */
/*  */
body {
  /*background-color: var(--black); */
  /* background: linear-gradient(27deg, #151515 5px, transparent 5px) 0 5px,
    linear-gradient(207deg, #151515 5px, transparent 5px) 10px 0px,
    linear-gradient(27deg, #222 5px, transparent 5px) 0px 10px,
    linear-gradient(207deg, #222 5px, transparent 5px) 10px 5px,
    linear-gradient(90deg, #1b1b1b 10px, transparent 10px),
    linear-gradient(
      #1d1d1d 25%,
      #1a1a1a 25%,
      #1a1a1a 50%,
      transparent 50%,
      transparent 75%,
      #242424 75%,
      #242424
    );
  background-color: #131313;
  background-size: 20px 20px; */

  background-color: #161616;
  opacity: 1;
  background-image: linear-gradient(
      30deg,
      #000000 12%,
      transparent 12.5%,
      transparent 87%,
      #000000 87.5%,
      #000000
    ),
    linear-gradient(
      150deg,
      #000000 12%,
      transparent 12.5%,
      transparent 87%,
      #000000 87.5%,
      #000000
    ),
    linear-gradient(
      30deg,
      #000000 12%,
      transparent 12.5%,
      transparent 87%,
      #000000 87.5%,
      #000000
    ),
    linear-gradient(
      150deg,
      #000000 12%,
      transparent 12.5%,
      transparent 87%,
      #000000 87.5%,
      #000000
    ),
    linear-gradient(
      60deg,
      #00000077 25%,
      transparent 25.5%,
      transparent 75%,
      #00000077 75%,
      #00000077
    ),
    linear-gradient(
      60deg,
      #00000077 25%,
      transparent 25.5%,
      transparent 75%,
      #00000077 75%,
      #00000077
    );
  background-size: 20px 35px;
  background-position: 0 0, 0 0, 10px 18px, 10px 18px, 0 0, 10px 18px;

  /* background-color: black;
  background-image: radial-gradient(
      white,
      rgba(255, 255, 255, 0.2) 2px,
      transparent 40px
    ),
    radial-gradient(white, rgba(255, 255, 255, 0.15) 1px, transparent 30px),
    radial-gradient(white, rgba(255, 255, 255, 0.1) 2px, transparent 40px),
    radial-gradient(
      rgba(255, 255, 255, 0.4),
      rgba(255, 255, 255, 0.1) 2px,
      transparent 30px
    );
  background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
  background-position: 0 0, 40px 60px, 130px 270px, 70px 100px; */
}
.section-main,
.section-members {
  min-height: 100vh;
}
.section-ctfs {
  min-height: 80vh;
}
/*  */
/* MAIN */
/*  */
.section-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;

  .main-left {
    .main-img {
      transition: box-shadow 1s;
      /* box-shadow: rgba(255, 255, 255, 0.4) -5px 5px,
        rgba(255, 255, 255, 0.3) -10px 10px, rgba(255, 255, 255, 0.2) -15px 15px,
        rgba(255, 255, 255, 0.1) -20px 20px,
        rgba(255, 255, 255, 0.05) -25px 25px; */
      /* box-shadow: var(--black) -10px 10px 0px -3px, var(--white) -10px 10px,
        var(--black) -20px 20px 0px -3px, var(--white) -20px 20px,
        var(--black) -30px 30px 0px -3px, var(--white) -30px 30px,
        var(--black) -40px 40px 0px -3px, var(--white) -40px 40px; */
    }
    .main-img-show {
      box-shadow: var(--black) -10px 10px 0px -3px, var(--white) -10px 10px,
        var(--black) -20px 20px 0px -3px, var(--white) -20px 20px,
        var(--black) -30px 30px 0px -3px, var(--white) -30px 30px,
        var(--black) -40px 40px 0px -3px, var(--white) -40px 40px;
    }
  }
  .main-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 520px;
    color: var(--white);

    .main-right-top {
      display: flex;
      flex-direction: column;

      .mi-noir-main-title {
        font-size: 50px;
        letter-spacing: 8px;
        line-height: 58px;
        font-weight: bold;
      }
      .mi-noir-phonetic-spelling {
        font-size: 28px;
        letter-spacing: 1px;
        color: #c0c0c0;
      }
    }
    .main-right-bot {
      display: flex;
      flex-direction: column;
      gap: 2px;
      letter-spacing: 1px;
      line-height: 24px;
      text-align: justify;

      .text-underline {
        text-decoration: underline;
      }

      .mi-noir-pos,
      .mi-noir-definition-ex {
        font-size: 15px;
        color: #c0c0c0;
      }
      .mi-noir-real-definition {
        font-size: 18px;
      }
      .mi-noir-real-definition {
        margin-left: 18px;
      }
      .mi-noir-definition-ex {
        margin-left: 42px;
      }

      .mi-noir-ctftime {
        margin-top: 10px;

        a {
          text-decoration: none;
          color: var(--white);
          transition: letter-spacing 0.5s;

          &:hover {
            letter-spacing: 1.5px;
          }
        }
      }
    }
  }
}
/*  */
/* MEMBERS */
/*  */
.section-members {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}
.member-title {
  transform: translateX(8%);
  opacity: 0;
  transition: 1s;

  p {
    font-size: 50px;
    letter-spacing: 8px;
    font-weight: bold;
    color: var(--white);
  }
}
.member-title-show {
  transform: translate(0);
  opacity: 1;
}
.member-members {
  display: flex;
  gap: 20px;
}
.member-container {
  background-color: transparent;
  width: 300px;
  height: 418.99px;
  perspective: 1000px;
}
.member-inner {
  position: relative;
  width: 100%;
  height: 100%;
  /* text-align: center; */
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
.member-container:hover .member-inner {
  transform: rotateY(180deg);
}
.member-front,
.member-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari */
  backface-visibility: hidden;
}
.member-front {
  background-color: var(--white);
  color: var(--black);
  border-radius: 12px;
}
.member-back {
  background-color: var(--white);
  color: var(--black);
  transform: rotateY(180deg);
  border-radius: 12px;
}
.member-back-inner {
  height: 90%;
  margin: 18px;
  display: flex;
  flex-direction: column;

  .member-nickname {
    p {
      font-size: 32px;
      font-weight: bold;
    }
  }
  .member-position {
    margin-bottom: 18px;
    p {
      font-size: 18px;
    }
  }
  .member-specialty {
    margin-bottom: 12px;
    p {
      font-size: 20px;
    }
  }
  .member-quote {
    /* margin-bottom: 10px; */
    p {
      font-size: 20px;

      span {
        font-style: italic;
      }
    }
  }
  .member-sosmed {
    margin-top: auto;
    a {
      font-size: 18px;
      color: var(--black);
      text-decoration: none;
      transition: letter-spacing 0.5s;

      &:hover {
        letter-spacing: 0.5px;
      }
    }
  }
}
/*  */
/* CTFS */
/*  */
.section-ctfs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}
.ctfs-title {
  font-size: 50px;
  letter-spacing: 8px;
  font-weight: bold;
  color: var(--white);

  transform: translateX(-8%);
  opacity: 0;
  transition: 1s;
}
.ctfs-title-show {
  transform: translate(0);
  opacity: 1;
}
.ctfs-container {
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow-x: hidden;
  height: 335px;
  overflow-y: hidden;

  &::-webkit-scrollbar {
    display: none;
  }

  .ctfs-container-group {
    display: flex;
    gap: 35px;
    animation: carousel 18s infinite linear;
    padding-right: 35px;

    .ctfs-list {
      width: 325px;
      height: 325px;
      /*  */
      perspective: 1000px;
    }
  }
}
@keyframes carousel {
  from {
    translate: 0;
  }
  to {
    translate: -100%;
  }
}
.ctf-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
.ctfs-list:hover .ctf-inner {
  transform: rotateY(-180deg);
}
.ctf-back-inner {
  .ctf-year {
    p {
      font-size: 18px;
    }
  }
  .ctf-name {
    margin-bottom: 8px;
    p {
      font-size: 32px;
      font-weight: bold;
    }
  }
  .ctf-placement {
    p {
      font-size: 20px;
    }
  }
  .ctf-writeup {
    margin-top: auto;
    a {
      font-size: 18px;
      text-decoration: none;
      color: var(--white);
      transition: letter-spacing 0.5s;

      &:hover {
        letter-spacing: 1px;
      }
    }
  }
}

/*  */
/* FOOTER */
/*  */
footer {
  /* height: 60px; */
  /* background-color: #303030; */
  background-color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;

  .footer-inside {
    padding: 28px 0 38px 0;
    width: 80%;
    /* border-top: 2px solid #383838; */
    color: #a9a9a9;
    display: flex;
    justify-content: space-between;

    span {
      font-weight: bold;
    }
  }
}

/* 3D SPINNING COIN EFFECT FOR CTF CARDS */
@keyframes brightness {
  0%,
  50%,
  100% {
    filter: blur(0px) brightness(120%)
      drop-shadow(0 0 2.5px rgba(255, 255, 255, 0.1))
      drop-shadow(0 0 5px rgba(255, 255, 255, 0.075))
      drop-shadow(0 0 7.5px rgba(255, 255, 255, 0.045))
      drop-shadow(0 0 10px rgba(255, 255, 255, 0.025));
  }
  25%,
  75% {
    filter: blur(1px) brightness(50%)
      drop-shadow(0 0 2.5px rgba(255, 255, 255, 0.1))
      drop-shadow(0 0 5px rgba(255, 255, 255, 0.075))
      drop-shadow(0 0 7.5px rgba(255, 255, 255, 0.045))
      drop-shadow(0 0 10px rgba(255, 255, 255, 0.025));
  }
}

@keyframes spin {
  0% {
    transform: rotateY(-180deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}

/* Replace existing .ctf-inner styles with these */
.ctf-inner {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 10000px;
  transform-style: preserve-3d;
  transition: transform 1s ease-in;
}

.ctfs-list:hover .ctf-inner {
  transform: rotateY(180deg);
}

/* Remove the old .ctf-front and .ctf-back styles and replace with these */
.ctf-front,
.ctf-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: visible;
  border-radius: 100%;
}

.ctf-front {
  background-color: var(--white);
  transform: translateZ(10px);
}

.ctf-back {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D thickness effect */
.ctf-front::before,
.ctf-front::after,
.ctf-back::before,
.ctf-back::after {
  content: "";
  position: absolute;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 100%;
}

/* Side elements for 3D effect */
.ctf-thickness {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.ctf-thickness i {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  border-radius: 100%;
  backface-visibility: hidden;
}

.ctf-thickness i:nth-child(1) {
  transform: translateZ(-9px);
}
.ctf-thickness i:nth-child(2) {
  transform: translateZ(-8px);
}
.ctf-thickness i:nth-child(3) {
  transform: translateZ(-7px);
}
.ctf-thickness i:nth-child(4) {
  transform: translateZ(-6px);
}
.ctf-thickness i:nth-child(5) {
  transform: translateZ(-5px);
}
.ctf-thickness i:nth-child(6) {
  transform: translateZ(-4px);
}
.ctf-thickness i:nth-child(7) {
  transform: translateZ(-3px);
}
.ctf-thickness i:nth-child(8) {
  transform: translateZ(-2px);
}
.ctf-thickness i:nth-child(9) {
  transform: translateZ(-1px);
}
.ctf-thickness i:nth-child(10) {
  transform: translateZ(0px);
}
.ctf-thickness i:nth-child(11) {
  transform: translateZ(1px);
}
.ctf-thickness i:nth-child(12) {
  transform: translateZ(2px);
}
.ctf-thickness i:nth-child(13) {
  transform: translateZ(3px);
}
.ctf-thickness i:nth-child(14) {
  transform: translateZ(4px);
}
.ctf-thickness i:nth-child(15) {
  transform: translateZ(5px);
}
.ctf-thickness i:nth-child(16) {
  transform: translateZ(6px);
}
.ctf-thickness i:nth-child(17) {
  transform: translateZ(7px);
}
.ctf-thickness i:nth-child(18) {
  transform: translateZ(8px);
}
.ctf-thickness i:nth-child(19) {
  transform: translateZ(9px);
}

/* Update the back content positioning */
.ctf-back-inner {
  height: 88%;
  margin: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  position: relative;
  z-index: 10;
  transform: translateZ(10px);
}

/* Remove old animation */
@keyframes carousel {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 35px));
  }
}
