:root {
  /* variables */
  --cg-black: rgb(18, 30, 30);
  --cg-blue: rgb(16, 16, 28);
  --cg-grey: rgb(99, 97, 97);
  --cg-white: rgb(255, 255, 255);
}

html {
  height: 100%;
}

* {
  box-sizing: border-box; /* Added for better layout handling */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensures body takes full viewport height */
  background: var(--cg-grey);
  padding: 0;
  margin: 0;
  font-family: monospace;
}

main {
  flex: 1; /* Makes the main content grow and push the footer down if necessary */
  padding: 0 20px 40px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* CSS for the 'About Me' section */
.about {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 5px;
  flex-direction: row-reverse; /* Keeps the image on the right */
}

.about-image img {
  display: block;
  margin: 20px auto;
  max-width: 350px; /* Make the image smaller */
  height: auto;
  border-radius: 5px;
}

.about-text {
  flex: 1;
  margin-right: 20px;
  font-size: 16px;
  line-height: 1.5;
}
.about-text p {
  margin-bottom: 20px; /* Ensure enough space below the paragraph */
}

.social-icons {
  margin-top: 20px;
  z-index: 2; /* Ensures icons are above background elements */
  text-align: center; /* Centers the icons horizontally */
}

.social-icons a {
  margin: 0 10px;
  font-size: 24px;
  color: var(--cg-black); /* Icon color */
  text-decoration: none;
  display: inline-block; /* Ensures icons are displayed properly */
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--cg-blue); /* Change color on hover */
}

@media (max-width: 768px) {
  .about {
    flex-direction: column; /* Stack text and image vertically on smaller screens */
    text-align: center;
  }
  .about-text {
    margin-right: 0;
    margin-bottom: 20px; /* Add space below text */
  }
}

/* CSS for navigation */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  height: 7%;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  background-color: var(--cg-black);
  color: var(--cg-white);
  padding: 0;
}

.nav-list {
  display: flex;
  flex-direction: row;
  position: relative;
  right: 30px;
  list-style: none;
}

@media (max-width: 768px) {
  .nav-list {
    flex-direction: column; /* Stack nav items vertically on smaller screens */
    align-items: center;
  }
}

.navbar a {
  color: var(--cg-white);
  font-weight: bold;
  margin: 0 12px;
  text-decoration: none;
  letter-spacing: 2px;
  font-family: monospace;
  transition: color 0.3s, background-color 0.3s; /* Added smooth transition */
}

.navbar a:hover {
  color: var(--cg-blue);
  text-decoration: underline;
}

.navbar a:active {
  color: var(--cg-blue);
}

.logo a {
  font-family: Georgia;
}

.logo a:hover {
  text-decoration: none;
}

/* Centering title and moving contact info below */
.page-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 36px;
  font-family: Georgia;
  color: var(--cg-white);
  margin-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--cg-white);
}

.page-title h1 {
  margin-bottom: 10px;
}

.page-title p {
  font-size: 18px;
  font-family: monospace;
  margin-top: 0;
}

.page-title a {
  color: var(--cg-blue);
  text-decoration: none;
}

.page-title a:hover {
  text-decoration: underline;
}

/* Resume Container */
.resume {
  width: 80%;
  margin: 0 auto;
  color: var(--cg-white);
  font-family: monospace;
  line-height: 1.6;
}

/* Section Titles with lines */
.resume .section-title {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--cg-white);
  font-family: Georgia;
  padding-bottom: 5px;
  position: relative;
}

.resume .section-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--cg-white);
  position: absolute;
  left: 0;
  bottom: -5px; /* Space between title and line */
}

.resume p {
  margin-bottom: 15px;
}

.resume ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.resume ul ul {
  list-style: circle;
}

.resume li {
  margin-bottom: 10px;
}

/* CSS for button */
.button {
  background-color: var(--cg-black);
  border: none;
  color: var(--cg-white);
  font-family: monospace;
  padding: 5px 7px;
  text-align: center;
  border-radius: 2px;
  transition: background-color 0.3s ease; /* Added transition */
}

.button:hover {
  background-color: var(--cg-blue);
}

/* CONTACT Form Styling */
#contact-form {
  max-width: 500px;
  margin: 0 auto; /* Center form horizontally */
  padding: 50px; /* Add padding for inner space */
  background-color: #efe7e7;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Add some shadow for depth */
}

@media (max-width: 768px) {
  #contact-form {
    width: 90%; /* The form takes 90% of the viewport width on small screens */
    max-width: none; /* Remove max-width to let it adjust naturally */
  }
}

/* Adjust labels and inputs */
#contact-form label {
  display: block;
  margin-bottom: 10px;
  font-family: Georgia, serif;
  font-weight: bold;
  font-size: 18px;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px; /* Increase margin for spacing between fields */
  border: 2px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  background-color: #f0f0f0; /* Light background for input fields */
}

/* Submit Button Styling */
#contact-form input[type="submit"] {
  background-color: var(--cg-black);
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#contact-form input[type="submit"]:hover {
  background-color: var(--cg-blue); /* Hover effect for button */
}

/* CSS for Particles.js background */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1; /* Make sure particles stay behind the content */
  background-color: #2b2b2b; /* Fallback background color */
}

/* Cube container styling */
.cube-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px; /* Adjust height as needed */
  margin-top: 20px;
}

/* Ensures the Three.js canvas is sized properly */
#cube-canvas canvas {
  width: 300px; /* Set width for the cube rendering */
  height: 300px; /* Set height for the cube rendering */
}

/* Under construction message styling */
.construction-message {
  text-align: center;
  margin-top: 20px;
}

.construction-message h2 {
  font-size: 24px;
  color: var(--cg-white);
  margin-bottom: 10px;
}

.construction-message p {
  font-size: 18px;
  color: var(--cg-grey);
}

/* CSS for footer */
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--cg-black);
  color: var(--cg-white);
  padding: 10px 0;
  width: 100%;
  height: 50px;
  position: relative;
  font-family: monospace;
}
