
/* Common Rules */

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: white;
  color: black;
}

header {
  padding: 30px 0;
}

nav {
  display: flex;
  justify-content: space-around;
  max-width: 1400px;
  margin: 0 auto;
}


main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header transition fade in out */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: fade-out 0.2s ease;
}

::view-transition-new(root) {
  animation: fade-in 0.2s ease;
}

@keyframes fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
body {
  opacity: 0;
  transition: opacity 0.2s ease;
}

body.page-loaded {
  opacity: 1;
}

body.fade-out {
  opacity: 0;
}
/* Grey out not selected */
nav a {
  color: grey;
  text-decoration: none;
  font-size: 19px;
}

nav a.active {
  color: black;
}



/* ABOUT */

.about-section {
  display: flex;
  align-items: center;
  gap: 60px;
}


.about-text {
  width: 80%;
}

.about-image img {
  width: 90%;
  border-radius: 10px;
}


/* PROJECTS */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.project-card {
  background: white;
}

.project-card img,
.project-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  border-radius: 12px;
}

.project-card h2 {
  margin: 15px 0 5px;
  font-size: 24px;
}

.project-card p {
  margin: 5px 0;
  line-height: 1.5;
}

.project-card:hover img,
.project-card:hover video {
  transform: scale(1.02);
}

/*Webgl Game*/
.game-main {
  max-width: none;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.game-container {
  width: 70%;
  margin: 20px auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}




/*cursor*/
.project-card video {
  cursor: pointer;
}
/*Credit*/
footer {
  text-align: center;
  padding: 30px 20px;
  color: grey;
  font-size: 14px;
}