/* credit to: https://www.youtube.com/watch?v=yefgBA1CecI */
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");

body {
  font-family: "Roboto Mono", monospace;
  background-color: #171717;
  width: 100vw;
  height: 70vw;
}

.welcome-container {
  padding: 0 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5rem;
  text-align: center;
}

.welcome {
  color: #f39f5a;
  font-size: clamp(1.2rem, 5vw, 2rem);
  letter-spacing: 0.2em;
  border-right: 3px solid;
  margin-bottom: 1em;
  width: 100%;
  max-width: 27ch;
  white-space: nowrap;
  overflow: hidden;
  animation: typing 1.5s steps(18), cursor 0.4s step-end infinite alternate;
}

.window {
  margin: auto;
  width: 90%;
  max-width: 600px;
  color: white;
  background-color: #171717;
  border: solid 0.1rem #6e6e6e4d;
  box-shadow: 0 1rem 3rem #0000004d;
  border-radius: 0.8rem;
  overflow: hidden;
}

.title-bar {
  background-color: #f9f4f8;
  border-bottom: solid 0.1rem #dcdcdc;
  height: 3rem;
}

.dots {
  display: flex;
  flex-direction: row;
  padding: 1rem;
}

.dots span {
  height: 1rem;
  width: 1rem;
  margin-right: 0.6rem;
  border-radius: 50%;
}

.dots span:nth-child(1) {
  background-color: #ff605c;
}

.dots span:nth-child(2) {
  background-color: #ffbd44;
}

.dots span:nth-child(3) {
  background-color: #00ca4e;
}

.window-body {
  padding: 2rem;
}

.about-me-text {
  color: whitesmoke;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  letter-spacing: 0.01em;
  line-height: 1.6;
  text-align: center;
}

.soc-med {
  color: whitesmoke;
  text-align: center;
  justify-content: center;
}

a {
  color: #f39f5a;
  text-decoration: underline;
  text-decoration-color: transparent; /* hide underline by default */
  transition: text-decoration-color 0.3s;
}

a:hover {
  text-decoration-color: #ffbd44; /* show custom underline on hover */
}

/* Style the navbar */
#navbar {
  position: sticky;
  top: 0;
  left: 20rem;
  overflow: hidden;
  background-color: #171717;
}

/* Navbar links */
#navbar a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 1rem;
  text-decoration: none;
  color: #f39f5a;
  font-weight: 700;
}

#navbar a:hover {
  text-decoration: underline;
  text-decoration-color: #ffbd44;
}

.gaps {
  margin-bottom: 5rem;
}
.center-wrapper {
  height: 10rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 155rem;
  gap: 4rem;
}
.box {
  display: flex;
  flex-direction: column; /* stack image on top */
  align-items: center;
  color: white;
  text-decoration: none;
  overflow: hidden;
  width: 90%;
  max-width: 600px;
  padding: 1rem;
  transition: background-color 0.1s ease;
  background-color: #171717;
  border: solid 0.1rem #6e6e6e4d;
  box-shadow: 0 1rem 3rem #0000004d;
  border-radius: 0.8rem;
}

.box:hover {
  background-color: #f8d0af;
}

.box-img {
  width: 100%; /* take full width */
  height: auto;
  border-radius: 0.4rem;
  object-fit: cover;
  margin-bottom: 1rem; /* spacing between image and text */
}

.box-content {
  text-align: left;
  width: 100%;
}

.box-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

.box-content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.source-code {
  margin-top: -3.5rem;
  text-align: left;
  color: white;
}

/* cursor blinking */
@keyframes cursor {
  50% {
    border-color: transparent;
  }
}

/* typing animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 27ch;
  }
}
