nav {
  position: absolute;
  top: 0;
  width: 100%;
  text-align: center;
  padding-top: 20px;
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  display: inline;
  margin-right: 50px;
  cursor: pointer; /* for CV */
}

nav ul li a {
  text-decoration: none;
  color: #999;
  font-weight: bold;
  font-size: 1.5rem;
}

nav ul li a:hover {
  color: #fff;
}


html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Courier New', monospace;
  background-color: #000;
  color: #FFF;
  margin: 0;
  display: flex;
  justify-content: center;
  text-align: center;
  overflow-x: hidden;
}

::selection {
  background-color: #fff;
  color: #000;
}

hr {
  width: 50%;
}

.content {
  margin-top: 50px;
  margin-left: 20px;
  position: relative;
  overflow-x: hidden;
  width: 70%;
  max-width: 1200px;
}

.lang-button {
  display: inline-block;
  cursor: pointer;
  position: relative; 
}

.lang-button:hover .underline {
  width: 100%; 
  transition: width 0.3s ease-in-out; 
}

.underline {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  transition: width 0.3s ease-in-out;
}

/* one-time pulse after load to hint the words are clickable */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hint-underline {
    0%, 100% { width: 0; }
    50% { width: 100%; }
  }

  .underline {
    animation: hint-underline 1.4s ease-in-out 1s 1;
  }

  .lang-button[data-panel="others"] .underline {
    animation-delay: 1.9s;
  }
}

.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px; /* space between cards */
}

#projects-container {
  position: relative;
  overflow: hidden;
}

.project-card {
  flex: 0 0 calc(33%); 
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #ddd; 
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.project-card.show {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.project-card img {
  width: 100%;
  height: auto;
  object-fit: cover; 
}

.project-card h3, .project-card p {
  padding: 10px;
  margin: 0;
}

.project-card .project-tech {
  color: #999;
  font-size: 0.9rem;
  padding: 5px 10px 0;
}

#ascii-art-container {
  white-space: pre;
  text-align: center;
  font-family: monospace;
  margin-bottom: 20px;
  position: relative;
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#ascii-art-container.show {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

#project-name {
  color:#FFF;
  font-size: 1.2rem;
  font-weight: bold;
  margin: 10px;
}

.tagline {
  color: #999;
  margin: -10px 0 40px;
}

.tagline a {
  color: rgb(31, 211, 154);
  text-decoration: none;
  font-weight: bold;
}

.tagline a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.experience {
  margin-top: 80px;
  text-align: left;
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
}

.prompt {
  color: rgb(31, 211, 154);
}

.job {
  border-left: 2px solid #333;
  padding: 5px 0 5px 25px;
  margin: 0 auto 35px;
  max-width: 700px;
  transition: border-color 0.3s ease-in-out;
}

.job:hover {
  border-left-color: rgb(31, 211, 154);
}

.job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.job-role {
  font-weight: bold;
  font-size: 1.2rem;
}

.job-company {
  color: rgb(31, 211, 154);
  text-decoration: none;
  font-weight: bold;
}

.job-company:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.job-type {
  color: #999;
  font-size: 0.9rem;
  border: 1px solid #444;
  border-radius: 3px;
  padding: 1px 8px;
}

.job-dates {
  color: #999;
  margin-left: auto;
}

.job-points {
  color: #ccc;
  margin: 10px 0 0;
  padding-left: 20px;
}

.job-points li {
  margin-bottom: 5px;
}

.section-subtitle {
  text-align: center;
  color: #999;
  margin: -10px 0 30px;
}

.contrib {
  text-align: left;
  border-left: 2px solid #333;
  padding: 8px 0 8px 25px;
  margin: 0 auto 25px;
  max-width: 700px;
  transition: border-color 0.3s ease-in-out;
}

.contrib:hover {
  border-left-color: rgb(31, 211, 154);
}

.contrib-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.contrib-repo {
  color: #fff;
  font-weight: bold;
  font-size: 1.1rem;
  text-decoration: none;
}

.contrib-repo:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.contrib-desc {
  color: #999;
  margin: 5px 0;
}

.contrib-title {
  display: inline-block;
  color: #ccc;
  text-decoration: none;
  margin-top: 3px;
}

.contrib-title:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.contrib-status {
  margin-left: auto;
  font-weight: bold;
}

.contrib-status.merged {
  color: #a371f7; /* GitHub merged purple */
}

.contrib-status.open {
  color: rgb(31, 211, 154);
}

footer {
  margin-top: 60px;
  padding-bottom: 30px;
  color: #999;
}

footer a {
  color: #999;
}

footer a:hover {
  color: #fff;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8); /* 0.8 => alpha channel */
  backdrop-filter: blur(8px); /* background blur */
  white-space: pre; /* for ascii formatting [inner html will appear as you see in modal.js] */
  font-size: 1.2rem;
}

.modal-content {
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #ffffff;
  width: 80%;
  text-align: center;
  color: white;
}

#pdfButton, #docxButton, #close {
  border: none;
  background-color: inherit;
  cursor: pointer;
  color: white;
  font-family: 'Courier New', monospace; /* somehow button resets styling for body */
  font-size: 1.2rem;
}

@media only screen and (max-width:1100px){
  #ascii-art-container {
    font-size: 1.3vw;
  }
  .content {
    margin-left: 10px;
    width: 90%;
  }

  .project-card {
    flex: 0 0 calc(30%);
    margin-bottom: 20px;
  }

}

@media only screen and (max-width: 800px) {
  nav ul li {
    margin-right: 20px;
  }
  
  .content {
    margin-left: 10px;
    width: 90%;
  }

  .projects {
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    flex: 0 0 calc(100% - 20px);
    margin-bottom: 20px;
  }
  
  #ascii-art-container {
   font-size: 1.3vw;
  }
}

@media only screen and (max-width: 600px) {
  body,html {
    overflow-x: hidden;
  }

  #plane-art {
    font-size: 1.2vh;
  }

  hr {
    width: 80%;
  }

  nav ul li {
    margin-right: 10px;
  }

  nav ul li a {
    font-size: 1.1rem;
  }

  .job {
    padding-left: 15px;
  }

  .job-dates {
    margin-left: 0;
    width: 100%;
  }

  .contrib {
    padding-left: 15px;
  }

  .contrib-status {
    margin-left: 0;
  }

}