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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Josefin Sans', sans-serif;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

:root {
  --bg-and-main: hsl(206, 15%, 18%);
  --primary: #89BCD9;
  --secondary: #F8F5EC;
  --section: hsl(202, 18%, 21%);
  --btn-hover: hsl(202, 8%, 27%);
  --nav-height: 104px;
  --footer-height: 214px;
  --content-width: 1440px;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overscroll-behavior-x: none;
}

body {
  background-color: var(--bg-and-main);
  color: var(--secondary);
  position: relative;
}

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

button {
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
}

.hero-image,
.avatar-mobile-circle,
.learning-circle,
.reference-image-card,
.project-image {
  flex-shrink: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.burger-btn {
  display: none;
}

.mobile-logo-block {
  display: none;
}

/* HERO */

.hero {
  min-height: calc(100vh - var(--nav-height));
  height: calc(100vh - var(--nav-height));
  position: relative;
  top: 0;
}

.hero-container {
  width: min(100% - 64px, var(--content-width));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 535px 1fr 30px;
  align-items: center;
  position: relative;
}

.hero-image {
  width: 535px;
  height: 100%;
  top: -120px;
  position: relative;
}

.avatar-mobile-circle {
  position: relative;
  width: 100%;
  height: 100%;
}

.avatar-bg {
  position: absolute;
  width: 500px !important;
  height: 710px;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  object-fit: contain;
  z-index: 1;
}

.avatar {
  position: absolute;
  width: 535px;
  height: 683px;
  left: 50%;
  top: 100px;
  transform: translateX(-50%);
  object-fit: contain;
  z-index: 2;
}

.avatar-bg-mobile-new,
.avatar-mobile-new,
.avatar-photo-mask {
  display: none;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--secondary);
  text-align: center;
  margin-right: 40px;
}

.hero-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--secondary);
  font-size: 16px;
  margin-bottom: 34px;
  position: relative;
}

.hero-logo {
  width: 66px;
  height: auto;
}

.logo-name {
  position: relative;
  left: 7px;
}

.logo-role {
  color: var(--primary);
  position: relative;
  right: 2px;
}

.hero-text h1 {
  font-family: 'Anta', sans-serif;
  font-size: 56px;
  line-height: 1;
  font-weight: 400;
  padding-bottom: 18px;
}

.hero-text > p {
  font-size: 28px;
  line-height: 1;
  font-weight: 400;
}

.hero-icons {
  width: 30px;
  height: 122px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-self: start;
  padding-top: 170px;
}

.hero-icons a,
.footer-right a {
  width: 30px;
  height: 30px;
  position: relative;
}

.icon,
.footer-icon {
  position: absolute;
  inset: 0;
  width: 30px;
  height: 30px;
}

.hover,
.footer-icon.hover {
  display: none;
}

.hero-icons a:hover .normal,
.footer-right a:hover .normal {
  display: none;
}

.hero-icons a:hover .hover,
.footer-right a:hover .hover {
  display: block;
}

.scroll-down {
  position: absolute;
  left: 74%;
  bottom: 54px;
  transform: translateX(-50%);
  width: 38px;
  height: 89px;
}

/* NAV */

.hero-nav {
  height: var(--nav-height);
  background-color: var(--primary);
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0 max(40px, calc((100% - var(--content-width)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: none;
}

.nav-logo,
.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-logo img,
.footer-center img {
  width: 53px;
}

.logo-name-dark,
.logo-role-dark,
.footer-logo-name,
.footer-logo-role {
  font-size: 16px;
  line-height: 1;
  position: relative;
}

.logo-name-dark,
.footer-logo-name {
  color: var(--secondary);
  left: 8px;
}

.logo-role-dark,
.footer-logo-role {
  color: var(--bg-and-main);
  left: 0;
}

.hero-nav ul {
  display: flex;
  gap: 56px;
  list-style: none;
}

.hero-nav a {
  font-size: 28px !important;
  font-weight: 500;
  line-height: 200%;
  color: var(--bg-and-main);
}

.hero-nav ul a:hover,
.language a.active,
.language a:hover {
  color: var(--secondary);
}

.language {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 92px;
  justify-content: center;
}

.language a {
  width: 40px;
  height: 32px;
  font-size: 16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.language a.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("./assets/icons/language-bg.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: -1;
}

/* SECTIONS */

#why-me,
#skills,
#projects,
#references,
#contact {
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.why-me,
.skills,
.references,
.contact {
  width: min(100% - 64px, var(--content-width));
  margin: 104px auto 0;
}

.projects {
  width: 100%;
  margin: 104px auto 0;
}

.why-me h2,
.skills h2,
.projects h2,
.contact h2 {
  font-family: 'Anta', sans-serif;
  font-size: clamp(54px, 5vw, 68px);
  color: var(--primary);
  text-align: center;
  font-weight: 400;
}

/* WHY ME */

.why-content,
.skills-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 80px;
  gap: 52px;
}

.location-box {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 16px;
  font-size: 30px;
  font-weight: 700;
  min-height: 64px;
  margin-left: 90px;
}

.location-box img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.why-text {
  flex: 1;
  font-size: 18px;
  line-height: 1.4;
}

.why-text h3 {
  margin-bottom: 12px;
  font-size: 18px;
  color: var(--secondary);
}

.why-text .btn {
  margin-left: auto;
}

.btn,
.project-buttons a {
  width: 135px;
  height: 48px;
  border: 1px solid var(--primary);
  border-radius: 30px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-top: 24px;
}

.btn:hover,
.project-buttons a:hover {
  background-color: var(--btn-hover);
}

/* SKILLS */

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  flex: 1;
  color: var(--primary);
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  transition: 125ms ease-in-out;
}

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

.skill img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.skills-grid .skill:nth-child(9) p {
  max-width: 85px;
  line-height: 1.05;
  text-align: center;
}

.learning-circle {
  width: 400px;
  min-width: 400px;
  min-height: 400px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.learning-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.learning-content {
  position: relative;
  z-index: 1;
  padding: 0 45px;
  font-size: 18px;
}

.learning-content > p:first-child {
  color: var(--primary);
}

.learning-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 19px 0;
}

.learning-icons img {
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
}

/* PROJECTS */

.projects h2 {
  width: min(100% - 64px, var(--content-width));
  margin: 0 auto;
}

.project-tabs {
  width: min(100% - 64px, var(--content-width));
  margin: 0 auto;
  padding-top: 80px;
  display: flex;
}

.project-tabs button {
  min-width: 250px;
  height: 97px;
  color: var(--primary);
  font-size: 30px;
  font-weight: 500;
  border-radius: 30px 30px 0 0;
}

.project-tabs button.active {
  background-color: var(--section);
}

.project-content {
  display: none;
  background-color: var(--section);
  color: var(--secondary);
  padding: 31px max(72px, calc((100% - var(--content-width)) / 2)) 28px;
  gap: 56px;
}

.project-content.active {
  display: flex;
}

.project-text {
  flex: 1.2;
}

.project-point {
  display: flex;
  gap: 18px;
  margin-bottom: 40px;
}

.project-point > img {
  width: 24px;
  height: 24px;
  margin-top: 4px;
  flex-shrink: 0;
}

.project-point h3 {
  font-size: 28px;
}

.project-point p {
  margin: 16px 0 40px;
  font-size: 18px;
  line-height: 1.35;
}

.project-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0.8;
  text-align: center;
}

.project-preview > p {
  padding-bottom: 12px;
  font-size: 18px;
}

.project-tech {
  display: flex;
  gap: 32px;
  margin-bottom: 16px;
}

.project-tech img {
  width: 36px;
  height: 36px;
}

.project-image {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 30px;
}

.project-buttons {
  display: flex;
  gap: 40px;
  margin: 34px 0 28px;
}

.project-buttons a:first-child {
  background-color: var(--primary);
  color: var(--bg-and-main);
}

/* REFERENCES */

.references {
  margin-top: 80px;
}

.references h2 {
  font-size: 28px;
  text-align: center;
  color: var(--primary);
  font-weight: 400;
  font-family: 'Josefin Sans', sans-serif;
}

.references-container {
  width: 100%;
  max-width: 1080px;
  margin: 56px auto 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 80px;
}

.reference-image-card {
  width: 400px;
  min-width: 400px;
  height: 400px;
  flex: 0 0 400px;
  position: relative;
  text-align: center;
  transition: transform 0.2s ease;
}

.reference-image-card:hover {
  transform: translateY(-6px);
}

.reference-image-card > img {
  position: absolute;
  inset: 0;
  width: 400px;
  height: 400px;
  object-fit: contain;
}

.reference-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 55px 18px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reference-content h3 {
  font-size: 24px;
  padding-bottom: 6px;
}

.reference-content span {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 12px;
}

.reference-content p {
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
  max-width: 300px;
  flex: 1;
}

.reference-content a {
  color: var(--primary);
  font-size: 16px;
  margin-top: auto;
  position: relative;
  text-decoration: none;
}

.reference-content a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.25s ease;
}

.reference-content a:hover::after {
  width: 100%;
}

/* CONTACT */

.contact {
  max-width: 980px;
  margin-bottom: 180px;
  position: relative;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding: 72px 0 48px;
  align-items: start;
}

.contact-info {
  text-align: center;
  font-size: 18px;
  line-height: 1.35;
  max-width: 430px;
  justify-self: center;
  font-weight: 700;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 18px;
  font-weight: 700;
  justify-self: center;
}

.contact-link-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.contact-icon-box {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

.contact-icon {
  position: absolute;
  inset: 0;
  width: 24px;
  height: 24px;
}

.contact-icon.hover {
  display: none;
}

.contact-link-row:hover .contact-icon.normal {
  display: none;
}

.contact-link-row:hover .contact-icon.hover {
  display: block;
}

.contact-link-row a {
  color: var(--secondary);
  transition: color 125ms ease-in-out;
}

.contact-link-row:hover a {
  color: var(--primary);
}

.contact-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: auto 164px auto;
  gap: 16px;
  margin-top: 48px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-field label,
.contact-form label {
  font-size: 16px;
  padding: 0 27px 4px;
  color: var(--primary);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: transparent;
  color: var(--secondary);
  padding: 20px 26px;
  font-size: 16px;
  border: 1px solid var(--primary);
  border-radius: 30px;
  outline: none;
}

.contact-form input:hover,
.contact-form textarea:hover,
.contact-form input:focus,
.contact-form textarea:focus {
  background-color: rgba(248, 245, 236, 0.08);
}

.contact-form textarea {
  resize: none;
  height: 120px;
}

.message-field {
  grid-column: 1 / -1;
}

.privacy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 0;
  font-size: 16px;
  color: var(--secondary);
  font-weight: 700;
  cursor: pointer;
}

.checkbox {
  display: none;
}

.checkbox-icons {
  position: relative;
  width: 24px;
  height: 24px;
  min-width: 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkbox-icons img {
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 2;
}

.icon-checked {
  display: none;
}

.checkbox:checked + .checkbox-icons .icon-unchecked {
  display: none;
}

.checkbox:checked + .checkbox-icons .icon-checked {
  display: block;
}

.privacy-row:hover .checkbox-icons::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(137, 188, 217, 0.1);
  z-index: 1;
}

.privacy-row span {
  color: var(--secondary);
}

.privacy-row a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.contact-form button {
  justify-self: end;
  width: 101px;
  height: 48px;
  border: 1px solid #74726d;
  border-radius: 30px;
  color: #74726d;
  background: transparent;
  font-size: 18px;
  margin-top: 0;
}

#sendButton:disabled {
  pointer-events: none;
  opacity: 0.5;
  color: #74726d;
  border-color: #74726d;
}

#sendButton:not(:disabled) {
  pointer-events: auto;
  opacity: 1;
  color: var(--primary);
  border-color: var(--primary);
  cursor: pointer;
}

#sendButton:not(:disabled):hover {
  background-color: rgba(137, 188, 217, 0.15);
}

.error-message {
  display: block;
  min-height: 18px;
  margin-top: 8px;
  color: #ff7b7b;
  font-size: 14px;
  line-height: 1.2;
}

.error-border {
  border-color: #ff6b6b !important;
}

#privacyError {
  display: none;
}

.form-feedback {
  min-height: 22px;
  font-size: 16px;
  color: var(--primary);
  text-align: right;
}

.form-feedback.error {
  color: #ff7b7b;
}

.arrow-up {
  position: absolute;
  right: 0;
  top: 0;
  width: 38px;
}

/* FOOTER */

.footer {
  height: var(--footer-height);
  background-color: var(--primary);
  color: var(--bg-and-main);
  padding: 0 max(72px, calc((100% - var(--content-width)) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-left a {
  color: var(--bg-and-main);
}

.footer-right {
  display: flex;
  gap: 16px;
}

/* HOVER IMAGES */

.hover-bg {
  display: none;
}

.avatar-mobile-circle:hover .normal-bg,
.learning-circle:hover .normal-bg,
.reference-image-card:hover .normal-bg {
  display: none;
}

.avatar-mobile-circle:hover .hover-bg,
.learning-circle:hover .hover-bg,
.reference-image-card:hover .hover-bg {
  display: block;
}

.avatar-mobile-circle .hover-bg,
.avatar-mobile-circle .normal-bg {
  position: absolute;
  width: 594px;
  height: 710px;
  left: 50%;
  top: 100px;
  transform: translateX(-50%);
  object-fit: contain;
}

.learning-circle .hover-bg,
.learning-circle .normal-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.learning-circle .hover-bg {
  transform: scale(1.28);
}

.reference-image-card .hover-bg,
.reference-image-card .normal-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reference-image-card .hover-bg {
  transform: scale(1.28);
}

/* LEGAL PAGE */

.legal-page {
  background-color: var(--bg-and-main);
  min-height: calc(100dvh - var(--nav-height) - var(--footer-height));
  padding: 72px 0 96px;
}

.legal-content {
  width: min(100% - 64px, 980px);
  margin: 0 auto;
  color: var(--secondary);
  line-height: 1.45;
}

.legal-content h1 {
  font-family: 'Anta', sans-serif;
  font-size: clamp(36px, 4vw, 64px);
  color: var(--primary);
  font-weight: 400;
  margin-bottom: 48px;
}

.legal-content h2 {
  font-family: 'Anta', sans-serif;
  font-size: clamp(26px, 2.6vw, 42px);
  color: var(--primary);
  font-weight: 400;
  margin: 44px 0 18px;
}

.legal-content h3 {
  color: var(--primary);
  font-size: 24px;
  margin: 34px 0 12px;
}

.legal-content h4 {
  color: var(--primary);
  font-size: 19px;
  margin: 24px 0 8px;
}

.legal-content p {
  font-size: 18px;
  margin-bottom: 14px;
}

.legal-content a {
  color: var(--primary);
  word-break: break-word;
}

.legal-content a:hover {
  color: var(--secondary);
}

.legal-date {
  margin-top: 40px;
  color: var(--primary);
  font-weight: 700;
}

.legal-footer {
  margin-top: 0;
}

.hero-nav ul a.active::before {
  content: "";
  position: absolute;
  inset: -3px -8px;
  background-image: url("./assets/icons/language-bg.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: -1;
  
}

.hero-nav ul a {
  position: relative;
  z-index: 1;
}


.hero-nav ul a.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-active-icon {
  display: none;
  position: absolute;
  width: 90px !important;
  height: 60px !important;
  z-index: 1;
  opacity: 1;
}

.hero-nav ul a.nav-item.active .nav-active-icon {
  display: block !important;
}

.hero-nav ul a.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-nav ul a.nav-item.active,
.hero-nav ul a.nav-item.active span {
  color: var(--secondary) !important;
}

.location-box p {
  position: relative;
  display: inline-block;
}

.location-box p::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 34px;
  background: var(--secondary);
  margin-left: 2px;
  position: relative;
  top: 8px;
}
