/* styles/styles.css */
body, html {
  margin: 0;
  overflow-x: hidden; /* Prevent horizontal overflow */
  overflow-y: hidden;
  width: 100%;
  height: 100%;
  transition: background-color 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Consolas', monospace;
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Ensure the canvas is behind other content */
}

body.dark-mode {
  background-color: #2a2a2a;
}

body.light-mode {
  background-color: #eee;
}

.typewriter {
  font-family: 'Consolas', monospace;
  display: inline-block;
  overflow: hidden; /* Ensures the text is hidden until typed out */
  white-space: nowrap; /* Prevents text from wrapping */
  animation: typing 3.5s steps(30, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}


.center-content {
  text-align: center;
  width: 75%;
  color: #fff;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* Translucent background */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Box shadow for lifted effect */
  border-radius: 10px;
  margin-bottom: 5px;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 1px;
}

.center-content h1 {
  margin: 0;
  font-size: 36px;
  font-weight:normal;
}

.center-content hr {
  width: 50%;
  margin: 30px auto;
  border: .2px solid #fff;
}

.center-content p {
  margin: 20px 0;
  font-size: 18px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-links .icon {
  width: 40px;
  height: 40px;
  transition: transform 0.3s;
}

.social-links .icon:hover {
  transform: scale(1.1);
}

body.light-mode .center-content {
  color: #111;
  background: rgba(255, 255, 255, 0.8); /* Light mode translucent background */
}

body.light-mode .center-content hr {
  border-color: #111;
}

.bio-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.bio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  gap: 30px;
}

.bio-paragraph {
  width: 50%;
}

#portfolio{
  padding-top: 10px;
}

.toggle-container {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 10;
}

.toggle-switch {
  display: none;
}

.toggle-label {
  display: inline-block;
  width: 60px;
  height: 30px;
  background-color: #8d8d8d;
  border-radius: 15px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-label::after {
  content: '';
  width: 26px;
  height: 26px;
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}

.toggle-switch:checked + .toggle-label {
  background-color: #2a2a2a;
}

.toggle-switch:checked + .toggle-label::after {
  transform: translateX(30px);
}

/* Portfolio Container */
.portfolio-container {
  text-align: center;
  margin-top: 50px;
  padding: 20px;
  width: 100%;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/*========== Projects Section ==========*/

.projects-section {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-top: 50px;
  min-height: 300px; /* Ensure a minimum height to prevent page jumps */
  width: 100%;
  box-sizing: border-box;
}

.project-card {
  position: relative;
  width: 300px; /* Adjust as needed */
  height: 300px; /* Adjust as needed */
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s;
  box-sizing: border-box;
}

.project-card:hover {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 10px;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.project-card h2 {
  margin-top: 0;
}

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

.project-card .tools {
  list-style: none;
  padding: 0;
}

.project-card:hover .overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
}

.overlay-content h2 {
  margin: 0;
  font-size: 24px;
}

.project-card .tools li {
  display: inline-block;
  background-color: #444;
  padding: 5px 10px;
  border-radius: 5px;
  margin: 5px 0;
}

.project-card .links a {
  color: #1e90ff;
  text-decoration: none;
  margin-right: 10px;
}

body.light-mode .project-card {
  background-color: #fff;
  color: #212121;
}

body.light-mode .project-card .tools li {
  background-color: #ddd;
}

body.light-mode .project-card .links a {
  color: #0073e6;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
  .center-content {
    background: none; /* Remove background on mobile */
    box-shadow: none; /* Remove box shadow on mobile */
    width: 90%; /* Adjust width on mobile */
    padding-bottom: 5px; /* Add padding to the bottom */
  }


  body.light-mode .center-content {
    background: none;
    box-shadow: none; 
  }


  .bio-paragraph, .contact-section p {
    width: 90%;
}

  .portfolio-container{
    padding: 0;
  }
  .project-card {
    max-width: 100%;
  }

  #tools, #content {
    margin-left: 0;
    margin-right: 0;
  }
}

.filter-bar {
  font-family: 'Consolas', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-bottom: 20px;
}

.tabs {
  display: flex;
  gap: 10px;
}

.tab-button {
  padding: 10px 20px;
  border: none;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  border-radius: 5px 5px 0 0;
  transition: background-color 0.3s, color 0.3s;
  position: relative;
  top: 1px;
  font-size: 16px;
}

.tab-button.active {
  background-color: #ddd;
  color: #000;
  border-bottom: 2px solid transparent;
}

body.dark-mode .tab-button.active {
  background-color: #444;
  color: #fff;
}

.tab-content {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  background-color: #444;
  padding: 10px;
  border-radius: 5px;
}

#tools, #content {
  margin-left: 10px;
  margin-right: 10px;
}

body.light-mode .tab-content {
  background-color: #ddd;
}

.filter-option {
  padding: 10px 20px;
  border: none;
  background-color: #444;
  color: #fff;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
  font-size: 16px; 
}

.filter-option.active {
  background-color: #c6c6c6;
  color: #000000;
}

.filter-option:hover {
  background-color: #c6c6c6;
  color: #000000;
}

body.light-mode .tab-button {
  background-color: #111;
  color: #ddd;
}

body.light-mode .tab-button.active {
  background-color: #ddd;
  color: #111;
}

body.light-mode .filter-option {
  background-color: #ddd;
  color: #111;
}

body.light-mode .filter-option.active,
body.light-mode .filter-option:hover {
  background-color: #444;
  color: #fff;
}

/* Modal for projectsn */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 100; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: hidden; /* Prevent overflow outside the modal */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fefefe;
  margin: 0 auto; /* Center horizontally */
  padding: 20px;
  margin-top: 1%;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  max-width: 600px;
  height: 90vh; /* Full height */
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-y: auto;
  overflow-x: none;
}

/* Add this to your styles.css file */

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 50px;
  display: none; /* Hide by default */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: transparent;
}

.nav-arrow:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.prev-arrow {
  left: 10%;
}

.next-arrow {
  right: 10%;
}

@media (min-width: 780px) {
  .nav-arrow {
    display: block; /* Show on desktop */
  }
}

/* Dark mode styles */
body.dark-mode .nav-arrow {
  color: #ccc; /* Adjust arrow color for dark mode */
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

body.dark-mode .nav-arrow:hover {
  box-shadow: 0 6px 12px rgba(255, 255, 255, 0.4);
}

/* Project Modal */
.modal-content h2 {
  font-size: 20px; /* Decrease font size for the headline */
  font-weight: lighter;
}

/* Project Cards */
.project-card h2 {
  font-size: 20px; /* Decrease font size for the headline */
  font-weight: lighter;
}

.project-card h3 {
  font-size: 16px; /* Decrease font size for the subheadline */
  font-weight: lighter;
}

body.dark-mode .modal-content {
  background-color: #333; /* Dark mode background color */
  color: #fff; /* Dark mode text color */
  border: 1px solid #555; /* Dark mode border color */
}

.close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 28px;
  font-weight: bold;
  z-index: 101;
}

@media (max-width: 768px) {
  .close {
    position: sticky; /* Stick to the top */
    top: 0;
    right: 5px; /* Maintain the right positioning */
    z-index: 101; /* Ensure it stays above other content */
    margin-left: auto; /* Push the button to the right */
  }
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

body.dark-mode .close {
  color: #fff; /* Dark mode close button color */
}

body.dark-mode .close:hover,
body.dark-mode .close:focus {
  color: #bbb; /* Dark mode close button hover color */
}

.modal img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
}

.read-more {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  width: 100%;
}

.read-more a {
  color: #1e90ff;
  text-decoration: none;
  margin-right: 10px;
}

.read-more a:hover {
  text-decoration: underline;
}

.modal .modal-link {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid #1e1e1e;
  color: #1e1e1e;
  text-decoration: none;
  font-size: 18px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
  margin: 5px; /* Add margin for spacing */
}

.modal .modal-link:hover {
  background-color: #1e1e1e;
  color: #fff;
}

body.dark-mode .modal .modal-link {
  border-color: #fff;
  color: #fff;
}

body.dark-mode .modal .modal-link:hover {
  background-color: #fff;
  color: #1e1e1e;
}

/*============ Contact Section ============*/

.contact-section {
  text-align: center;
  margin-top: 100px;
  margin-bottom: 50px;
  padding-top: 50px;
  gap: 20px;
}

.contact-section h1 {
  font-size: 36px;
  margin-bottom: 50px;
}

.contact-section {
  width: 100%;
}

.contact-section p {
  font-size: 18px;
  margin-bottom: 50px;
  width: 70%;
  text-align: center;
  margin: 0 auto;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.contact-button {
  padding: 10px 20px;
  border: 2px solid #282828;
  color: #1e1e1e;
  text-decoration: none;
  font-size: 18px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
  margin-top: 50px;
}

.contact-button:hover {
  background-color: #242424;
  color: #fff;
}

body.dark-mode .contact-button {
  border-color: #fff;
  color: #fff;
}

body.dark-mode .contact-button:hover {
  background-color: #fff;
  color: #131313;
}

/* Footer */
.footer {
  text-align: center;
  color: #fff; /* Default text color for dark mode */
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center items horizontally */
  justify-content: center;
  margin-top: 1px;
}

body.light-mode .footer {
  color: #111;
}

.toggle-container {
  display: flex;
  align-items: center;
}

.toggle-switch {
  display: none;
}

.toggle-label {
  display: inline-block;
  width: 60px;
  height: 30px;
  background-color: #ccc;
  border-radius: 15px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-label::after {
  content: '';
  width: 26px;
  height: 26px;
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}

.toggle-switch:checked + .toggle-label {
  background-color: #2a2a2a;
}

.toggle-switch:checked + .toggle-label::after {
  transform: translateX(30px);
}

@media (max-width: 768px) {
  .footer {
    position: static; /* Remove sticky behavior on mobile */
  }
}

@media (min-width: 769px) {
  .footer {
    position: relative; /* Stick to the bottom of the page on desktop */
    bottom: 0;
    width: 100%;
  }
}

/* About Me Section */
.about-me {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 20px;
  margin: 50px 0;
  text-align: left;
}

.about-me-pic {
  width: 300px;
  height: 300px;
  border-radius: 5%;
  object-fit: cover;
}

.about-me-paragraph {
  font-size: 18px;
  line-height: 1.6;
  width: 40%;
  text-align: left;
}

.about-me-paragraph a {
  color: inherit;
  font-weight: bold; /* Make the text bolder */
  text-decoration: none;
}

.about-me-paragraph a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .about-me {
    flex-direction: column;
    text-align: center;
  }

  .about-me-paragraph {
    width: 90%;
  }
}
