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

#main {
  padding-top: 50px;
}

body {
  background: #0d1117;
  color: #c9d1d9;
  font-family: 'Montserrat', Arial, sans-serif;
  line-height: 1.6;
}

body::-webkit-scrollbar {
  display: none;
}

::selection {
  background: #6941ec;
  color: #fff;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #0d1117;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

header .container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: #6941ec;
  cursor: default;
  text-decoration: none;
}
.logo img {
  height: 36px;
  width: auto;
  vertical-align: middle;
  cursor: pointer;
}

.hello {
  text-align: center;
}

.hello h2 {
  color: white;
}

.hello img {
  width: 150px;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 75px;
}

nav a {
  color: #8b949e;
  margin-left: 1.8rem;
  text-decoration: none;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #6941ec;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #6941ec;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

nav a.active {
  color: #ffffff;
}

h1, h2, h3, .footer, nav a, .project a, .social-btn, .footer-copyright {
  font-family: 'Inter', 'Montserrat', Arial, sans-serif;
}

h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 2.8rem;
  color: #6941ec;
  margin-bottom: 1rem;
}

h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 2rem;
  color: #6941ec;
  margin-bottom: 1rem;
}

.project a {
  font-family: 'Montserrat', sans-serif;
  color: #6941ec;
  text-decoration: none;
  font-weight: 600;
}

main {
  padding: 90px 1rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

section {
  padding: 2rem 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

p {
  margin-bottom: 1.5rem;
}

#about p {
  max-width: 650px;
}

#work .projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.project {
  background: #161b22;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 0;
  box-shadow: 0 0 10px #ac5feb66;
  transition: box-shadow 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  border: 2px solid transparent;
  height: 100%;
}

.project:hover, .project:focus-within {
  box-shadow: 0 0 20px #6941ec;
  border: 2px solid #6941ec;
}

.project-icon {
  position: static;
  margin-right: 16px;
  margin-top: 0.1em;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #6941ec;
  background-color: #161b22;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  flex-shrink: 0;
}
.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.project-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 160px;
  height: 100%;
}
.project-content h3 {
  margin-bottom: 0.5rem;
}
.project-content p {
  margin-bottom: 1rem;
  flex-grow: 1;
}
.project-content a {
  margin-top: auto;
  align-self: flex-start;
}
.project-content a:not([href]) {
  color: #8b949e;
  background: none;
  cursor: default;
  border: none;
  opacity: 0.7;
  pointer-events: none;
  text-decoration: line-through;
}

.project h3, .project p, .project a {
  margin-left: 0;
}

.social-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0 1rem 0;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  background: #181c23;
  box-shadow: 0 2px 8px #0003;
  transition: box-shadow 0.2s, transform 0.2s, border 0.2s;
  border: 2px solid transparent;
  outline: none;
  cursor: pointer;
  position: relative;
  justify-content: center;
  min-width: 170px;
  text-align: center;
}

.social-btn.telegram,
.social-btn.discord,
.social-btn.github,
.social-btn.team {
  background: #181c23;
}

.social-btn .icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  background-size: cover;
  background-repeat: no-repeat;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.social-btn.telegram .icon {
  background-image: url('https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/telegram.svg');
  filter: invert(56%) sepia(93%) saturate(747%) hue-rotate(163deg) brightness(97%) contrast(101%);
}
.social-btn.discord .icon,
.social-btn.team .icon {
  background-image: url('https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/discord.svg');
  filter: invert(54%) sepia(99%) saturate(749%) hue-rotate(196deg) brightness(97%) contrast(101%);
}
.social-btn.github .icon {
  background-image: url('https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/github.svg');
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.social-btn.team {
  display: block;
  width: calc(3 * 170px + 2rem);
  max-width: 100%;
  margin: 0.5rem auto 0 auto;
  text-align: center;
  justify-content: center;
}

.social-btn:hover, .social-btn:focus {
  box-shadow: 0 6px 24px #6941ec55;
  transform: translateY(-4px) scale(1.04);
  border: 2px solid #6941ec;
  opacity: 1;
}

.footer {
  width: 100%;
  background: #0d1117;
  color: #c9d1d9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  margin-top: 3rem;
  border-top: 1px solid #23272f;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.footer-logo img {
  height: 32px;
  width: auto;
  vertical-align: middle;
  transition: transform 0.2s;
}

.footer-logo:hover img {
  transform: scale(1.08) rotate(-5deg);
}

.footer-copyright {
  color: #6941ec;
  font-weight: 600;
}

.footer-status {
  color: #8b949e;
  font-size: 0.95em;
  margin-left: 0.7em;
}

.footer-social {
  display: flex;
  gap: 1.1rem;
}

.footer-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  box-shadow: none;
  background-color: transparent;
  border-radius: 0;
  opacity: 1;
  transition: transform 0.18s, filter 0.18s;
  filter: invert(77%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(90%) contrast(90%);
}
.footer-icon.telegram {
  background-image: url('https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/telegram.svg');
}
.footer-icon.discord {
  background-image: url('https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/discord.svg');
}
.footer-icon.github {
  background-image: url('https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/github.svg');
}
.footer-icon:hover {
  transform: scale(1.18);
  filter: invert(77%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(120%) contrast(90%);
}

@media (max-width: 700px) {
  .footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem 1rem;
    font-size: 0.95rem;
    gap: 1rem;
  }
  .footer-social {
    margin-top: 1rem;
  }
}

@media (max-width: 900px) {
  #work .projects-grid {
    grid-template-columns: 1fr;
  }
  .project {
    flex-direction: column;
    align-items: stretch;
  }
  .project-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

@media (max-width: 600px) {
  header {
    padding: 1rem;
  }

  nav a {
    margin-left: 1rem;
    font-size: 0.9rem;
  }

  section {
    padding: 3rem 1rem;
  }
  .social-buttons {
    flex-direction: column;
    gap: 0.7rem;
    align-items: center;
  }
  .social-btn {
    min-width: 0;
    width: 100%;
    max-width: 350px;
  }
  .social-btn.team {
    width: 100%;
    max-width: 350px;
  }
}
  .social-btn.team {
    width: 100%;
    max-width: 350px;
  }

[data-lang-key] {
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: opacity, transform;
}

[data-lang-key].fade-out {
  opacity: 0 !important;
  transform: translateY(-5px) !important;
}

[data-lang-key].fade-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.no-animation {
  transition: none !important;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  margin-left: 1.8rem;
  background: #161b22;
  border-radius: 6px;
  padding: 3px;
  border: 1px solid #30363d;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  --active-index: 0;
}

.lang-switcher:hover {
  box-shadow: 0 4px 15px rgba(105, 65, 236, 0.3);
  border-color: #6941ec;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #8b949e;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  min-width: 40px;
  text-align: center;
}

.lang-btn.active {
  color: #ffffff;
}

.lang-btn:hover:not(.active) {
  color: #c9d1d9;
}

.lang-switcher::before {
  content: '';
  position: absolute;
  width: 50%;
  height: calc(100% - 6px);
  background: #6941ec;
  border-radius: 4px;
  top: 3px;
  left: 3px;
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.lang-switcher.en-active::before,
html.lang-en .lang-switcher::before {
  transform: translateX(calc(100% - 6px));
}

.lang-switcher.switching::before {
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes glow {
  0% { box-shadow: 0 0 0 0 rgba(105, 65, 236, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(105, 65, 236, 0); }
  100% { box-shadow: 0 0 0 0 rgba(105, 65, 236, 0); }
}

.lang-switcher.switching {
  animation: glow 1s;
}

@media (max-width: 700px) {
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.8rem;
  }
  
  .lang-switcher {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

.project.pinned {
  grid-column: span 2;
}
@media (max-width: 900px) {
  .project.pinned {
    grid-column: span 1;
  }
  }


