/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #1a1a2e;
  color: #d6f05d;
  line-height: 1.6;
  padding: 20px;
}

.contact-box {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.contact-box:hover {
  background-color: #d6f05d;
  color: #16213e;
  cursor: pointer;
}

.contact-box a {
  color: inherit;
  text-decoration: none;
}

.contact-box a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.blog-container {
  max-width: 900px;
  margin: 0 auto;
  display: block;
  padding: 0 10px;
}

@media (min-width: 769px) {
  .blog-container {
    display: flex;
    justify-content: center;
  }
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.intro-box, .contact-box, .technologies-box, .projects-box, .current-box, .blog-box {
  border: 2px solid #d6f05d;
  border-radius: 10px;
  padding: 20px;
  background-color: #16213e;
  position: relative;
}

.intro-box h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.bio {
  font-size: 1.1rem;
  max-width: 600px;
}

.chess-image {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 80px;
  height: auto;
  opacity: 0.8;
}

.projects {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.blog-entry {
  margin-left: auto;
  margin-right: auto;
  max-width: 700px;
}

.project-card {
  flex: 1 1 280px;
  max-width: 300px;
  border: 2px solid #d6f05d;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  color: #d6f05d;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.project-card:hover {
  background-color: #d6f05d;
  color: #16213e;
}

.projects-box {
  /* Removed hover effect from the entire projects box */
  margin-top: 10px;
}

.projects-box h2 {
  margin-bottom: 15px;
}

.project-card:hover {
  background-color: #d6f05d;
  color: #16213e;
  cursor: pointer;
}

.technologies-box:hover,
.contact-box:hover,
.current-box:hover,
.blog-box:hover,
.projects-box:hover {
  background-color: #d6f05d;
  color: #16213e;
  cursor: pointer;
}

.technologies-box h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.technologies-box .tech-icons {
  justify-content: flex-end;
}

.technologies-box .tech-icons img {
  filter: none;
  opacity: 1;
  width: 30px;
  height: 30px;
  fill: #d6f05d;
  color: #d6f05d;
  cursor: pointer;
}

.contact-box h2, .technologies-box h2, .current-box h2, .blog-box h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-icon-link {
  display: inline-flex;
  align-items: center;
  width: 30px;
  height: 30px;
  margin-left: 8px;
}

.blog-icon {
  width: 30px;
  height: 30px;
  filter: invert(78%) sepia(88%) saturate(749%) hue-rotate(70deg) brightness(95%) contrast(90%);
  transition: filter 0.3s ease;
  cursor: pointer;
}

.blog-icon-link:hover .blog-icon {
  filter: invert(40%) sepia(100%) saturate(750%) hue-rotate(70deg) brightness(95%) contrast(90%);
}

.contact-icons, .tech-icons {
  display: flex;
  gap: 25px;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
}

.contact-icons a img, .tech-icons img, .external-link-icon img, .company-logo {
  width: 40px;
  height: 40px;
  cursor: pointer;
  /* Remove filter to show original icon colors */
  filter: none;
  transition: filter 0.3s ease;
}

.contact-icons a[aria-label="GitHub"] img {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
}

.contact-icons a:hover img, .tech-icons img:hover, .external-link-icon img:hover {
  filter: brightness(0.7) invert(0.7);
}

.current-box p {
  margin-bottom: 8px;
}

.company-logo {
  width: 50px;
  margin-top: 10px;
}

.blog-box a {
  display: inline-block;
}

.blog-header, .projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.footer-note {
  background-color: #d6f05d;
  color: #16213e;
  padding: 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  margin-top: auto;
}

.home-button {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 10px;
  background-color: #d6f05d;
  color: #16213e;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  border: 2px solid #d6f05d;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.home-button:hover {
  background-color: #16213e;
  color: #d6f05d;
  border-color: #d6f05d;
}

.modal {
  display: none; /* Hidden by default */

  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
}

.modal-content {
  background-color: #16213e;
  margin: 10% auto; /* 10% from the top and centered */
  padding: 20px;
  border: 2px solid #d6f05d;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
  color: #d6f05d;
  font-size: 1rem;
  position: relative;
}

.close-button {
  color: #d6f05d;
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
}

.close-button:hover {
  color: #a0a000;
}

.show-modal {
  display: block !important;
}
/* Modal styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
}

.modal-content {
  background-color: #16213e;
  margin: 10% auto; /* 10% from the top and centered */
  padding: 20px;
  border: 2px solid #d6f05d;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
  color: #d6f05d;
  font-size: 1rem;
  position: relative;
}

.close-button {
  color: #d6f05d;
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 15px;
}

.close-button:hover {
  color: #a0a000;
}

/* Responsive styles for mobile */
@media (max-width: 768px) {
  .container {
    display: block;
    max-width: 100%;
    padding: 10px;
  }

  .left-column, .right-column {
    width: 100%;
    gap: 20px;
  }

  .intro-box, .contact-box, .technologies-box, .projects-box, .current-box, .blog-box {
    margin-bottom: 20px;
  }

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

  .project-card {
    max-width: 100%;
    width: 100%;
  }

  .home-button {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: #d6f05d;
    color: #16213e;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #d6f05d;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: fixed;
    top: 20px;
    left: 20px;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    z-index: 1000;
  }

  body.blog-page .home-button {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    z-index: 9999 !important;
  }

  @media (max-width: 768px) {
    .home-button {
      position: static !important;
      margin-bottom: 20px !important;
      padding-bottom: 20px !important;
    }
  }
}