/* Variables */
:root {
  --background-color: #0e0e0e;
  --background-gradient-color1: #000;
  --background-gradient-color2: #19191a;
  --text-color: #fff;
  --secondary-text-color: #eee;
  --accent-color: #ffc112;
  --hover-color: #f09;
  --strike-color: #222;
  --card-background-color: #111;
  --font-family: "Inter", sans-serif;
  --font-weight-bold: 800;
  --h1-font-size: 50px;
  --section-font-size: 41px;
  --inner-h1-font-size: 55px;
}

/* Global Styles */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html,
body {
  margin: 0;
}

body {
  background-color: var(--background-color);
  background-image: repeating-linear-gradient(
    135deg,
    var(--background-gradient-color1),
    var(--background-gradient-color2) 1%,
    transparent 1.5%,
    transparent 50%
  );
  background-size: 100px 100px;
}

header {
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-family);
}

main {
  min-width: 100%;
  min-height: 100vh;
  font-family: var(--font-family);
  font-optical-sizing: auto;
  font-weight: var(--font-weight-bold);
}

h1 {
  font-weight: var(--font-weight-bold);
  font-size: var(--h1-font-size);
  margin: 0;
  color: var(--secondary-text-color);
}

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

section {
  padding: 60px;
  line-height: 1.14;
  color: var(--text-color);
  max-width: 790px;
  margin: auto;
  font-size: var(--section-font-size);
}

section span {
  animation: pulsate 5.2s ease-in-out infinite alternate;
  color: var(--text-color);
  text-shadow: 0 0 7px var(--text-color), 0 0 10px var(--text-color),
    0 0 21px var(--text-color), 0 0 42px var(--accent-color),
    0 0 82px var(--accent-color), 0 0 92px var(--accent-color),
    0 0 102px var(--accent-color);
}

strike {
  text-decoration: none;
  color: var(--strike-color);
}

.shine-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  border-radius: 3px;
  z-index: 2;
}

.shine {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(200, 200, 200, 0.05) 50%,
    transparent 100%
  );
}

a {
  color: var(--text-color);
  text-decoration: none;
  will-change: transform;
}

.faded {
  opacity: 0.2 !important;
}

a:hover {
  z-index: 2;
  color: var(--text-color);
  text-shadow: 0 0 7px var(--text-color), 0 0 10px var(--text-color),
    0 0 21px var(--text-color), 0 0 42px var(--hover-color),
    0 0 82px var(--hover-color), 0 0 92px var(--hover-color),
    0 0 102px var(--hover-color);
}

@keyframes pulsate {
  0% {
    text-shadow: 0 0 4px var(--text-color), 0 0 10px var(--text-color),
      0 0 18px var(--text-color), 0 0 38px var(--accent-color),
      0 0 73px var(--accent-color), 0 0 80px var(--accent-color),
      0 0 94px var(--accent-color), 0 0 140px var(--accent-color);
  }
  100% {
    text-shadow: 0 0 4px var(--text-color), 0 0 11px var(--text-color),
      0 0 19px var(--text-color), 0 0 40px var(--accent-color),
      0 0 80px var(--accent-color), 0 0 90px var(--accent-color),
      0 0 100px var(--accent-color), 0 0 150px var(--accent-color);
  }
}

@keyframes neonFlash {
  0% {
    color: transparent;
    text-shadow: none;
  }
  20% {
    color: white;
    text-shadow: 0 0 7px var(--text-color), 0 0 10px var(--text-color), 0 0 21px var(--text-color), 0 0 42px var(--accent-color);
  }
  40% {
    color: transparent;
    text-shadow: none;
  }
  60% {
    color: white;
    text-shadow: 0 0 7px var(--text-color), 0 0 10px var(--text-color), 0 0 21px var(--text-color), 0 0 42px var(--accent-color);
  }
  80% {
    color: white;
    text-shadow: 0 0 7px var(--text-color), 0 0 10px var(--text-color), 0 0 21px var(--text-color), 0 0 42px var(--accent-color);
  }
  100% {
    color: white;
    text-shadow: none;
  }
}

.card {
  display: block;
  position: relative;
  max-width: 420px;
  width: 80%;
  height: 260px;
  color: var(--text-color);
  perspective: 1000px;
  animation: fadeIn 700ms cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
  animation-delay: 200ms;
  opacity: 0;
  margin: auto;
}

@keyframes fadeIn {
  0% {
    transform: translateY(-50px) scale(1.1);
    filter: blur(5px);
    opacity: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: blur(0);
    opacity: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
}

.falling-card {
  animation: gracefulFall 1.5s ease-out forwards;
}

.card figure {
  margin: 0;
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--card-background-color);
  border-radius: 3px;
  color: var(--text-color);
}

.card figure::before {
  content: "";
  position: absolute;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  top: 6px;
  left: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  pointer-events: none;
  box-shadow: 0 30px 20px rgba(0, 0, 0, 0.5);
}

.inner {
  padding: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 100%;
}

.inner h1 {
  font-size: var(--inner-h1-font-size);
  line-height: 3rem;
}

.two {
  transform: scaleY(-1);
}

/* Responsive Styles */
@media (max-width: 768px) {  

  .card {
    transform-origin: center center;
    width: 260px; /* Swap width and height */
    height: 420px;
    margin: auto;
  }
  
  .card .inner {
    transform: rotate(90deg) translateX(110px) translateY(2px);
    height: 215px;
    width: 270px;
  }

  h1 {
    font-size: 32px;
  }

  section {
    padding: 40px 30px;
    font-size: 26px;
  }
}
