@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,900;1,700&display=swap");

/* Variables */
:root {
  --space-1: calc(4/16 * 1rem);
  --space-2: calc(8/16 * 1rem);
  --space-3: calc(1rem);
  --space-4: calc(2rem);
  --space-5: calc(4rem);
  --space-6: calc(8rem);
  --space-7: calc(16rem);

  --font-family: "Roboto", sans-serf;
  --normal-font: 400;
  --bold-font: 700;
  --bolder-font: 900;
  --bg-color: #fcfcfc;
  --primary-color: #4756df;
  --secondary-color: #ff7235;
  --primary-shadow: #8b8eaf;
  --secondary-shadow: #a17a69;
  --bottom-margin: var(--space-2);
  --bottom-margin-2: var(--space-3);
  --line-height: 1.7rem;
  --transition: 0.3s;
}
/* Variables end */

html {
  scroll-behavior: smooth;
}

/* CSS Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* border: 2px solid red; */
}

ul {
  list-style-type: none;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  text-decoration: none;
  color: var(--secondary-color);
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height);
}

.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container.text {
  /* text heavy content should be smaller than normal content since it's a
   * better reading experience to reduce the travel time of your eyes,
   * otherwise it can be tiresome to read it. */
  max-width: 700px;
}

.section-wrapper {
  padding-block: var(--space-4);
}
.section-wrapper:nth-child(2n+1) {
  /* every other child */
  background-color: var(--bg-color);
}

/* CSS Resets end */

/* Navbar */
nav {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1;
  background-color: var(--bg-color);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: var(--space-4);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
}

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

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

nav ul {
  display: flex;
  gap: var(--space-4);
}

nav ul li {
  font-weight: var(--bold-font);
}

.burger-menu {
  color: var(--primary-color);
  font-size: var(--space-4);
  border: 0;
  background-color: transparent;
  cursor: pointer;
  display: none; /* flex */
  align-items: center;
}
/* Navbar ends */

/* Hero section */
.hero {
  display: grid;
  grid-template-columns: 3fr 3fr;
  gap: var(--space-4);
  align-items: center;
  justify-items: center;
}

.hero img {
  width: 100%;
  max-width: 50vmin;
  height: auto;
  aspect-ratio: 1/1;
}

.bio {
  width: 100%;
  padding: var(--space-3);
  border-radius: var(--space-1);
  box-shadow: 0px 2px 15px 2px var(--primary-shadow);
}

.bio h1 {
  margin-bottom: var(--bottom-margin);
}

.bio p {
  line-height: var(--line-height);
  padding: var(--space-1) 0;
}
/* Hero section ends */

/* More about */
.more-about {
  background-color: var(--bg-color);
}

.more-about h2 {
  margin-bottom: var(--bottom-margin);
}

.more-about p {
  margin-block: var(--space-2);
}
/* More about ends */

/* Skills section */
.skills {
  max-width: 68.75rem;
  margin: auto;
  text-align: center;
  margin-top: var(--space-4);
}

.skill-header {
  margin-bottom: var(--space-3);
}

.skills-wrapper img {
  padding: var(--space-3);
}

.icon {
  width: 11.875rem;
  height: 11.25rem;
}
/* Skills section ends */

/* Projects section */
.projects {
  background-color: var(--bg-color);
  padding: 32px 0;
  margin-top: var(--space-4);
}

.projects-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.projects-title {
  text-align: center;
  margin-bottom: var(--space-3);
}

.project-container {
  text-align: center;
  width: 21.875rem;
  padding: var(--space-3);
}

.project-container p {
  padding: var(--space-2);
}

.project-title {
  margin-bottom: var(--bottom-margin);
}

.project-details {
  margin-bottom: var(--bottom-margin);
}

.project-pic {
  width: 65%;
  height: 60%;
}
/* Projects section ends */

/* Contacts section */
.contact {
  margin-top: var(--space-4);
}

.contact h2 {
  text-align: center;
  margin-bottom: var(--bottom-margin-2);
}

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

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

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

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

.input-field::placeholder {
  padding: var(--space-2);
  color: var(--primary-color);
}

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

.submit-btn:hover {
  background-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  cursor: pointer;
  color: white;
}
/* Contacts section ends */

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

.socicon {
  width: 2rem;
  height: 2rem;
}
/* Social button ends */

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

.up-arrow {
  width: 3rem;
  height: 3rem;
}
/* Scroll to top button ends */

/* Footer section */
footer {
  background-color: var(--bg-color);
  padding: var(--space-3);
  text-align: center;
  margin: var(--space-4) 0 0;
}
/* Footer section ends */

/* General (utilities) */
.icon-card {
  background-color: #fff;
  border-radius: 11px;
  box-shadow: 0 3px 10px var(--secondary-shadow);
  padding: var(--space-4);
  margin: var(--space-3);
}

.project-card {
  background-color: #fff;
  border-radius: 11px;
  box-shadow: 0 3px 10px var(--primary-shadow);
  padding: var(--space-4);
  margin: var(--space-3);
}

/* Media queries for responsiveness */
@media screen and (max-width: 720px) {
  .container {
    padding-inline: var(--space-4);
  }

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

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

  nav ul li {
    margin: var(--space-2);
  }

  .burger-menu {
    display: flex;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-4);
  }

  .more-about {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-5);
  }

  .more-about h2 {
    text-align: center;
  }

  .more-about p {
    text-align: justify;
  }

  .icon {
    width: 5.875rem;
    height: 5.25rem;
  }

  .projects-container {
    flex-direction: column;
  }

  .project-container {
    width: 20.875rem;
  }

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

@media screen and (max-width: 420px) {
  .container {
    padding-inline: var(--space-3);
  }

  .project-container {
    width: 17.875rem;
  }

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