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

ul, ol {
  padding-left: 40px; /* Restore default padding */
  margin-left: 0;
}

body {
  background-color: #1e1e1e;
  color: #d3d3d3;
  font-family: 'Courier New', Courier, monospace;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: rgba(0, 136, 169, 1);
}

a:hover {
  color: rgba(0, 136, 169, 0.8);
}

/*Navbar*/
nav {
  background-color: #1b1b1b;
  box-shadow: 3px 3px 5px rgba(30, 30, 30, 0.1);
}

nav ul {
  width: 100%;
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  margin-left: 0;
}

nav li {
  height: 70px;
}

nav a {
  height: 100%;
  padding: 0 30px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  font-size: 20px;
  color: #d3d3d3;
  text-decoration: none;
}

nav a:hover {
  color: rgba(0, 136, 169, 1);
}

nav li:first-child {
  margin-right: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 250px;
  z-index: 999;
  background-color: rgba(30, 30, 30, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: -10px 0 10px rgba(30, 30, 30, 0.1);
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  opacity: 0;
}

.sidebar.visible {
  display: flex;
  animation: fly-left 0.3s ease-out forwards;
  will-change: opacity, transform;
}

@keyframes close-sidebar {
  from {
    opacity: 1;
    transform: 0;
  }
  to {
    opacity: 0;
    transform: translateX(100vw);
  }
}

.sidebar.closing {
  display: flex;
  animation: close-sidebar 0.3s ease-out forwards;
}

.menu-button {
  display: none;
}

.logo {
  width: 64px;
  height: 64px;
}

.svg-list, .svg-x {
  transition: all 0.3s ease;
}

.svg-list:hover, .svg-x:hover {
  fill: rgba(0, 136, 169, 1);
}

/*Home*/
.home-greeting {
  font-size: 30px;
  color: #a9a9a9;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  border-right: 2px solid transparent;
  animation: typing7 0.5s steps(6) forwards, cursor 1s step-end forwards; /*12 chars per sec*/
}

.home-name {
  font-size: 70px;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  border-right: 2px solid transparent;
  animation: typing12 0.92s steps(12) forwards, cursor 1s step-end forwards;
  animation-delay: 0.5s;
}

.home-job {
  color: #a9a9a9;
  font-size: 40px;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  border-right: 2px solid transparent;
  animation: typing24 2s steps(24) forwards, cursor 1s step-end infinite;
  animation-delay: 1.42s;
}

.text-anim-container {
  display: inline-block;
}

@keyframes cursor {
  0% {
    border-right-color: transparent;
  }
  50% {
    border-right-color: inherit;
  }
}

@keyframes typing7 {
  from {
    width: 0ch;
  }
  to {
    width: 7ch;
  }
}

@keyframes typing12 {
  from {
    width: 0ch;
  }
  to {
    width: 12ch;
  }
}

@keyframes typing24 {
  from {
    width: 0ch;
  }
  to {
    width: 24ch;
  }
}

/*Styles*/
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(25vh);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.download-button {
  justify-content: center;
  padding: 10px;
  background-color: rgba(0, 136, 169, 1);
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  color: #d3d3d3;
  text-decoration: none;
  animation: fade-in 1.5s ease-out forwards;
  will-change: opacity, transform;
  display: inline-block;
}

.download-button:hover {
  background-color: rgba(0, 136, 169, 0.8);
  color: #d3d3d3;
}

.download-button-div {
  margin-top: 40px;
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  margin: 30px auto;
  max-width: 1000px;
  width: 100%;
  box-sizing: border-box;
  gap: 20px;
}


@keyframes fly-right {
  from {
    transform: translateX(-50vw);
    opacity: 0;
  }
  to {
    transform: translate(0);
    opacity: 1;
  }
}

@keyframes fly-left {
  from {
    transform: translateX(150vw);
    opacity: 0;
  }
  to {
    transform: translate(0);
    opacity: 1;
  }
}

.avatar-image {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: thick double;
  border-width: 8px;
  border-color: #363636;
  animation: fly-left 1.5s ease-out forwards;
  will-change: opacity, transform;
}

.bio {
  animation: fly-right 1.5s ease-out forwards;
  will-change: opacity, transform;
}

.text-content {
  flex-grow: 1;
  max-width: 60%;
}

.section {
  text-align: center;
  margin-top: 60px;
  margin-bottom: 30px;
  padding: 0 10px;
}

.section-content {
  max-width: calc(100% - 20px);
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
}

/*Footer Styles*/
footer {
  background-color: #111;
  margin-top: auto;
}

.footer-container {
  width: 100%;
  padding: 30px 20px 10px;
}

.social-icons {
  display: flex;
  justify-content: center;
}

.social-icons a {
  text-decoration: none;
  padding: 8px;
  background-color: #d3d3d3;
  margin: 8px;
  border-radius: 50%;
}

.social-icons a i {
  font-size: 1em;
  color: black;
  opacity: 0.9;
}

.social-icons a:hover {
  background-color: #111;
  transition: all 0.5s ease;
}

.social-icons a:hover i {
  color: #d3d3d3;
  transition: all 0.5s ease;
}

.webring {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.webring img {
  transform: scale(1.25);
}

.webring-logo {
  display: inline-block;
  transform: scale(1.25);
  transition: transform 0.3s ease;
}

.webring-logo:hover{
  transform: scale(1.25) translateY(-3px);
}

.webring-logo path {
  fill: #13738D;
}

.webring-arrow {
  font-size: 24px;
  transition: all 0.3s ease;
}

.webring-arrow:hover {
  color: #13738D;
  transform: translateY(-3px);
}

.webring a {
  color: #d3d3d3;
}

.footer-nav {
  margin: 20px 0;
}

.footer-nav ul {
  display: flex;
  justify-content: center;
  list-style-type: none;
  padding: 0;
  margin-left: 0;
}

.footer-nav ul li a {
  color: #d3d3d3;
  margin: 15px;
  text-decoration: none;
  font-size: 1em;
  transition: all 0.5s ease;
  padding: 0;
  margin-left: 0;
}

.footer-nav ul li a:hover {
  color: rgba(0, 136, 169, 1);
  padding: 0;
  margin-left: 0;
}

.footer-bottom {
  background-color: #000;
  padding: 15px;
  text-align: center;
}

.footer-bottom p {
  color: #d3d3d3;
}

/*Contact form*/
.contact-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  will-change: opacity, transform;
  animation: fade-in 1.5s ease-in-out forwards;
}

.form-style {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 20px;
}

.contact-title h2 {
  font-weight: 600;
  font-size: 40px;
  margin-bottom: 5px;
}

.contact-title hr {
  border: none;
  width: 120px;
  height: 5px;
  background-color: rgba(0, 136, 169, 1);
  border-radius: 10px;
  margin-bottom: 20px;
}

.contact-inputs {
  width: 400px;
  height: 50px;
  border: none;
  outline: none;
  padding: 25px;
  font-weight: 500;
  background-color: #d3d3d3;
  border-radius: 50px;
}

.form-style textarea {
  height: 140px;
  padding-top: 15px;
  border-radius: 20px;
}

.contact-inputs:focus {
  border: 2px solid rgba(0, 136, 169, 1);
}

.form-style button {
  display: flex;
  align-items: center;
  padding: 15px 30px;
  font-size: 16px;
  color: #d3d3d3;
  border: none;
  border-radius: 50px;
  background: linear-gradient(270deg, rgba(0, 136, 169, 1), rgba(0, 136, 169, 0.5));
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-style button:hover {
  transform: scale(1.05);
}

/*Media*/
@media (max-width: 1300px) {
  .home-greeting {
    font-size: 20px;
  }
  .home-name {
    font-size: 40px;
  }
  .home-job {
    font-size: 25px;
  }

  .avatar-image {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 1000px) {
  .banner {
    flex-direction: column-reverse;
    align-items: center;
  }

  .bio {
    text-align: left;
  }

  .avatar-image {
    margin-bottom: 20px;
  }

  .text-content {
    max-width: 100%;
    text-align: center;
  }
}

@media (max-width: 800px) {
  .hide-on-mobile {
    display: none;
  }
  .menu-button {
    display: block;
  }
  .avatar-image {
    width: 250px;
    height: 250px;
  }
  .home-greeting {
    font-size: 15px;
  }
  .home-name {
    font-size: 35px
  }
  .home-job {
    font-size: 25px
  }

  .footer-nav ul {
    flex-direction: column;
  }

  .footer-nav ul li {
    width: 100%;
    text-align: center;
    margin: 10px;
  }
}

/*Projects or blogs post*/
.posts-container {
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: 80%;
  margin-bottom: 40px;
  max-width: 1000px;
}

.posts-container h1 {
  margin-top: 20px;
}

.posts-container a {
  color: #d3d3d3;
  text-decoration: none;
}

.post-title {
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 1.2;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 400px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  border-radius: 10px;
  overflow: hidden;
  background-color: #1b1b1b;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease;
}

.card a {
  display: none;
}

.visible {
  animation: fade-in 1.5s ease-in-out forwards;
  will-change: opacity, transform;
  pointer-events: auto;
}

.visible a {
  display: inline;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-wrapper {
  transition: transform 0.3s ease;
}

.card-wrapper:hover {
  transform: perspective(250px) translateZ(5px);
}

.card:hover {
  box-shadow: 0 8px 16px 0 rgba(255, 255, 255, 0.2);
}

.card .post-content-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  background-color: rgb(0, 0, 0);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  margin: 5px 0;
}

.card .date {
  font-size: 0.9em;
  color: rgba(211, 211, 211, 0.5);
}

.tags {
  margin-top: auto;
  font-size: 0.8em;
  color: #d3d3d3;
  line-height: 2;
}

.tags span {
  background-color: rgba(0, 136, 169, 1);
  border-radius: 50px;
  padding: 2px 6px;
  margin-right: 4px;
}

@keyframes fade-in-z {
  from {
    opacity: 0;
    transform: perspective(250px) translateZ(25px);
  }
  to {
    opacity: 1;
    transform: translateZ(0);
  }
}

.post-detail-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  box-sizing: border-box;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  animation: fade-in-z 1.5s ease-out forwards;
  will-change: opacity, transform;
}

.post-detail-container img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

@media (max-width: 450px) {
  .posts-container {
    width: 90%;
    grid-template-columns: 1fr;
  }

  .bio {
    font-size: 16px;
  }

  .sidebar {
    width: 100%;
  }

  .contact-inputs {
    width: 80%;
  }

  .avatar-image {
    width: 200px;
    height: 200px;
  }

  .form-style textarea {
    width: 80%;
  }
  .home-job {
    font-size: 18px;
  }
}