:root {
  --background: rgb(0, 4, 15);
  --font-default: rgb(255, 255, 255);
  --orbit-border: rgb(199, 199, 199);
  --border-shadow-default: rgb(163, 163, 163);
  --cube-dark-tile: rgb(31, 31, 31);
  --cube-blue-tile: rgb(0, 83, 238);
  --constellation-glow: rgb(255, 63, 63);
  --gamedevblog-glow: rgb(255, 172, 95);
  --guessphrase-glow: rgb(151, 255, 137);
  --webbedwords-glow: rgb(163, 228, 255);
  --logo-glow: rgb(62, 178, 255);
}

@font-face {
    font-family: "Courier Prime";
    src: url("assets/fonts/CourierPrime-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Courier Prime";
    src: url("assets/fonts/CourierPrime-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Courier Prime";
    src: url("assets/fonts/CourierPrime-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body {
  margin: 0;
  color: var(--font-default);
  background-color: var(--background);
  font-family: 'Courier Prime', monospace;
  overflow: hidden;
}

button {
  all: unset;
  cursor: pointer;
}

a {
  text-decoration: none;
}

.background {
  position: fixed;
  width: 100%;
  height: 100%;

  background:
      radial-gradient(circle at 40% 30%,
          rgba(56, 182, 255, 0.9) 0%,
          rgba(0, 0, 0, 0) 40%),

      radial-gradient(circle at 60% 30%,
          rgba(0, 83, 207, 0.9) 0%,
          rgba(255, 120, 90, 0) 40%),

      radial-gradient(circle at 40% 70%,
          rgba(62, 75, 255, 0.9) 0%,
          rgba(190, 40, 255, 0) 40%),

      radial-gradient(circle at 60% 70%,
          rgba(0, 129, 235, 0.9) 0%,
          rgba(80, 220, 255, 0) 40%);

  filter: blur(50px);
  opacity: 0.95;
}

.global-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
}

@property --rotate {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.black-cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 800px;
  border-radius: 50%;
  background-color: black;
  --rotate: 0deg;
  transform: translate(-50%, -50%) rotate(var(--rotate));
  animation: orbit-rotate 60s linear infinite;
  transition: width 1s ease, border-radius 0.5s ease, height 1s ease;
}
.black-cover.one {
  animation-delay: 0s;
}
.black-cover.two {
  animation-delay: -15s;
}
.black-cover.circle {
  border-radius: 50%;
  width: 800px;
  height: 800px;
}
.black-cover.box {
  border-radius: 0px;
  width: 300px;
  height: 300px;
}

.visual-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 800px;
  border: 3px solid var(--orbit-border);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0px 0px 50px 0px var(--border-shadow-default);
  --rotate: 0deg;
  transform: translate(-50%, -50%) rotate(var(--rotate));
  animation: orbit-rotate 60s linear infinite;
  transition: box-shadow 0.5s ease, width 1s ease, border-color 0.5s ease, border-radius 0.5s ease, height 1s ease;
}
.visual-orbit.one {
  animation-delay: 0s;
}
.visual-orbit.two {
  animation-delay: -15s;
}
.visual-orbit.constellation {
  border-color: var(--constellation-glow);
  box-shadow: 0px 0px 200px 10px var(--constellation-glow);
}
.visual-orbit.gamedevblog {
  border-color: var(--gamedevblog-glow);
  box-shadow: 0px 0px 200px 10px var(--gamedevblog-glow);
}
.visual-orbit.guessphrase {
  border-color: var(--guessphrase-glow);
  box-shadow: 0px 0px 200px 10px var(--guessphrase-glow);
}
.visual-orbit.webbedwords {
  border-color: var(--webbedwords-glow);
  box-shadow: 0px 0px 200px 10px var(--webbedwords-glow);
}
.visual-orbit.circle {
  border-radius: 50%;
  width: 800px;
  height: 800px;
}
.visual-orbit.logo {
  border-color: var(--logo-glow);
  box-shadow: 0px 0px 100px 10px var(--logo-glow);
}
.visual-orbit.box {
  border-radius: 0px;
  width: 300px;
  height: 300px;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 800px;
  pointer-events: none;
  --rotate: 0deg;
  transform: translate(-50%, -50%) rotate(var(--rotate));
  animation: orbit-rotate 60s linear infinite;
  z-index: 99;
}
.orbit.one {
  animation-delay: 0s;
}
.orbit.two {
  animation-delay: -15s;
}

@keyframes orbit-rotate {
  from { --rotate: 0deg; }
  to { --rotate: 360deg; }
}

.satellite {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  animation: satellite 60s linear infinite;
  offset-path: ellipse(200px 400px at center);
  pointer-events: auto;
  background-size: contain;
  transition: transform 0.5s, offset-path 1s ease, opacity 0.5s;
  box-shadow: 0 0 20px 5px black;
}
.satellite:hover {
  transform: scale(1.1);
}
.satellite.one.constellation {
  animation-delay: -30s;
  background-image: url('assets/icons/constellation.webp');
}
.satellite.one.gamedevblog {
  animation-delay: 0s;
  background-color: rgb(22, 22, 22);
  background-image: url('assets/icons/gamedevblog.webp');
  background-size: 65px auto;
  background-repeat: no-repeat;
  background-position: center;
}
.satellite.two.guessphrase {
  animation-delay: -30s;
  background-image: url('assets/icons/guessphrase.webp');
}
.satellite.two.webbedwords {
  animation-delay: 0s;
  background-color: #bcdbff;
  background-image: url('assets/icons/webbedwords.webp');
  background-size: 60px auto;
  background-repeat: no-repeat;
  background-position: center;
}
.satellite.circle {
  offset-path: ellipse(400px 400px at center);
}
.satellite.disappear {
  pointer-events: none;
  opacity: 0;
}

@keyframes satellite {
  0% { offset-distance: 0%; }
  100% { offset-distance: 100%; }
}

.project-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  padding: 100px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.project-container.opacity {
  opacity: 1;
}

.project-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  padding: 100px;
  border-radius: 50%;
  position: absolute;
}
.project-background.about {
  background:
      radial-gradient(circle at 70% 70%,
          rgba(27, 145, 180, 0.9) 20%,
          rgba(0, 0, 0, 0) 40%),

      radial-gradient(circle at 30% 70%,
          rgba(8, 41, 189, 0.9) 20%,
          rgba(255, 120, 90, 0) 40%),

      radial-gradient(circle at 50% 30%,
          rgba(76, 139, 255, 0.9) 80%,
          rgba(190, 40, 255, 0) 40%);

  filter: blur(50px);
  opacity: 0.95;
}
.project-background.constellation {
  background: url('assets/backgrounds/constellation.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px);
  opacity: 0.6;
}
.project-background.gamedevblog {
  background: url('assets/backgrounds/gamedevblog.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(4px);
  opacity: 0.3;
}
.project-background.guessphrase {
  background: url('assets/backgrounds/guessphrase.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(6px);
  opacity: 0.4;
}
.project-background.webbedwords {
  background: url('assets/backgrounds/webbedwords.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(6px);
  opacity: 0.2;
}

.projects {
  text-align: center;
  z-index: 0;
}

.title {
  font-size: 40px;
  margin-bottom: 10px;
}

.timeline {
  font-size: 20px;
  font-style: italic;
  margin-bottom: 10px;
}

.content {
  font-size: 18px;
}
.content div {
  margin: 40px 0;
}
.content .link {
  all: unset;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 5px;
  color: black;
  font-weight: bold;
}
.content .link:hover {
  opacity: 0.9;
}
.content .link:active {
  opacity: 0.8;
}
.content .link.gamedevblog {
  background-color: var(--gamedevblog-glow);
  box-shadow: 0 0 8px 1px var(--gamedevblog-glow); 
}
.content .link.guessphrase {
  background-color: var(--guessphrase-glow);
  box-shadow: 0 0 8px 1px var(--guessphrase-glow);
}
.content .link.webbedwords {
  background-color: var(--webbedwords-glow);
  box-shadow: 0 0 8px 1px var(--webbedwords-glow); 
}

.hidden {
  display: none;
}

svg {
  width: 45px;
  transition: transform 0.2s;
  fill: white;
}

svg:hover {
  transform: scale(1.1);
}

svg:active {
  transform: scale(1.2);
}

.logo-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease, transform 0.5s ease, margin-top 0.5s ease;
}
.logo-container.disappear {
  opacity: 0;
  pointer-events: none;
}
.logo-container.about {
  margin-top: 285px;
  transform: scale(0.5);
}
.logo-container:hover {
  transform: translate(-50%, -50%) scale(1.05);
}
.logo-container.about:hover {
  transform: translate(-50%, -50%) scale(0.6);
}

.hexagon {
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  width: 200px;
  height: 195px;
  background-color: white;
  clip-path: polygon(50% 0%, 100% 22.5%, 100% 78%, 50% 100%, 0% 78%, 0% 22.5%);
  animation: scale 3s ease infinite 1s alternate;
}

@keyframes scale {
  from { transform: translate(-50%, -50%) scale(0.88); }
  to { transform: translate(-50%, -50%) scale(0.94); }
}

.cube-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
}
.cube-container .top-container {
  position: absolute;
  top: -70px;
  left: 0.5px;
  transform: translate(-50%, -50%);
}
.cube-container .top-container .row {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-bottom: -12px;
}
.cube-container .top-container .row .tile {
  width: 42.4px;
  height: 30px;
  rotate: -22.5deg;
  transform: skew(45deg);
  animation-name: top-move;
}
.cube-container .left-container {
  position: absolute;
  top: 14px;
  left: -61.5px;
  transform: translate(-50%, -50%);
}
.cube-container .left-container .row {
  display: flex;
  justify-content: center;
  gap: 1px;
  margin-bottom: -30px;
}
.cube-container .left-container .row .tile {
  width: 40px;
  height: 38px;
  rotate: 90deg;
  transform: skew(-22.5deg);
  animation-name: left-move;
}
.cube-container .left-container .row .tile:nth-child(2) {
  margin-top: 18px;
}
.cube-container .left-container .row .tile:nth-child(3) {
  margin-top: 36px;
}
.cube-container .right-container {
  position: absolute;
  top: 14px;
  left: 61.5px;
  transform: translate(-50%, -50%);
}
.cube-container .right-container .row {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 1px;
  margin-bottom: -30px;
}
.cube-container .right-container .row .tile {
  width: 40px;
  height: 38px;
  rotate: 90deg;
  transform: skew(22.5deg);
  animation-name: right-move;
}
.cube-container .right-container .row .tile:nth-child(2) {
  margin-top: 18px;
}
.cube-container .right-container .row .tile:nth-child(3) {
  margin-top: 36px;
}

.gray {
    background-color: var(--cube-dark-tile);
}

.blue {
    background-color: var(--cube-blue-tile);
}

.tile {
  animation-duration: 3s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

@keyframes top-move {
  from { transform: translate(0px, 0px) skew(45deg); }
  to { transform: translate(2.5px, -4px) skew(45deg); }
}

@keyframes left-move {
  from { transform: translate(0px, 0px) skew(-22.5deg); }
  to { transform: translate(2.5px, 4px) skew(-22.5deg); }
}

@keyframes right-move {
  from { transform: translate(0px, 0px) skew(22.5deg); }
  to { transform: translate(2.5px, -4px) skew(22.5deg); }
}
