:root {
  --page-background: #2c2c2c;
  --font-color: #ffffff;
  --cta-color: #8685ef;
  --default-lineHeight: 22px;
  --alternate-textColor: #202124;
  --secondary-lineHeight: 25px;
}

html {
  font-size: 62.6%;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

body {
  background-color: var(--page-background);
  color: var(--font-color);
  font-size: 1.4rem;
  font-family: 'IBM Plex Mono', monospace;
  position: relative;
}

.debug {
  border: 1px solid red;
}

/* menubar styles */

.logo {
  width: 5vh;
}

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  height: min(10vmax, 12vh);
  width: 100%;
  background-color: #202124;
}

.nav-wrapper {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--font-color);
}

.nav-wrapper ul {
  list-style: none;
  display: flex;
  gap: 48px;
}

.nav-wrapper a {
  color: inherit;
  font-family: 'Roboto Mono', monospace;
  font-weight: bold;
  text-decoration: none;
}

.line {
  width: 28px;
  height: 2px;
  background-color: var(--font-color);
}

.line:not(:first-of-type) {
  margin-top: 6px;
}

/* Hero section */

#welcome-section {
  margin-top: 14vh;
}

h1 {
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 30px;
}

.hand {
  font-size: 1.6rem;
}

.name {
  font-size: 36px;
  font-family: 'Roboto Mono', monospace;
  font-weight: bold;
}

.bold {
  font-weight: bold;
}

h1 + p {
  margin-top: 12px;
  line-height: var(--default-lineHeight);
}

/* image styles */

.imageContainer img {
  max-width: 100%;
  display: block;
  margin: 30px auto;
}

/* btn styles */

.btn-container a,
.btn-container button {
  display: inline-block;
  text-align: center;
  padding: 10px;

  color: #202124;
  background-color: #faf7ff;
  text-decoration: none;
  font-family: 'Roboto Mono', monospace;
  font-weight: bold;
}

.btn-container form {
  display: inline-block;
}

.btn-container button {
  margin-left: 10px;
  background-color: var(--cta-color);
  color: var(--font-color);
  font-size: 1.6rem;
  border: none;
  outline: none;
  cursor: pointer;
}

/* Action button styles */
.btn-container {
  width: fit-content;
  margin: auto;
}

/* About section styles */
.about {
  margin-top: 5.8rem;
}

h2 {
  font-family: 'Roboto Mono', monospace;

  font-weight: bold;
  font-size: 3.6rem;
  display: inline-block;
  padding: 5px 20px;
  border-bottom: 1px solid var(--font-color);
  margin-bottom: 30px;
}

.about p {
  line-height: var(--default-lineHeight);
}

.expand {
  color: var(--cta-color);
}

/* Skills section */

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

.skill-title {
  display: inline-block;
  margin: 22px auto;
  padding: 5px;
  background-color: var(--font-color);
  color: var(--alternate-textColor);
  font-weight: bold;
  text-transform: uppercase;
}

.skill-items {
  display: inline-block;
}

.skill-items img {
  display: inline-block;
  width: 50px;
  height: 50px;
}

/* project section styles */

.projects {
  margin-top: 5.8rem;
}

.project-tile {
  margin-bottom: 24px;
}

.project-tile img {
  width: min(100%, 760px);
  display: block;
  margin: auto;
  margin-bottom: 10px;
}

.project-tile p {
  text-align: center;
}

.project-link {
  margin: 6px auto 0;
  display: block;
  width: 150px;
  color: var(--font-color);
  border: 1px solid var(--font-color);
  padding: 5px;
}

/* Contact section styles */
.img-container img {
  max-width: 300px;
  display: block;
  margin: auto;
}

.social-container img {
  vertical-align: middle;
}

.divider {
  position: relative;
  margin-top: 30px;
  background-color: var(--font-color);
  height: 2px;
  z-index: -1;
}

.circle {
  position: absolute;
  border-radius: 50%;
  padding: 5px;
  background-color: var(--font-color);
  color: var(--alternate-textColor);
  top: -550%;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
}

/* contact form styles */
.form {
  margin-top: 14px;
}

label {
  display: block;
  width: 100px;
  padding: 5px;
  font-size: 1.4rem;
}

input[type='email'] {
  display: block;
  border: none;
  background: none;
  color: var(--font-color);
  border-bottom: 1px solid var(--font-color);
  outline: none;
  padding: 5px;
  flex-grow: 1;
}

.form-row {
  display: flex;
  justify-content: stretch;
  margin-top: 22px;
}

textarea {
  padding: 5px;
  color: var(--font-color);
  vertical-align: top;
  background: none;
  border: 1px solid var(--font-color);
  outline: none;
  flex-grow: 1;
  min-height: 150px;
}

.submit-btn {
  margin-top: 22px;
  padding: 10px;
  text-align: center;
  border: none;
  outline: none;
  background-color: var(--font-color);
  color: var(--alternate-textColor);
  width: 100%;
  font-weight: bold;
  cursor: pointer;
}

/* Footer styles */

footer {
  background-color: #202124;
  height: 12vmax;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* For menubar */
@media (max-width: 800px) {
  .nav-wrapper {
    background-color: #202124;
  }

  #menubar {
    position: absolute;
    top: min(10vmax, 12vh);
    left: 0;
    width: 100%;
    background-color: #202124;
  }

  .menubar {
    transition: height 0.3s ease-in-out;
    display: block;
    height: 0;
    overflow: hidden;
  }

  .show-menubar {
    border-top: 1px solid var(--font-color);
    height: 90vmax;
  }

  #menubar ul {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}

/* Tablets */
@media (min-width: 800px) {
  /* menubar styles */

  #menubar {
    display: block;
  }

  .burgers {
    display: none;
  }
}

@media (max-width: 1150px) {
  /* menubar */
  .nav-wrapper {
    padding: 15px 30px;
  }

  /* global wrapper styles */
  .wrapper {
    padding: 30px;
  }
}

/* For desktops */
@media (min-width: 1150px) {
  /* menubar */
  .nav-wrapper,
  .wrapper {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
  }

  /* hero section */
  #welcome-section {
    display: grid;
    grid-template-rows: auto auto;
    grid-template-columns: 60% 40%;
    row-gap: 4.5rem;
  }

  .titleContainer {
    align-self: center;
    grid-row-start: 1;
    grid-row-end: 2;
    grid-column-start: 1;
    grid-column-end: 2;
  }

  .imageContainer {
    grid-row-start: 1;
    grid-row-end: 3;
  }

  /* hero text styles */
  h1 {
    font-size: 1.6rem;
    line-height: 36px;
  }

  .hand {
    font-size: 1.8rem;
  }

  .name {
    font-size: 40px;
  }

  h1 + p {
    line-height: var(--secondary-lineHeight);
  }

  /* action btn styles */

  .btn-container button {
    margin-left: 36px;
  }

  .btn-container {
    margin: 0;
  }

  .btn-container a {
    font-size: 1.6rem;
  }

  /* About section styles */
  .about,
  .projects,
  .contacts {
    margin-top: 8rem;
  }

  h2 {
    font-size: 4rem;
    margin-bottom: 30px;
  }

  .about p {
    line-height: var(--secondary-lineHeight);
    padding-right: 36px;
    border-right: 1px solid #faf7ff;
    height: 100%;
  }

  .about-content {
    display: grid;
    grid-template-rows: auto;
    grid-template-columns: 60% 40%;
  }

  /* Skill section */

  .skill-title {
    margin: 18px auto;
  }

  /* projects section */

  .projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: row;
    grid-auto-rows: 362px;
    grid-gap: 65px;
  }

  /* contacts section */

  .contacts h2 {
    margin-bottom: 0;
  }

  .contacts-container {
    display: grid;
    grid-template-columns: 50% 50%;
    grid-template-rows: auto;
  }

  .text-container {
    align-self: center;
    grid-row: 1 / 2;
    grid-column: 1 / 2;
  }

  .img-container {
    align-self: center;
    grid-row: 1 / 2;
    grid-column: 2 / 3;
  }

  .img-container img {
    max-width: 100%;
  }
}
