/* General styles */

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

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

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  font-size: 18px;
  font-family: "Poppins", sans-serif;

  --bg-color: #f5efdc;
  --primary-text-color: #181820;
  --secondary-text-color: #5c5c62;
  --durability-text-color: #6a737d9c;
  --icon-color: #6a737d;
  --border-color: #ff9a0045;
  --primary-decoration-color: #ff9a00;
  --secondary-decoration-color: #ffcb7c;
}

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
  padding-top: 30px;
}

.fh {
  display: flex;
  flex-direction: column;
  gap: 85px;
  justify-content: center;
  align-items: center;
}

.fv {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.resume {
  margin: 50px auto;
  border: 1px solid #f5f5f5;
  background-color: var(--bg-color);
  overflow: hidden;
  box-shadow: 1px 1px 7px 7px #f5f5f5;
  padding: 30px 0;
  max-width: 900px;
}

.resume__block {
  border-bottom: 3px solid var(--border-color);
  padding-bottom: 30px;
  margin-bottom: 15px;
}
/* Contact info styles */

.contact-info__header,
.contact-info__sub-header {
  text-align: center;
}

.contact-info__header {
  color: var(--primary-text-color);
  margin-bottom: 15px;
  text-decoration-color: var(--primary-decoration-color);
  text-decoration-line: underline;
}

.contact-info__sub-header {
  color: var(--secondary-text-color);
  margin-bottom: 30px;
}

.contact-info__block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.contact-info__block--around {
  justify-content: space-around;
}

.contact-info__avatar {
  border-radius: 50%;
  width: 300px;
  height: 300px;
  object-fit: cover;
  border: 3px solid;
  border-color: var(--primary-decoration-color);
}

/* Intro and skills styles */

.intro {
  display: flex;
  justify-content: start;
}

.intro__icon-wrapper {
  width: 30px;
  display: flex;
  justify-content: center;
}

.intro__icon {
  height: 1.1428rem;
  vertical-align: text-bottom;
}

.intro__icon path {
  fill: var(--primary-decoration-color);
}

.intro_text {
  color: var(--secondary-text-color);
  text-align: justify;
}

/* SKILLS  */

.skills__header {
  color: var(--secondary-text-color);
  text-align: center;
  font-size: 24px;
}
.skills__header span {
  display: block;
}
.skills__header .soft {
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.skills__header:hover .soft,
.skills__header:focus .soft {
  filter: blur(4px);
  opacity: 0.6;
}
.skills__header:hover .hard,
.skills__header:focus .hard {
  text-shadow: 0 0 3px #000, 0 0 8px var(--durability-text-color);
  transform: scale(1.05);
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.skills__el-mb {
  margin-bottom: 15px;
}
.skills__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  list-style: none;
}
.skills__item {
  background-color: var(--primary-text-color);
  color: var(--secondary-decoration-color);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 0 10px var(--primary-decoration-color),
    0 0 20px var(--primary-decoration-color) inset;
  text-shadow: 0 0 8px var(--secondary-decoration-color),
    0 0 16px var(--secondary-decoration-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  cursor: pointer;
  display: inline-block;
  overflow: hidden;
}

.skills__item .poof-icon,
.skills__item .emoji-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.poof-icon,
.emoji-icon {
  width: 40px;
  height: 40px;
  opacity: 0;
  pointer-events: none;
}

.skills__item:hover .trait-text,
.skills__item:focus .trait-text {
  opacity: 0;
}

.skills__item:hover .poof-icon,
.skills__item:focus .poof-icon {
  opacity: 1;
  animation: poofFadeOut 0.4s ease forwards;
}

.skills__item:hover .emoji-icon,
.skills__item:focus .emoji-icon {
  animation: emojiFadeIn 0.6s ease forwards;
  animation-delay: 0.4s;
}
/* EXP TIMELINE */
.timeline__container {
  position: relative;
  margin: 0 auto;
  padding: 2rem 1rem;
  cursor: pointer;
}

.timeline__container::after {
  content: "";
  position: absolute;
  width: 4px;
  background-color: var(--secondary-decoration-color);
  top: 0;
  bottom: 0;
  left: 8px;
}

.timeline__item {
  position: relative;
  width: 100%;
  padding: 1rem 1.5rem 1rem 2.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-shadow: 0 0 8px var(--secondary-decoration-color),
    0 0 16px var(--secondary-decoration-color);
}

.timeline__item::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background-color: #000;
  border: 4px solid var(--secondary-decoration-color);
  border-radius: 50%;
  top: 15px;
  left: -14px;
  z-index: 1;
}

.timeline__content {
  background-color: #000;
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline__content:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
}

.timeline__content h3 {
  margin-top: 0;
  color: #ffcc00;
  font-weight: bold;
}

.timeline__content p {
  margin: 0.5rem 0 0;
  line-height: 1.5;
}

.timeline__details {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.5s ease, opacity 0.3s ease;
}
/* additional info styles */

.additional-info {
  flex: 1 1 40%;
}
.additional-info__languages {
  margin-bottom: 20px;
}

.additional-info__languages-header {
  color: var(--secondary-text-color);
  text-align: left;
  margin-bottom: 20px;
}

.additional-info__languages-item {
  color: var(--secondary-text-color);
}
.additional-info__languages-item small {
  vertical-align: super;
}

/* icon-links*/

.icon-links {
  position: absolute;
  bottom: -60px;
  left: 0;
  width: 100%;
  pointer-events: none;
  display: flex;
  justify-content: space-around;
}

/* TOOLTIP  */

.tooltip-container {
  display: inline-block;
  pointer-events: auto;
}

.tooltip-container--background {
  transition: box-shadow 0.3s ease;
}
.tooltip-container--background::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 80%;
  background: white;
  filter: blur(20px);

  z-index: -1;
  animation: glowPulse 10s infinite ease-in-out;
  border-radius: inherit;
}

.tooltip-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.icon {
  width: 2rem;
  stroke: var(--primary-text-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.2s, stroke 0.2s;
}

.tooltip-button:hover .icon,
.tooltip-button:focus .icon {
  transform: scale(1.25);
  stroke: var(--primary-decoration-color);
}

.tooltip-text {
  position: absolute;
  top: 50%;
  left: 3.5rem;
  transform: translateY(-50%) scale(0);
  transform-origin: left;
  background-color: white;
  border: 1px solid var(--icon-color);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: bold;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out;
  z-index: 20;
  white-space: nowrap;
}

.tooltip-container:hover .tooltip-text,
.tooltip-container:focus .tooltip-text,
.tooltip-container:active .tooltip-text {
  transform: translateY(-50%) scale(1);
}

/* TITLE ENTRANCE */
.hero__title {
  color: var(--primary-text-color);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 1px;
  text-align: center;
}
.hero__title-small {
  font-size: 24px;
}

.hero__text-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}
.hero__text span {
  position: relative;
  overflow: hidden;
  display: block;
  line-height: 1.2;
}

.hero__text span::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  animation: a-ltr-after 2s cubic-bezier(0.77, 0, 0.18, 1) forwards;
  transform: translateX(-101%);
}

.hero__text span::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--secondary-decoration-color);
  animation: a-ltr-before 2s cubic-bezier(0.77, 0, 0.18, 1) forwards;
  transform: translateX(0);
}

/* animations  */

/* INTRO  */
.typewriter {
  overflow: hidden;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: black;
  }
}

/* AVATAR  */
.glow-follow {
  position: relative;
  height: 300px;
  width: 300px;
  z-index: 1;
  transition: box-shadow 0.1s ease;
  border-radius: 50%;
}

@keyframes glowPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
}

/* TITLE  */
.hero__text span:nth-of-type(1)::before,
.hero__text span:nth-of-type(1)::after {
  animation-delay: 1s;
}

.hero__text span:nth-of-type(2)::before,
.hero__text span:nth-of-type(2)::after {
  animation-delay: 1.5s;
}

@keyframes a-ltr-after {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(101%);
  }
}

@keyframes a-ltr-before {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(200%);
  }
}

/* skills */
@keyframes poofFadeOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

@keyframes emojiFadeIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0);
  }
}

.vibrate {
  animation: subtle-shake 3s infinite;
}
@keyframes subtle-shake {
  0%,
  100% {
    transform: translate(0);
  }
  25% {
    transform: translate(0.5px, -0.5px);
  }
  50% {
    transform: translate(-0.5px, 0.5px);
  }
  75% {
    transform: translate(0.5px, 0.5px);
  }
}

/* ===================== MEDIA QUERIES ===================== */

/* Tablet */
@media (min-width: 768px) {
  .container {
    max-width: 100%;
  }
  .fh {
    display: flex;
    flex-direction: row;
    gap: 0;
    justify-content: space-around;
  }
  .typewriter {
    white-space: nowrap;
    width: 0;
    font-size: 15px;
    border-right: 2px solid transparent;
    animation: typing 4s steps(60, end) forwards, blink 0.7s step-end 6;
  }

  .typewriter:nth-child(2) {
    animation-delay: 4s;
  }
  .typewriter:nth-child(3) {
    animation-delay: 8s;
  }
  .typewriter:nth-child(4) {
    animation-delay: 12s;
  }
  .typewriter:nth-child(5) {
    animation-delay: 16s;
  }

  .icon-links {
    position: absolute;
    top: -20px;
    left: 0;
    height: 100%;
    transform: translateX(50%);
    display: inline-block;
  }
  .tooltip-container {
    position: absolute;
    top: 50%;
    left: 0;
    transform-origin: left center;
    pointer-events: auto;
  }

  .tooltip-container--background::after {
    width: 150%;
    height: 150%;
    animation: glowPulse 2s infinite ease-in-out;
  }

  .tooltip-container:nth-child(1) {
    transform: rotate(-60deg) translateX(175px) rotate(60deg);
  }
  .tooltip-container:nth-child(2) {
    transform: rotate(-30deg) translateX(175px) rotate(30deg);
  }
  .tooltip-container:nth-child(3) {
    transform: rotate(0deg) translateX(175px);
  }
  .tooltip-container:nth-child(4) {
    transform: rotate(30deg) translateX(175px) rotate(-30deg);
  }
  .tooltip-container:nth-child(5) {
    transform: rotate(60deg) translateX(175px) rotate(-60deg);
  }

  .timeline__container {
    padding: 2rem;
  }

  .timeline__container::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline__item {
    width: 50%;
    padding: 1rem 2rem;
  }

  .timeline__item.left {
    left: 0;
    text-align: right;
  }

  .timeline__item.left::before {
    right: -10px;
    left: auto;
  }

  .timeline__item.right {
    left: 50%;
    text-align: left;
  }

  .timeline__item.right::before {
    left: -10px;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  body {
    font-size: 16px;
  }
  .container {
    max-width: 720px;
  }
  .hero__title {
    font-size: 26px;
  }
}
@media (min-width: 1025px) and (max-width: 1279px) {
  .container {
    max-width: 900px;
  }
}
/* Desktop 1280px */
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
  .typewriter {
    font-size: 18px;
  }
  .timeline__item {
    margin-bottom: 2.5rem;
  }
}

/* Large Desktop 1440px */
@media (min-width: 1440px) {
  .container {
    max-width: 1440px;
  }
  .timeline__item {
    padding: 1.5rem 2.5rem;
  }

  .timeline__content {
    padding: 1.25rem 2rem;
  }
}
