@font-face {
  font-family: "Roboto";
  src: url("../assets/fonts/Roboto-VariableFont.ttf");
  font-weight: normal;
  font-style: normal;
}

:root {
  --primary-color: #e63538;
  --bg: #1f1f1f;
  --box-color: #292626;
}

::selection {
  background: var(--primary-color);
  color: #000;
}

*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: 0;
  font-family: "Roboto";
}

html {
  color: #fafafa;
  font-size: 15px;
}

ul,
ol,
li {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

p {
  line-height: 1.5;
}

img {
  max-width: 100%;
  object-fit: cover;
}

#root {
  width: 100%;
  height: 100dvh;
  background: var(--bg);
  overflow-y: auto;
}

.site-header {
  position: sticky;
  padding: 40px 145px;
  z-index: 100;
}

.site-header .header__inner {
  display: flex;
  max-width: 1080px;
  justify-content: space-between;
  align-items: center;
  margin-inline: auto;
}

.site-header .header__dropButton {
  display: none;
  flex-direction: column;
  width: 25px;
  gap: 4px;
  cursor: pointer;
}

.site-header .header__dropButton span {
  height: 3px;
  background: var(--bg);
  transition: 400ms;
}

.site-header .header__menu:not(.close) + .header__dropButton span {
  &:first-child {
    transform: translate(0, 7px) rotate(-45deg);
  }

  &:nth-child(2) {
    opacity: 0;
  }

  &:last-child {
    transform: translate(0, -7px) rotate(45deg);
  }
}

.site-header .header__menu ul {
  display: flex;
  gap: 45px;
}

.site-header .header__menu ul a {
  position: relative;
  transition: 300ms;
}

.site-header .header__menu ul a:hover {
  color: var(--primary-color);
}

.site-header .header__menu ul a:hover::before {
  width: max(55px, 100%);
  left: calc(-1px * max(55px, 100%) / 2);
}

.site-header .header__menu ul a::before {
  content: "";
  position: absolute;
  bottom: -12px;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  left: 50%;
  transition: all 300ms;
  transform: translateX(-50%);
}

.site-header .header__contact a {
  background: var(--primary-color);
  padding: 12px 20px;
  border-radius: 15px;
  position: relative;
}

.site-header .header__contact a:hover {
  background: #d63437;
}

.animated-btn::before {
  position: absolute;
  content: "";
  inset: 0;
  z-index: -1;
  scale: 105%;
  border-radius: inherit;
  background: conic-gradient(from var(--angle) at 50% 50%, var(--bg) 250deg, var(--primary-color) 320deg);
  animation: animatedButtonAngle 1200ms linear infinite;
}

.site-body {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 12px;
}

.introduction {
  margin-block: 65px 45px;
  text-align: center;
  position: relative;
}

.introduction p.heading {
  font-size: min(7vw, 4rem);
  line-height: 1.6;
}

.introduction > p > span {
  color: transparent;
  background: linear-gradient(to right top, var(--primary-color) 30%, #fff);
  background-clip: text;
  background-position: 100% 100%;
  background-size: 200% 200%;
  animation: nameTextGradient 400ms linear 5150ms;
}

.introduction .introduction__typeCursor {
  display: inline-block;
  width: 4px;
  height: 80px;
  background: #fff;
  position: relative;
  bottom: -20px;
  animation: typingCursor infinite linear .8s;
}

.introduction .introduction__mouseCursor {
  position: absolute;
  transform: rotate(-90deg) scale(.7);
  animation: nameTextPointer 1s linear 4350ms forwards;
}

.introduction p:last-child {
  max-width: min(100%, 600px);
  margin: 15px auto;
}

.tools .heading {
  text-align: center;
  font-size: 1.8rem;
}

.tools .tools-container {
  display: flex;
  flex-wrap: wrap;
  padding: 50px;
  justify-content: center;
  gap: 20px;
  max-width: 800px;
  margin-inline: auto;
}

.tools .tools-container .tool-box {
  display: flex;
  padding: 15px 25px;
  align-items: center;
  gap: 10px;
  background: var(--box-color);
  border-radius: 12px;
}

.showcase .heading {
  text-align: center;
  font-size: 1.7rem;
}

.showcase .cards-container {
  position: relative;
  overflow-x: hidden;
  min-height: 260px;
}

.showcase .cards-container .cards {
  position: absolute;
  display: flex;
  padding-block: 50px;
  animation: showcasesAutoScroll 15s linear infinite;
}

.showcase .card {
  position: relative;
  padding: 20px;
  width: 350px;
  background: var(--box-color);
  box-shadow: 1px 1px 8px 0 #141414;
  border-radius: 16px;
  display: flex;
  height: 160px;
  border: 1px solid transparent;
  transition: 400ms;
  overflow: hidden;
  margin-left: 60px;
  cursor: pointer;
  &  * {
    transition: 400ms;
  }
}

.showcase .card::before {
  content: "View Website";
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / .8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: .4s;
  opacity: 0;
  visibility: hidden;
}

.showcase .card:hover {
  border-color: var(--primary-color);
  &::before {
    visibility: visible;
    opacity: 1;
  }
}

.showcase .card .card-img {
  padding-right: 10px;
  display: flex;
  align-items: center;
}

.showcase .card .card-content p.name {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.showcase .card .card-content p.description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.showcase .card .card-tags {
  margin-block: 4px;
}

.showcase .card .card-tags span {
  display: inline-block;
  padding: 4px 6px;
  background: #000;
  font-size: .7rem;
  margin-left: 4px;
  border-radius: 4px;
}

.skill-items {
  padding-inline: 25px;
  margin-block: 35px;
}

.skill-item {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

.skill-item:nth-child(even) {
  flex-direction: row-reverse;
}

.skill-item > div {
  min-width: 250px;
  width: 50%;
}

.skill-item .heading {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.skill-item .item-description {
  padding-inline: 40px;
}

.skill-item .item-animation {
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transform: translate(-80px, -80px);
}

.skill-item .code-window {
  width: 400px;
  max-width: 100%;
  height: 200px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 1px 1px 14px 1px #0e0d0d;
}

.code-window .window__bar {
  background: #272525;
  padding: 6px 10px;
}

.code-window .window__bar span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: calc(infinity * 1px);
  margin-left: 4px;
}

.code-window .window__bar span:nth-child(1) {
  background: rgb(248, 60, 60);
}

.code-window .window__bar span:nth-child(2) {
  background: rgb(235, 191, 50);
}

.code-window .window__bar span:nth-child(3) {
  background: rgb(67, 206, 67);
}

.code-window .window__content {
  flex: 1;
  padding: 20px;
}

.code-window .window__content .code-lines {
  display: flex;
  flex-direction: column;
}

.code-lines * {
  font-family: "Fira Code";
}

.code-lines .line {
  display: flex;
}

.code-lines .line.active .code {
  border-top: 1px solid #242323;
  border-bottom: 1px solid #242323;
}

.code-lines .line .line-number {
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-lines .line .code {
  flex: 1;
  padding-block: 3px;
  display: flex;
}

.code-lines .line .code > span.keyword {
  color: var(--primary-color);
}

.code-lines .line .code > span.symbol {
  color: #fff;
}

.code-lines .line .code > span.tag {
  color: #058625;
}

.code .cursor {
  display: inline-block;
  width: 2px;
  background: #fff;
  animation: typingCursor infinite linear .8s;
}

.item-animation.intersection-fade {
  animation: fadeUp 1s forwards;
}

.send-message {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
}

.send-message .message-guide p:first-child {
  font-size: 2rem;
  margin-bottom: 15px;
  text-align: center;
}

.send-message .message-form form {
  background: var(--box-color);
  border-radius: 12px;
  box-shadow: 1px 1px 12px 0 #1a1a1a;
  padding: 25px;
}

.send-message .message-form .form-heading {
  text-align: center;
  font-size: 1.3rem;
  margin-block: 20px;
}

.send-message .message-form .form-content {
  width: 100%;
  max-width: 250px;
  margin-inline: auto;
}

.send-message .message-form .field-container {
  margin-bottom: 15px;
}

.send-message .message-form .field-container label {
  display: block;
  margin-bottom: 8px;
  text-align: left;
}

.send-message .message-form .field-container input,
.send-message .message-form .field-container textarea {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #3b3b3b;
  caret-color: var(--primary-color);
  color: #fff;
  &:hover,
  &:focus {
    border: 1px solid var(--primary-color);
  }
  &:is(textarea) {
    min-height: 70px;
  }
}

.message-form .form-submit {
  display: flex;
  justify-content: center;
}

.message-form .form-submit button {
  padding: 8px 15px;
  color: #fff;
  border-radius: 6px;
  background: var(--primary-color);
  border: none;
  cursor: pointer;
}

.contact .title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
}

.contact .social-networks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 600px;
  margin-inline: auto;
  row-gap: 45px;
}

.contact .social-networks > div {
  display: flex;
  justify-content: center;
  font-size: 2.5rem;
  cursor: pointer;
}

.contact .social-networks i {
  transition: .3s;
}

.contact .social-networks > div:hover i {
  color: var(--primary-color);
}

footer {
  margin-top: 50px;
}

.footer__lists {
  background: #181717;
  display: flex;
  flex-wrap: wrap;
  padding: 20px 40px;
  justify-content: center;
  line-height: 1.5;
}

.footer__lists .footer__list {
  text-align: center;
  margin-block: 20px;
  min-width: 200px;
}

.footer__lists .footer__list:not(.contact-methods) li:not(:first-child):hover {
  color: var(--primary-color);
}

.footer__lists .footer__list li:first-child {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.footer__lists .footer__list.contact-methods .contact-method {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.footer__lists .footer__list.contact-methods .description {
  max-width: 200px;
  hyphens: auto;
  margin-block: 10px;
}

footer .copyright {
  background: #000;
  text-align: center;
  padding: 25px;
}

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes animatedButtonAngle {
  from { --angle: 0deg; }
  to { --angle: 360deg; }
}

@keyframes typingCursor {
  0% { opacity: 1; }
  50% { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nameTextGradient {
  from { background-position: -100%; }
  to { background-position: 10%; }
}

@keyframes nameTextPointer {
  0% { translate: 0 0; }
  70% { translate: -165px 50px; }
  85% {
    translate: -165px 40px;
    scale: .5;
  }
  100% {
    translate: -165px 50px;
    scale: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate(-80px, 80px);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes showcasesAutoScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 830px) {
  .site-header {
    width: calc(100% - 2 * 30px);
    padding: 25px 45px;
    top: 30px;
    left: 30px;
    border-radius: 12px;
    background: rgb(255 255 255 / .5);
    box-shadow: 1px 1px 10px 0 #0e0e0e;
  }

  .site-header::before {
    content: "";
    position: absolute;
    backdrop-filter: blur(8px);
    inset: 0;
    z-index: -10;
    border-radius: inherit;
  }

  .site-header::after {
    content: "";
    inset: 0;
    position: absolute;
    z-index: -15;
    background: conic-gradient(from 60deg at 20% -300%, var(--primary-color) 30deg, transparent 150deg);
    opacity: .3;
    border-radius: inherit;
  }

  .site-header .header__dropButton {
    display: flex;
  }

  .site-header .header__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: rgb(255 255 255 / .4);
    border-radius: 12px;
    padding: 25px 40px;
    backdrop-filter: blur(15px);
    box-shadow: 1px 1px 30px 0 #0e0e0e;
    max-height: 1000px;
    transition: 400ms;
  }

  .site-header .header__menu ul {
    flex-direction: column;
  }

  .site-header .header__menu ul a:hover {
    color: var(--primary-color);
  }

  .site-header .header__menu ul a::before {
    display: none;
  }

  .site-header .header__menu.close {
    max-height: 0;
    padding-block: 0;
    overflow: hidden;
  }

  .skill-items .skill-item {
    display: block;
  }

  .skill-items .skill-item > div {
    padding: 20px;
    width: 100%;
  }

  .skill-items .skill-item .item-animation > div {
    display: flex;
    justify-content: center;
  }
}
