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

:root {
  /* Colors */
  --clr-black: #000000;
  --clr-neutral: #404040;
  --clr-white: #ffffff;
  --clr-error: #ef4444;

  --clr-zinc-100: #f4f4f5;
  --clr-zinc-200: #e4e4e7;
  --clr-zinc-300: #d4d4d8;
  --clr-zinc-500: #71717a;
  --clr-zinc-800: #27272a;

  /* Fonts */
  --font-family: "Sora", sans-serif;

  --fs-48: 3rem;
  --fs-40: 2.5rem;
  --fs-36: 2.25rem;
  --fs-32: 2rem;
  --fs-28: 1.75rem;
  --fs-24: 1.5rem;
  --fs-20: 1.25rem;
  --fs-16: 1rem;
  --fs-12: 0.75rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  letter-spacing: 0.02em;
}

a {
  text-decoration: none;
  color: inherit;
}

a:focus {
  outline-offset: 2px;
}

input,
button,
textarea {
  font-family: inherit;
}

input,
textarea {
  padding: 16px 24px;
  border: 1.4px solid var(--clr-black);
  border-radius: 4px;
  font-size: var(--fs-16);
  line-height: 20px;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--clr-zinc-500);
}

input:hover,
textarea:hover {
  border-color: var(--clr-neutral);
  background-color: var(--clr-zinc-100);
}

input:focus,
textarea:focus {
  box-shadow: 0px 2px 4px -2px rgba(24, 39, 75, 0.08),
    0px 4px 4px -2px rgba(24, 39, 75, 0.08);
}

input:disabled,
textarea:disabled {
  border-color: var(--clr-zinc-200);
  background-color: var(--clr-zinc-100);
  color: var(--clr-zinc-300);
}

/* Utility classes */
.fw-normal {
  font-weight: 400;
}
.fw-semibold {
  font-weight: 600;
}
.fw-bold {
  font-weight: 600;
}
.fw-extrabold {
  font-weight: 800;
}

.tracking-narrow {
  letter-spacing: -0.02em;
}

.text-subheading {
  font-size: var(--fs-40);
  line-height: 48px;
}

.text-display-m {
  font-size: var(--fs-24);
  line-height: 36px;
}

.text-h1 {
  font-size: var(--fs-36);
  line-height: 44px;
}
.text-h2 {
  font-size: var(--fs-32);
  line-height: 44px;
}
.text-h3 {
  font-size: var(--fs-28);
  line-height: 32px;
}
.text-h4 {
  font-size: var(--fs-24);
  line-height: 28px;
}
.text-h5 {
  font-size: var(--fs-20);
  line-height: 24px;
}
.text-h6 {
  font-size: var(--fs-16);
  line-height: 20px;
}

.text-p1 {
  font-size: var(--fs-20);
  line-height: 24px;
}
.text-p2 {
  font-size: var(--fs-16);
  line-height: 20px;
}
.text-p3 {
  font-size: var(--fs-12);
  line-height: 16px;
}
.text-btn1 {
  font-size: var(--fs-20);
  line-height: 24px;
}
.text-btn2 {
  font-size: var(--fs-16);
  line-height: 20px;
}
.text-underlined {
  font-size: var(--fs-20);
  line-height: 24px;
}

.building-tag{
  background-color: var(--clr-white);
  color: var(--clr-black);
  padding: .5rem 1rem;
  border-radius: 0.25rem;
}

.container {
  max-width: 1280px;
  margin-inline: auto;
}

@supports (paint-order: stroke fill) and (-webkit-text-fill-color: white) and
  (-webkit-text-stroke: 3px var(--clr-black)) {
  .text-outlined {
    -webkit-text-stroke: 3px var(--clr-black);
    -webkit-text-fill-color: white;
    paint-order: stroke fill;
  }
}

.btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 8px;
  background-color: var(--clr-black);
  color: var(--clr-white);
  border: 2px solid var(--clr-black);
  border-radius: 4px;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--clr-neutral);
  border-color: var(--clr-neutral);
}

.btn:active {
  background-color: var(--clr-white);
  color: var(--clr-black);
}

nav {
  display: flex;
  padding: 1rem;
}

.logo-div {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.desktop-menu {
  display: none;
}

.hidden {
  display: none;
}

.rotate {
  transform: rotate(90deg);
}

.mobile-nav .nav-items {
  width: 100%;
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle {
  width: 27px;
  margin-left: auto;
  transition: transform 200ms linear;
}

section {
  padding-inline: 1rem;
  padding-block: 2.5rem;
}

.section-title {
  text-align: center;
  margin-block: 20px;
}

@media screen and (min-width: 768px) {
  nav {
    padding-inline: 2rem;
    padding-block: 1.5rem;
  }
  .desktop-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
  }

  .mobile-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: none;
  }

  section {
    padding-inline: 2rem;
  }

  .section-title {
    font-size: var(--fs-40);
  }
}

@media screen and (min-width: 1024px) {
  nav ul {
    gap: 2rem;
  }
}

.about-me,
.hero-div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-img {
  display: inline-block;
  margin-bottom: 3rem;
  align-self: center;
  object-fit: contain;
}

.intro-text {
  margin-block: 2rem;
  color: var(--clr-zinc-500);
}

.social-links {
  width: 100%;
  display: flex;
  gap: 1.5rem;
}

.img-link {
  width: 3rem;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 2px solid var(--clr-black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 50ms linear;
  cursor: pointer;
}

.skills-div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.skill-item {
  flex-basis: 10rem;
  display: flex;
  max-width: 160px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 2rem;
  padding: 1.5rem;
  border: 2px solid var(--clr-black);
  border-radius: 4px;
}

.skill-item > img {
  width: 3.5rem;
}

.img-link img,
.skill-item img {
  transition: filter 100ms linear, transform 100ms ease-in-out;
}

.img-link:hover,
.skill-item:hover {
  background-color: var(--clr-black);
  color: var(--clr-white);
}

.img-link:hover img,
.skill-item:hover img {
  filter: invert(1);
  transform: scale(1.2);
}

@media screen and (min-width: 768px) {
  .about-me {
    flex-direction: row;
    justify-content: space-between;
  }

  .info {
    max-width: 450px;
    flex-shrink: 0;
    overflow: visible;
  }

  .about-me h1 {
    line-height: 48px;
    font-size: var(--fs-36);
  }
  .hero-img {
    overflow: hidden;
    max-width: 400px;
    order: 2;
  }

  .skills-div {
    padding-block: 1.25rem;
  }
}

@media screen and (min-width: 1024px) {
  .about-me h1 {
    line-height: 56px;
    font-size: var(--fs-48);
  }

  .info {
    max-width: 600px;
  }

  .hero-img {
    min-width: 490px;
  }
}

section.projects {
  background-color: var(--clr-black);
  min-height: 100vh;
}

.my-projects {
  color: var(--clr-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}

.project,
.project-info {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.project-img {
  width: 100%;
  object-fit: cover;
  border-radius: .25rem;
  overflow: hidden;
}

.project :nth-child(3) {
  color: var(--clr-zinc-500);
}

.project a img {
  filter: invert(1);
}

.contact-form {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-block: 1.25rem;
  order: 2;
}

.contact-items {
  display: flex;
  flex-direction: column;
}

footer {
  background-color: var(--clr-black);
}

footer > div {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding-block: 1.25rem;
  padding-inline: 1rem;
  color: var(--clr-white);
}

footer img {
  filter: invert(1);
}

@media screen and (min-width: 768px) {
  .project {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .project:nth-of-type(even) .project-img {
    order: 2;
  }
  .project-img {
    flex: 3;
    max-width: 530px;
    max-height: 350px;
    margin: 1.25rem;
    overflow: hidden;
  }

  .project-info {
    flex: 4;
    max-width: 600px;
  }

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

  a.project-link{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: white;
  }

  .contact-items {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding-top: 20px;
  }

  .about-person {
    height: 340px;
    aspect-ratio: 1;
  }

  .contact-items > .social-links {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  .contact-items > .social-links > .img-link {
    width: 8rem;
    flex-wrap: wrap;
    row-gap: 2rem;
  }
  .contact-items > .social-links > .img-link > img {
    width: 3.5rem;
  }

  footer > div {
    padding-inline: 2rem;
  }
}
