html {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

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

body {
  margin: 0 auto;
}

h1,
h2,
h3 {
  font-weight: 700;
  font-size: 40px;
  line-height: 52px;
  color: #172b4d;
}

ul {
  list-style-type: none;
}

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

.top-section {
  background-image: url('../images/background.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  width: 100%;
}

.header-mobile {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 24px;
}

.header-mobile div {
  padding-top: 54px;
}

.header-mobile a {
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  color: #28352f;
  text-decoration: none;
}

.hide {
  display: none;
}

.show {
  display: block;
}

.nav-mobile {
  display: block;
  font-weight: 600;
  font-size: 32px;
  background-color: #fff;
  height: 100vh;
}

.nav-mobile ul {
  margin: 0;
  padding-top: 20px;
}

.nav-mobile a {
  text-decoration: none;
  color: #3a4a42;
  font-weight: 600;
  font-size: 32px;
}

.nav-mobile li {
  padding-bottom: 40px;
}

/** this is a style for desktop version **/
@media only screen and (min-width: 768px) {
  .header-mobile {
    display: none;
  }

  .nav-desktop {
    display: block;
  }

  .header-title {
    margin-top: 160px;
  }

  .header-title > * {
    font-weight: 800;
    font-size: 48px;
    line-height: 60px;
  }

  .header-body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .header-body p {
    line-height: 32px;
    max-width: 920px;
  }

  .top-section {
    padding-bottom: 495px;
  }

  .nav ul {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
  }

  .nav li {
    padding: 26px 12px;
    margin-right: 8px;
  }

  .nav li:last-child {
    margin-right: 0;
  }

  .nav a {
    font-weight: 600;
    font-size: 18px;
    line-height: 20px;
    text-decoration: none;
    color: #344563;
  }

  .nav a:hover {
    text-decoration: underline;
    color: #60c095;
  }
}

.header-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 74px;
}

.header-title > * {
  text-align: center;
  margin: 0;
  padding: 0 24px;
}

.color-green {
  color: #36b37f;
}

.header-body {
  text-align: center;
}

.header-body p {
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
  color: #172b4d;
  padding: 24px;
}

.icons {
  display: flex;
  justify-content: center;
  padding: 0;
}

.icons li {
  padding: 10px;
}

.down-arrow {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-top: 62px;
}

.down-arrow img {
  border: 1px solid #dfe1e6;
  border-radius: 32px;
  width: 40px;
  height: 40px;
}

.work-title {
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.work-title h2 {
  text-align: center;
}

.work-list {
  display: grid;
  grid-template-columns: auto;
  padding: 24px 22px;
}

/** display grid for medium version **/
@media only screen and (min-width: 768px) and (max-width: 1200px) {
  .work-list {
    grid-template-columns: repeat(2, 369px);
    justify-content: space-between;
    column-gap: 24px;
    row-gap: 32px;
  }
}

/** display grid for large desktop devices **/
@media only screen and (min-width: 1200px) {
  .work-list {
    grid-template-columns: repeat(3, 369px);
    justify-content: space-between;
    column-gap: 24px;
    row-gap: 32px;
  }
}

.list-item {
  display: flex;
  flex-direction: column;
  border: 1px solid #d0d9d4;
  border-radius: 8px;
  background: #ebf0ee;
  margin-bottom: 24px;
}

.image-placeholder img {
  height: 250px;
  width: 100%;
  border-radius: 8px;
}

.image-desc {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
}

.image-desc h3 {
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  text-align: center;
  color: #3a4a42;
  margin: 16px 0;
}

.buttons {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.buttons div {
  background: #ebf0ee;
  border-radius: 4px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.03em;
}

.button-link {
  display: flex;
  justify-content: center;
  margin: 29px 0 8px 0;
}

.button {
  min-width: 122px;
  align-items: center;
  padding: 12px;
}

button {
  border-radius: 4px;
  height: 48px;
  font-weight: 500;
  font-size: 17px;
  line-height: 24px;
  color: #fff;
  letter-spacing: 0.03em;
  border: 0;
  background: #36b37f;
  transition: transform 500ms;
}

button:hover {
  background: #36b37f;
  box-shadow: 0 8px 16px #36b37f3d;
  cursor: pointer;
  transform: scale(1.05);
}

button:active {
  background: #008552;
}

.about-container {
  width: 100%;
}

@media only screen and (max-width: 768px) {
  .about-container {
    background-image: url('../images/about-me-background.png');
    background-repeat: no-repeat;
    background-position: right top;
  }

  .resume-button {
    background-image: url('../images/about-me-background2.png');
    background-position: left bottom;
    background-repeat: no-repeat;
  }
}

@media only screen and (min-width: 768px) {
  .about-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image:
      url('../images/about-me-desktop1.svg'),
      url('../images/about-me-desktop2.svg');
    background-position: right top, left bottom;
    background-repeat: no-repeat, no-repeat;
    width: 100%;
  }
}

.about-header {
  display: flex;
  align-items: flex-end;
  height: 127px;
}

.about-header h2 {
  font-weight: 700;
  font-size: 40px;
  line-height: 52px;
  color: #172b4d;
  margin: 0 auto;
}

.about-desc p {
  font-weight: 400;
  font-size: 20px;
  line-height: 32px;
  color: #42526e;
  text-align: center;
  display: block;
  margin: 0;
  padding: 24px 12px;
}

@media only screen and (min-width: 768px) {
  .about-desc p {
    line-height: 32px;
    max-width: 920px;
  }
}

.resume-button {
  display: flex;
  height: 72px;
  width: 100%;
}

.resume-button button {
  min-width: 159px;
  height: 48px;
  margin: auto;
}

.skills-container {
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.skills-list {
  display: grid;
  grid-template-columns: 369px;
  padding: 0;
}

.skills-list li {
  border: 1px solid #c1c7d0;
  border-radius: 8px;
  background: #ebf0ee;
}

/** display grid for medium version **/
@media only screen and (min-width: 768px) and (max-width: 1200px) {
  .skills-list {
    grid-template-columns: repeat(2, 369px);
    justify-content: space-between;
    column-gap: 24px;
  }
}

/** display grid for large desktop devices **/
@media only screen and (min-width: 1200px) {
  .skills-list {
    grid-template-columns: repeat(3, 369px);
    justify-content: space-between;
    column-gap: 24px;
  }
}

.item-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
}

.item-list .icon {
  padding-top: 40px;
}

.item-list h3 {
  font-weight: 600;
  font-size: 24px;
  line-height: 32px;
  color: #344563;
}

.about-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.about-buttons div {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  color: #36b37e;
  letter-spacing: 0.03em;
  transition: background-color 500ms, color 1000ms;
}

.about-buttons div:hover {
  background-color: #36b37e;
  color: white;
}

.contact-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

.contact-wrapper {
  /* flex: 1; */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1200px;
}

.contact-wrapper > *:nth-child(1) {
  max-width: 463px;
}

.contact-wrapper > *:nth-child(2) {
  flex-grow: 1;
  max-width: 684px;
}

/** display grid for medium version **/
@media only screen and (min-width: 768px) {
  .form-title {
    margin-right: 24px;
  }

  .contact-wrapper h2 {
    font-weight: 700;
    font-size: 30px;
    line-height: 52px;
  }

  .contact-wrapper > *:nth-child(1) {
    min-width: 463px;
  }

  .contact-wrapper > *:nth-child(2) {
    min-width: 684px;
  }

  .contact-form input {
    width: 100%;
    min-width: 684px;
  }

  .contact-form {
    margin-top: 80px;
  }

  .footer-section p {
    display: none;
  }

  .icon-wrapper {
    width: 100%;
  }

  .border-top {
    border-top: 1px solid #dfe1e6;
  }

  .contact-wrapper {
    padding-bottom: 225px;
  }

  .contact-background {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-image:
      url('../images/contact-section-1.svg'),
      url('../images/contact-section-2.svg'),
      url('../images/contact-form-illustratoin-3-desktop.svg');
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: bottom left, 20% 80%, bottom right;
  }
}

@media only screen and (max-width: 768px) {
  .contact-section {
    background-image: url('../images/illustration-contact-form.svg');
    background-repeat: no-repeat;
    background-position: bottom right;
  }

  .contact-form li:last-child {
    align-self: center;
  }

  .footer-section {
    margin-bottom: 300px;
  }
}

.contact-wrapper h2 {
  text-align: center;
  margin: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 24px;
}

.contact-form li {
  display: flex;
  margin-bottom: 24px;
}

.contact-form li:last-child {
  padding: 0;
  margin: 0;

  /* align-self: center; */
}

.contact-form input {
  width: 100%;
  min-width: 327px;
  height: 48px;
  border: 1px solid #d0d9d4;
  border-radius: 4px;
  padding: 15px 16px;
}

.contact-form input::placeholder {
  font-weight: 400;
  font-size: 15px;
  line-height: 24px;
  color: #6b778c;
}

.contact-form textarea::placeholder {
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 24px;
  color: #091e42;
}

.contact-form textarea {
  font-family: Inter, sans-serif;
  width: 100%;
  min-width: 327px;
  height: 114px;
  border: 1px solid #60c095;
  border-radius: 4px;
  padding: 12px;
}

.footer-section {
  display: flex;
  justify-content: center;
}

.footer-section p {
  font-weight: 400;
  font-size: 20px;
  line-height: 32px;
  color: #42526e;
  margin: 0;
}

/** style popup model **/
.model-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgb(193, 199, 208, 0.5);
  opacity: 0;
  pointer-events: none;
}

.model {
  margin: 16px;
  padding: 32px;
  border: 1px solid #dfe1e6;
  border-radius: 16px;
  background-color: #fff;
}

.model-placeholder {
  width: 100%;
  height: 20vh;
  background: url('../images/tech-image.png') no-repeat;
  background-position: center center;
  background-size: cover;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  position: relative;
}

.icon-close {
  width: 12px;
  height: 12px;
  position: absolute;
  right: 22px;
  top: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.project-title {
  font-weight: 700;
  font-size: 32px;
  line-height: 44px;
  text-align: center;
  color: #172b4d;
}

.model-description {
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #344563;
}

.project-buttons {
  display: flex;
  justify-content: space-between;
}

.hide-main {
  opacity: 0.1;
  pointer-events: none;
}

.show-popup {
  opacity: 1;
  pointer-events: auto;
}

.live-icon {
  background: url(../images/live.svg) no-repeat;
  background-position: right;
  width: 30px;
  height: 24px;
}

.source-icon {
  background: url(../images/github.svg) no-repeat;
  background-position: right;
  width: 30px;
  height: 24px;
}

.model-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.icon-close::before {
  content: 'x';
  color: #fffff9;
  font-weight: 500;
  font-family: Arial, sans-serif;
  font-size: 2rem;
  text-shadow: 0 0 40px #000;
}

/** style model window for desktop devices **/
@media only screen and (min-width: 768px) {
  .model-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(193, 199, 208, 0.4);
  }

  .model {
    width: 70%;
    display: flex;
    flex-wrap: wrap;
  }

  .model-placeholder {
    height: 40vh;
    order: 1;
    flex-basis: 100%;
    margin-top: 62px;
  }

  .project-title {
    order: 2;
    width: 60%;
    flex-basis: 60%;
    text-align: left;
  }

  .buttons {
    order: 3;
    justify-content: flex-start;
    gap: 10px;
    flex-basis: 100%;
  }

  .model-description {
    order: 4;
    flex-basis: 100%;
  }

  .project-buttons {
    order: 2;
    width: 40%;
    flex-basis: 40%;
    display: flex;
    justify-content: flex-end;
    align-self: center;
    gap: 12px;
  }

  .icon-close {
    top: -62px;
    right: 0;
    width: 40px;
    height: 40px;
    background-color: #ebecf0;
  }

  .icon-close::before {
    font-size: 2rem;
    color: #67798e;
  }
}

/** display grid for medium version **/
@media only screen and (min-width: 768px) and (max-width: 1200px) {
  .model {
    width: 90%;
  }
}

.error-message {
  font-weight: 400;
  font-size: 20px;
  color: #ff6163;
}
