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

:root {
  font-size: 12px;
  --color-text: #fff;
  --color-bg: #000;
  --color-link: #fff;
  --color-link-hover: #39ff14; /* Neon green for that pump energy */
  --page-padding: 1.5rem;
  --color-card-1: #00ff41; /* Matrix green */
  --color-card-2: #39ff14; /* Electric lime */
  --color-card-3: #32cd32; /* Lime green */
  --color-card-4: #00ff7f; /* Spring green */
  --color-card-5: #7fff00; /* Chartreuse */
  --color-card-6: #adff2f; /* Green yellow */
  --color-bg-card: rgba(0, 255, 65, 0.2); /* Green with transparency */
  --color-bg-card-inner: rgb(15 41 15); /* Dark green instead of purple */
}

body {
  margin: 0;
  color: var(--color-text);
  background-color: #15161B;
  font-family: Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-size: 400px, 100% 100vh;
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
  content: '';
  position: fixed;
  z-index: 1000;
}

.js .loading::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
}

.js .loading::after {
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  opacity: 0.4;
  background: var(--color-link);
  animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
  to {
    opacity: 1;
    transform: scale3d(0.5,0.5,1);
  }
}

a {
  text-decoration: underline;
  color: var(--color-link);
  outline: none;
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
  color: var(--color-link-hover);
  outline: none;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
  /* Provide a fallback style for browsers
   that don't support :focus-visible */
  outline: none;
  background: lightgrey;
}

a:focus:not(:focus-visible) {
  /* Remove the focus indicator on mouse-focus for browsers
   that do support :focus-visible */
  background: transparent;
}

a:focus-visible {
  /* Draw a very noticeable focus style for
   keyboard-focus on browsers that do support
   :focus-visible */
  outline: 2px solid red;
  background: transparent;
}

.unbutton {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

.unbutton:focus {
  outline: none;
}

.frame {
  padding: var(--page-padding);
  position: relative;
  display: grid;
  z-index: 1000;
  width: 100%;
  height: 100%;
  grid-row-gap: 1rem;
  grid-column-gap: 2rem;
  pointer-events: none;
  justify-items: start;
  grid-template-columns: auto auto;
  grid-template-areas: 'title title' 'back archive' 'sponsor sponsor' 'hire hire';
}

.frame a {
  pointer-events: auto;
}

.frame__title {
  grid-area: title;
  font-size: inherit;
  margin: 0;
}

.frame__back {
  grid-area: back;
  justify-self: start;
}

.frame__archive {
  grid-area: archive;
  justify-self: start;
}

.frame__sub {
  display: grid;
  position: fixed;
  bottom: var(--page-padding);
  right: var(--page-padding);
  width: 50px;
  height: 50px;
  border: 1px solid var(--color-link-hover);
  place-items: center;
  border-radius: 50%;
}

.frame__sub:hover::before,
.frame__sub:focus::before  {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  top: -30%;
  left: -30%;
}

.frame__sub svg {
  fill: var(--color-link-hover);
  width: 25px;
  height: 25px;
}

.modal {
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0,20px,0);
  position: absolute;
  bottom: 55px;
  right: 0px;
  background: #2d8a2d; /* Green instead of purple */
  color: #fff;
  width: 280px;
  max-width: calc(100vw - var(--page-padding) * 2);
  line-height: 1.4;
  padding: 1.5rem;
  font-size: 16px;
  border-radius: 8px;
  transition: all 0.3s;
}

.frame__sub:hover .modal,
.frame__sub:focus .modal {
  pointer-events: auto;
  opacity: 1;
  transform: translate3d(0px,0px,0px);
}

.frame__hire {
  grid-area: hire;
  max-width: 200px;
}

.frame__demos {
  grid-area: demos;
  display: flex;
  gap: 1rem;
}

main {
  position: relative;
}

/* Navigation Links Styles */
.nav-links {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 15px;
  font-family: Arial, sans-serif;
}

.nav-links a {
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  text-transform: lowercase;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Navigation Links Styles */
.nav-links2 {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 15px;
  font-family: Arial, sans-serif;
}

.nav-links2 a {
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  text-transform: lowercase;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.nav-links2 a:hover {
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  .nav-links {
      top: 15px;
      right: 15px;
      gap: 10px;
  }
  
  .nav-links a {
      padding: 6px 12px;
      font-size: 12px;
  }
}

.intro {
  width: 100%;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: 20vh 20vh auto;
  grid-template-areas: 'intro-title' 'intro-hint' '...';
  place-items: center;
  padding: 0 var(--page-padding);
}

.intro__title {
  text-transform: uppercase;
  font-size: clamp(2rem, 7vw, 8rem);
  font-weight: 400;
  grid-area: intro-title;
  position: relative;
  z-index: 100;
  align-self: center;
  margin: 0;
  text-align: center;
  padding: 0% 30%;

  /* Make text italic */
  font-style: italic;
}


.intro__hint {
  grid-area: intro-hint;
  position: relative;
  z-index: 100;
  align-self: center;
  font-size: 1.5rem;
  text-align: center;
}

.intro__hint::after {
  content: '\00BB';
  position: absolute;
  top: 100%;
  left: 0%;
  text-align: center;
  font-size: 3rem;
  width: 100%;
  transform: rotate(90deg);
  animation: pulse 0.3s linear alternate infinite;
}

@keyframes pulse {
  to {
    top: 120%;
  }
}

.outro {
  display: grid;
  place-items: center;
  margin: 40vh 0;
}

.outro__title {
  font-weight: 300;
  font-size: clamp(1.5rem,10vw,2rem);
}

.grid {
  position: relative;
  perspective: 1000px;
  align-self: start;
  grid-area: intro-title;
  grid-row: 1 / span 3;
  display: grid;
  grid-template-columns: repeat(3,auto);
  justify-content: center;
  gap: 3rem;
  filter: brightness(70%);
}

.card {
  width: 30vw;
  max-width: 255px;
  min-width: 70px;
  aspect-ratio: 420/590;
  font-size: 9px;
  text-transform: uppercase;
  padding: 0px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 14px;
  position: relative;
  align-items: stretch;
  outline: 1px solid var(--color-card);
  background: var(--color-bg-card);
  grid-template-areas: 'card-img card-img';
}

.grid .card {
   box-shadow: 0 2px 7px 0 rgba(0,0,0,0.8);
}

.card:nth-child(1n) {
  --color-card: var(--color-card-1);
}

.card:nth-child(2n) {
  --color-card: var(--color-card-2);
}

.card:nth-child(3n) {
  --color-card: var(--color-card-3);
}

.card:nth-child(4n) {
  --color-card: var(--color-card-4);
}

.card:nth-child(5n) {
  --color-card: var(--color-card-5);
}

.card:nth-child(6n) {
  --color-card: var(--color-card-6);
}

.card > * {
  background-color: var(--color-bg-card-inner);
}

.card__img {
  grid-area: card-img;
  background-size: contain;
  background-position: 50% 50%;
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 14px 14px 14px 14px;
}

.card__meta {
  grid-area: card-meta;
  padding: 0.5rem 3px;
  text-align: right;
}

.card-wrap {
  margin-top: 5vh;
  display: grid;
  grid-gap: 2rem;
  grid-auto-flow: row;
  grid-template-columns: 250px;
  text-align: center;
  justify-items: center;
}

.card--rel  {
  align-items: start;
  background: rgba(0,255,65,0.1); /* Green transparency instead of white */
}

.card--rel .card__img {
  aspect-ratio: 4 / 3;
  filter: contrast(0.8);
}

.card--rel .card__title {
  grid-column-end: 3;
  background: none;
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: none;
  padding: 2rem 1rem 1rem;
}

.credits {
  font-size: 5rem;
  text-align: center;
  margin: 50vh auto 0;
  padding-bottom: 50vh;
}

.section-title {
  width: 100%;
  display: grid;
  place-items: center;
  font-size: clamp(2rem,6vw,6rem);
  line-height: 1;
  font-weight: 400;
  margin: 25vh auto 0;
  max-width: 600px;
  text-align: center;
  text-transform: uppercase;
}

.wrap {
  position: relative;
  min-height: 100vh;
}

.wrap__inner {
  position: relative;
  perspective: 1000px;
}

.content {
  width: 100vw;
  position: relative;
  transform-style: preserve-3d;
  display: grid;
  grid-template-areas: 'card';
  grid-template-columns: 100%;
  place-items: center;
}

.content .card {
  grid-area: card;
  background: rgba(0, 255, 65, 0.36); /* Green instead of purple */
}

@media screen and (min-width: 53em) {
  body {
    --page-padding: 2rem;
  }
  .frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    grid-template-columns: auto auto auto 1fr;
    grid-template-rows: auto auto;
    align-content: space-between;
    grid-template-areas: 'title back archive sponsor' 'hire ... ... sub';
  }
  .frame__sub {
    justify-self: end;
  }
  .frame__title {
    padding-right: 4rem;
  }
  .frame__hire {
    align-self: end;
  }
  .modal {
    bottom: 50px;
    right: 50px;
  }
  .intro {
    grid-template-rows: 60vh 40vh auto;
  }
  .intro__title {
    align-self: end;
  }
  .grid {
    padding-top: 12vh;
  }
  .content {
    min-height: 100vh;
    justify-content: center;
    align-items: center;
  }
  .card-wrap {
    grid-template-columns: repeat(2, 300px);
  }
}