/* ---------------------- root & basics ---------------------- */

:root {
  --bg-color: #272727;
  --accent-color: #36aeea;
  --text-lightGrey-color: #bebebe;
  --keywords-default-color: #f4f1ec;
  --keywords-hover-color: #0eebf5;
  --keywords-strike-color: #cfff04;
  --menu-dim: #bebebe;
  --cls-btn-color: #f4f1ec;
  --menu-hover-color: #d6d6d6;
  --menu-bg-color: #1d1d1d;
}

* {
  box-sizing: border-box;
}

body{
  font-family: 'Cuprum', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-color);
}

.hidden{
  display: none;
}

.hide {
  display: none;
}

.visible-mobile {
  display: none;
}

@media screen and (max-width: 480px){
  .visible-mobile{
    display: block;
  }
  .hidden-mobile{
    display: none;
  }
}

/* ---------------------- header ---------------------- */

header{
  background-color: var(--bg-color);
  min-height: 80px;
}

header::after{
  content:'';
  display:block;
  width: 85%;
  height: 80px;

  -webkit-box-shadow:0 0 20px rgba(0,0,0,0.5);
  -moz-box-shadow:0 0 20px rgba(0,0,0,0.5);
  box-shadow:0 0 20px rgba(0,0,0,0.5);
  top:0%;
  bottom:0;
  left:10px;
  right:10px;
  -moz-border-radius:100px / 10px;
  border-radius:100px / 10px;

  position: absolute;
  bottom: 0;
  left: 10%;
  z-index: -1;
}

nav{
  padding: 8px;
}

/* ---------------------- logo ---------------------- */

.logo {
  float: left;
  padding: 8px;
  margin-left: 9%;
  margin-top: 8px;
  /* position: relative; */

  animation: logo-entry 1.2s cubic-bezier(.05, .7, .2, 1) .2s both;
}

.logo a {
  color: var(--accent-color);
  text-transform: uppercase;
  font-size: 32px;
  text-decoration: none;
}

@keyframes logo-entry {
  from {
    transform: translateX(-40px);
    letter-spacing: 5px;
    opacity: 0;
  }

  to {
    transform: translateX(0);
    letter-spacing: 2px;
    opacity: 100%;
  }
}

@media screen and (max-width: 864px) {
  .logo {
    padding: 2px;
    position: absolute;
  }
}

@media screen and (max-width: 480px) {
  .logo {
    margin-left: 5%;
  }
}

/* ---------------------- menu text ---------------------- */

nav ul {
  float: right;
  margin-right: 5%;
}

nav ul li {
  display: inline-block;
  float: left;
  padding: 10px 0 0 40px;
}

nav ul li a {
  color: var(--accent-color);
  text-decoration: none;
  text-transform: capitalize;
  font-size: 18px;
  letter-spacing: 1px;
  transition: all .3s ease;
  animation: menu-entry 1.2s cubic-bezier(.05, .7, .2, 1) forwards;
}

.selected{
  text-decoration: underline 2px;
  text-underline-offset: 0.5em;
}

@keyframes menu-entry {
  from {
    letter-spacing: 0.2em;
    opacity: 0;
    scale: 100%
  }

  to {
    letter-spacing: 1px;
    opacity: 100%;
    scale: 100%;
  }
}

nav ul li a:hover {
  color: var(--menu-hover-color);
}

/* ---------------------- hamburger menu ---------------------- */

@media screen and (max-width: 864px) {
  .nav-wrapper {
    position: fixed;
    inset: 0;
    background: var(--menu-bg-color);
    transform: translateX(100%);
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform .60s cubic-bezier(0.78, 0.18, 0.12, 1.02), opacity .30s ease .30s, visibility 0s linear .60s;
    display: flex;
    align-items: center;
    justify-content: right;
  }

  .nav-wrapper ul {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;

    list-style: none;
    margin: 0;
    padding: 0;
    margin-right: 30px;
  }

  .nav-wrapper ul li {
    overflow: hidden;
    line-height: 1.2;
    margin: 0.35rem 0;
    text-align: right;
    display: block;
    float: none !important;
    width: auto;
  }

  .nav-wrapper ul li:not(:first-child) {
    margin-left: 0;
  }

  .nav-wrapper ul li a {
    display: inline-block;
    transform: translateY(110%) translateX(16%) scaleY(.85) scaleX(.90);
    transform-origin: bottom right;
    opacity: 0;
    transition:
      transform .7s cubic-bezier(0.78, 0.18, 0.12, 1.02),
      opacity .3s ease;
    will-change: transform, opacity;
    color: var(--cls-btn-color);
  }

  .nav-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    display: block;
    width: 48px;
    height: 48px;
    cursor: pointer;
    z-index: 4;
    border-radius: 50%;
    animation: hamburger-entry 1s cubic-bezier(.05, .7, .2, 1) .2s both;
  }

  .nav-btn i {
    display: block;
    position: absolute;
    opacity: 1;
    height: 2px;
    width: 24px;
    background: var(--accent-color);
    border-radius: 2px;
    left: 10px;

    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .25s ease-in-out;
    -moz-transition: .25s ease-in-out;
    -o-transition: .25s ease-in-out;
    transition: .25s ease-in-out;
  }

  .nav-btn i:nth-child(1) {
    top: 16px;
    width: 24px;
  }

  .nav-btn i:nth-child(2) {
    top: 24px;
    width: 20px;
  }

  .nav-btn i:nth-child(3) {
    top: 32px;
    width: 24px;
  }

  #nav:checked+.nav-btn i:nth-child(1) {
    top: 24px;
    background: var(--cls-btn-color);
    -webkit-transform: rotate(135deg);
    -moz-transform: rotate(135deg);
    -o-transform: rotate(135deg);
    transform: rotate(135deg);
  }

  #nav:checked+.nav-btn i:nth-child(2) {
    opacity: 0;
    left: -60px;
    background: var(--keywords-hover-color);
  }

  #nav:checked+.nav-btn i:nth-child(3) {
    top: 24px;
    background: var(--cls-btn-color);
    -webkit-transform: rotate(-135deg);
    -moz-transform: rotate(-135deg);
    -o-transform: rotate(-135deg);
    transform: rotate(-135deg);
  }

  #nav:checked~.nav-wrapper {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition:
      transform .60s cubic-bezier(0.78, 0.18, 0.12, 1.02),
      visibility 0s;
  }

  #nav:checked~.nav-wrapper {
    touch-action: none;
  }

  #nav:checked~.nav-wrapper {
    overscroll-behavior: contain;
  }

  #nav:checked~.nav-wrapper ul li a {
    transform: translateY(0) scaleY(1);
    opacity: 1;
  }

  #nav:checked~.nav-wrapper ul li:nth-child(1) a {
    transition-delay: .16s;
  }

  #nav:checked~.nav-wrapper ul li:nth-child(2) a {
    transition-delay: .20s;
  }

  #nav:checked~.nav-wrapper ul li:nth-child(3) a {
    transition-delay: .24s;
  }

  #nav:checked~.nav-wrapper ul li:nth-child(4) a {
    transition-delay: .28s;
  }

  #nav:not(:checked)~.nav-wrapper ul li a {
    transition:
      transform .50s cubic-bezier(0.78, 0.18, 0.12, 1.02),
      opacity .25s ease;
  }

  #nav:not(:checked)~.nav-wrapper ul li:nth-child(1) a {
    transition-delay: .14s;
  }

  #nav:not(:checked)~.nav-wrapper ul li:nth-child(2) a {
    transition-delay: .10s;
  }

  #nav:not(:checked)~.nav-wrapper ul li:nth-child(3) a {
    transition-delay: .06s;
  }

  #nav:not(:checked)~.nav-wrapper ul li:nth-child(4) a {
    transition-delay: .02s;
  }
}

@keyframes hamburger-entry {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ---------------------- card grid ---------------------- */

/* Art, card ratio is set by .car-frame:before, padding-top: 66.67% */
/* Design & Science, card ratio is set by .car-frame:before, padding-top: 75% */

.height50 {
  height: 50px;
}

.height20 {
  height: 20px;
}

.card-list {
  max-width: 1200px;
  margin: 0 auto;
}

.list-grid {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 80%;
}

.list-grid::after {
  content: '';
  width: 420px;
  margin: 20px 20px 20px 20px;
  visibility: hidden;
}

.card-frame {
  width: 420px;
  max-width: 80%;
  position: relative;
  display: inline-block;
  margin: 20px 20px 20px 20px;
}

.card-frame:before {
  display: block;
  content: "";
  width: 100%;
  padding-top: 66.67%;
}

.card-frame > .content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: inline-block;
}

.content {
  padding: 0;
  width: 100%;
  display: inline-block;
  text-align: center;
  background-color: #1d1d1d; /* Dark grey placeholder background */
  overflow: hidden;
  position: relative;
}

/* 1. TEXT STATE (Visible by default while loading) */
.card-title {
  width: 80%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  z-index: 2; /* Sits above the image */
  transition: opacity 0.6s ease;
  pointer-events: none; 
}

.card-frame h1 {
  color: #fff;
  font-size: 28px;
  font-weight: normal;
}

.card-frame p {
  color: #fff;
  font-size: 20px;
  font-weight: lighter;
}

/* 2. IMAGE INITIAL STATE (Hidden & Scaled Up) */
img.cover {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: scale(1.08); /* Ready to scale down */
  transition: opacity 0.5s ease, 
              transform 0.5s ease;
  transform-origin: center center;
  z-index: 1;
  
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* 3. REVEALED STATE (Triggered by JS) */
.card-frame.revealed img.cover {
  opacity: 1;
  transform: scale(1);
}

.card-frame.revealed .card-title {
  opacity: 0; /* Title fades away once image is shown */
}

/* 4. HOVER STATE (Active only after reveal) */
.card-frame.revealed .content:hover img.cover {
  transform: scale(1.08);
  opacity: 0.2;
}

.card-frame.revealed .content:hover .card-title {
  opacity: 1;
}

@media only screen and (max-width: 1155px) {
  .card-frame {
    width: 320px;
  }
  .list-grid::after {
    width: 320px;
  }
}

@media all and (min-width: 660px) and (max-width: 904px) {
  .card-frame {
    width: 420px;
  }
}

@media screen and (max-width: 480px) {
  .card-frame {
    margin: 10px 0 10px 0;
  }
  .list-grid {
    width: 95%;
  }
}

.anime {
  transform: scale(0);
  opacity: 0;
}

/* ---------------------- filter ---------------------- */

.filters {
  width: 80%;
  margin: auto;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.filters button {
  background: none;
  border: none;
  padding: 10px 10px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  font-family: 'Cuprum', sans-serif;
  position: relative;
  transition: color 0.3s;
  line-height: 1.8;
}

.filters button:hover {
  color: var(--keywords-hover-color);
}

.filters .separator {
  margin: 0 10px;
  color: white;
}

.underline {
  position: absolute;
  height: 2px;
  width: 0;
  background-color: white;
  transition: all 0.3s cubic-bezier(0, 0.44, 0.26, 0.99);
}