/* ===================================
   HERO SECTION
   =================================== */

.home {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: clamp(60px, 7vw, 110px);
  width: 100%;
  min-height: min(100svh, 900px);
  margin: 0;
  padding: 125px 7% 65px;
  background-color: var(--surface);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  overflow: hidden;
  border-color: black;
}
/* Bottom divider for Intro section */

.home::after {
  content: "";

  position: absolute;
  bottom: 0;
  left: 50%;

  width: min(1100px, 85%);
  height: 1px;

  background: linear-gradient(
    to right,
    transparent,
    var(--border) 20%,
    var(--accent) 50%,
    var(--border) 80%,
    transparent
  );

  transform: translateX(-50%);
}

/* ===================================
   INTRODUCTION
   =================================== */

.intro {
  flex: 0 1 720px;
  max-width: 720px;
}

.welcome {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 20px;

  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.welcome::before {
  content: "";

  width: 38px;
  height: 2px;

  background-color: var(--accent);
  border-radius: 50px;
}

/* ===================================
   NAME
   =================================== */

.name {
  min-height: 2.1em;
  margin: 0;

  color: var(--text);
  font-size: clamp(42px, 6vw, 78px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -3px;
}

/*
  The typing animation for .name span
  is controlled by theme.css.
*/

.name span {
  color: var(--accent);
}

/* ===================================
   DEVELOPER TITLE
   =================================== */

.skill {
  max-width: 700px;
  margin: 25px 0 18px;
  color: var(--text);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -1px;
}

.skill span {
  color: var(--accent);
}

/* ===================================
   DESCRIPTION
   =================================== */

.description {
  max-width: 650px;
  margin-bottom: 35px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

/* ===================================
   SOCIAL LINKS
   =================================== */

.link {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.block {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background-color: var(--card);
  box-shadow: 0 8px 20px var(--shadow);

  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.block a {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  border-radius: inherit;
}

.block img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.block:hover {
  border-color: var(--accent);
  background-color: var(--accent);

  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(255, 32, 32, 0.28);
}

.block:hover img {
  transform: scale(1.1);
  filter: brightness(0) invert(1);
}

/* ===================================
   PROFILE
   =================================== */

.profile {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 400px;
}

.pic {
  position: relative;

  width: 360px;
  height: 360px;

  border: 7px solid var(--border);
  border-radius: 50%;

  background-color: var(--card);

  box-shadow:
    16px 16px 0 var(--accent),
    0 25px 55px var(--shadow);

  overflow: hidden;

  transition:
    transform 0.4s ease,
    border-color 0.35s ease,
    background-color 0.35s ease,
    box-shadow 0.4s ease;
}

.pic img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  transition: transform 0.4s ease;
}

.pic:hover {
  transform: translateY(-8px);

  box-shadow:
    10px 10px 0 var(--accent),
    0 30px 60px var(--shadow);
}

.pic:hover img {
  transform: scale(1.06);
}

/* ===================================
   PROFILE VISITOR COUNTER
   =================================== */

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

.visitor-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 18px;
  text-align: center;
}

.visitor-counter span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

#visitor-number {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

/* ===================================
   TABLET AND MOBILE
   =================================== */

@media (max-width: 950px) {
  .home {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    gap: 55px;

    min-height: auto;
    padding: 125px 35px 75px;

    text-align: center;
  }

  /* Important: remove the desktop flex-basis */
  .intro {
    flex: none;

    width: 100%;
    max-width: 720px;
  }

  .welcome {
    justify-content: center;
  }

  .skill,
  .description {
    margin-right: auto;
    margin-left: auto;
  }

  .link {
    justify-content: center;
  }

  /* Important: prevent extra vertical space */
  .profile {
    flex: none;

    width: 100%;
  }

  #typing-name {
    display: block;
    width: max-content;
    min-width: 0;
    max-width: 100%;
    margin: 5px auto 0;
  }
}

/* ===================================
   PHONES
   =================================== */

@media (max-width: 550px) {
  .home {
    gap: 50px;
    padding: 105px 20px 65px;
  }

  .intro {
    width: 100%;
  }

  .welcome {
    margin-bottom: 22px;
    font-size: 11px;
    letter-spacing: 1.5px;
  }

  .welcome::before {
    width: 28px;
  }

  .name {
    min-height: 2.05em;
    font-size: clamp(36px, 11vw, 48px);
    line-height: 1.05;
    letter-spacing: -2px;
  }

  #typing-name {
    display: block;
    width: max-content;
    min-width: 0;
    max-width: 100%;
    margin: 5px auto 0;
  }

  .skill {
    max-width: 450px;
    margin: 24px auto 18px;

    font-size: clamp(19px, 5vw, 22px);
    line-height: 1.3;
    letter-spacing: -0.5px;
  }

  .description {
    max-width: 440px;
    margin-bottom: 32px;

    font-size: 14px;
    line-height: 1.7;
  }

  .description br {
    display: none;
  }

  .link {
    gap: 13px;
  }

  .block {
    width: 44px;
    height: 44px;
  }

  .block img {
    width: 21px;
    height: 21px;
  }

  .profile {
    flex: none;

    width: 100%;
    height: auto;
  }

  .pic {
    width: min(260px, 75vw);
    height: min(260px, 75vw);

    border-width: 5px;

    box-shadow:
      10px 10px 0 var(--accent),
      0 22px 45px var(--shadow);
  }

  .pic:hover {
    box-shadow:
      7px 7px 0 var(--accent),
      0 25px 50px var(--shadow);
  }
}

/* ===================================
   SMALL PHONES
   =================================== */

@media (max-width: 370px) {
  .home {
    padding-right: 15px;
    padding-left: 15px;
  }

  .name {
    font-size: 34px;
  }

  .skill {
    font-size: 18px;
  }

  .description {
    font-size: 13px;
  }

  .pic {
    width: 225px;
    height: 225px;
  }
}
