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

ul {
  list-style-type: none;
}

h2 {
  text-decoration: underline;
  font-weight: bold;
}

a {
  text-decoration: none;
}

body {
  font-family: "Roboto", sans-serif;
}

/* Variables */
:root {
  --primary-color: #4756df;
  --secondary-color: #ff7235;
  --background-color: #fcfcfc;
  --text-color: #333;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Navbar */
nav {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3.5rem;
  background-color: var(--background-color);
  box-shadow: 0 3px 5px var(--shadow-color);
}

p {
  text-align: justify;
}

nav h1 {
  color: var(--primary-color);
}

nav a {
  color: var(--primary-color);
}

nav a:hover {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
}

nav ul {
  display: flex;
  gap: 1.9rem;
}

nav ul li {
  font-weight: 700;
}

.burger-menu {
  color: var(--primary-color);
  font-size: 2rem;
  border: 0;
  background-color: transparent;
  cursor: pointer;
  display: none;
}

/* Section Container */
section {
  background-color: var(--background-color);
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--shadow-color);
  border-radius: 8px;
  box-shadow: 0 3px 10px var(--shadow-color);
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 1rem;
  max-width: 68.75rem;
  margin: auto;
  margin-top: 1rem;
}

.hero-img {
  max-width: 40%;
  border-radius: 50%;
  padding: 10px;
}

.bio {
  width: 100%;
  max-width: 30rem;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0px 2px 15px 2px var(--shadow-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 1rem;
  margin-right: 5rem;
}

.bio-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.bio-text {
  font-size: 1rem;
  line-height: 1.5;
}

.view {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.download-cv,
.send-email {
  display: flex;
  align-items: center;
}

.download-btn {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: white;
  background-color: #007bff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.download-btn:hover {
  background-color: #0056b3;
}

/* More about */
.more-about {
  background-color: var(--background-color);
  padding: 1rem 6rem;
  max-width: 68.75rem;
  margin: auto;
  margin-top: 2rem;
}

.more-about h2 {
  margin-bottom: 1rem;
  text-align: center;
}

.more-about p {
  line-height: 1.7rem;
  padding: 0.4rem;
}

/* Skills section */
.skills {
  max-width: 68.75rem;
  margin: auto;
  text-align: center;
  margin-top: 2.5rem;
}

.skill-header {
  margin-bottom: 1rem;
}

.skills-wrapper img {
  padding: 1.25rem;
}

.icon {
  width: 11.875rem;
  height: 11.25rem;
}

/* Projects section */
.projects {
  max-width: 68.75rem;
  margin: auto;
  text-align: center;
  background-color: var(--background-color);
  padding: 32px;
  margin-top: 2rem;
}

.projects-title {
  text-align: center;
  margin-bottom: 1rem;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

/* Default project card styles */

.project-card {
  background: #fff;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 1.5rem;
  border-radius: 0.5rem;
  flex: 1 1 calc(33.333% - 2rem);
  max-width: 250px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  border-color: var(--secondary-color);
}

.project-card h3 {
  margin: 0;
  padding-bottom: 0.5rem;
  font-size: 1.25rem;
  border-bottom: 2px solid var(--primary-color);
}

.project-card p {
  margin: 0;
  flex-grow: 1;
}

.project-card a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}

.project-card a:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Contacts section */
.contact {
  max-width: 68.75rem;
  margin: auto;
  margin-top: 2rem;
}

.contact h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.contact-form-container {
  max-width: 40.75rem;
  margin: 0 auto;
  padding: 0.938rem;
  border-radius: 5px;
  box-shadow: 0 3px 10px var(--shadow-color);
}

.contact-form-container label {
  line-height: 2.7em;
  font-weight: 700;
  color: var(--primary-color);
}

.contact-form-container textarea {
  min-height: 6.25rem;
  font-size: 14px;
}

.contact-form-container .input-field {
  width: 100%;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 5px;
  border: none;
  border: 2px outset var(--primary-color);
  font-size: 0.875rem;
  outline: none;
}

.input-field::placeholder {
  padding: 0.5rem;
  color: var(--primary-color);
}

.submit-btn {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  background-color: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
}

.submit-btn:hover {
  background-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  color: #fff;
  cursor: pointer;
}

/* Social buttons */
.socials {
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 3%;
  bottom: 50%;
}

.socicon {
  width: 3rem;
  height: 3rem;
}

/* Scroll to top button */
.scroll-up {
  position: fixed;
  right: 0.5%;
  bottom: 3%;
  cursor: pointer;
}

.up-arrow {
  width: 3rem;
  height: 3rem;
}

/* Download CV button */
.download-cv {
  margin-top: 1rem;
}

.download-btn {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.download-btn:hover {
  background-color: var(--secondary-color);
}

/* Media queries for responsiveness */
@media screen and (max-width: 720px) {
  nav {
    padding: 1.5rem 1rem;
  }

  nav ul {
    position: fixed;
    background-color: var(--background-color);
    flex-direction: column;
    top: 86px;
    left: 10%;
    width: 80%;
    text-align: center;
    transform: translateX(120%);
    transition: transform 0.5s ease-in;
  }

  nav ul li {
    margin: 8px;
  }

  .burger-menu {
    display: block;
  }

  nav ul.show {
    transform: translateX(0);
  }

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

  .hero-img {
    max-width: 20rem;
  }

  .bio {
    max-width: 25rem;
    text-align: center;
    align-items: center;
  }

  .more-about {
    padding: 1rem 3.5rem;
  }

  .skills-wrapper img {
    width: 5.875rem;
    height: 5.25rem;
  }

  .contact-form-container {
    max-width: 23.75rem;
  }

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

  .project-card {
    flex: 1 1 100%;
    max-width: 100%;
    margin-bottom: 2rem;
    /* Ensuring equal width and height */
    height: auto;
    padding: 1rem;
  }
}

@media screen and (max-width: 420px) {
  .hero-img {
    max-width: 15rem;
  }

  .bio {
    max-width: 18.3rem;
    margin-left: 5rem;
    margin-bottom: 1rem;
  }

  .project-card {
    padding: 1rem;
    font-size: 0.875rem;
    /* Ensuring equal width and height */
    width: 100%;
    max-width: 100%;
  }

  .contact-form-container {
    max-width: 17.75rem;
  }
}

@media screen and (max-width: 320px) {
  .hero-img {
    max-width: 12rem;
  }
}