/* ==========================================================================
   Yuri Boltovski — Portfolio
   Custom styles + self-hosted Inter font
   ========================================================================== */

/* Inter (self-hosted, latin subset, via @fontsource/inter) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('./fonts/inter-latin-300-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/inter-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/inter-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/inter-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/inter-latin-700-normal.woff2') format('woff2');
}

html {
  scroll-padding-top: 5rem;
}

.portfolio-nav {
  isolation: isolate;
  background: linear-gradient(
    100deg,
    #124b68 0%,
    #0d2f47 48%,
    #3f688f 100%
  ) !important;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.portfolio-nav::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: -1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(34, 211, 238, 0.45),
    transparent
  );
}

.portfolio-nav > div:first-child > a:first-child,
.portfolio-nav > div:first-child > div > a,
.portfolio-nav #mobile-menu > a,
.portfolio-nav #mobile-menu-btn {
  color: #fff;
}

.portfolio-nav > div:first-child > a:first-child:hover,
.portfolio-nav > div:first-child > div > a:hover,
.portfolio-nav #mobile-menu > a:hover,
.portfolio-nav #mobile-menu-btn:hover {
  color: #facc15;
}

.portfolio-nav > div:first-child > a:first-child > div {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14), 0 0 14px rgba(255, 255, 255, 0.32);
}

.portfolio-nav .nav-contact-link {
  margin-left: -1rem;
}

.portfolio-nav > div:first-child > div {
  transform: translateX(-1rem);
}

.portfolio-nav #mobile-menu {
  background: linear-gradient(
    100deg,
    #081827 0%,
    #0d2f47 48%,
    #124b68 100%
  ) !important;
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.language-switch {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
  font-weight: 600;
}

.language-switch a {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: .25rem;
  border-radius: .4rem;
  color: #64748b;
  text-decoration: none;
  transition: color .2s;
}

.language-switch a[lang="en"] {
  padding: .5rem;
  border: 1px solid rgb(6 182 212 / 0.2);
  border-radius: .5rem;
  background: rgb(238 247 249 / 30%);
  color: rgb(146 240 255);
}
.language-switch a[lang="ru"] {
  padding: .5rem;
  border: 1px solid rgb(34 197 94 / 0.2);
  border-radius: .5rem;
  background: rgb(238 247 249 / 30%);
  color: rgb(125 221 167);
}
.language-switch a:hover { color: #2563eb; }
.language-switch a.active { color: #0f172a; }
.language-switch a[lang="en"].active { color: rgb(217 119 6); }
.language-switch span { color: #cbd5e1; }

.portfolio-nav .language-switch a[lang].active {
  border-color: rgb(245 158 11 / 0.28);
  background: rgb(238 247 249 / 30%);
  color: rgb(251 191 36);
}

.portfolio-nav .language-switch a:hover {
  color: #facc15;
}

.language-switch-mobile {
  margin-top: .5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, .09);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Decorative grid background used behind the hero section */
.bg-grid {
  background-size: 50px 50px;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 90%);
}
.service-card {
  border: 1px solid transparent;
  border-radius: .75rem;
}
.service-card:hover {
  transform: none;
  box-shadow: none;
}

#services {
  position: relative;
}

#services::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 2rem;
  bottom: 0;
  left: 1rem;
  width: 1px;
  background-color: rgb(0 0 0 / 0.1);
}

#services > .grid {
  margin-left: 1rem;
}

.service-timeline-dot {
  z-index: 1;
  top: 1.5625rem;
}

#skills {
  position: relative;
}

#skills::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -1rem;
  bottom: 0;
  left: 1rem;
  width: 1px;
  background-color: rgb(0 0 0 / 0.1);
}

.technologies-heading {
  margin-left: 2.25rem;
}

.technologies-timeline-dot {
  z-index: 1;
  top: calc(50% - 0.3125rem);
  left: -1.5625rem;
}

@media (min-width: 640px) {
  #services .service-card:nth-child(even) .service-timeline-dot {
    display: none;
  }
}

.skill-card {
  background: transparent;
  border: none;
  border-radius: .75rem;
  padding-block: .375rem;
  transition: all .2s ease;
}
.skill-card:hover {
  border: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
}

.technology-grid-frame {
  margin-left: 1rem;
  padding: 1rem;
  border: none;
  border-radius: .75rem;
  column-gap: 0;
}

.technologies-title-icon {
  background: #ede9fe;
}

#skills > .grid {
  row-gap: 0;
}

/* Smooth-scroll offset so anchored sections aren't hidden under the fixed nav */

.badge {
  display: inline-block;
  padding: 0.1rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 11px;
  font-weight: 500;
}

/* Slate */
.badge.slate {
  background-color: rgb(100 116 139 / 0.1);
  border: 1px solid rgb(100 116 139 / 0.2);
  color: rgb(51 65 85);
}

/* Gray */
.badge.gray {
  background-color: rgb(107 114 128 / 0.1);
  border: 1px solid rgb(107 114 128 / 0.2);
  color: rgb(55 65 81);
}

/* Zinc */
.badge.zinc {
  background-color: rgb(113 113 122 / 0.1);
  border: 1px solid rgb(113 113 122 / 0.2);
  color: rgb(63 63 70);
}

/* Red */
.badge.red {
  background-color: rgb(239 68 68 / 0.1);
  border: 1px solid rgb(239 68 68 / 0.2);
  color: rgb(185 28 28);
}

/* Orange */
.badge.orange {
  background-color: rgb(249 115 22 / 0.1);
  border: 1px solid rgb(249 115 22 / 0.2);
  color: rgb(194 65 12);
}

/* Amber */
.badge.amber {
  background-color: rgb(245 158 11 / 0.1);
  border: 1px solid rgb(245 158 11 / 0.2);
  color: rgb(180 83 9);
}

/* Yellow */
.badge.yellow {
  background-color: rgb(234 179 8 / 0.1);
  border: 1px solid rgb(234 179 8 / 0.2);
  color: rgb(161 98 7);
}

/* Lime */
.badge.lime {
  background-color: rgb(132 204 22 / 0.1);
  border: 1px solid rgb(132 204 22 / 0.2);
  color: rgb(63 98 18);
}

/* Green */
.badge.green {
  background-color: rgb(34 197 94 / 0.1);
  border: 1px solid rgb(34 197 94 / 0.2);
  color: rgb(21 128 61);
}

/* Emerald */
.badge.emerald {
  background-color: rgb(16 185 129 / 0.1);
  border: 1px solid rgb(16 185 129 / 0.2);
  color: rgb(4 120 87);
}

/* Teal */
.badge.teal {
  background-color: rgb(20 184 166 / 0.1);
  border: 1px solid rgb(20 184 166 / 0.2);
  color: rgb(15 118 110);
}

/* Cyan */
.badge.cyan {
  background-color: rgb(6 182 212 / 0.1);
  border: 1px solid rgb(6 182 212 / 0.2);
  color: rgb(14 116 144);
}

/* Sky */
.badge.sky {
  background-color: rgb(14 165 233 / 0.1);
  border: 1px solid rgb(14 165 233 / 0.2);
  color: rgb(3 105 161);
}

/* Blue */
.badge.blue {
  background-color: rgb(59 130 246 / 0.1);
  border: 1px solid rgb(59 130 246 / 0.2);
  color: rgb(29 78 216);
}

/* Indigo */
.badge.indigo {
  background-color: rgb(99 102 241 / 0.1);
  border: 1px solid rgb(99 102 241 / 0.2);
  color: rgb(67 56 202);
}

/* Violet */
.badge.violet {
  background-color: rgb(139 92 246 / 0.1);
  border: 1px solid rgb(139 92 246 / 0.2);
  color: rgb(109 40 217);
}

/* Purple */
.badge.purple {
  background-color: rgb(168 85 247 / 0.1);
  border: 1px solid rgb(168 85 247 / 0.2);
  color: rgb(126 34 206);
}

/* Fuchsia */
.badge.fuchsia {
  background-color: rgb(217 70 239 / 0.1);
  border: 1px solid rgb(217 70 239 / 0.2);
  color: rgb(162 28 175);
}

/* Pink */
.badge.pink {
  background-color: rgb(236 72 153 / 0.1);
  border: 1px solid rgb(236 72 153 / 0.2);
  color: rgb(190 24 93);
}

/* Rose */
.badge.rose {
  background-color: rgb(244 63 94 / 0.1);
  border: 1px solid rgb(244 63 94 / 0.2);
  color: rgb(190 18 60);
}

#projects .badge {
  background-color: transparent;
  border-color: rgb(100 116 139 / 0.35);
}

#projects > .grid > a > p {
  text-align: justify;
}

#projects {
  position: relative;
}

#projects::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 2rem;
  bottom: 0;
  left: 1rem;
  width: 1px;
  background-color: rgb(0 0 0 / 0.1);
}

#projects > .grid {
  margin-left: 1rem;
}

#experience {
  position: relative;
}

#experience::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 2rem;
  bottom: 0;
  left: 1rem;
  width: 1px;
  background-color: rgb(0 0 0 / 0.1);
}

#experience > .relative {
  margin-left: 1rem;
}

#projects > .grid > a {
  background-color: transparent;
  border: 1px solid transparent;
}

#projects > .grid > a > .absolute.-left-\[5px\] {
  z-index: 1;
  top: 2.0625rem;
}

#projects > .grid > a:hover {
  background-color: transparent;
  border-color: transparent;
  border-radius: 0 1rem 1rem 0;
  transform: none;
  box-shadow: none;
}

@media (min-width: 768px) {
  #projects > .grid > a > .absolute.-left-\[5px\] {
    top: 2.5625rem;
  }
}

.hero-profile-photo {
  width: 9rem;
  height: 9rem;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 9999px;
  box-shadow: 0 0 10px 2px rgba(15, 23, 42, 0.16);
}

.hero-profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-introduction {
  width: 100%;
  text-align: justify;
}

.about-copy {
  text-align: justify;
}

.education-copy {
  text-align: justify;
}

.education-content {
  padding-top: 0;
}

.hero-linkedin-button {
  border-color: rgba(0, 0, 0, 0.1);
  background: #fff;
  color: #334155;
}

.hero-linkedin-button:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.05);
  color: #334155;
}

.hero-linkedin-button img {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

.hero-section-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  width: 100%;
  margin-top: 1.5rem;
}

.hero-section-divider::before,
.hero-section-divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(8, 145, 178, 0.24));
}

.hero-section-divider::after {
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.24), transparent);
}

.hero-section-divider a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(8, 145, 178, 0.22);
  border-radius: 9999px;
  background: #fff;
  color: #0891b2;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.hero-section-divider a:hover {
  border-color: rgba(8, 145, 178, 0.42);
  background: #ecfeff;
  transform: translateY(2px);
}

.section-divider-about,
.section-divider-projects,
.section-divider-contact {
  margin-top: 0;
  margin-bottom: 3rem;
}

.section-divider-technologies {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.section-divider-contact {
  margin-bottom: 1rem;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-profile-photo {
    width: 8rem;
    height: 8rem;
  }
}

@media (max-width: 767px) {
  .portfolio-nav > div:first-child {
    justify-content: flex-start;
    gap: .75rem;
  }

  .portfolio-nav > div:first-child > a:first-child,
  .portfolio-nav #mobile-menu-btn {
    flex: 0 0 auto;
  }

  .portfolio-nav .language-switch-header {
    gap: .25rem;
    margin-left: auto;
  }

  .portfolio-nav #mobile-menu-btn {
    margin-left: .25rem;
  }

  .hero-profile-photo {
    width: 6.5rem;
    height: 6.5rem;
  }

  .hero-introduction {
    text-align: left;
  }

  .about-copy {
    text-align: left;
  }

  .education-copy {
    text-align: left;
  }

  .skill-card,
  .skill-card span {
    min-width: 0;
  }

  .skill-card span {
    overflow-wrap: anywhere;
  }

}
