* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  font-family: 'Press Start 2P', monospace;
  scroll-behavior: smooth;
  color: #fff;
}


#top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  color: #40c322;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  font-size: 10px;
  border-bottom: 2px solid #40c322;
  z-index: 1000;
}

#nav-left {
  font-weight: bold;
}

#nav-right {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: #40c322;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background-color: #40c322;
  transition: width 0.3s;
}

.nav-link:hover::after {
  width: 100%;
}


section {
  min-height: 100vh;
  padding: 80px 20px 40px;
  box-sizing: border-box;
}


#start-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 80px);
  text-align: center;
  color: white;
}

#title {
  font-size: 16px;
  margin-bottom: 20px;
  color: #40c322;
}

#desc {
  font-size: 10px;
  margin-bottom: 40px;
  color: #ccc;
}

#startBtn {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  text-transform: uppercase;
  color: #fff;
  background-color: #40c322;
  padding: 20px 40px;
  border: none;
  box-shadow:
    0 0 0 4px #000,
    4px 4px 0 4px #222,
    8px 8px 0 4px #000;
  cursor: pointer;
  transition: transform 0.1s ease;
}


#main-content {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 64px;
  padding: 80px 20px;
  min-height: 100vh;
}


#canvas-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#gameCanvas {
  display: block;
  width: 960px;
  height: 512px;
  background: #111;
  image-rendering: pixelated;
  image-rendering: crisp-edges;

  -webkit-font-smoothing: none;
  font-smooth: never;
}


#instruction-wrapper,
#interaction-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #40c322;
}

.section-title {
  font-size: 10px;
  color: #ccc;
  margin-bottom: 12px;
  text-align: center;
}


#arrow-keys {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.arrow-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.enter-row {
  margin-top: 0px;
}

.key {
  border: 2px solid #40c322;
  padding: 6px 10px;
  background: #000;
  color: #40c322;
  font-size: 10px;
  text-align: center;
  min-width: 32px;
  font-family: 'Press Start 2P', monospace;
  line-height: 1;
  box-shadow:
    0 0 0 2px #000,
    2px 2px 0 2px #222,
    4px 4px 0 2px #000;
  image-rendering: pixelated;
  transform: scale(1);  
  -webkit-font-smoothing: none;
  border-radius: 0; 
}

#about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: justify;
  padding: 100px 20px 60px; 
}

#about h2 {
  font-size: 16px;
  color: #40c322;
  margin-bottom: 24px;
}

#about p {
  font-size: 12px;
  color: #ccc;
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 16px;
  padding: 0 16px;
}

#projects, #contact {
  padding-top: 80px;
}

#projects h2,
#contact h2 {
  font-size: 12px;
  color: #40c322;
  margin-bottom: 16px;
  text-align: center;
  justify-content: center;
}

#projects p{
  font-size: 10px;
  color: #ccc;
  max-width: 600px;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  padding: 40px 16px;
}

.project-card {
  width: 320px;
  background: #111;
  border: 2px solid #40c322;
  box-shadow:
    0 0 0 4px #000,
    4px 4px 0 4px #222,
    8px 8px 0 4px #000;
  font-family: 'Press Start 2P', monospace;
  color: #ccc;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-image {
  position: relative;
  background: #000;
  border-bottom: 2px solid #40c322;
  height: 180px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.project-title {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.85);
  padding: 10px;
  font-size: 10px;
  text-align: center;
  color: #fff;
  border-top: 1px solid #40c322;
  line-height: 1.3;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 0;
}

.tag {
  font-size: 8px;
  padding: 4px 6px;
  text-transform: uppercase;
  color: #000;
  border-radius: 2px;
}


.tag.rl { background: #40c322; }
.tag.mlagents { background: #a278ff; }
.tag.unity { background: aquamarine; }
.tag.torch { background: coral; }
.tag.csharp { background: #f2d45c; }
.tag.cpp { background: #b99aff; }

.project-desc {
  font-size: 8px;
  padding: 8px 12px 12px;
  color: #aaa;
  line-height: 1.5;
  text-align: left;
}

.project-highlights {
  list-style: none;
  font-size: 8px;
  padding: 0 12px;
  color: #fff;
  line-height: 1.6;
}

.project-highlights li::before {
  content: "✔ ";
  color: #40c322;
  margin-right: 4px;
}

#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: auto !important;
  padding: 60px 20px 40px !important;
  text-align: center;
  background-color: #000;
}

#contact h2 {
  font-size: 16px;
  color: #40c322;
  margin-bottom: 20px;
}

.contact-text {
  font-size: 10px;
  color: #ccc;
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.email-link {
  color: #40c322;
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.social-icon {
  font-size: 24px;
  text-decoration: none;
  color: #40c322;
  transition: transform 0.2s ease;
}

.social-icon:hover {
  transform: scale(1.2);
  color: #fff;
}


/* project modal */ 

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
}

.modal-content {
  background: #111;
  border: 2px solid #40c322;

  box-shadow:
    0 0 0 4px #000,
    4px 4px 0 4px #222,
    8px 8px 0 4px #000;

  width: 700px;
  max-width: 90%;

  margin: 80px auto;
  padding: 30px;

  font-family: 'Press Start 2P', monospace;
  color: #ccc;

  max-height: 80vh;   
  overflow-y: auto;   
}

.modal-content img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  margin: 20px 0;
  image-rendering: pixelated;
}

.close-btn {
  float: right;
  font-size: 20px;
  color: #40c322;
  cursor: pointer;
}

.close-btn:hover {
  color: #fff;
}

.modal-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 10px;
  color: #40c322;
  text-decoration: underline;
}

.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #40c322;
}